copyWith method

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

Implementation

Order copyWith({
  String? id,
  String? trackingValue,
  int? orderNumber,
  String? deviceInfo,
  List<String>? tags,
  String? businessId,
  double? totalAmountOutstanding,
  double? totalAmountPaid,
  double? totalPrice,
  double? totalCost,
  double? currentTotalPrice,
  double? subtotalPrice,
  double? lineItemTotalPrice,
  double? totalLineItemsSold,
  int? totalUniqueLineItems,
  double? totalTip,
  double? totalWithdrawal,
  double? totalTax,
  double? totalDiscount,
  double? totalShipping,
  double? totalRefunded,
  List<TaxInfo>? taxes,
  List<OrderDiscount>? discounts,
  CapturedChannel? capturedChannel,
  List<OrderLineItem>? orderLineItems,
  List<OrderRefund>? refunds,
  FinancialStatus? financialStatus,
  OrderStatus? orderStatus,
  DateTime? dateCreated,
  DateTime? dateUpdated,
  String? createdBy,
  String? updatedBy,
  List<OrderTransaction>? transactions,
  FulfillmentStatus? fulfillmentStatus,
  OrderSource? orderSource,
  FulfillmentMethod? fulfillmentMethod,
  String? orderVersion,
  List<OrderHistoryLog>? orderHistory,
  String? customerReference,
  String? notes,
}) {
  return Order(
    businessId: businessId ?? this.businessId,
    capturedChannel: capturedChannel ?? this.capturedChannel,
    createdBy: createdBy ?? this.createdBy,
    currentTotalPrice: currentTotalPrice ?? this.currentTotalPrice,
    dateCreated: dateCreated ?? this.dateCreated,
    dateUpdated: dateUpdated ?? this.dateUpdated,
    deviceInfo: deviceInfo ?? this.deviceInfo,
    discounts: discounts ?? this.discounts,
    financialStatus: financialStatus ?? this.financialStatus,
    id: id ?? this.id,
    lineItemTotalPrice: lineItemTotalPrice ?? this.lineItemTotalPrice,
    orderLineItems: orderLineItems ?? this.orderLineItems,
    orderNumber: orderNumber ?? this.orderNumber,
    orderStatus: orderStatus ?? this.orderStatus,
    refunds: refunds ?? this.refunds,
    subtotalPrice: subtotalPrice ?? this.subtotalPrice,
    tags: tags ?? this.tags,
    taxes: taxes ?? this.taxes,
    totalAmountOutstanding:
        totalAmountOutstanding ?? this.totalAmountOutstanding,
    totalAmountPaid: totalAmountPaid ?? this.totalAmountPaid,
    totalCost: totalCost ?? this.totalCost,
    totalDiscount: totalDiscount ?? this.totalDiscount,
    totalLineItemsSold: totalLineItemsSold ?? this.totalLineItemsSold,
    totalPrice: totalPrice ?? this.totalPrice,
    totalRefunded: totalRefunded ?? this.totalRefunded,
    totalShipping: totalShipping ?? this.totalShipping,
    totalTax: totalTax ?? this.totalTax,
    totalTip: totalTip ?? this.totalTip,
    totalUniqueLineItems: totalUniqueLineItems ?? this.totalUniqueLineItems,
    totalWithdrawal: totalWithdrawal ?? this.totalWithdrawal,
    trackingValue: trackingValue ?? this.trackingValue,
    transactions: transactions ?? this.transactions,
    updatedBy: updatedBy ?? this.updatedBy,
    fulfillmentStatus: fulfillmentStatus ?? this.fulfillmentStatus,
    orderSource: orderSource ?? this.orderSource,
    fulfillmentMethod: fulfillmentMethod ?? this.fulfillmentMethod,
    orderHistory: orderHistory ?? this.orderHistory,
    orderVersion: orderVersion ?? this.orderVersion,
    customerReference: customerReference ?? this.customerReference,
    notes: notes ?? this.notes,
  );
}