A billing or usage period defined by a start and end date, used when calculating subscription usage and generating invoice line items. Instances are produced by KademiSubscriptionManager methods such as findUsagePeriod and passed on to tier calculation and invoicing methods so that every step of a billing run agrees on the same date range.


Properties

PropertyReturnsDescription
endDateEnd date of the period, exclusive. Usage and billing calculations treat this as the boundary up to but not including this date.
periodDescriptionStringHuman-readable description of the period, formatted as the start date to the day before the end date so that a customer viewing an invoice does not see it as billing into the first day of the next period. The value is computed once and cached on the instance.
startDateStart date of the period, inclusive.

Methods

getEnd()

Returns: Date

End date of the period, exclusive. Usage and billing calculations treat this as the boundary up to but not including this date.

getStart()

Returns: Date

Start date of the period, inclusive.

getPeriodDescription()

Returns: String

Human-readable description of the period, formatted as the start date to the day before the end date so that a customer viewing an invoice does not see it as billing into the first day of the next period. The value is computed once and cached on the instance.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.