To make the integration of the RESTful finance calulation service as simple as possible we have also created a VBScript class which consumes the service
that you can simply drop into your existing ASP Classic project.
Here you will find the neccessary files and documentation needed to integrate this class into your project.
Calling The Service
There are 8 available public functions in the YcleCalculation class, each detailed below.
The following function descriptions are using the format detailed below.
Function Name( Required Parameter, Optional Parameter )
Calculate
The
Calculate function has the following parameters and will perform a basic HP (Hire Purchase) calculation returning the calculation
response XML as a string.
Calculate(
cashPrice,
regDate )
ycle.Calculate( 25500, "01/05/2008" )
Parameter Description And Formatting
Calculate With Rate
The
CalculateWithRate function has the following parameters and will perform a HP (Hire Purchase) calculation using the supplied rate
returning the calculation response XML as a string.
CalculateWithRate(
cashPrice,
regDate,
rateType,
rate
)
ycle.CalculateWithRate( 15000, "01/05/2008", ycle.APR, 10.1 )
ycle.CalculateWithRate( 25500, "01/05/2008", ycle.Commission, 125 )
Parameter Description And Formatting
Calculate With Finance Options
The
CalculateWithFinanceOptions function has the following parameters and will perform a HP (Hire Purchase) calculation using the supplied finance options
returning the calculation response XML as a string.
CalculateWithFinanceOptions(
cashPrice,
regDate,
deposit,
term
)
ycle.CalculateWithFinanceOptions( 25500, "01/05/2008", 1250, 36 )
ycle.CalculateWithFinanceOptions( 15000, "01/05/2008", 1250, 24 )
Parameter Description And Formatting
Calculate With Finance Options And Rate
The
CalculateWithFinanceOptionsAndRate function has the following parameters and will perform a HP (Hire Purchase) calculation using the supplied finance options and rate
returning the calculation response XML as a string.
CalculateWithFinanceOptionsAndRate(
cashPrice,
regDate,
deposit,
term
rateType,
rate
)
ycle.CalculateWithFinanceOptionsAndRate( 15000, "01/05/2008", 1250, 36, ycle.APR, 10.1 )
ycle.CalculateWithFinanceOptionsAndRate( 25500, "01/05/2008", 1250, 24, ycle.Commission, 125 )
Parameter Description And Formatting
Calculate With RV
The
CalculateRV function has the following parameters and will perform a basic HP (Hire Purchase) and RV (Residual Value) based calculation returning the calculation
response XML as a string.
CalculateRV(
cashPrice,
regDate,
currentMileage,
capCode
)
ycle.CalculateRV( 25500, "01/05/2008", 12500, 'FOKA13ZC73HPIM' )
ycle.CalculateRV( 25500, "01/04/2008", 1200, 35165 )
Parameter Description And Formatting
Calculate With RV And Rate
The
CalculateRVWithRate function has the following parameters and will perform a HP (Hire Purchase) and RV (Residual Value) based calculation using the
supplied rate returning the calculation response XML as a string.
CalculateRVWithRate(
cashPrice,
regDate,
currentMileage,
capCode,
rateType,
rate
)
ycle.CalculateRVWithRate( 25500, "01/05/2008", 12500, 'FOKA13ZC73HPIM', ycle.APR, 9.8 );
ycle.CalculateRVWithRate( 15000, "01/05/2008", 16500, 35165, ycle.Commission, 150 );
Parameter Description And Formatting
Calculate With RV And Finance Options
The
CalculateRVWithFinanceOptions function has the following parameters and will perform a HP (Hire Purchase) and RV (Residual Value) based calculation using the
supplied finance options returning the calculation response XML as a string.
CalculateRVWithFinanceOptions(
cashPrice,
regDate,
currentMileage,
capCode,
deposit,
annualMileage,
term
)
ycle.CalculateRVWithFinanceOptions( 25500, "01/05/2008", 12500, 'FOKA13ZC73HPIM', 1000, 10000, 36 )
ycle.CalculateRVWithFinanceOptions( 15000, "01/05/2008", 16500, 35165, 500, 12000, 24 )
Parameter Description And Formatting
Calculate With RV And Finance Options And Rate
The
CalculateRVWithFinanceOptionsAndRate function has the following parameters and will perform a HP (Hire Purchase) and RV (Residual Value) based calculation using the
supplied finance options and rate returning the calculation response XML as a string.
CalculateRVWithFinanceOptionsAndRate(
cashPrice,
regDate,
currentMileage,
capCode,
deposit,
annualMileage,
term,
rateType,
rate
)
ycle.CalculateRVWithFinanceOptionsAndRate( 25500, "01/05/2008", 12500, 'FOKA13ZC73HPIM', 1000, 10000, 36, ycle.APR, 9.8 )
ycle.CalculateRVWithFinanceOptionsAndRate( 15000, "01/05/2008", 16500, 35165, 500, 12000, 24, ycle.Commission, 100 )
Parameter Description And Formatting
This needs to be a valid numeric value between 1000 and 1000000 (exclusive) with no currency signs or commas ( £ or , )
5999.00 (i.e. £5,999.00)
This needs to be a valid string representation of a date, typically of the format dd/mm/yyyy.
The order of the month and day will be dependant of the Time settings on the server,
so if this is set to a U.S. Time format, then the date will need to be in the format mm/dd/yyyy.
25/12/2008 (i.e. Christmas 2008)
This needs to be a valid numeric value between 0 and 1000000 (exclusive)
This needs to be either a valid 14-20 digit CapCode or a valid numeric CapId between 1000 and 1000000 (exclusive)
This needs to be a valid numeric value between 0 and 1000000 (exclusive) with no currency signs or commas( £ or , )
1250.00 (i.e. £1,250.00)
This needs to be a valid numeric value between 6000 and 30000 rounded to the nearest thousand
This needs to be a valid numeric value, expressed in months, between 24 and 60 inclusive.
A RateType property of the YcleCalulcation class has been created to make the selection easier. If supplied it needs to be one of the
following values, however this is an optional parameter (unless Rate is supplied). If not supplied the default type will be used of Commission.
This is optional. If not supplied the default of 0 will be used. If supplied this value will need to reflect either a commission or percentage
depending on the selected option above. The value needs to be a valid numeric value with currency signs, commas and percentage signs (£ or , or %)
removed.
100 (i.e. commission of £100)
7.9 (i.e. 7.9% or £7.90 dependant on rate type)