proposeContractTermination()

SubscriptionContractTerminationOffer proposeContractTermination(string usn, int subscriptionContractId, dateTime terminationDate)

This method is used to propose a contract termination to Smile. In response, Smile will return an offer detailing the charges which would be raised due to the contract termination without actually terminating the contract. The proposal may then be relayed to commitContractTermination() , with possible modifications to the resultant invoice, which will carry out the contract termination.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription for which to propose the contract termination.
subscriptionContractId
Format: integer
Purpose: Specifies the ID of the contract to propose termination of.
terminationDate
Format: dateTime
Purpose: Specifies the date and time at which the proposed termination would take effect.

Results

This method returns a SubscriptionContractTerminationOffer XML document that contains information about any charges that would be raised in the event of the contract termination.

There are no messages defined by this method.

Example: A retured SubscriptionContractTerminationOffer XML document

This example shows a SubscriptionContractTerminationOffer XML document detailing an early termination charge that would be raised if contract 557 was terminated at the given date.

<SubscriptionContractTerminationOffer xmlns="http://xml.inomial.com/smile/ 2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <OfferId>46488a01-e97c-3a6d-a354-115ae954fa1d</OfferId>
  <SubscriptionContractId>557</SubscriptionContractId> 
  <USN>2142422431</USN>
  <TerminationDate>2032-12-28+11:00</TerminationDate> 
  <NewInvoiceRequest>   
    <effectiveDate>2015-02-09+11:00</effectiveDate> 
    <dueDate>2015-02-21+11:00</dueDate>
    <ChargeRequest>  
      <USN>2142422431</USN> 
      <itemCode>002595</itemCode>
      <description>Early termination charge</description>   
      <count>1</count>
      <startDate>2032-12-28+11:00</startDate> 
      <endDate>2032-12-29+11:00</endDate>
      <amount>460.30</amount> 
      <chargeGst>true</chargeGst>
      <chargeId>46488a01-e97c-3a6d-a354-115ae954fa1d</chargeId>  
    </ChargeRequest> 
  </NewInvoiceRequest>   
</SubscriptionContractTerminationOffer> 

Faults

NoSuchItemException

This fault is returned when the contract or subscription is not found.

InvalidRequestException
This fault is returned when:
  • the given subscription contract ID is not associated with the given USN
  • the termination date is beyond the end date of the contract
  • the contract has already terminated
  • the termination date is null

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.ProposeContractTermination usn
 subscriptionContractdId terminationDate
usn
Purpose: Specifies the USN of the subscription for which to propose the contract termination.
subscriptionContractId
Purpose: Specifies the ID of the contract to propose termination of.
terminationDate
Purpose: Specifies the date and time at which the proposed termination would take effect.
Note: For more information about the Java client and the options it accepts, see Java client syntax.