DiscountUpdate
March 11, 2026 ยท View on GitHub
Schema to update a discount.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
metadata | Dict[str, models.DiscountUpdateMetadata] | :heavy_minus_sign: | 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 | OptionalNullable[str] | :heavy_minus_sign: | N/A |
code | OptionalNullable[str] | :heavy_minus_sign: | 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. |
starts_at | date | :heavy_minus_sign: | Optional timestamp after which the discount is redeemable. |
ends_at | date | :heavy_minus_sign: | Optional timestamp after which the discount is no longer redeemable. |
max_redemptions | OptionalNullable[int] | :heavy_minus_sign: | Optional maximum number of times the discount can be redeemed. |
duration | OptionalNullable[models.DiscountDuration] | :heavy_minus_sign: | N/A |
duration_in_months | OptionalNullable[int] | :heavy_minus_sign: | N/A |
type | OptionalNullable[models.DiscountType] | :heavy_minus_sign: | N/A |
amount | OptionalNullable[int] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
currency | OptionalNullable[models.PresentmentCurrency] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
amounts | Dict[str, int] | :heavy_minus_sign: | N/A |
basis_points | OptionalNullable[int] | :heavy_minus_sign: | N/A |
products | List[str] | :heavy_minus_sign: | N/A |