The discount object
discount object contains information about a discount, including its id, code, amount, savings, and type. Note that this object will display a value only if it's accessed in notifications or in the Order Printer app.
discount object has the following attributes:
Returns the amount of the discount.
Returns the title or discount code of the discount. Same as
Returns the id of the discount.
Returns the amount of the discount's savings. The negative opposite of amount.
Returns the title or discount code of the discount.
Returns the total amount of the discount if it has been applied to multiple line items.
Returns the type of the discount. The possible values of