Order class abstract

The order

Available extensions
Annotations
  • @freezed

Constructors

Order({required String id, @JsonKey.new(defaultValue: '') required String email, required String currencyCode, @JsonKey.new(defaultValue: '') required String customerUrl, required LineItemsOrder lineItems, required String name, required int orderNumber, required String processedAt, required ShippingAddress? shippingAddress, required ShippingAddress? billingAddress, required String statusUrl, @JsonKey.new(fromJson: _priceOrZero) required PriceV2 subtotalPrice, required PriceV2 totalPrice, required PriceV2 totalShippingPrice, @JsonKey.new(fromJson: _priceOrZero) required PriceV2 totalTax, @JsonKey.new(defaultValue: '') required String financialStatus, required String fulfillmentStatus, PriceV2? totalRefunded, String? phone, String? cursor, String? canceledAt, String? cancelReason, List<SuccessfulFullfilment>? successfulFulfillments})
The order constructor
const
factory
Order.fromGraphJson(Map<String, dynamic> json)
The order from graph json
factory
Order.fromJson(Map<String, dynamic> json)
The order from json
factory

Properties

billingAddress ShippingAddress?
no setterinherited
canceledAt String?
no setterinherited
cancelReason String?
no setterinherited
copyWith → $OrderCopyWith<Order>
Create a copy of Order with the given fields replaced by the non-null parameter values.
no setterinherited
currencyCode String
no setterinherited
cursor String?
no setterinherited
customerUrl String
Nullable on the Storefront API; empty string when absent.
no setterinherited
email String
Nullable on the Storefront API; empty string when absent.
no setterinherited
financialStatus String
Nullable on the Storefront API (for example on unpaid orders); empty string when absent.
no setterinherited
fulfillmentStatus String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
no setterinherited
lineItems LineItemsOrder
no setterinherited
name String
no setterinherited
orderNumber int
no setterinherited
phone String?
no setterinherited
processedAt String
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shippingAddress ShippingAddress?
no setterinherited
statusUrl String
no setterinherited
subtotalPrice PriceV2
Nullable on the Storefront API; zero amount when absent.
no setterinherited
successfulFulfillments List<SuccessfulFullfilment>?
no setterinherited
totalPrice PriceV2
no setterinherited
totalRefunded PriceV2?
no setterinherited
totalShippingPrice PriceV2
no setterinherited
totalTax PriceV2
Nullable on the Storefront API; zero amount when absent.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_Order value)) → TResult

Available on Order, provided by the OrderPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Order value)?) → TResult?

Available on Order, provided by the OrderPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Order value)?, {required TResult orElse()}) → TResult

Available on Order, provided by the OrderPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String email, String currencyCode, String customerUrl, LineItemsOrder lineItems, String name, int orderNumber, String processedAt, ShippingAddress? shippingAddress, ShippingAddress? billingAddress, String statusUrl, PriceV2 subtotalPrice, PriceV2 totalPrice, PriceV2 totalShippingPrice, PriceV2 totalTax, String financialStatus, String fulfillmentStatus, PriceV2? totalRefunded, String? phone, String? cursor, String? canceledAt, String? cancelReason, List<SuccessfulFullfilment>? successfulFulfillments)?, {required TResult orElse()}) → TResult

Available on Order, provided by the OrderPatterns extension

A variant of when that fallback to an orElse callback.
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
when<TResult extends Object?>(TResult $default(String id, String email, String currencyCode, String customerUrl, LineItemsOrder lineItems, String name, int orderNumber, String processedAt, ShippingAddress? shippingAddress, ShippingAddress? billingAddress, String statusUrl, PriceV2 subtotalPrice, PriceV2 totalPrice, PriceV2 totalShippingPrice, PriceV2 totalTax, String financialStatus, String fulfillmentStatus, PriceV2? totalRefunded, String? phone, String? cursor, String? canceledAt, String? cancelReason, List<SuccessfulFullfilment>? successfulFulfillments)) → TResult

Available on Order, provided by the OrderPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String email, String currencyCode, String customerUrl, LineItemsOrder lineItems, String name, int orderNumber, String processedAt, ShippingAddress? shippingAddress, ShippingAddress? billingAddress, String statusUrl, PriceV2 subtotalPrice, PriceV2 totalPrice, PriceV2 totalShippingPrice, PriceV2 totalTax, String financialStatus, String fulfillmentStatus, PriceV2? totalRefunded, String? phone, String? cursor, String? canceledAt, String? cancelReason, List<SuccessfulFullfilment>? successfulFulfillments)?) → TResult?

Available on Order, provided by the OrderPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited