cancel()
void cancel(string usn, date fromTimestamp)
This method closes a subscription at the specified date and time. If the specified time is before the current time, Smile closes the subscription immediately.
To close a subscription, Smile adds a plan schedule item with the close date to the plan schedule. This lets you calculate early termination fees or issue a credit for recurring charges in the next billing run.
After Smile closes a subscription, the subscription is deprovisioned and the subscription username is released and reset to the USN. Smile also releases any other resources held by the subscription.
If an account has multiple subscriptions, you must call this method for each subscription to close each subscription individually. You cannot close a subscription that is under contract; you must terminate the contract before you close the subscription.
Parameters
- usn
- Format: string
- fromTimestamp
- Format: dateTime
Results
This method does not return any output, and adds a plan schedule item with the close date to the plan schedule.
After the subscription is closed, Smile sends the SubscriptionClosed message to the message bus.
Faults
CancelExceptionThis fault is returned when the subscription cannot be cancelled, or the caller does not have permission to perform this action.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.CancelSubscription usn
- usn
- Purpose: Specifies the USN of the subscription to immediately close. You cannot use the Java client to close a subscription on a future date.