redeemVoucher()

void redeemVoucher(string usn, string voucherNumber, string voucherCode)

This method validates a voucher and, if the voucher is valid, consumes the voucher and adds the prepaid value of the voucher to a subscription.

Before you call this method, you may need to call authenticate() to check the customer's credentials and obtain the subscription's USN.

Parameters

usn
Format: string
Purpose: Specifies the USN of the subscription to add the prepaid to.
voucherNumber
Format: string
Purpose: Specifies the voucher number.
voucherCode
Format: string
Purpose: Specifies the voucher's secret code.

Results

This method adds the value of the voucher to the subscription. Depending on your Smile configuration and the value of the prepaid, the subscription's features may be updated after the prepaid is added, for example, the subscription may be unshaped or unwall-gardened. Smile may also reload the subscription's billing configuration and communicate with other network applications.

This method does not return any output. Smile does not emit any messages after it adds prepaid to the subscription, but if the prepaid causes the subscription's features to change, Smile emits the SubscriptionFeaturesChanged message when the feature change is complete.

Faults

PrepaidException

This fault is returned when the voucher is invalid, the subscription cannot accept the voucher 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.RedeemVoucher usn voucherNumber voucherCode
usn
Purpose: Specifies the USN of the subscription to add the prepaid to.
voucherNumber
Purpose: Specifies the voucher number.
voucherCode
Purpose: Specifies the voucher's secret code.
Note: For more information about the Java client and the options it accepts, see Java client syntax.