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
| Property | Returns | Description |
|---|---|---|
| end | Date | End date of the period, exclusive. Usage and billing calculations treat this as the boundary up to but not including this date. |
| periodDescription | 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. |
| start | Date | Start 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.