Order class
- Annotations
-
- @freezed
Constructors
-
Order.new({required bool active, OrderAddress? billingAddress, required String code, required List<
String> couponCodes, required DateTime createdAt, required CurrencyCode currencyCode, Map<String, dynamic> ? customFields, Customer? customer, required List<Discount> discounts, List<Fulfillment> ? fulfillments, required HistoryEntryList history, required String id, required List<OrderLine> lines, DateTime? orderPlacedAt, List<Payment> ? payments, required List<Promotion> promotions, required double shipping, OrderAddress? shippingAddress, required List<ShippingLine> shippingLines, required double shippingWithTax, required String state, required double subTotal, required double subTotalWithTax, required List<Surcharge> surcharges, required List<OrderTaxSummary> taxSummary, required double total, required int totalQuantity, required double totalWithTax, required OrderType type, required DateTime updatedAt}) -
constfactory
-
Order.fromJson(Map<
String, dynamic> json) -
factory
Properties
- active → bool
-
An order is active as long as the payment process has not been completed
no setterinherited
- billingAddress → OrderAddress?
-
no setterinherited
- code → String
-
A unique code for the Order
no setterinherited
-
copyWith
→ $OrderCopyWith<
Order> -
Create a copy of Order
with the given fields replaced by the non-null parameter values.
no setterinherited
-
couponCodes
→ List<
String> -
An array of all coupon codes applied to the Order
no setterinherited
- createdAt → DateTime
-
no setterinherited
- currencyCode → CurrencyCode
-
no setterinherited
- customer → Customer?
-
no setterinherited
-
customFields
→ Map<
String, dynamic> ? -
no setterinherited
-
discounts
→ List<
Discount> -
no setterinherited
-
fulfillments
→ List<
Fulfillment> ? -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- history → HistoryEntryList
-
no setterinherited
- id → String
-
no setterinherited
-
lines
→ List<
OrderLine> -
no setterinherited
- orderPlacedAt → DateTime?
-
The date & time that the Order was placed, i.e. the Customer
completed the checkout and the Order is no longer "active"
no setterinherited
-
payments
→ List<
Payment> ? -
no setterinherited
-
promotions
→ List<
Promotion> -
Promotions applied to the order. Only gets populated after the payment process has completed.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shipping → double
-
no setterinherited
- shippingAddress → OrderAddress?
-
no setterinherited
-
shippingLines
→ List<
ShippingLine> -
no setterinherited
- shippingWithTax → double
-
no setterinherited
- state → String
-
no setterinherited
- subTotal → double
-
The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level
discounts which have been prorated (proportionally distributed) amongst the items of each OrderLine.
To get a total of all OrderLines which does not account for prorated discounts, use the
sum of
OrderLine.discountedLinePrice
values.no setterinherited - subTotalWithTax → double
-
Same as subTotal, but inclusive of tax
no setterinherited
-
surcharges
→ List<
Surcharge> -
Surcharges are arbitrary modifications to the Order total which are neither
ProductVariants nor discounts resulting from applied Promotions. For example,
one-off discounts based on customer interaction, or surcharges based on payment
methods.
no setterinherited
-
taxSummary
→ List<
OrderTaxSummary> -
A summary of the taxes being applied to this Order
no setterinherited
- total → double
-
Equal to subTotal plus shipping
no setterinherited
- totalQuantity → int
-
no setterinherited
- totalWithTax → double
-
The final payable amount. Equal to subTotalWithTax plus shippingWithTax
no setterinherited
- type → OrderType
-
no setterinherited
- updatedAt → DateTime
-
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Order to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited