setSpendLimitOverride()

void setSpendLimitOverride(string usn, SubscriptionSpendLimitOverrideRequest
 subscriptionSpendLimitOverrideRequest)

This method permanently overrides the default value of a subscription spend limit. Use this method to permanently increase or decrease the value of a spend limit. If you have previously changed the value of a spend limit, you can also use this method to revert the spend limit to its default value.

Note that you cannot remove a spend limit from a subscription.

Note: You must enable pre-rating before you use this method.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription associated with the spend limit to change.
subscriptionSpendLimitOverrideRequest
Format: SubscriptionSpendLimitOverrideRequest XML
Purpose: Defines a SubscriptionSpendLimitOverrideRequest XML document that specifies the ID of the spend limit to change and the new value of the spend limit. If you do not specify an override value, Smile removes any existing overrides and reverts the spend limit value to the service default.

Example: Temporarily override a spend limit

This example changes the value of the spend limit with an ID of 7 to $10.

<SubscriptionSpendLimitOverrideRequest xmlns="http://xml.inomial.com/smile/2.xsd">
  <spendLimitId>7</spendLimitId>
  <limitOverride>10.00</limitOverride>
</SubscriptionSpendLimitOverrideRequest>

Results

This method does not return any output, and changes the value of the specified spend limit.

There are no messages defined by this method. However, if the new spend limit value causes the subscription to cross an alert threshold, Smile emits the SubscriptionSpendLimitStatusUpdated message after the pre-rating process runs.

Faults

NoSuchItemException

This fault is returned when the subscription does not exist.

InvalidRequestException

This fault is returned when the spend limit does not exist or is not associated with the subscription, or an invalid value is provided for the new spend limit, for example, a negative number.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.SetSpendLimitOverride usn spendLimitId [limitOverride]
usn
Purpose: Specifies the USN of the subscription associated with the spend limit to change.
spendLimitId
Purpose: Specifies the ID of the spend limit.
limitOverride
Purpose: (Optional) Specifies the new spend limit. If you do not specify this parameter, Smile removes any existing overrides and reverts the spend limit value to the service default.
Note: For more information about the Java client and the options it accepts, see Java client syntax.