Schema to update a discount.
| Field | Type | Required | Description |
|---|---|---|---|
metadata |
array<string, string|int|float|bool> | ➖ | Key-value object allowing you to store additional information. The key must be a string with a maximum length of 40 characters. The value must be either: * A string with a maximum length of 500 characters * An integer * A floating-point number * A boolean You can store up to 50 key-value pairs. |
name |
?string | ➖ | N/A |
code |
?string | ➖ | Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. |
startsAt |
\DateTime | ➖ | Optional timestamp after which the discount is redeemable. |
endsAt |
\DateTime | ➖ | Optional timestamp after which the discount is no longer redeemable. |
maxRedemptions |
?int | ➖ | Optional maximum number of times the discount can be redeemed. |
duration |
?Components\DiscountDuration | ➖ | N/A |
durationInMonths |
?int | ➖ | N/A |
type |
?Components\DiscountType | ➖ | N/A |
amount |
?int | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
currency |
?Components\PresentmentCurrency | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
amounts |
array<string, int> | ➖ | N/A |
basisPoints |
?int | ➖ | N/A |
products |
array<string> | ➖ | N/A |