DiscountRule
A discount rule defines how a Discount is calculated when applied to a Cart.
Properties
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.
created_at
DateRequiredThe date with timezone at which the resource was created.
deleted_at
null | DateRequiredThe date with timezone at which the resource was deleted.
description
stringRequiredA short description of the discount
id
stringRequiredThe discount rule's ID
metadata
Record<string, unknown>RequiredAn optional key-value map with additional details
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.updated_at
DateRequiredThe date with timezone at which the resource was updated.
value
numberRequiredThe value that the discount represents; this will depend on the type of the discount
Was this section helpful?