DiscountRule
A discount rule defines how a Discount is calculated when applied to a Cart.
Properties
idstringRequiredThe discount rule's ID
created_atDateRequiredThe date with timezone at which the resource was created.
updated_atDateRequiredThe date with timezone at which the resource was updated.
deleted_atnull | DateRequiredThe date with timezone at which the resource was deleted.
descriptionstringRequiredA short description of the discount
The type of the Discount, can be fixed for discounts that reduce the price by a fixed amount, percentage for percentage reductions or free\_shipping for shipping vouchers.
fixed for discounts that reduce the price by a fixed amount, percentage for percentage reductions or free\_shipping for shipping vouchers.valuenumberRequiredThe value that the discount represents; this will depend on the type of the discount
The scope that the discount should apply to.
The details of the discount conditions associated with the rule. They can be used to limit when the discount can be used.
metadataRecord<string, unknown>RequiredAn optional key-value map with additional details
Was this section helpful?