The menu whose items the rule discounts, or null for items from any of the vendor's menus.
The item the rule discounts, or null for every item of menuId. Must be null when menuId is null.
"flat" takes a fixed amount off each discounted item. "percent" takes a fraction of each discounted item's price.
For "flat", the amount in NZD cents taken off each discounted item (1500 = $15.00). For "percent", the fraction of the price taken off, greater than 0 and at most 1 (0.5 = 50%).
For "percent" only: cap in NZD cents on the total the rule takes off, or null for no cap. Always null for "flat".
Maximum number of item units the rule discounts, or null for no limit. When more units qualify, the ones giving the biggest discount are chosen.
The rule applies only if the cart meets every condition. An empty list means it always applies.
A new discount rule. The server sets its ID.