UNPKG

@bebapps/rapyd-sdk

Version:

An un-official [Rapyd](https://rapyd.net) SDK for Node.js.

47 lines (46 loc) 2.97 kB
export enum CouponError { /** * The request tried to create a coupon, but the discount was set by both percentage and fixed amount. The request was rejected. Corrective action: Set 'percent_off' or set 'amount_off' and 'currency'. */ ERROR_COUPON_DISCOUNT_NOT_RECOGNIZED = 'ERROR_COUPON_DISCOUNT_NOT_RECOGNIZED', /** * The request tried to delete a coupon, but the operation failed. Corrective action: Determine whether the coupon was already deleted, and why there were multiple requests to delete it. */ ERROR_DELETE_COUPON = 'ERROR_DELETE_COUPON', /** * The request attempted an operation that requires the ID of a coupon, but the coupon was not found. The request was rejected. Corrective action: Use the ID of a valid coupon. */ ERROR_GET_COUPON = 'ERROR_GET_COUPON', /** * The request attempted an operation that requires the ID of a coupon, but the coupon was not found. The request was rejected. Corrective action: Use the ID of a valid coupon. */ ERROR_GET_DISCOUNT = 'ERROR_GET_DISCOUNT', /** * The request tried to create a coupon, but 'amount_off' was set and 'currency' was unset or invalid. The request was rejected. Corrective action: Use the correct 3-letter ISO 4217 code for the currency, in uppercase letters. */ INVALID_AMOUNT_OFF_AND_CURRENCY = 'INVALID_AMOUNT_OFF_AND_CURRENCY', /** * The request tried to create a coupon, but the amount off was not a positive number. The request was rejected. Corrective action: Use a positive decimal value for 'percent_off'. */ INVALID_COUPON_AMOUNT_OFF = 'INVALID_COUPON_AMOUNT_OFF', /** * The request tried to create a coupon, but the value for the 'duration' parameter was not recognized. The request was rejected. Corrective action: Set 'duration' to one of the following values: 'forever', 'once', 'repeating' */ INVALID_COUPON_DURATION = 'INVALID_COUPON_DURATION', /** * The request tried to retrieve a list of coupons, but the 'limit' query parameter was out of range. The request was rejected. Corrective action: Set 'limit' to an integer between 10 and 100. */ INVALID_COUPON_LIMIT = 'INVALID_COUPON_LIMIT', /** * The request tried to create a coupon, but the percent off was less than 1 or greater than 100. The request was rejected. Corrective action: Set 'percent_off' to an integer between 0-100. */ INVALID_COUPON_PERCENT_OFF = 'INVALID_COUPON_PERCENT_OFF', /** * The request tried to create a coupon, but the type of discount could not be determined. The request was rejected. Corrective action: Set 'percent_off' or set 'amount_off' and 'currency'. */ INVALID_COUPON_PERCENT_AND_AMOUNT_OFF = 'INVALID_COUPON_PERCENT_AND_AMOUNT_OFF', /** * The request tried to create a coupon, but the percent off was less than 1 or greater than 100. The request was rejected. Corrective action: Use an integer value between 0-100 for 'percent_off'. */ INVALID_PERCENT_OFF = 'INVALID_PERCENT_OFF', };