OrderReturnDiscount

September 24, 2019 · View on GitHub

Description

Represents a discount being returned that applies to one or more return line items in an order. Fixed-amount, order-scoped discounts are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal.

Properties

NameGetterSetterTypeDescriptionNotes
uidgetUid()setUid($value)stringUnique ID that identifies the return discount only within this order.[optional]
source_discount_uidgetSourceDiscountUid()setSourceDiscountUid($value)string`uid` of the Discount from the Order which contains the original application of this discount.[optional]
catalog_object_idgetCatalogObjectId()setCatalogObjectId($value)stringThe catalog object id referencing `CatalogDiscount`.[optional]
namegetName()setName($value)stringThe discount's name.[optional]
typegetType()setType($value)stringThe type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. Discounts that don't reference a catalog object ID must have a type of `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. See OrderLineItemDiscountType for possible values[optional]
percentagegetPercentage()setPercentage($value)stringThe percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. `percentage` is not set for amount-based discounts.[optional]
amount_moneygetAmountMoney()setAmountMoney($value)\SquareConnect\Model\MoneyThe total declared monetary amount of the discount. `amount_money` is not set for percentage-based discounts.[optional]
applied_moneygetAppliedMoney()setAppliedMoney($value)\SquareConnect\Model\MoneyThe amount of discount actually applied to this line item. When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items.[optional]
scopegetScope()setScope($value)stringIndicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped discounts, the server will generate references in `applied_discounts` on all `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount will only apply to `OrderReturnLineItem`s with references in their `applied_discounts` field. See OrderLineItemDiscountScope for possible values[optional]

Note: All properties are protected and only accessed via getters and setters.

[Back to Model list] [Back to API list] [Back to README]