changePlan()
void changePlan(string usn, PlanScheduleItem PlanScheduleItem)
This method adds an item to the subscription's plan schedule. The plan schedule specifies the plan that a subscription uses a given point in time. You can add an item that changes the subscription's plan now, in the past or at a future point, for example, when a contract ends.
You cannot use this method to add plan option groups or view the subscription's current plan schedule. To add a plan options group, change the plan schedule in Smile.
You can call this method at any point after the subscription is activated; however, you may not be able to change the plan of a subscription that is under contract. If you suspend a subscription, Smile cancels any future plan changes.
Parameters
- usn
- Format: string
- PlanScheduleItem
- Format: PlanScheduleItem XML
Example: Change a plan
This example shows a PlanScheduleItem XML document that adds the Silver plan with a static IP option to a subscription's plan schedule and specifies the number of modem ports. The plan takes effect 01/01/2013. The plan schedule item also overrides the flagfall for China cellular calls and overrides some charging rules with new limits.
<PlanScheduleItem xmlns="http://xml.inomial.com/smile/2.">
<PlanCode>Silver</PlanCode>
<PlanScheduleType>1</PlanScheduleType>
<Start>2013-01-01T00:00:00+11:00</Start>
<Options>
<Object>
<Boolean name="staticIp">true</Integer>
<Integer name="modemPorts">6</Integer>
</Object>
</Options>
<TariffOverrides>
<TariffOverride>
<Destination key="69751">China cellular</Destination>
<TariffType key="1541">Local</TariffType>
<Flagfall>2</Flagfall>
<Rate>1</Rate>
<Units>1</Units>
<Increment>1</Increment>
<MinimumCharge>5</MinimumCharge>
<MaximumCharge>20</MaximumCharge>
<OverrideDescription>Updated from API</OverrideDescription>
<RoundingMode>HalfUp</RoundingMode>
<DecimalPlaces>2</DecimalPlaces>
<CallType>Voice</CallType>
</TariffOverride>
</TariffOverrides>
<ChargingRuleOverrides>
<ChargingRuleOverride>
<ChargingRule key="1119" />
<Rate>1</Rate>
<MaximumUnits>10</MaximumUnits>
<MaximumUnitsPerSession>100</MaximumUnitsPerSession>
<Comment>SOAP</Comment>
</ChargingRuleOverride>
<ChargingRuleOverride>
<ChargingRule key="1118" />
<RetailMarkup>50</RetailMarkup>
<MaximumUnits>10</MaximumUnits>
<MaximumUnitsPerSession>100</MaximumUnitsPerSession>
<Comment>SOAP</Comment>
</ChargingRuleOverride>
</ChargingRuleOverrides>
</PlanScheduleItem>
Results
This method does not return any output, and adds a plan schedule item to the subscription's plan schedule.
Smile does not emit any messages when the plan changes, but if the plan change causes the subscription's features to change, Smile emits the SubscriptionFeaturesChanged message when the feature change is complete.
Faults
ChangePlanExceptionThis fault is returned when a required plan option is not specified or the plan cannot be changed, for example, the plan is a contract.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.ChangePlan usn filename
- usn
- Purpose: Specifies the USN of the subscription to update.
- filename
- Purpose: Defines the filename of the PlanScheduleItem XML document.