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
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ClubReady.Web.Api.Sales.Model
Imports ClubReady.Core.Api.Models
Imports ClubReady.Web.Api

Namespace Global

    Namespace ClubReady.Core.Api.Models

        Public Partial Class ApiDtoBase
            Public Overridable Property ApiKey As String
            Public Overridable Property StoreId As Nullable(Of Integer)
            Public Overridable Property ChainId As Nullable(Of Integer)
        End Class

        Public Partial Class CalculatePaymentPlanRequestDto
            Inherits ApiDtoBase
            Public Overridable Property InstallmentPlanId As Integer
            Public Overridable Property PackageId As Integer
            Public Overridable Property StartDate As Nullable(Of Date)
            Public Overridable Property PromoCode As String
        End Class

        Public Partial Class CalculatePaymentPlanResultDto
            Public Sub New()
                Payments = New List(Of PaymentPlanInstallment)
                Fees = New List(Of PaymentPlanInstallment)
            End Sub

            Public Overridable Property PlanTotal As String
            Public Overridable Property SubTotal As String
            Public Overridable Property TaxRate As Nullable(Of Single)
            Public Overridable Property EnhancementFee As String
            Public Overridable Property EnhancementFeeTaxAmount As String
            Public Overridable Property TaxEnhFee As Boolean
            Public Overridable Property Tax As String
            Public Overridable Property TotalDueToday As String
            Public Overridable Property Payments As List(Of PaymentPlanInstallment)
            Public Overridable Property Fees As List(Of PaymentPlanInstallment)
            Public Overridable Property IsEvergreen As Boolean
            Public Overridable Property RequirePaymentProfile As Boolean
        End Class

        Public Partial Class PaymentPlanInstallment
            Public Overridable Property PayToday As Boolean
            Public Overridable Property Amount As Decimal
            Public Overridable Property Taxed As Boolean
            Public Overridable Property TaxRate As Nullable(Of Single)
            Public Overridable Property TaxAmount As Nullable(Of Decimal)
            Public Overridable Property FeeName As String
            Public Overridable Property DueDate As Date
            Public Overridable Property Total As String
            Public Overridable Property SetupFeeId As Nullable(Of Integer)
        End Class
    End Namespace

    Namespace ClubReady.Web.Api

        Public Enum RestrictedResourceType
            Store
            Chain
            User
            Undefined
        End Enum
    End Namespace

    Namespace ClubReady.Web.Api.Sales.Model

        Public Partial Class CalculatePaymentPlanRequest
            Inherits CalculatePaymentPlanRequestDto
            Implements IRestrictedApiRequest
            '''<Summary>
            '''Api Key - grants access to resources
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Api Key - grants access to resources", IsRequired:=true, Name:="ApiKey", ParameterType:="query")>
            Public Overridable Property ApiKey As String

            '''<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")>
            Public Overridable Property StoreId As Nullable(Of Integer)

            '''<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")>
            Public Overridable Property InstallmentPlanId As Integer

            '''<Summary>
            '''The package to calculate for
            '''</Summary>
            <ApiMember(DataType:="integer", Description:="The package to calculate for", IsRequired:=true, Name:="PackageId", ParameterType:="path")>
            Public Overridable Property PackageId As Integer

            '''<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")>
            Public Overridable Property StartDate As Nullable(Of Date)

            '''<Summary>
            '''Promo code to apply a discount.
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Promo code to apply a discount.", Name:="PromoCode", ParameterType:="query")>
            Public Overridable Property PromoCode As String

            Public Overridable Property RestrictedId As Nullable(Of Integer)
            Public Overridable Property RestrictedResourceType As RestrictedResourceType
        End Class
    End Namespace
End Namespace

VB.NET 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.