GET | /sales/members/{MemberId}/status | Get customer's billing status |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetBillingStatusRequest extends GetBillingStatusRequestDto 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;
/**
* Store ID # member belongs to
*/
@ApiMember(DataType="integer", Description="Store ID # member belongs to", IsRequired=true, Name="StoreId", ParameterType="query")
public Integer StoreId = null;
/**
* ID of the member to lookup
*/
@ApiMember(DataType="integer", Description="ID of the member to lookup", IsRequired=true, Name="MemberId", ParameterType="path")
public Integer MemberId = null;
public Integer RestrictedId = null;
public RestrictedResourceType RestrictedResourceType = null;
public String getApiKey() { return ApiKey; }
public GetBillingStatusRequest setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public GetBillingStatusRequest setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getMemberId() { return MemberId; }
public GetBillingStatusRequest setMemberId(Integer value) { this.MemberId = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public GetBillingStatusRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public GetBillingStatusRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
}
public static class GetBillingStatusRequestDto extends ApiDtoBase
{
public Integer MemberId = null;
public Integer getMemberId() { return MemberId; }
public GetBillingStatusRequestDto setMemberId(Integer value) { this.MemberId = 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;
}
public static class MemberBillingStatus extends GetMemberBillingStatus_Result
{
public ArrayList<MemberBillingStatusInvoice> Invoices = null;
public Integer UserTypeId = null;
public String UserTypeName = null;
public Integer NewUserId = null;
public ArrayList<MemberBillingStatusInvoice> getInvoices() { return Invoices; }
public MemberBillingStatus setInvoices(ArrayList<MemberBillingStatusInvoice> value) { this.Invoices = value; return this; }
public Integer getUserTypeId() { return UserTypeId; }
public MemberBillingStatus setUserTypeId(Integer value) { this.UserTypeId = value; return this; }
public String getUserTypeName() { return UserTypeName; }
public MemberBillingStatus setUserTypeName(String value) { this.UserTypeName = value; return this; }
public Integer getNewUserId() { return NewUserId; }
public MemberBillingStatus setNewUserId(Integer value) { this.NewUserId = value; return this; }
}
@DataContract
public static class GetMemberBillingStatus_Result
{
@DataMember
public String FullName = null;
@DataMember
public String MemberStatus = null;
@DataMember
public String HomeClub = null;
@DataMember
public BigDecimal BalanceDue = null;
@DataMember
public Integer StoreID = null;
public String getFullName() { return FullName; }
public GetMemberBillingStatus_Result setFullName(String value) { this.FullName = value; return this; }
public String getMemberStatus() { return MemberStatus; }
public GetMemberBillingStatus_Result setMemberStatus(String value) { this.MemberStatus = value; return this; }
public String getHomeClub() { return HomeClub; }
public GetMemberBillingStatus_Result setHomeClub(String value) { this.HomeClub = value; return this; }
public BigDecimal getBalanceDue() { return BalanceDue; }
public GetMemberBillingStatus_Result setBalanceDue(BigDecimal value) { this.BalanceDue = value; return this; }
public Integer getStoreID() { return StoreID; }
public GetMemberBillingStatus_Result setStoreID(Integer value) { this.StoreID = value; return this; }
}
public static class MemberBillingStatusInvoice
{
public Integer InvoiceId = null;
public String Status = null;
public Short StatusId = null;
public BigDecimal AmountDue = null;
public BigDecimal SalesTaxDue = null;
public Date PaymentDue = null;
public Date PaymentMade = null;
public String PackageName = null;
public Integer getInvoiceId() { return InvoiceId; }
public MemberBillingStatusInvoice setInvoiceId(Integer value) { this.InvoiceId = value; return this; }
public String getStatus() { return Status; }
public MemberBillingStatusInvoice setStatus(String value) { this.Status = value; return this; }
public Short getStatusId() { return StatusId; }
public MemberBillingStatusInvoice setStatusId(Short value) { this.StatusId = value; return this; }
public BigDecimal getAmountDue() { return AmountDue; }
public MemberBillingStatusInvoice setAmountDue(BigDecimal value) { this.AmountDue = value; return this; }
public BigDecimal getSalesTaxDue() { return SalesTaxDue; }
public MemberBillingStatusInvoice setSalesTaxDue(BigDecimal value) { this.SalesTaxDue = value; return this; }
public Date getPaymentDue() { return PaymentDue; }
public MemberBillingStatusInvoice setPaymentDue(Date value) { this.PaymentDue = value; return this; }
public Date getPaymentMade() { return PaymentMade; }
public MemberBillingStatusInvoice setPaymentMade(Date value) { this.PaymentMade = value; return this; }
public String getPackageName() { return PackageName; }
public MemberBillingStatusInvoice setPackageName(String value) { this.PackageName = value; return this; }
}
}
Java GetBillingStatusRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /sales/members/{MemberId}/status HTTP/1.1 Host: clubready.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <MemberBillingStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Sales.Models"> <BalanceDue xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Data.ClubReady">0</BalanceDue> <FullName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Data.ClubReady">String</FullName> <HomeClub xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Data.ClubReady">String</HomeClub> <MemberStatus xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Data.ClubReady">String</MemberStatus> <StoreID xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Data.ClubReady">0</StoreID> <Invoices> <MemberBillingStatusInvoice> <AmountDue>0</AmountDue> <InvoiceId>0</InvoiceId> <PackageName>String</PackageName> <PaymentDue>0001-01-01T00:00:00</PaymentDue> <PaymentMade>0001-01-01T00:00:00</PaymentMade> <SalesTaxDue>0</SalesTaxDue> <Status>String</Status> <StatusId>0</StatusId> </MemberBillingStatusInvoice> </Invoices> <NewUserId>0</NewUserId> <UserTypeId>0</UserTypeId> <UserTypeName>String</UserTypeName> </MemberBillingStatus>