getPlanScheduleItemsAt()
PlanScheduleItems getPlanScheduleItemsAt(string usn, dateTime timestamp)
This method returns information about the plan a subscription uses at a specified time.
Use this method to retrieve and display information about a subscription's plan to a customer.
Parameters
- usn
- Format: string
- timestamp
- Format: dateTime
Results
This method returns a PlanScheduleItems XML document that contains information about the plan or plans the subscription uses at the specified time. If you specify a timestamp before the subscription was created, Smile returns an empty response.
There are no messages defined by this method.
Example: A returned PlanScheduleItems XML document
This example shows a PlanScheduleItems XML document that lists the plan schedule items associated with the subscription on 1 January 2011. The two plan schedule items are of different types.
Associating more than one type of plan schedule with a subscription lets you rate CDRs in different ways, for example, charging for incoming and outgoing calls.
<PlanScheduleItems xmlns="http://xml.inomial.com/smile/2.xsd">
<PlanScheduleItem>
<PlanCode>Silver</PlanCode>
<PlanScheduleType>1</PlanScheduleType>
<Start>2011-01-01T00:00:00+11:00</Start>
<Options>
<Object>
<Boolean name="staticIp">true</Boolean>
</Object>
</Options>
</PlanScheduleItem>
<PlanScheduleItem>
<PlanCode>Value1</PlanCode>
<PlanScheduleType>3</PlanScheduleType>
<Start>2011-01-01T00:00:00+11:00</Start>
<Options>
<Object/>
</Options>
</PlanScheduleItem>
</PlanScheduleItems>
Faults
NoSuchItemExceptionThis fault is returned when the subscription does not exist.
InvalidRequestExceptionThis fault is returned when the caller does not specify a timestamp.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetPlanScheduleItemsAt usn timestamp
- usn
- Purpose: Specifies the USN of the subscription associated with the plan.
- timestamp
- Purpose: Specifies the date and time for which you want to retrieve plan information.