copyWith method
Implementation
DVSale copyWith({
DVSaleStatus? status,
String? chargeReference,
DVMoney? refunded,
DVMoney? taxRefunded,
DateTime? revokedAt,
bool clearRevokedAt = false,
}) =>
DVSale(
id: id,
customerKey: customerKey,
lines: lines,
subtotal: subtotal,
discount: discount,
tax: tax,
total: total,
behavior: behavior,
taxSource: taxSource,
taxJurisdiction: taxJurisdiction,
taxReference: taxReference,
promotions: promotions,
entitlements: entitlements,
createdAt: createdAt,
status: status ?? this.status,
chargeReference: chargeReference ?? this.chargeReference,
refunded: refunded ?? this.refunded,
taxRefunded: taxRefunded ?? this.taxRefunded,
revokedAt: clearRevokedAt ? null : revokedAt ?? this.revokedAt,
);