copyWith method
InvoiceModel
copyWith({
- String? id,
- String? dueDate,
- String? currency,
- Object? discountCents,
- String? email,
- int? itemsTotalCents,
- Object? notificationUrl,
- Object? returnUrl,
- String? status,
- Object? taxCents,
- String? updatedAt,
- int? totalCents,
- String? totalPaid,
- int? totalPaidCents,
- Object? paidAt,
- int? paidCents,
- String? paid,
- String? secureId,
- String? secureUrl,
- Object? customerId,
- Object? userId,
- String? total,
- String? taxesPaid,
- Object? interest,
- Object? discount,
- String? createdAt,
- Object? refundable,
- Object? installments,
- BankSlip? bankSlip,
- List<
Item> ? items, - List<
Variable> ? variables, - List<
CustomVariables> ? customVariables, - bool? earlyPaymentDiscount,
- List<
EarlyPaymentDiscounts> ? earlyPaymentDiscounts, - List<
Logs> ? logs,
Implementation
InvoiceModel copyWith({
String? id,
String? dueDate,
String? currency,
Object? discountCents,
String? email,
int? itemsTotalCents,
Object? notificationUrl,
Object? returnUrl,
String? status,
Object? taxCents,
String? updatedAt,
int? totalCents,
String? totalPaid,
int? totalPaidCents,
Object? paidAt,
int? paidCents,
String? paid,
String? secureId,
String? secureUrl,
Object? customerId,
Object? userId,
String? total,
String? taxesPaid,
Object? interest,
Object? discount,
String? createdAt,
Object? refundable,
Object? installments,
BankSlip? bankSlip,
List<Item>? items,
List<Variable>? variables,
List<CustomVariables>? customVariables,
bool? earlyPaymentDiscount,
List<EarlyPaymentDiscounts>? earlyPaymentDiscounts,
List<Logs>? logs,
}) {
return InvoiceModel(
id: id ?? this.id,
dueDate: dueDate ?? this.dueDate,
currency: currency ?? this.currency,
discountCents: discountCents ?? this.discountCents,
email: email ?? this.email,
itemsTotalCents: itemsTotalCents ?? this.itemsTotalCents,
notificationUrl: notificationUrl ?? this.notificationUrl,
returnUrl: returnUrl ?? this.returnUrl,
status: status ?? this.status,
taxCents: taxCents ?? this.taxCents,
updatedAt: updatedAt ?? this.updatedAt,
totalCents: totalCents ?? this.totalCents,
totalPaid: totalPaid ?? this.totalPaid,
totalPaidCents: totalPaidCents ?? this.totalPaidCents,
paidAt: paidAt ?? this.paidAt,
paidCents: paidCents ?? this.paidCents,
paid: paid ?? this.paid,
secureId: secureId ?? this.secureId,
secureUrl: secureUrl ?? this.secureUrl,
customerId: customerId ?? this.customerId,
userId: userId ?? this.userId,
total: total ?? this.total,
taxesPaid: taxesPaid ?? this.taxesPaid,
interest: interest ?? this.interest,
discount: discount ?? this.discount,
createdAt: createdAt ?? this.createdAt,
refundable: refundable ?? this.refundable,
installments: installments ?? this.installments,
bankSlip: bankSlip ?? this.bankSlip,
items: items ?? this.items,
variables: variables ?? this.variables,
customVariables: customVariables ?? this.customVariables,
earlyPaymentDiscount: earlyPaymentDiscount ?? this.earlyPaymentDiscount,
earlyPaymentDiscounts: earlyPaymentDiscounts ?? this.earlyPaymentDiscounts,
logs: logs ?? this.logs,
);
}