Scheduling Module
functions for generating a regular payment schedule, with payment amounts, interest and APR
Types and nested modules
Type/Module | Description |
an actual payment made by the customer, optionally including metadata such as bank references etc. |
|
the status of the payment, allowing for delays due to payment-provider processing times |
|
parameters required for amortisation |
|
a scheduled payment item, with running calculations of interest and principal balance |
|
parameters for creating a payment schedule |
|
a schedule of payments, with statistics |
|
statistics resulting from the basic schedule calculations |
|
when calculating the level payments, whether the final payment should be lower or higher than the level payment |
|
|
|
whether a payment plan is generated according to a regular schedule or is an irregular array of payments |
|
|
|
an actual payment made by the customer, optionally including metadata such as bank references etc. |
|
the status of the payment, allowing for delays due to payment-provider processing times |
|
parameters required for applying payments and amortisation |
|
a regular schedule based on a unit-period config with a specific number of payments with an auto-calculated amount |
|
a scheduled payment item, with running calculations of interest and principal balance |
|
parameters for creating a payment schedule |
|
a schedule of payments, with statistics |
|
a regular schedule based on a unit-period config with a specific number of payments of a specified amount |
|
final statistics based on the payments being made on time and in full |
|
|
|
when calculating the level payments, whether the final payment should be lower or higher than the level payment |
|
how to handle cases where the payment due is less than the minimum that payment providers can process |
|
basic schedule generation parameters and advanced parameters for amortisation |
|
a rescheduled payment, including the day on which the payment was created |
|
whether a payment plan is generated according to a regular schedule or is an irregular array of payments |
|
the type of the schedule; for scheduled payments, this affects how any payment due is calculated |
|
any original or rescheduled payment, affecting how any payment due is calculated |
|
whether to stick to scheduled payment amounts or add charges and interest to them |
|
the intended day on which to quote a settlement |
Functions and values
Function or value |
Description
|
Full Usage:
adjustFinalPayment finalScheduledPaymentDay isAutoGenerateSchedule basicItems
Parameters:
int<MeasureProduct<OffsetDay, MeasureOne>>
isAutoGenerateSchedule : bool
basicItems : BasicItem array
Returns: BasicItem array
|
handle any principal balance overpayment (due to rounding) on the final payment of a schedule
|
|
calculates the number of days between two offset days on which interest is chargeable
|
Full Usage:
calculateInterest bp interestMethod payment previousItem day
Parameters:
BasicParameters
interestMethod : Method
payment : int64<MeasureProduct<Cent, MeasureOne>>
previousItem : BasicItem
day : int<MeasureProduct<OffsetDay, MeasureOne>>
Returns: decimal<MeasureProduct<Cent, MeasureOne>>
|
|
Full Usage:
calculateLevelPayment principal fee interest paymentCount paymentRounding
Parameters:
int64<MeasureProduct<Cent, MeasureOne>>
fee : int64<MeasureProduct<Cent, MeasureOne>>
interest : decimal<MeasureProduct<Cent, MeasureOne>>
paymentCount : int
paymentRounding : Rounding
Returns: int64<MeasureProduct<Cent, MeasureOne>>
|
|
Full Usage:
equaliseInterest bp paymentDays firstItem paymentCount feeTotal paymentMap state
Parameters:
BasicParameters
paymentDays : int<MeasureProduct<OffsetDay, MeasureOne>> array
firstItem : BasicItem
paymentCount : int
feeTotal : int64<MeasureProduct<Cent, MeasureOne>>
paymentMap : PaymentMap
state : InterestBalance voption
Returns: (BasicItem array * InterestBalance voption) option
|
|
Full Usage:
generateItem bp interestMethod scheduledPayment previousItem day
Parameters:
BasicParameters
interestMethod : Method
scheduledPayment : ScheduledPayment
previousItem : BasicItem
day : int<MeasureProduct<OffsetDay, MeasureOne>>
Returns: BasicItem
|
|
Full Usage:
generatePaymentMap startDate paymentSchedule
Parameters:
Date
paymentSchedule : ScheduleConfig
Returns: Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ScheduledPayment>
|
generates a map of offset days and payments based on a start date and payment schedule
|
Full Usage:
generatePaymentValue bp paymentDays firstItem roughPayment
Parameters:
BasicParameters
paymentDays : int<MeasureProduct<OffsetDay, MeasureOne>> array
firstItem : BasicItem
roughPayment : decimal
Returns: decimal * decimal
|
|
Full Usage:
toValueOption _arg1
Parameters:
'a option
Returns: 'a voption
|
convert an option to a value option
|
Full Usage:
totalAddOnInterest bp finalPaymentDay
Parameters:
BasicParameters
finalPaymentDay : int<MeasureProduct<OffsetDay, MeasureOne>>
Returns: int64<MeasureProduct<Cent, MeasureOne>>
|
|