GET | /sales/members/{MemberId}/status | Get customer's billing status |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubReady.Web.Api.Sales.Model;
using ClubReady.Core.Api.Models;
using ClubReady.Web.Api;
using ClubReady.Core.Sales.Models;
using ClubReady.Core.Data.ClubReady;
namespace ClubReady.Core.Api.Models
{
public partial class ApiDtoBase
{
public virtual string ApiKey { get; set; }
public virtual int? StoreId { get; set; }
public virtual int? ChainId { get; set; }
}
public partial class GetBillingStatusRequestDto
: ApiDtoBase
{
public virtual int MemberId { get; set; }
}
}
namespace ClubReady.Core.Data.ClubReady
{
[DataContract]
public partial class GetMemberBillingStatus_Result
{
[DataMember]
public virtual string FullName { get; set; }
[DataMember]
public virtual string MemberStatus { get; set; }
[DataMember]
public virtual string HomeClub { get; set; }
[DataMember]
public virtual decimal? BalanceDue { get; set; }
[DataMember]
public virtual int? StoreID { get; set; }
}
}
namespace ClubReady.Core.Sales.Models
{
public partial class MemberBillingStatus
: GetMemberBillingStatus_Result
{
public MemberBillingStatus()
{
Invoices = new List<MemberBillingStatusInvoice>{};
}
public virtual List<MemberBillingStatusInvoice> Invoices { get; set; }
public virtual int UserTypeId { get; set; }
public virtual string UserTypeName { get; set; }
public virtual int? NewUserId { get; set; }
}
public partial class MemberBillingStatusInvoice
{
public virtual int InvoiceId { get; set; }
public virtual string Status { get; set; }
public virtual short StatusId { get; set; }
public virtual decimal AmountDue { get; set; }
public virtual decimal SalesTaxDue { get; set; }
public virtual DateTime PaymentDue { get; set; }
public virtual DateTime? PaymentMade { get; set; }
public virtual string PackageName { get; set; }
}
}
namespace ClubReady.Web.Api
{
public enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
}
namespace ClubReady.Web.Api.Sales.Model
{
public partial class GetBillingStatusRequest
: GetBillingStatusRequestDto, IRestrictedApiRequest
{
///<summary>
///Api Key - grants access to resources
///</summary>
[ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")]
public virtual string ApiKey { get; set; }
///<summary>
///Store ID # member belongs to
///</summary>
[ApiMember(DataType="integer", Description="Store ID # member belongs to", IsRequired=true, Name="StoreId", ParameterType="query")]
public virtual int? StoreId { get; set; }
///<summary>
///ID of the member to lookup
///</summary>
[ApiMember(DataType="integer", Description="ID of the member to lookup", IsRequired=true, Name="MemberId", ParameterType="path")]
public virtual int MemberId { get; set; }
public virtual int? RestrictedId { get; set; }
public virtual RestrictedResourceType RestrictedResourceType { get; set; }
}
}
C# 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>