Skip to main content
Skip to main content

DiscountCondition

Holds rule conditions for when a discount is applicable

Properties

idstringRequired
The discount condition's ID
created_atDateRequired
The date with timezone at which the resource was created.
updated_atDateRequired
The date with timezone at which the resource was updated.
deleted_atnull | DateRequired
The date with timezone at which the resource was deleted.
The type of the condition. The type affects the available resources associated with the condition. For example, if the type is products, that means the products relation will hold the products associated with this condition and other relations will be empty.
The operator of the condition. in indicates that discountable resources are within the specified resources. not\_in indicates that discountable resources are everything but the specified resources.
discount_rule_idstringRequired
The ID of the discount rule associated with the condition
discount_ruleDiscountRuleRequired
The details of the discount rule associated with the condition.
productsProduct[]Required
products associated with this condition if type is products.
product_typesProductType[]Required
Product types associated with this condition if type is product\_types.
product_tagsProductTag[]Required
Product tags associated with this condition if type is product\_tags.
product_collectionsProductCollection[]Required
Product collections associated with this condition if type is product\_collections.
customer_groupsCustomerGroup[]Required
Customer groups associated with this condition if type is customer\_groups.
metadataRecord<string, unknown>Required
An optional key-value map with additional details
Was this section helpful?