updatePrepaid()
void updatePrepaid(string usn, PrepaidUpdate prepaidUpdate)
This method updates a purchased prepaid block from a subscription, but does not raise an invoice or charge. Before you use this method, there must be a block associated with the subscription.
Parameters
- usn
- Format: string
- prepaidUpdate
- Format: PrepaidUpdate XML
Example: A PrepaidUpdate XML document
This example shows a PrepaidUpdate XML document.
If no values are specified for the optional elements in PrepaidUpdate no changes will be applied to these fields. The original values will not be updated. A PrepaidUpdate XML document contains the following elements:
- <PrepaidId>
- The ID of the purchased prepaid to update.
- <StartDate>
- (Optional) The start timestamp of the prepaid block.
- <EndDate>
- (Optional) The end timestamp of the prepaid block.
- <PurchasedQuantity>
- (Optional) The purchased prepaid quantity.
- <RemainingQuantity>
- (Optional) The remaining prepaid quantity.
<PrepaidUpdate xmlns="http://xml.inomial.com/smile/2.xsd">
<PrepaidId>474</PrepaidId>
<StartDate>2015-02-05T00:00:00+11:00</StartDate>
<EndDate>2015-02-25T00:00:00+11:00</EndDate>
<PurchasedQuantity>500000000</PurchasedQuantity>
<RemainingQuantity>400000000</RemainingQuantity>
</PrepaidUpdate>
Results
This method does not return any output.
Smile emits the PrepaidUpdated message when a prepaid block is updated.
Faults
PrepaidExceptionThis fault is returned when:
- the USN provided does not exist
- no prepaid ID given in the PrepaidUpdate XML document
- the prepaid block to update does not belong to the subscription provided
- the end date is before the start date due to the update
- the end date is not provided when updating the purchased quantity with an empty value
- a remaining quantity is not provided when updating remaining quantity
- the remaining quantity is larger than the purchased quantity
- the purchased quantity is smaller than total used quantity
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.UpdatePrepaid usn filename
- usn
- Purpose: Specifies the USN of the subscription whose prepaid block to update.
- filename
- Purpose: Defines the filename of the PrepaidUpdate XML document.
Note: For more information about the Java client and the options it
accepts, see Java client syntax.