copyWith method

Authorization copyWith({
  1. String? authorizationCode,
  2. String? bin,
  3. String? last4,
  4. String? expMonth,
  5. String? expYear,
  6. String? channel,
  7. String? cardType,
  8. String? bank,
  9. String? countryCode,
  10. String? brand,
  11. bool? reusable,
  12. String? signature,
  13. String? accountName,
  14. String? mobileMoneyNumber,
})

Returns a copy of this Authorization with the specified fields replaced.

Implementation

Authorization copyWith({
  String? authorizationCode,
  String? bin,
  String? last4,
  String? expMonth,
  String? expYear,
  String? channel,
  String? cardType,
  String? bank,
  String? countryCode,
  String? brand,
  bool? reusable,
  String? signature,
  String? accountName,
  String? mobileMoneyNumber,
}) {
  return Authorization(
    authorizationCode: authorizationCode ?? this.authorizationCode,
    bin: bin ?? this.bin,
    last4: last4 ?? this.last4,
    expMonth: expMonth ?? this.expMonth,
    expYear: expYear ?? this.expYear,
    channel: channel ?? this.channel,
    cardType: cardType ?? this.cardType,
    bank: bank ?? this.bank,
    countryCode: countryCode ?? this.countryCode,
    brand: brand ?? this.brand,
    reusable: reusable ?? this.reusable,
    signature: signature ?? this.signature,
    accountName: accountName ?? this.accountName,
    mobileMoneyNumber: mobileMoneyNumber ?? this.mobileMoneyNumber,
  );
}