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.
Parameters
- usn
- Format: string
- subscriptionSpendLimitOverrideRequest
- Format: SubscriptionSpendLimitOverrideRequest XML
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
NoSuchItemExceptionThis fault is returned when the subscription does not exist.
InvalidRequestExceptionThis 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.