update()
Subscription update(string usn, Subscription subscription)
This method updates personal subscription data, for example, personal details and any custom fields you have added to the service.
This method updates elements nested within the <Object> element in a Subscription XML document, and may also update accessory data. You cannot use this method to update any elements that are outside the <Object> element. For example, you cannot use this method to update a subscription's status or parent. Nor can it be used to update billing fields such as invoicing cycle and rating cycle.
You can call this method at any point after the subscription order is entered.
Parameters
- usn
- Format: string
- subscription
- Format: Subscription XML
Example: Request an update of subscription data
This example shows a Subscription XML document containing subscription data to be updated, including two custom fields.
<Subscription xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
<USN>1000000016</USN>
<Properties>
<Object>
<String name="contactGiven">Leslie</String>
<String name="contactFamily">Knope</String>
<String name="emailAddress">leslie@pawneecouncil.gov</String>
<String name="mobilePhone">0401555678</String>
<Boolean name="specialCustomer">true</Boolean>
<Decimal name="speed">123.51</Decimal>
</Object>
</Properties>
</Subscription>
Results
This method returns a Subscription XML document that contains the updated state of the subscription. Smile also emits the SubscriptionUpdated message.
Example: A returned Subscription XML document
This example shows a Subscription XML document with the complete updated state of the subscription.
<Subscription xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
<USN>1000000016</USN>
<SID>17</SID>
<ServiceName>Smile Access</ServiceName>
<Parent>1000000008</Parent>
<Properties>
<Object>
<String name="abn"></String>
<String name="billAddress"></String>
<String name="billBuildingName"></String>
<String name="billCountry"></String>
<String name="billFloorNumber"></String>
<String name="billLotNumber"></String>
<String name="billName"></String>
<String name="billNumber"></String>
<String name="billPostCode"></String>
<String name="billPostalDeliveryType"></String>
<String name="billState"></String>
<String name="billSubUnit"></String>
<String name="billSuburb"></String>
<String name="billType"></String>
<String name="comments"></String>
<String name="companyPosition"></String>
<String name="contactFamily">Knope</String>
<String name="contactGiven">Leslie</String>
<String name="contactTitle"></String>
<String name="emailAddress">leslie@pawneecouncil.gov</String>
<String name="fax"></String>
<String name="homePhone"></String>
<String name="jabberAddress"></String>
<String name="mobilePhone">0401555678</String>
<String name="name">Filiopoulos, Andrew</String>
<String name="secretAnswer"></String>
<String name="secretQuestion"></String>
<String name="sex"></String>
<String name="streetAddress"></String>
<String name="streetBuildingName"></String>
<String name="streetCountry"></String>
<String name="streetFloorNumber"></String>
<String name="streetLotNumber"></String>
<String name="streetName"></String>
<String name="streetNumber"></String>
<String name="streetPostalDeliveryType"></String>
<String name="streetPostcode"></String>
<String name="streetState"></String>
<String name="streetSubUnit"></String>
<String name="streetSuburb"></String>
<String name="streetType"></String>
<String name="tradingName"></String>
<String name="workPhone"></String>
<String name="username">david@inomial.com</String>
<String name="description"></String>
<String name="filterId"></String>
<String name="framedInterfaceId"></String>
<String name="framedIpAddress"></String>
<String name="framedIpNetmask"></String>
<String name="framedIpv6Pool"></String>
<String name="framedIpv6Route"></String>
<String name="framedNetworkPrefix"></String>
<String name="framedRoute"></String>
<Integer name="preferredHomeContactTime"/>
<Integer name="preferredMobileContactTime"/>
<Integer name="preferredWorkContactTime"/>
<Integer name="framedProtocol"/>
<Integer name="radiusServiceType">1</Integer>
<Boolean name="billPrintName">true</Boolean>
<Boolean name="streetPrintName">true</Boolean>
<Boolean name="specialCustomer">true</Boolean>
<Decimal name="speed">123.51</Decimal>
<Timestamp name="dob"></Timestamp>
</Object>
</Properties>
<ProvisionStatus>Provisioned</ProvisionStatus>
<SuspendStatus>Active</SuspendStatus>
<ActivateStatus>NotActivated</ActivateStatus>
<EnableStatus>NotEnabled</EnableStatus>
<InvoicingCycle>
<CycleType>Anniversary</CycleType>
<CycleDay>31</CycleDay>
</InvoicingCycle>
<RatingCycle>
<CycleType>Anniversary</CycleType>
<CycleDay>31</CycleDay>
</RatingCycle>
<Timezone key="13">Australia/Melbourne</Timezone>
<Company key="1">Example Telecom</Company>
</Subscription>
Faults
UpdateExceptionThis fault is returned when the subscription does not exist, the caller does not have permission to update the subscription or the caller cannot modify a property.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.UpdateSubscription usn filename
- usn
- Purpose: Specifies the USN of the subscription to update.
- filename
- Purpose: Defines the filename of the Subscription XML document.