getRateForCohort
function getRateForCohort(input, options?): CohortRateResult;Defined in: core/rates.ts:120
Resolves the annual rate that applies to a cohort (defined by
subscriptionDate) for the quarter that contains asOfDate (defaults to
today, UTC).
The quarter is anchored to the subscription date: the first quarter starts
on subscriptionDate and ends 3 months later, and so on. The annual rate
is the sum of the base rate for the quarter-start month and the permanence
premium for the contract year that the quarter falls into.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | CohortRateInput |
options | RatesOptions |
Returns
Section titled “Returns”Throws
Section titled “Throws”when asOfDate lies on or after subscriptionDate + maturityYears
(the certificate has matured), or when the input fails Zod validation.