proposePlanChange()

PlanChangeOffer proposePlanChange(string usn, PlanChangeProposal planChangeProposal)

This method prepares a quote for a plan change. This quote may be committed to via the commitPlanChange() method.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription to which the plan change is proposed.
planChangeProposal
Format: PlanChangeProposal XML
Purpose: Defines a PlanChangeProposal XML document that specifies the item for the plan change.

Example: Propose a plan change

This example shows a PlanChangeProposal XML document that proposes the addition of plan2, with a quantity of two option 1s. This plan change would take effect 16/04/2014. The plan schedule item also overrides the flagfall for China cellular calls and overrides some charging rules with new limits.

<PlanChangeProposal xmlns="http://xml.inomial.com/smile/2.xsd">
  <PlanScheduleItem>
    <PlanCode>plan2</PlanCode>
    <PlanScheduleType>1</PlanScheduleType>
    <Start>2014-04-16T00:00:00</Start>
    <Options>
      <Object>
        <Integer name="op1">2</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>
</PlanChangeProposal>

Results

This method returns a PlanChangeOffer XML document that contains information about what the cost of the plan change would be.

The PlanChangeOffer also contains an <OfferId> which is used to determine if the offer is still valid. An offer is valid for as long as the information that was generated remains unchanged. For example, if a subscription has its plan changed, then any offers created before the plan change will become invalid. 

There are no messages defined by this method.

Example: A returned PlanChangeOffer XML document

This example shows a PlanChangeOffer XML document that contains information about the cost of the new plan and options and a credit for the subscription's current plan.

<PlanChangeOffer xmlns:="http://xml.inomial.com/smile/2.xsd" xmlns:="http://ws.inomial.com/smile.2">
  <USN>2142421144</USN>
  <PlanChangeProposal>
    <PlanScheduleItem>
      <PlanCode>plan2</PlanCode>
      <PlanScheduleType>1</PlanScheduleType>
      <Start>2014-04-16T00:00:00</Start>
      <Options>
        <Object>
          <Integer name="op1">2</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>
    <OfferId>e34ab133-f570-3779-8695-3387ea20d21d</OfferId>
  </PlanChangeProposal>
  <NewInvoiceRequest>
    <effectiveDate>2014-04-16+10:00</effectiveDate>
    <dueDate>2014-04-28+10:00</dueDate>
    <ChargeRequest>
      <USN>2142421144</USN>
      <itemCode>001336</itemCode>
      <description>Plan 2 (16/04/2014 - 30/04/2014)</description>
      <quantity>1</quantity>
      <startDate>2014-04-16+10:00</startDate>
      <endDate>2014-05-01+10:00</endDate>
      <amount>7.49</amount>
      <chargeGst>true</chargeGst>
      <gst gstId="2">
        <amount>0.75</amount>
      </gst>
      <chargeId>c33d170a-855d-3b3e-a2dd-3b3cbea01c42</chargeId>
    </ChargeRequest>
    <ChargeRequest>
      <USN>2142421144</USN>
      <itemCode>001337</itemCode>
      <description>Option 1 (16/04/2014 - 30/04/2014)</description>
      <quantity>2</quantity>
      <startDate>2014-04-16+10:00</startDate>
      <endDate>2014-05-01+10:00</endDate>
      <amount>1.00</amount>
      <chargeGst>true</chargeGst>
      <gst gstId="2">
        <amount>0.10</amount>
      </gst>
      <chargeId>01e85a99-8e2e-3a9e-85e0-87b7a2d40f3b</chargeId>
     </ChargeRequest>
     <ChargeRequest>
       <USN>2142421144</USN>
       <itemCode>001335</itemCode>
       <description>Retraction for Plan 1 (16/04/2014 - 30/04/2014)</description>
       <quantity>1.000</quantity>
       <startDate>2014-04-16+10:00</startDate>
       <endDate>2014-05-01+10:00</endDate>
       <amount>-4.99</amount>
       <chargeGst>true</chargeGst>
       <gst gstId="2">
         <amount>-0.50</amount>
       </gst>
       <chargeId>8ccb6f3f-4a5d-35bc-a41f-0d7a3280a269</chargeId>
     <retractChargeId>afd075b6-b7af-4438-99ef-848a8c9c890c</retractChargeId>
    </ChargeRequest>
  </NewInvoiceRequest>
</PlanChangeOffer>

Faults

NoSuchItemException

This fault is returned when the subscription, or another referenced object, does not exist.

InvalidRequestException

This fault is returned if the plan change is invalid.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.ProposePlanChange usn filename
usn
Purpose: Specifies the USN of the subscription to which the plan change is proposed.
filename
Purpose: Defines the filename of the PlanChangeProposal XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.