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.

Warning: Suspending a subscription cancels any future plan changes.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription to suspend.
fromTimestamp
Format: dateTime
Purpose: Specifies the date from which the subscription is suspended. If you specify null, the subscription is suspended immediately.
comment
Format: string
Purpose: (Optional) Explains why the subscription was suspended. Smile stores the comment in the event log.

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

InvalidRequestException

This fault is returned when the specified USN is an account, or a subscription that cannot be suspended.

NoSuchItemException

This fault is returned when the specified USN is not an active subscription. An active subscription is provisioned and is not closed.

SuspendException

This 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
Purpose: Specifies the date from which the subscription is suspended.
comment
Purpose: (Optional) Explains why the subscription was suspended.
Note: For more information about the Java client and the options it accepts, see Java client syntax.