getActiveSubscriptionContract()

SubscriptionContract getActiveSubscriptionContract(string usn, dateTime when)

This method returns details about the contract a given subscription is bound to (if any) at a given time.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription to query.
when
Format: dateTime
Purpose: Specifies the time stamp of when to query the active contract.

Results

This method returns a SubscriptionContract XML document that contains information about the contract a given subscription is bound to.

There are no messages defined by this method.

Example: A returned SubscriptionContract XML document

This example shows a SubscriptionContract XML document containing information about contract ID 476 that subscription 2142422589 is bound to.

<SubscriptionContract xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <SubscriptionContractId>476</SubscriptionContractId>
  <Contract key="399">12 Month</Contract>
  <USN>2142422589</USN>
  <EarlyTerminationCharge currency="AUD" formatted="$0.00">0</EarlyTerminationCharge>
  <StartDate>2014-08-28+10:00</StartDate>
  <EndDate>2015-08-27+10:00</EndDate>
  <ContractValue currency="AUD" formatted="$360.00">360.000000</ContractValue>
  <MinimumTerminationCharge currency="AUD" formatted="$0.00">0</MinimumTerminationCharge>
  <MaximumTerminationCharge currency="AUD" formatted="$0.00">0</MaximumTerminationCharge>
</SubscriptionContract>

Faults

InvalidRequestException

This fault is returned when the USN or when parameter is not provided.

NoSuchItemException

This fault is returned when the subscription USN does not exist.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetActiveSubscriptionContract
 usn when
usn
Purpose: Specifies the USN of the subscription to query.
when
Purpose: Specifies the time stamp of when to query the active contract.
Note: For more information about the Java client and the options it accepts, see Java client syntax.