copyWith method

InvoiceModel copyWith({
  1. String? id,
  2. String? dueDate,
  3. String? currency,
  4. Object? discountCents,
  5. String? email,
  6. int? itemsTotalCents,
  7. Object? notificationUrl,
  8. Object? returnUrl,
  9. String? status,
  10. Object? taxCents,
  11. String? updatedAt,
  12. int? totalCents,
  13. String? totalPaid,
  14. int? totalPaidCents,
  15. Object? paidAt,
  16. int? paidCents,
  17. String? paid,
  18. String? secureId,
  19. String? secureUrl,
  20. Object? customerId,
  21. Object? userId,
  22. String? total,
  23. String? taxesPaid,
  24. Object? interest,
  25. Object? discount,
  26. String? createdAt,
  27. Object? refundable,
  28. Object? installments,
  29. BankSlip? bankSlip,
  30. List<Item>? items,
  31. List<Variable>? variables,
  32. List<CustomVariables>? customVariables,
  33. bool? earlyPaymentDiscount,
  34. List<EarlyPaymentDiscounts>? earlyPaymentDiscounts,
  35. 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,
  );
}