Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Latest commit

 

History

History
32 lines (25 loc) · 5.93 KB

OrderLineItem.md

File metadata and controls

32 lines (25 loc) · 5.93 KB

OrderLineItem

Description

Represents a line item in an order. Each line item describes a different product to purchase, with its own quantity and price details.

Properties

Name Type Description Notes
uid String Unique ID that identifies the line item only within this order. [optional] [beta]
name String The name of the line item. [optional]
quantity String The quantity purchased, formatted as a decimal number. For example: `"3"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `"1.70000"`.
quantityUnit OrderQuantityUnit The unit and precision that this line item's quantity is measured in. [optional]
note String The note of the line item. [optional]
catalogObjectId String The `CatalogItemVariation` id applied to this line item. [optional]
variationName String The name of the variation applied to this line item. [optional]
metadata Map<String, String> Application-defined data attached to this line item. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (personally identifiable information, card details, etc.). Keys written by applications must be 60 characters or less and must be in the character set `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character. Values have a max length of 255 characters. An application may have up to 10 entries per metadata field. Entries written by applications are private and can only be read or modified by the same application. See Metadata for more information. [optional] [beta]
modifiers List<OrderLineItemModifier> The `CatalogModifier`s applied to this line item. [optional]
taxes List<OrderLineItemTax> A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. [optional] [deprecated]
discounts List<OrderLineItemDiscount> A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. [optional] [deprecated]
appliedTaxes List<OrderLineItemAppliedTax> The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax. [optional] [beta]
appliedDiscounts List<OrderLineItemAppliedDiscount> The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount. [optional] [beta]
basePriceMoney Money The base price for a single unit of the line item. [optional]
variationTotalPriceMoney Money The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. [optional]
grossSalesMoney Money The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. [optional]
totalTaxMoney Money The total tax amount of money to collect for the line item. [optional]
totalDiscountMoney Money The total discount amount of money to collect for the line item. [optional]
totalMoney Money The total amount of money to collect for this line item. [optional]