ClubReady Api

<back to all web services

CalculatePaymentPlanRequest

The following routes are available for this service:
GET/sales/packages/{PackageId}/installments/calculate/{InstallmentPlanId}Get customer's billing status
namespace ClubReady.Core.Api.Models

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ApiDtoBase() = 
        member val ApiKey:String = null with get,set
        member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ChainId:Nullable<Int32> = new Nullable<Int32>() with get,set

    [<AllowNullLiteral>]
    type CalculatePaymentPlanRequestDto() = 
        inherit ApiDtoBase()
        member val InstallmentPlanId:Int32 = new Int32() with get,set
        member val PackageId:Int32 = new Int32() with get,set
        member val StartDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val PromoCode:String = null with get,set

    type RestrictedResourceType =
        | Store = 0
        | Chain = 1
        | User = 2
        | Undefined = 3

    [<AllowNullLiteral>]
    type CalculatePaymentPlanRequest() = 
        inherit CalculatePaymentPlanRequestDto()
        ///<summary>
        ///Api Key - grants access to resources
        ///</summary>
        [<ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")>]
        member val ApiKey:String = null with get,set

        ///<summary>
        ///ID # of store to calculate plan for
        ///</summary>
        [<ApiMember(DataType="integer", Description="ID # of store to calculate plan for", IsRequired=true, Name="StoreId", ParameterType="query")>]
        member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Installment Plan to calculate a scheduel for
        ///</summary>
        [<ApiMember(DataType="integer", Description="Installment Plan to calculate a scheduel for", IsRequired=true, Name="InstallmentPlanId", ParameterType="path")>]
        member val InstallmentPlanId:Int32 = new Int32() with get,set

        ///<summary>
        ///The package to calculate for
        ///</summary>
        [<ApiMember(DataType="integer", Description="The package to calculate for", IsRequired=true, Name="PackageId", ParameterType="path")>]
        member val PackageId:Int32 = new Int32() with get,set

        ///<summary>
        ///Date to calculate schedule from. If not provided, will use today.
        ///</summary>
        [<ApiMember(DataType="datetime", Description="Date to calculate schedule from. If not provided, will use today.", Name="StartDate", ParameterType="query")>]
        member val StartDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///Promo code to apply a discount.
        ///</summary>
        [<ApiMember(DataType="string", Description="Promo code to apply a discount.", Name="PromoCode", ParameterType="query")>]
        member val PromoCode:String = null with get,set

        member val RestrictedId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val RestrictedResourceType:RestrictedResourceType = new RestrictedResourceType() with get,set

    [<AllowNullLiteral>]
    type PaymentPlanInstallment() = 
        member val PayToday:Boolean = new Boolean() with get,set
        member val Amount:Decimal = new Decimal() with get,set
        member val Taxed:Boolean = new Boolean() with get,set
        member val TaxRate:Nullable<Single> = new Nullable<Single>() with get,set
        member val TaxAmount:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val FeeName:String = null with get,set
        member val DueDate:DateTime = new DateTime() with get,set
        member val Total:String = null with get,set
        member val SetupFeeId:Nullable<Int32> = new Nullable<Int32>() with get,set

    [<AllowNullLiteral>]
    type CalculatePaymentPlanResultDto() = 
        member val PlanTotal:String = null with get,set
        member val SubTotal:String = null with get,set
        member val TaxRate:Nullable<Single> = new Nullable<Single>() with get,set
        member val EnhancementFee:String = null with get,set
        member val EnhancementFeeTaxAmount:String = null with get,set
        member val TaxEnhFee:Boolean = new Boolean() with get,set
        member val Tax:String = null with get,set
        member val TotalDueToday:String = null with get,set
        member val Payments:ResizeArray<PaymentPlanInstallment> = new ResizeArray<PaymentPlanInstallment>() with get,set
        member val Fees:ResizeArray<PaymentPlanInstallment> = new ResizeArray<PaymentPlanInstallment>() with get,set
        member val IsEvergreen:Boolean = new Boolean() with get,set
        member val RequirePaymentProfile:Boolean = new Boolean() with get,set

F# CalculatePaymentPlanRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>