Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 2.71 KB

Discount.md

File metadata and controls

55 lines (39 loc) · 2.71 KB

Discount

Properties

Name Type Description
type TypeEnum
amountOff BigDecimal Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.
amountOffFormula String
aggregatedAmountLimit Integer Maximum discount amount per order.
effect EffectEnum
isDynamic Boolean Flag indicating whether the discount was calculated using a formula.
unitOff Integer Number of units to be granted a full value discount.
unitOffFormula String Formula used to calculate the number of units.
unitType String The product deemed as free, chosen from product inventory (e.g. time, items).
product DiscountProduct
sku SimpleSkuDiscountUnit
units List<DiscountUnitMultipleOneUnit>
percentOff BigDecimal The percent discount that the customer will receive.
percentOffFormula String
amountLimit BigDecimal Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
fixedAmount BigDecimal Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
fixedAmountFormula String

Enum: TypeEnum

Name Value
AMOUNT "AMOUNT"
UNIT "UNIT"
PERCENT "PERCENT"
FIXED "FIXED"

Enum: EffectEnum

Name Value
APPLY_TO_ORDER "APPLY_TO_ORDER"
APPLY_TO_ITEMS "APPLY_TO_ITEMS"
APPLY_TO_ITEMS_PROPORTIONALLY "APPLY_TO_ITEMS_PROPORTIONALLY"
APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY"
APPLY_TO_ITEMS_BY_QUANTITY "APPLY_TO_ITEMS_BY_QUANTITY"
ADD_MISSING_ITEMS "ADD_MISSING_ITEMS"
ADD_NEW_ITEMS "ADD_NEW_ITEMS"
ADD_MANY_ITEMS "ADD_MANY_ITEMS"