Order class

Order deals with order creation, update, cancel and status check against the current order instance.

Constructors

Order({String orderId = '', required OrderType orderType, HttpService? httpService, PINAppIntent? pinAppIntent})
Order.fromJson(String source)
factory
Order.fromMap(Map<String, dynamic> map)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
orderId String
Unique Id returned after the successfull creation of an order. Update, cancel and status check will be done against this order.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addLineItem(LineItem lineItem) Order
Adds a lineItem to an Order instance. Example for a LineItem:
cancelOrder() Future<String>
Cancels the order and return the status against the current order instance.
createOrder() Future<Order>
creates an order for the current order instance
getOrderStatus() Future<String>
Fetch the order status of the current order instance.
initiatePayment() Future<Payment>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeLineItemById(String lineItemId) Order
Removes the lineItem from the orderLines for given lineItemId of the order
setPurchaseOrderId(String purchaseOrderId) Order
Sets the purchaseOrderId In case of the _orderType is returnOrder.
toJson() String
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override
updateLineItemQuantityById(String lineItemId, int quantity) Order
Updates LineItem quantity for for given lineItemId of the order.
updateOrder() Future<Order>
Updates the order for the current order instance.

Operators

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