copyWith method

Transaction copyWith({
  1. String? result,
  2. String? resultDetails,
  3. String? amount,
  4. String? callerId,
  5. String? nsu,
  6. String? nsuLastSuccesfullMessage,
  7. String? cvNumber,
  8. bool? receiptAlreadyPrinted,
  9. String? type,
  10. String? brand,
  11. String? inputType,
  12. String? installments,
  13. String? gmtDateTime,
  14. String? nsuLocal,
  15. String? authorizationCode,
  16. String? cardBin,
  17. String? cardLastDigits,
  18. String? extraScreensResult,
  19. String? splitPayloadResponse,
  20. String? cardholderName,
  21. AutomationSlip? automationSlip,
  22. bool? printMerchantPreference,
  23. String? orderId,
  24. String? pixPayloadResponse,
  25. String? refundTransactionDate,
  26. String? refundCvNumber,
  27. String? refundOriginTerminal,
})

Creates a copy of the current instance with updated fields.

Implementation

Transaction copyWith({
  String? result,
  String? resultDetails,
  String? amount,
  String? callerId,
  String? nsu,
  String? nsuLastSuccesfullMessage,
  String? cvNumber,
  bool? receiptAlreadyPrinted,
  String? type,
  String? brand,
  String? inputType,
  String? installments,
  String? gmtDateTime,
  String? nsuLocal,
  String? authorizationCode,
  String? cardBin,
  String? cardLastDigits,
  String? extraScreensResult,
  String? splitPayloadResponse,
  String? cardholderName,
  AutomationSlip? automationSlip,
  bool? printMerchantPreference,
  String? orderId,
  String? pixPayloadResponse,
  String? refundTransactionDate,
  String? refundCvNumber,
  String? refundOriginTerminal,
}) {
  return Transaction(
    result: result ?? this.result,
    resultDetails: resultDetails ?? this.resultDetails,
    amount: amount ?? this.amount,
    callerId: callerId ?? this.callerId,
    nsu: nsu ?? this.nsu,
    nsuLastSuccesfullMessage:
        nsuLastSuccesfullMessage ?? this.nsuLastSuccesfullMessage,
    cvNumber: cvNumber ?? this.cvNumber,
    receiptAlreadyPrinted:
        receiptAlreadyPrinted ?? this.receiptAlreadyPrinted,
    type: type ?? this.type,
    brand: brand ?? this.brand,
    inputType: inputType ?? this.inputType,
    installments: installments ?? this.installments,
    gmtDateTime: gmtDateTime ?? this.gmtDateTime,
    nsuLocal: nsuLocal ?? this.nsuLocal,
    authorizationCode: authorizationCode ?? this.authorizationCode,
    cardBin: cardBin ?? this.cardBin,
    cardLastDigits: cardLastDigits ?? this.cardLastDigits,
    extraScreensResult: extraScreensResult ?? this.extraScreensResult,
    splitPayloadResponse: splitPayloadResponse ?? this.splitPayloadResponse,
    cardholderName: cardholderName ?? this.cardholderName,
    automationSlip: automationSlip ?? this.automationSlip,
    printMerchantPreference:
        printMerchantPreference ?? this.printMerchantPreference,
    orderId: orderId ?? this.orderId,
    pixPayloadResponse: pixPayloadResponse ?? this.pixPayloadResponse,
    refundTransactionDate:
        refundTransactionDate ?? this.refundTransactionDate,
    refundCvNumber: refundCvNumber ?? this.refundCvNumber,
    refundOriginTerminal: refundOriginTerminal ?? this.refundOriginTerminal,
  );
}