POST | /sales/member/{MemberId}/payment/makepayment | Make a Payment for a Member |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class MakePayment extends MakePaymentRequest implements IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
@ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
public String ApiKey = null;
/**
* ID # of store member belongs to
*/
@ApiMember(DataType="integer", Description="ID # of store member belongs to", IsRequired=true, Name="StoreId", ParameterType="query")
public Integer StoreId = null;
/**
* ID # of chain member belongs to
*/
@ApiMember(DataType="integer", Description="ID # of chain member belongs to", Name="ChainId", ParameterType="query")
public Integer ChainId = null;
/**
* Member ID of user to make payment for
*/
@ApiMember(DataType="integer", Description="Member ID of user to make payment for", IsRequired=true, Name="MemberId", ParameterType="path")
public Integer MemberId = null;
/**
* Amount of the payment, including sales tax
*/
@ApiMember(DataType="decimal", Description="Amount of the payment, including sales tax", IsRequired=true, Name="Amount", ParameterType="query")
public BigDecimal Amount = null;
/**
* Invoice ID to be paid
*/
@ApiMember(DataType="integer", Description="Invoice ID to be paid", IsRequired=true, Name="Invoice", ParameterType="query")
public ArrayList<Integer> Invoice = null;
public Integer RestrictedId = null;
public RestrictedResourceType RestrictedResourceType = null;
public String getApiKey() { return ApiKey; }
public MakePayment setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public MakePayment setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public MakePayment setChainId(Integer value) { this.ChainId = value; return this; }
public Integer getMemberId() { return MemberId; }
public MakePayment setMemberId(Integer value) { this.MemberId = value; return this; }
public BigDecimal getAmount() { return Amount; }
public MakePayment setAmount(BigDecimal value) { this.Amount = value; return this; }
public ArrayList<Integer> getInvoice() { return Invoice; }
public MakePayment setInvoice(ArrayList<Integer> value) { this.Invoice = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public MakePayment setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public MakePayment setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
}
public static class MakePaymentRequest extends ApiDtoBase
{
public Integer UserId = null;
public BigDecimal Amount = null;
public ArrayList<Integer> Invoice = null;
public Integer getUserId() { return UserId; }
public MakePaymentRequest setUserId(Integer value) { this.UserId = value; return this; }
public BigDecimal getAmount() { return Amount; }
public MakePaymentRequest setAmount(BigDecimal value) { this.Amount = value; return this; }
public ArrayList<Integer> getInvoice() { return Invoice; }
public MakePaymentRequest setInvoice(ArrayList<Integer> value) { this.Invoice = value; return this; }
}
public static class ApiDtoBase
{
public String ApiKey = null;
public Integer StoreId = null;
public Integer ChainId = null;
public String getApiKey() { return ApiKey; }
public ApiDtoBase setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public ApiDtoBase setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public ApiDtoBase setChainId(Integer value) { this.ChainId = value; return this; }
}
public static enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sales/member/{MemberId}/payment/makepayment HTTP/1.1
Host: clubready.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ApiKey: String,
StoreId: 0,
ChainId: 0,
MemberId: 0,
Amount: 0,
Invoice:
[
0
],
RestrictedId: 0,
RestrictedResourceType: Chain,
UserId: 0
}