Retrieve spend limit states
A spend limit tracks the amount that a subscription spends on a particular type of usage in each rating period, and lets you take action when a customer exceeds spend limit alert thresholds. For example, a fixed-line subscription may have a spend limit of $150 on international calls per month. Smile can perform an action when a subscription exceeds the value of a spend limit, for example, disable international calls.
Smile resets the value of each spend limit to $0 at the start of each rating period and when a subscription changes plan.
Retrieving spend limit states lets you view information about the amount that a customer has spent on a particular type of usage in the current rating period.
The following methods retrieve spend limit states:
- getSubscriptionSpendLimitStates() returns information about all spend limits for a subscription.
- getSubscriptionSpendLimitState() returns information about a specified spend limit.