Order class
Constructors
Order ({String ? id , String ? locationId , String ? referenceId , OrderSource ? source , String ? customerId , List <OrderLineItem > ? lineItems , List <OrderLineItemTax > ? taxes , List <OrderLineItemDiscount > ? discounts , List <OrderServiceCharge > ? serviceCharges , List <OrderFulfillment > ? fulfillments , OrderMoneyAmounts ? returnAmounts , OrderMoneyAmounts ? netAmounts , OrderRoundingAdjustment ? roundingAdjustment , DateTime ? createdAt , DateTime ? updatedAt , DateTime ? closedAt , OrderState ? state , Money ? totalMoney , Money ? totalTaxMoney , Money ? totalDiscountMoney , Money ? totalServiceChargeMoney , List <Tender > ? tenders , List <Refund > ? refunds , List <OrderReturn > ? returns , int ? version , Map <String , String > ? metadata , Money ? netAmountDueMoney , OrderPricingOptions ? pricingOptions , List <OrderReward > ? rewards , String ? ticketName })
const
Order.fromJson (Map <String , dynamic > json )
Converts a Map to an Order
factory
Properties
closedAt
→ DateTime ?
Read only The timestamp for when the order reached a terminal state,
in RFC 3339 format (for example "2016-09-04T23:59:33.123Z").
final
createdAt
→ DateTime ?
Read only The timestamp for when the order was created, in RFC 3339
format (for example, "2016-09-04T23:59:33.123Z").
final
customerId
→ String ?
The ID of the customer associated with the order.
final
discounts
→ List <OrderLineItemDiscount > ?
The list of all discounts associated with the order.
final
fulfillments
→ List <OrderFulfillment > ?
Details about order fulfillment.
final
hashCode
→ int
The hash code for this object.
no setter inherited
id
→ String ?
Read only The order's unique ID.
final
lineItems
→ List <OrderLineItem > ?
The line items included in the order.
final
locationId
→ String ?
The ID of the seller location that this order is associated with.
final
metadata
→ Map <String , String > ?
Application-defined data attached to this order. 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 (such
as personally identifiable information or card details).
final
netAmountDueMoney
→ Money ?
Read only The net amount of money due on the order.
final
netAmounts
→ OrderMoneyAmounts ?
Read only The net money amounts (sale money - return money).
final
pricingOptions
→ OrderPricingOptions ?
Pricing options for an order. The options affect how the order's price is
calculated. They can be used, for example, to apply automatic price
adjustments that are based on preconfigured pricing rules.
final
props
→ List <Object ? >
The list of properties that will be used to determine whether
two instances are equal.
no setter
referenceId
→ String ?
A client-specified ID to associate an entity in another system with
this order.
final
refunds
→ List <Refund > ?
Read only The refunds that are part of this order.
final
returnAmounts
→ OrderMoneyAmounts ?
Read only The rollup of the returned money amounts.
final
returns
→ List <OrderReturn > ?
Read only A collection of items from sale orders being returned in
this one. Normally part of an itemized return or exchange. There is
exactly one Return object per sale Order being referenced.
final
rewards
→ List <OrderReward > ?
Read only A set-like list of Rewards that have been added to the
Order.
final
roundingAdjustment
→ OrderRoundingAdjustment ?
Read only A positive rounding adjustment to the total of the order.
This adjustment is commonly used to apply cash rounding when the minimum
unit of account is smaller than the lowest physical denomination of the
currency.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
serviceCharges
→ List <OrderServiceCharge > ?
A list of service charges applied to the order.
final
source
→ OrderSource ?
The origination details of the order.
final
state
→ OrderState ?
The current state of the order.
final
stringify
→ bool ?
If set to true
, the toString method will be overridden to output
this instance's props .
no setter inherited
taxes
→ List <OrderLineItemTax > ?
The list of all taxes associated with the order.
final
tenders
→ List <Tender > ?
Read only The tenders that were used to pay for the order.
final
ticketName
→ String ?
A short-term identifier for the order (such as a customer first name,
table number, or auto-generated order number that resets daily).
final
totalDiscountMoney
→ Money ?
Read only The total amount of discount money to collect for the order.
final
totalMoney
→ Money ?
Read only The total amount of money to collect for the order.
final
totalServiceChargeMoney
→ Money ?
Read only The total amount of money collected in service charges for
the order.
final
totalTaxMoney
→ Money ?
Read only The total amount of tax money to collect for the order.
final
updatedAt
→ DateTime ?
Read only The timestamp for when the order was last updated, in RFC
3339 format (for example, "2016-09-04T23:59:33.123Z").
final
version
→ int ?
The version number, which is incremented each time an update is committed
to the order. Orders not created through the API do not include a version
number and therefore cannot be updated.
final