getAvailableContractsForPlan()

PlanContractDescriptionList getAvailableContractsForPlan(int company, int plan, dateTime when)

This method returns contracts available to subscriptions on a particular plan at a particular time. This can be useful for presenting a set of contracts to an end user which may be available for use for an existing subscription already subscribed to a particular plan.

If no contracts are available an empty list is returned.

Parameters

company
Format: integer
Purpose: Specifies the ID of the company to query.
plan
Format: integer
Purpose: Specifies the code of the plan to query.
when
Format: dateTime
Purpose: Specifies the time stamp at which the contracts must be valid for use.

Results

This method returns a PlanContractDescriptionList XML document that contains information about the available contracts for a given company and plan.

If no contracts are available an empty list is returned.

There are no messages defined by this method.

Example: A returned PlanContractDescriptionList XML document

This example shows a PlanContractDescriptionList XML document containing information about available contracts.

<PlanContractDescriptionList xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <PlanContractDescription>
    <PlanContractId>558</PlanContractId>
    <SelfService>false</SelfService>
    <Name>Example contract</Name>
    <Plan key="standard">Silver</Plan>
    <ContractDescription>
      <ContractId>464</ContractId>
      <ServiceId key="414">Spend Wise Voice Service</ServiceId>
      <Name>12 Months</Name>
      <BaseValue currency="AUD" formatted="$100.00">100</BaseValue>
      <PlanRecurringChargePercentage>0</PlanRecurringChargePercentage>
      <Duration unit="CalendarMonths">12</Duration>
      <GraceDays>2</GraceDays>
      <ValidFrom>2014-08-21+10:00</ValidFrom>
      <SetupFees/>
      <EarlyTerminationFee>
        <ItemCode>002594</ItemCode>
        <Name>Early termination charge</Name>
        <UnitSize>1</UnitSize>
        <ChargeGst>true</ChargeGst>
        <Rate currency="AUD" formatted="$12.00">12</Rate>
      </EarlyTerminationFee>
      <MinimumTerminationCharge currency="AUD" formatted="$0.00">0</MinimumTerminationCharge>
      <MaximumTerminationCharge currency="AUD" formatted="$0.00">0</MaximumTerminationCharge>
      <Comments>Asd</Comments>
      <AllowedManagedPlanChanges>All</AllowedManagedPlanChanges>
      </Plans>
    </ContractDescription>
  </PlanContractDescription>
</PlanContractDescriptionList>

Faults

NoSuchItemException

This fault is returned when the given plan does not exist.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetAvailableContractsForPlan company plan when
company
Purpose: Specifies the ID of the company to query.
plan
Purpose: Specifies the code of the plan to query.
when
Purpose: Specifies the time stamp at which the contracts must be valid for use.
Note: For more information about the Java client and the options it accepts, see Java client syntax.