Order class

Represents a customer order.

Contains order details including status, line items, pricing, billing/shipping addresses, and payment information.

Annotations

Constructors

Order({required String id, required String orderNumber, required String status, String currency = 'USD', required DateTime dateCreated, DateTime? datePaid, DateTime? dateCompleted, required double subtotal, double tax = 0.0, double shipping = 0.0, double discount = 0.0, required double total, required List<OrderLineItem> lineItems, required Address billingAddress, required Address shippingAddress, String? paymentMethod, String? paymentMethodTitle, String? shippingMethod, String? shippingMethodTitle, String? transactionId, String? customerNote, Map<String, dynamic>? extensions})
const
Order.fromJson(Map<String, dynamic> json)
factory

Properties

billingAddress → Address
final
currency → String
final
customerNote → String?
final
dateCompleted → DateTime?
final
dateCreated → DateTime
final
datePaid → DateTime?
final
discount → double
final
extensions → Map<String, dynamic>?
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
isCancelled → bool
no setter
isCompleted → bool
no setter
isFailed → bool
no setter
isPaid → bool
no setter
isPending → bool
no setter
isProcessing → bool
no setter
isRefunded → bool
no setter
lineItems → List<OrderLineItem>
final
orderNumber → String
final
paymentMethod → String?
final
paymentMethodTitle → String?
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shipping → double
final
shippingAddress → Address
final
shippingMethod → String?
final
shippingMethodTitle → String?
final
status → String
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
subtotal → double
final
tax → double
final
total → double
final
transactionId → String?
final

Methods

copyWith({String? id, String? orderNumber, String? status, String? currency, DateTime? dateCreated, DateTime? datePaid, DateTime? dateCompleted, double? subtotal, double? tax, double? shipping, double? discount, double? total, List<OrderLineItem>? lineItems, Address? billingAddress, Address? shippingAddress, String? paymentMethod, String? paymentMethodTitle, String? shippingMethod, String? shippingMethodTitle, String? transactionId, String? customerNote, Map<String, dynamic>? extensions}) → Order
getExtension<T>(String key) → T?
inherited
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.

Operators

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