Defines a single billable metric, such as profiles or emails sent, that subscription usage is measured and priced against. Instances are loaded from the usage-factors.xml configuration file (each element deserialised via the usage-factor XStream alias) and held in a UsageFactors list. KademiSubscriptionManager reads the referenced data series to total or sum the raw usage, then applies the scale factor to convert it to the billed quantity and units shown to the customer.
Group: Subscriptions
Properties
| Property | Returns | Description |
|---|---|---|
| id | String | Identifier for this usage factor, for example "profiles" or "webhits-mau". Used to look up matching license inclusions and tier overrides when calculating overage. |
| scaleFactor | int | Divisor applied to the raw usage figure to convert it into the quantity that is billed, for example dividing minutes by 60 to bill in hours. Defaults to 1 when no scaling is required. |
| seriesName | String | Name of the sales data series that this usage factor reads its raw usage figures from. |
| sku | String | Product SKU that this usage factor is billed under, or null if it is not billed as a separate line item. |
| type | UsageFactorType | Whether the raw usage figures for this factor should be totalled (the latest recorded value is used as-is) or summed (daily values are added together over the license period). |
| units | String | Label for the units this factor is reported in after the scale factor has been applied, for example "hours" or "profiles (1000s)". May be null when the raw value needs no unit label. |
Methods
getId()
Returns: String
Identifier for this usage factor, for example "profiles" or "webhits-mau". Used to look up matching license inclusions and tier overrides when calculating overage.
getSeriesName()
Returns: String
Name of the sales data series that this usage factor reads its raw usage figures from.
getSku()
Returns: String
Product SKU that this usage factor is billed under, or null if it is not billed as a separate line item.
getType()
Returns: UsageFactorType
Whether the raw usage figures for this factor should be totalled (the latest recorded value is used as-is) or summed (daily values are added together over the license period).
getScaleFactor()
Returns: int
Divisor applied to the raw usage figure to convert it into the quantity that is billed, for example dividing minutes by 60 to bill in hours. Defaults to 1 when no scaling is required.
getUnits()
Returns: String
Label for the units this factor is reported in after the scale factor has been applied, for example "hours" or "profiles (1000s)". May be null when the raw value needs no unit label.