getPrepaidState()

SubscriptionPrepaidState getPrepaidState(string usn)

This method returns a list all prepaid blocks ever purchased for a USN. This may include prepaid blocks which have expired or have been completely consumed.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription to query.

Results

This method returns a SubscriptionPrepaidState XML document contains a list of the prepaid blocks that have been added to the subscription.

There are no messages defined by this method.

CAUTION:
Check the start and end date of the prepaid blocks to ensure that it is valid when displaying to users.

Example: A returned SubscriptionPrepaidState XML document

This example shows a SubscriptionPrepaidState XML document for subscription “2142429550” with three prepaid blocks in the history, one of which is completely consumed.

<SubscriptionPrepaidState xmlns:="http://xml.inomial.com/smile/2.xsd" xmlns:="http://ws.inomial.com/smile.2">
  <USN>2142429550</USN>
  <PrepaidStateElements>
    <PrepaidStateElement>
      <StartDate>2013-10-24T14:06:40.281+11:00</StartDate>
      <EndDate>2014-10-23T23:59:59.999+11:00</EndDate>
      <PrepaidDescription key="test1">Test Prepaid 1</PrepaidDescription>
      <PurchasedQuantity formatted="0:10:00">600</PurchasedQuantity>
      <RemainingQuantity formatted="0:10:00">600</RemainingQuantity>
      <ChargeType key="0">Online time</ChargeType>
    </PrepaidStateElement>
    <PrepaidStateElement>
      <StartDate>2013-10-24T14:10:04.099+11:00</StartDate>
      <EndDate>2014-10-23T23:59:59.999+11:00</EndDate>
      <PrepaidDescription key="jfy">Prepaid Description</PrepaidDescription>
      <PrepaidType key="295">new type</PrepaidType>
      <PurchasedQuantity formatted="1">1</PurchasedQuantity>
      <RemainingQuantity formatted="1">1</RemainingQuantity>
      <VoucherNumber>2188</VoucherNumber>
      <ChargeType key="0">Online time</ChargeType>
    </PrepaidStateElement>
    <PrepaidStateElement>
      <StartDate>2013-08-23T00:00:00.000+10:00</StartDate>
      <EndDate>2013-11-22T23:59:59.999+11:00</EndDate>
      <PrepaidDescription key="pp529">Block A</PrepaidDescription>
      <PurchasedQuantity formatted="0:04:00">240</PurchasedQuantity>
      <RemainingQuantity formatted="0:00:00">0</RemainingQuantity>
      <ChargeType key="887">test.prepaid.getPrepaidState Timed</ChargeType>
    </PrepaidStateElement>
  </PrepaidStateElements>
</SubscriptionPrepaidState>

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetPrepaidState usn
usn
Purpose: Specifies the USN of the subscription to query.
Note: For more information about the Java client and the options it accepts, see Java client syntax.