copyWith method
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,
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,
);
}