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.*;

public class dtos
{

    public static 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 String ApiKey = 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")
        public Integer StoreId = 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")
        public Integer InstallmentPlanId = null;

        /**
        * The package to calculate for
        */
        @ApiMember(DataType="integer", Description="The package to calculate for", IsRequired=true, Name="PackageId", ParameterType="path")
        public Integer PackageId = 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")
        public Date StartDate = null;

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

        public Integer RestrictedId = null;
        public RestrictedResourceType RestrictedResourceType = null;
        
        public String getApiKey() { return ApiKey; }
        public CalculatePaymentPlanRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public Integer getStoreId() { return StoreId; }
        public CalculatePaymentPlanRequest setStoreId(Integer value) { this.StoreId = value; return this; }
        public Integer getInstallmentPlanId() { return InstallmentPlanId; }
        public CalculatePaymentPlanRequest setInstallmentPlanId(Integer value) { this.InstallmentPlanId = value; return this; }
        public Integer getPackageId() { return PackageId; }
        public CalculatePaymentPlanRequest setPackageId(Integer value) { this.PackageId = value; return this; }
        public Date getStartDate() { return StartDate; }
        public CalculatePaymentPlanRequest setStartDate(Date value) { this.StartDate = value; return this; }
        public String getPromoCode() { return PromoCode; }
        public CalculatePaymentPlanRequest setPromoCode(String value) { this.PromoCode = value; return this; }
        public Integer getRestrictedId() { return RestrictedId; }
        public CalculatePaymentPlanRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
        public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
        public CalculatePaymentPlanRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
    }

    public static class CalculatePaymentPlanRequestDto extends ApiDtoBase
    {
        public Integer InstallmentPlanId = null;
        public Integer PackageId = null;
        public Date StartDate = null;
        public String PromoCode = null;
        
        public Integer getInstallmentPlanId() { return InstallmentPlanId; }
        public CalculatePaymentPlanRequestDto setInstallmentPlanId(Integer value) { this.InstallmentPlanId = value; return this; }
        public Integer getPackageId() { return PackageId; }
        public CalculatePaymentPlanRequestDto setPackageId(Integer value) { this.PackageId = value; return this; }
        public Date getStartDate() { return StartDate; }
        public CalculatePaymentPlanRequestDto setStartDate(Date value) { this.StartDate = value; return this; }
        public String getPromoCode() { return PromoCode; }
        public CalculatePaymentPlanRequestDto setPromoCode(String value) { this.PromoCode = value; return this; }
    }

    public static class ApiDtoBase
    {
        public String ApiKey = null;
        public Integer StoreId = null;
        public Integer ChainId = null;
        
        public String getApiKey() { return ApiKey; }
        public ApiDtoBase setApiKey(String value) { this.ApiKey = value; return this; }
        public Integer getStoreId() { return StoreId; }
        public ApiDtoBase setStoreId(Integer value) { this.StoreId = value; return this; }
        public Integer getChainId() { return ChainId; }
        public ApiDtoBase setChainId(Integer value) { this.ChainId = value; return this; }
    }

    public static enum RestrictedResourceType
    {
        Store,
        Chain,
        User,
        Undefined;
    }

    public static class CalculatePaymentPlanResultDto
    {
        public String PlanTotal = null;
        public String SubTotal = null;
        public Float TaxRate = null;
        public String EnhancementFee = null;
        public String EnhancementFeeTaxAmount = null;
        public Boolean TaxEnhFee = null;
        public String Tax = null;
        public String TotalDueToday = null;
        public ArrayList<PaymentPlanInstallment> Payments = null;
        public ArrayList<PaymentPlanInstallment> Fees = null;
        public Boolean IsEvergreen = null;
        public Boolean RequirePaymentProfile = null;
        
        public String getPlanTotal() { return PlanTotal; }
        public CalculatePaymentPlanResultDto setPlanTotal(String value) { this.PlanTotal = value; return this; }
        public String getSubTotal() { return SubTotal; }
        public CalculatePaymentPlanResultDto setSubTotal(String value) { this.SubTotal = value; return this; }
        public Float getTaxRate() { return TaxRate; }
        public CalculatePaymentPlanResultDto setTaxRate(Float value) { this.TaxRate = value; return this; }
        public String getEnhancementFee() { return EnhancementFee; }
        public CalculatePaymentPlanResultDto setEnhancementFee(String value) { this.EnhancementFee = value; return this; }
        public String getEnhancementFeeTaxAmount() { return EnhancementFeeTaxAmount; }
        public CalculatePaymentPlanResultDto setEnhancementFeeTaxAmount(String value) { this.EnhancementFeeTaxAmount = value; return this; }
        public Boolean isTaxEnhFee() { return TaxEnhFee; }
        public CalculatePaymentPlanResultDto setTaxEnhFee(Boolean value) { this.TaxEnhFee = value; return this; }
        public String getTax() { return Tax; }
        public CalculatePaymentPlanResultDto setTax(String value) { this.Tax = value; return this; }
        public String getTotalDueToday() { return TotalDueToday; }
        public CalculatePaymentPlanResultDto setTotalDueToday(String value) { this.TotalDueToday = value; return this; }
        public ArrayList<PaymentPlanInstallment> getPayments() { return Payments; }
        public CalculatePaymentPlanResultDto setPayments(ArrayList<PaymentPlanInstallment> value) { this.Payments = value; return this; }
        public ArrayList<PaymentPlanInstallment> getFees() { return Fees; }
        public CalculatePaymentPlanResultDto setFees(ArrayList<PaymentPlanInstallment> value) { this.Fees = value; return this; }
        public Boolean getIsEvergreen() { return IsEvergreen; }
        public CalculatePaymentPlanResultDto setIsEvergreen(Boolean value) { this.IsEvergreen = value; return this; }
        public Boolean isRequirePaymentProfile() { return RequirePaymentProfile; }
        public CalculatePaymentPlanResultDto setRequirePaymentProfile(Boolean value) { this.RequirePaymentProfile = value; return this; }
    }

    public static class PaymentPlanInstallment
    {
        public Boolean PayToday = null;
        public BigDecimal Amount = null;
        public Boolean Taxed = null;
        public Float TaxRate = null;
        public BigDecimal TaxAmount = null;
        public String FeeName = null;
        public Date DueDate = null;
        public String Total = null;
        public Integer SetupFeeId = null;
        
        public Boolean isPayToday() { return PayToday; }
        public PaymentPlanInstallment setPayToday(Boolean value) { this.PayToday = value; return this; }
        public BigDecimal getAmount() { return Amount; }
        public PaymentPlanInstallment setAmount(BigDecimal value) { this.Amount = value; return this; }
        public Boolean isTaxed() { return Taxed; }
        public PaymentPlanInstallment setTaxed(Boolean value) { this.Taxed = value; return this; }
        public Float getTaxRate() { return TaxRate; }
        public PaymentPlanInstallment setTaxRate(Float value) { this.TaxRate = value; return this; }
        public BigDecimal getTaxAmount() { return TaxAmount; }
        public PaymentPlanInstallment setTaxAmount(BigDecimal value) { this.TaxAmount = value; return this; }
        public String getFeeName() { return FeeName; }
        public PaymentPlanInstallment setFeeName(String value) { this.FeeName = value; return this; }
        public Date getDueDate() { return DueDate; }
        public PaymentPlanInstallment setDueDate(Date value) { this.DueDate = value; return this; }
        public String getTotal() { return Total; }
        public PaymentPlanInstallment setTotal(String value) { this.Total = value; return this; }
        public Integer getSetupFeeId() { return SetupFeeId; }
        public PaymentPlanInstallment setSetupFeeId(Integer value) { this.SetupFeeId = value; return this; }
    }

}

Java 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: www.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>