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