Order constructor

const Order({
  1. String id = '',
  2. String deviceInfo = '',
  3. List<String> tags = const [],
  4. String businessId = '',
  5. double totalAmountOutstanding = 0.0,
  6. double totalAmountPaid = 0.0,
  7. double totalPrice = 0.0,
  8. double totalCost = 0.0,
  9. double currentTotalPrice = 0.0,
  10. double subtotalPrice = 0.0,
  11. double lineItemTotalPrice = 0.0,
  12. double totalLineItemsSold = 0,
  13. int totalUniqueLineItems = 0,
  14. double totalTip = 0.0,
  15. double totalWithdrawal = 0.0,
  16. double totalTax = 0.0,
  17. double totalDiscount = 0.0,
  18. double totalShipping = 0.0,
  19. double totalRefunded = 0.0,
  20. CapturedChannel capturedChannel = CapturedChannel.undefined,
  21. FinancialStatus financialStatus = FinancialStatus.undefined,
  22. OrderStatus orderStatus = OrderStatus.undefined,
  23. String createdBy = '',
  24. String trackingValue = '',
  25. int orderNumber = 0,
  26. List<TaxInfo> taxes = const [],
  27. List<OrderDiscount> discounts = const [],
  28. List<OrderLineItem> orderLineItems = const [],
  29. List<OrderRefund> refunds = const [],
  30. DateTime? dateCreated,
  31. DateTime? dateUpdated,
  32. String updatedBy = '',
  33. List<OrderTransaction> transactions = const [],
  34. FulfillmentStatus fulfillmentStatus = FulfillmentStatus.undefined,
  35. OrderSource orderSource = OrderSource.undefined,
  36. FulfillmentMethod fulfillmentMethod = FulfillmentMethod.undefined,
  37. String orderVersion = '',
  38. List<OrderHistoryLog> orderHistory = const [],
  39. String customerReference = '',
  40. String notes = '',
})

Implementation

const Order({
  this.id = '',
  this.deviceInfo = '',
  this.tags = const [],
  this.businessId = '',
  this.totalAmountOutstanding = 0.0,
  this.totalAmountPaid = 0.0,
  this.totalPrice = 0.0,
  this.totalCost = 0.0,
  this.currentTotalPrice = 0.0,
  this.subtotalPrice = 0.0,
  this.lineItemTotalPrice = 0.0,
  this.totalLineItemsSold = 0,
  this.totalUniqueLineItems = 0,
  this.totalTip = 0.0,
  this.totalWithdrawal = 0.0,
  this.totalTax = 0.0,
  this.totalDiscount = 0.0,
  this.totalShipping = 0.0,
  this.totalRefunded = 0.0,
  this.capturedChannel = CapturedChannel.undefined,
  this.financialStatus = FinancialStatus.undefined,
  this.orderStatus = OrderStatus.undefined,
  this.createdBy = '',
  this.trackingValue = '',
  this.orderNumber = 0,
  this.taxes = const [],
  this.discounts = const [],
  this.orderLineItems = const [],
  this.refunds = const [],
  this.dateCreated,
  this.dateUpdated,
  this.updatedBy = '',
  this.transactions = const [],
  this.fulfillmentStatus = FulfillmentStatus.undefined,
  this.orderSource = OrderSource.undefined,
  this.fulfillmentMethod = FulfillmentMethod.undefined,
  this.orderVersion = '',
  this.orderHistory = const [],
  this.customerReference = '',
  this.notes = '',
});