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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'CalculatePaymentPlanResultDto' using the custom 'csv' filter}One or more errors occurred.