suspend()
void suspend(string usn, date fromTimestamp, string comment)
This method suspends a subscription's access to a service at a specified date and time, and also suspends usage and recurring charges for the subscription, for example, monthly access fees.
If a suspended subscription is not under contract, any recurring charges will be pro-rated to exclude the suspension period. If a suspended subscription is under contract, the customer is obligated to pay any recurring charges for the duration of the contract; instead, recurring charges will be suspended after the contract ends, for the same period that the subscription was suspended.
You can call this method at any point in the subscription lifecycle after the subscription is activated and before it is closed. To suspend a subscription for a period of time in advance, call suspend() and resume() before the suspension date.
Parameters
- usn
- Format: string
- fromTimestamp
- Format: dateTime
- comment
- Format: string
Results
This method does not return any output. Smile suspends the subscription at the specified time.
Smile emits the SubscriptionSuspended message after the subscription is suspended.
Faults
InvalidRequestExceptionThis fault is returned when the specified USN is an account, or a subscription that cannot be suspended.
NoSuchItemExceptionThis fault is returned when the specified USN is not an active subscription. An active subscription is provisioned and is not closed.
SuspendExceptionThis fault is returned when the subscription cannot be suspended or the caller does not have permission to suspend the subscription.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.SuspendSubscription usn timestamp [comment]
- usn
- Purpose: Specifies the USN of the subscription to suspend.
- timestamp
- Format: dateTime
- comment
- Purpose: (Optional) Explains why the subscription was suspended.