Order class

Constructors

Order({String? id, OrderOrigin? origin, OrderStatusEnum? status, Money? total, OrderPayment? payment, OrderActions? actions, List<OrderItem> items = const [], List<OrderTimelineEntry> timeline = const [], DateTime? createdAt, DateTime? updatedAt, int? fulfillmentVersion, String? referenceId})
Returns a new Order instance.

Properties

actions ↔ OrderActions?
Whether payment retry and fulfillment retry are available now.
getter/setter pair
createdAt ↔ DateTime?
When the order was created (UTC).
getter/setter pair
fulfillmentVersion ↔ int?
Increases with every fulfillment change; matches the order.fulfillment.updated webhook.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
id ↔ String?
Order id.
getter/setter pair
items ↔ List<OrderItem>
The order items, one per unit bought.
getter/setter pair
origin ↔ OrderOrigin?
Where the order was created.
getter/setter pair
payment ↔ OrderPayment?
The latest payment attempt; null when none was made.
getter/setter pair
referenceId ↔ String?
Your own order reference, when one was sent.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status ↔ OrderStatusEnum?
Current order status.
getter/setter pair
timeline ↔ List<OrderTimelineEntry>
Every status the order has had, oldest first.
getter/setter pair
total ↔ Money?
What the order costs, in the order's currency: the item prices plus completed amendment charges, less completed amendment credits.
getter/setter pair
updatedAt ↔ DateTime?
When the order last changed (UTC).
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Order?
Returns a new Order instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Order>
mapFromJson(dynamic json) → Map<String, Order>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Order>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.