/
model_order_return_discount.go
30 lines (29 loc) · 2.14 KB
/
model_order_return_discount.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
* Square Connect API
*
* Client library for accessing the Square Connect APIs
*
* API version: 2.0
* Contact: developers@squareup.com
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package square
// 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.
type OrderReturnDiscount struct {
// Unique ID that identifies the return discount only within this order.
Uid string `json:"uid,omitempty"`
// `uid` of the Discount from the Order which contains the original application of this discount.
SourceDiscountUid string `json:"source_discount_uid,omitempty"`
// The catalog object id referencing `CatalogDiscount`.
CatalogObjectId string `json:"catalog_object_id,omitempty"`
// The discount's name.
Name string `json:"name,omitempty"`
// The 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](#type-orderlineitemdiscounttype) for possible values
Type_ string `json:"type,omitempty"`
// The 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.
Percentage string `json:"percentage,omitempty"`
AmountMoney *Money `json:"amount_money,omitempty"`
AppliedMoney *Money `json:"applied_money,omitempty"`
// Indicates 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](#type-orderlineitemdiscountscope) for possible values
Scope string `json:"scope,omitempty"`
}