getSubscriptionValuePoolState()

SubscriptionValuePool getSubscriptionValuePoolState(string usn, string valuePoolId)

This method returns information about the current state of a specified value pool. Use this method to retrieve and display information about a specific value pool for a subscription.

Note: You must enable pre-rating before you use this method.

Parameters

usn
Format: string
Purpose: Specifies the subscription associated with the value pool.
valuePoolId
Format: string
Purpose: Specifies the ID of the value pool for which you want to retrieve information.

Results

This method returns a SubscriptionValuePoolState XML document that lists information about the current state of the value pool, for example, the value pool limit, amount spent in the period to date, alert thresholds and reset date.

Note: Smile updates the values in this XML document each time the pre-rating process runs.

There are no messages defined by this method.

Example: A returned SubscriptionValuePool XML document

This example shows a SubscriptionValuePool XML document for the Included Calls value pool. The value pool has a limit of $50 and alert thresholds at 80% and 100% of the value pool. Smile resets the value pool to $0 at midnight on 1 September 2012.

<SubscriptionValuePool xmlns="http://ws.inomial.com/smile.2" xmlns="http://xml.inomial.com/smile/2.xsd">
  <ValuePool>
    <valuePoolId>183</valuePoolId>
    <sid>137</sid>
    <name>Included Calls</name>
    <alertThresholds>
      <alertThreshold>80</alertThreshold>
      <alertThreshold>100</alertThreshold>
    </alertThresholds>
  </ValuePool>
  <periodEnd>2012-08-31+12:00</periodEnd>
  <limit>50.00</limit>
  <effectiveAlertThresholds>
    <alertThreshold>80</alertThreshold>
    <alertThreshold>100</alertThreshold>
   </effectiveAlertThresholds>
  <currentSpend>0.00</currentSpend>
  <currentThreshold>0</currentThreshold>
  <previousThreshold>0</previousThreshold>
  <resetDate>2012-09-01T00:00:00.000+12:00</resetDate>
</SubscriptionValuePool>

Faults

NoSuchItemException

This fault is returned when the subscription or value pool does not exist.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetSubscriptionValuePoolState usn valuePoolId
usn
Purpose: Specifies the subscription associated with the value pool.
valuePoolId
Purpose: Specifies the ID of the value pool for which you want to retrieve information.
Note: For more information about the Java client and the options it accepts, see Java client syntax.