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 |
|
a breakdown of how an actual payment is apportioned to principal, fee, interest and charges |
|
a generated payment, where applicable |
|
statistics resulting from the simple schedule calculations |
|
when calculating the level payments, whether the final payment should be lower or higher than the level payment |
|
parameters for creating a payment schedule |
|
how to treat scheduled payments |
|
whether a payment plan is generated according to a regular schedule or is an irregular array of payments |
|
|
|
a scheduled payment item, with running calculations of interest and principal balance |
|
a schedule of payments, with statistics |
|
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 |
|
a breakdown of how an actual payment is apportioned to principal, fee, interest and charges |
|
a regular schedule based on a unit-period config with a specific number of payments with an auto-calculated amount |
|
|
|
a regular schedule based on a unit-period config with a specific number of payments of a specified amount |
|
a generated payment, where applicable |
|
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 |
|
parameters for creating a payment schedule |
|
how to treat scheduled payments |
|
the status of a payment made by the customer |
|
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 |
|
a scheduled payment item, with running calculations of interest and principal balance |
|
a schedule of payments, with statistics |
Functions and values
Function or value |
Description
|
Full Usage:
adjustFinalPayment finalScheduledPaymentDay isAutoGenerateSchedule simpleItems
Parameters:
int<MeasureProduct<OffsetDay, MeasureOne>>
isAutoGenerateSchedule : bool
simpleItems : SimpleItem array
Returns: SimpleItem 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 sp interestMethod payment previousItem day
Parameters:
Parameters
interestMethod : Method
payment : int64<MeasureProduct<Cent, MeasureOne>>
previousItem : SimpleItem
day : int<MeasureProduct<OffsetDay, MeasureOne>>
Returns: decimal<MeasureProduct<Cent, MeasureOne>>
|
|
Full Usage:
calculateLevelPayment paymentCount paymentRounding principal fee interest
Parameters:
int
paymentRounding : Rounding
principal : int64<MeasureProduct<Cent, MeasureOne>>
fee : int64<MeasureProduct<Cent, MeasureOne>>
interest : decimal<MeasureProduct<Cent, MeasureOne>>
Returns: int64<MeasureProduct<Cent, MeasureOne>>
|
|
Full Usage:
equaliseInterest sp paymentDays firstItem paymentCount feeTotal paymentMap stateOption
Parameters:
Parameters
paymentDays : int<MeasureProduct<OffsetDay, MeasureOne>> array
firstItem : SimpleItem
paymentCount : int
feeTotal : int64<MeasureProduct<Cent, MeasureOne>>
paymentMap : Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ScheduledPayment>
stateOption : EqualiseInterestState voption
Returns: (SimpleItem array * EqualiseInterestState voption) option
|
|
Full Usage:
generateItem sp interestMethod scheduledPayment previousItem day
Parameters:
Parameters
interestMethod : Method
scheduledPayment : ScheduledPayment
previousItem : SimpleItem
day : int<MeasureProduct<OffsetDay, MeasureOne>>
Returns: SimpleItem
|
|
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 sp paymentDays firstItem roughPayment
Parameters:
Parameters
paymentDays : int<MeasureProduct<OffsetDay, MeasureOne>> array
firstItem : SimpleItem
roughPayment : decimal
Returns: decimal * decimal
|
|
Full Usage:
mergeScheduledPayments scheduledPayments
Parameters:
(int<MeasureProduct<OffsetDay, MeasureOne>> * ScheduledPayment) array
Returns: Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ScheduledPayment>
|
merges scheduled payments, determining the currently valid original and rescheduled payments, and preserving a record of any previous payments that have been superseded
|
Full Usage:
toValueOption _arg1
Parameters:
'a option
Returns: 'a voption
|
convert an option to a value option
|
Full Usage:
totalAddOnInterest sp finalPaymentDay
Parameters:
Parameters
finalPaymentDay : int<MeasureProduct<OffsetDay, MeasureOne>>
Returns: int64<MeasureProduct<Cent, MeasureOne>>
|
|