SubscriptionSpendLimitExceeded

Smile emits this message when a subscription exceeds a spend limit. Listen for this message if you need to perform an action when a subscription exceeds a spend limit, for example, suspending access to international calls.

Note: Smile also emits the SubscriptionSpendLimitStatusUpdated message when a subscription exceeds a spend limit.

Message header

The following table lists the parameters in the SubscriptionSpendLimitExceeded message header.

Table 1. SubscriptionSpendLimitExceeded header parameters
Parameter Type Values
sid integer The service ID
usn string The unique subscription ID number for the subscription
spendLimitId integer The spend limit ID
currentThreshold integer The threshold limit that the subscription will next exceed
previousThreshold integer The threshold limit that the subscription has most recently exceeded
smileMessageType string "SubscriptionSpendLimitExceeded"

Message body

The message body contains the <SubscriptionSpendLimits> element and has the following format:
{http://xml.inomial.com/smile/2.xsd}SubscriptionSpendLimits

Example: The <SubscriptionSpendLimits> element

This example shows a SubscriptionSpendLimits XML document that contains the <SubscriptionSpendLimits> element.

<SubscriptionSpendLimits xmlns="http://xml.inomial.com/smile/2.xsd">
  <Subscription>
    <USN>2142425376</USN>
    <SID>137</SID>
    <ServiceName>Example Telecom Voice</ServiceName>
    <Parent>2142422670</Parent>
    <Properties>
      <Object>
        <String name="username">0491570156</String>
        <Boolean name="billPrintName">false</Boolean>
        <Boolean name="streetPrintName">true</Boolean>
        <Timestamp name="dob"/>
      </Object>
    </Properties>
    <ProvisionStatus>Provisioned</ProvisionStatus>
    <SuspendStatus>Active</SuspendStatus>
    <ActivateStatus>NotActivated</ActivateStatus>
    <EnableStatus>Enabled</EnableStatus>
    <AccessoryDataList/>
  </Subscription>
  <Limits>
    <SubscriptionSpendLimit>
      <SpendLimit>
        <spendLimitId>1</spendLimitId>
        <sid>137</sid>
        <name>Data</name>
        <limit>10</limit>
        <alertThresholds>
          <alertThreshold>50</alertThreshold>
          <alertThreshold>80</alertThreshold>
          <alertThreshold>100</alertThreshold>
        </alertThresholds>
      </SpendLimit>
      <periodEnd>2012-08-31+10:00</periodEnd>
      <effectiveLimit>10</effectiveLimit>
      <effectiveAlertThresholds>
        <alertThreshold>50</alertThreshold>
        <alertThreshold>80</alertThreshold>
        <alertThreshold>100</alertThreshold>
      </effectiveAlertThresholds>
      <currentSpend>33.473000</currentSpend>
      <currentThreshold>100</currentThreshold>
      <previousThreshold>0</previousThreshold>
    </SubscriptionSpendLimit>
  </Limits>
</SubscriptionSpendLimits>