Frontend | Backend | Api

Discounts\Models\Api\MaxUsageCondition

Max usage condition describes the conditions that need to be met for the discount to be applied; based on usage quantity (for the current discount) or total discount price (in discount logs). Applies to the current user. There are no "from/to" fields as they don't make sense. The amount value is the discounted price amount. If a discount gives $30 off, and the amount in this condition is set to $100, a user could use $30 + $30 + $30 = $90 (which is clear). However, then there is no restriction for the discounted price (because the action is responsible for that, not a condition), and the condition for the 4th time is $90 allow applying. Thus, the resulting total discount will be 30 + $30 + $30 + $30 = $120 with no further following applies.

Property Description Returns
quantity Gets a maximum number of usages (the set value is included) that can be applied for the discount to remain active. Checks for the current user. int
price Gets a maximum total discount price amount (the set value is included) that can be used for the discount to remain active (for the current user). string
displayType Returns the nice name of a condition type string
type Returns the type of condition string
snakeType Returns the type of condition in the snake case format: lowercase and connected by underline string
slugType Returns the type of condition in the slug format: lowercase and connected by hyphen string
id int
name string
data array
active bool
created Date the record was created. DateTime
modified Last modification date for the record. DateTime
rule Rule