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
import java.math.*
import java.util.*
import net.servicestack.client.*


open class CalculatePaymentPlanRequest : CalculatePaymentPlanRequestDto(), IRestrictedApiRequest
{
    /**
    * Api Key - grants access to resources
    */
    @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
    var ApiKey:String? = null

    /**
    * ID # of store to calculate plan for
    */
    @ApiMember(DataType="integer", Description="ID # of store to calculate plan for", IsRequired=true, Name="StoreId", ParameterType="query")
    var StoreId:Int? = null

    /**
    * Installment Plan to calculate a scheduel for
    */
    @ApiMember(DataType="integer", Description="Installment Plan to calculate a scheduel for", IsRequired=true, Name="InstallmentPlanId", ParameterType="path")
    var InstallmentPlanId:Int? = null

    /**
    * The package to calculate for
    */
    @ApiMember(DataType="integer", Description="The package to calculate for", IsRequired=true, Name="PackageId", ParameterType="path")
    var PackageId:Int? = null

    /**
    * 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")
    var StartDate:Date? = null

    /**
    * Promo code to apply a discount.
    */
    @ApiMember(DataType="string", Description="Promo code to apply a discount.", Name="PromoCode", ParameterType="query")
    var PromoCode:String? = null

    var RestrictedId:Int? = null
    var RestrictedResourceType:RestrictedResourceType? = null
}

open class CalculatePaymentPlanRequestDto : ApiDtoBase()
{
    var InstallmentPlanId:Int? = null
    var PackageId:Int? = null
    var StartDate:Date? = null
    var PromoCode:String? = null
}

open class ApiDtoBase
{
    var ApiKey:String? = null
    var StoreId:Int? = null
    var ChainId:Int? = null
}

enum class RestrictedResourceType
{
    Store,
    Chain,
    User,
    Undefined,
}

open class CalculatePaymentPlanResultDto
{
    var PlanTotal:String? = null
    var SubTotal:String? = null
    var TaxRate:Float? = null
    var EnhancementFee:String? = null
    var EnhancementFeeTaxAmount:String? = null
    var TaxEnhFee:Boolean? = null
    var Tax:String? = null
    var TotalDueToday:String? = null
    var Payments:ArrayList<PaymentPlanInstallment> = ArrayList<PaymentPlanInstallment>()
    var Fees:ArrayList<PaymentPlanInstallment> = ArrayList<PaymentPlanInstallment>()
    var IsEvergreen:Boolean? = null
    var RequirePaymentProfile:Boolean? = null
}

open class PaymentPlanInstallment
{
    var PayToday:Boolean? = null
    var Amount:BigDecimal? = null
    var Taxed:Boolean? = null
    var TaxRate:Float? = null
    var TaxAmount:BigDecimal? = null
    var FeeName:String? = null
    var DueDate:Date? = null
    var Total:String? = null
    var SetupFeeId:Int? = null
}

Kotlin 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>