GET | /sales/packages/{PackageId}/installments/calculate/{InstallmentPlanId} | Get customer's billing status |
---|
export class ApiDtoBase
{
public ApiKey: string;
public StoreId?: number;
public ChainId?: number;
public constructor(init?: Partial<ApiDtoBase>) { (Object as any).assign(this, init); }
}
export class CalculatePaymentPlanRequestDto extends ApiDtoBase
{
public InstallmentPlanId: number;
public PackageId: number;
public StartDate?: string;
public PromoCode: string;
public constructor(init?: Partial<CalculatePaymentPlanRequestDto>) { super(init); (Object as any).assign(this, init); }
}
export enum RestrictedResourceType
{
Store = 'Store',
Chain = 'Chain',
User = 'User',
Undefined = 'Undefined',
}
export class CalculatePaymentPlanRequest extends CalculatePaymentPlanRequestDto 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 ApiKey: string;
/**
* ID # of store to calculate plan for
*/
// @ApiMember(DataType="integer", Description="ID # of store to calculate plan for", IsRequired=true, Name="StoreId", ParameterType="query")
public StoreId: number;
/**
* Installment Plan to calculate a scheduel for
*/
// @ApiMember(DataType="integer", Description="Installment Plan to calculate a scheduel for", IsRequired=true, Name="InstallmentPlanId", ParameterType="path")
public InstallmentPlanId: number;
/**
* The package to calculate for
*/
// @ApiMember(DataType="integer", Description="The package to calculate for", IsRequired=true, Name="PackageId", ParameterType="path")
public PackageId: number;
/**
* Date to calculate schedule from. If not provided, will use today.
*/
// @ApiMember(DataType="datetime", Description="Date to calculate schedule from. If not provided, will use today.", Name="StartDate", ParameterType="query")
public StartDate?: string;
/**
* Promo code to apply a discount.
*/
// @ApiMember(DataType="string", Description="Promo code to apply a discount.", Name="PromoCode", ParameterType="query")
public PromoCode: string;
public RestrictedId?: number;
public RestrictedResourceType: RestrictedResourceType;
public constructor(init?: Partial<CalculatePaymentPlanRequest>) { super(init); (Object as any).assign(this, init); }
}
export class PaymentPlanInstallment
{
public PayToday: boolean;
public Amount: number;
public Taxed: boolean;
public TaxRate?: number;
public TaxAmount?: number;
public FeeName: string;
public DueDate: string;
public Total: string;
public SetupFeeId?: number;
public constructor(init?: Partial<PaymentPlanInstallment>) { (Object as any).assign(this, init); }
}
export class CalculatePaymentPlanResultDto
{
public PlanTotal: string;
public SubTotal: string;
public TaxRate?: number;
public EnhancementFee: string;
public EnhancementFeeTaxAmount: string;
public TaxEnhFee: boolean;
public Tax: string;
public TotalDueToday: string;
public Payments: PaymentPlanInstallment[];
public Fees: PaymentPlanInstallment[];
public IsEvergreen: boolean;
public RequirePaymentProfile: boolean;
public constructor(init?: Partial<CalculatePaymentPlanResultDto>) { (Object as any).assign(this, init); }
}
TypeScript CalculatePaymentPlanRequest 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/packages/{PackageId}/installments/calculate/{InstallmentPlanId} HTTP/1.1 Host: clubready.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CalculatePaymentPlanResultDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models"> <EnhancementFee>String</EnhancementFee> <Fees> <PaymentPlanInstallment> <Amount>0</Amount> <DueDate>0001-01-01T00:00:00</DueDate> <FeeName>String</FeeName> <PayToday>false</PayToday> <SetupFeeId>0</SetupFeeId> <TaxRate>0</TaxRate> <Taxed>false</Taxed> </PaymentPlanInstallment> </Fees> <IsEvergreen>false</IsEvergreen> <Payments> <PaymentPlanInstallment> <Amount>0</Amount> <DueDate>0001-01-01T00:00:00</DueDate> <FeeName>String</FeeName> <PayToday>false</PayToday> <SetupFeeId>0</SetupFeeId> <TaxRate>0</TaxRate> <Taxed>false</Taxed> </PaymentPlanInstallment> </Payments> <TaxEnhFee>false</TaxEnhFee> <TaxRate>0</TaxRate> </CalculatePaymentPlanResultDto>