copyWith method

Instrument copyWith({
  1. String? id,
  2. PaymentMethod? type,
  3. String? fingerprint,
  4. int? expiryMonth,
  5. int? expiryYear,
  6. String? last4,
  7. String? bin,
  8. String? scheme,
  9. bool? isDefault,
})

Implementation

Instrument copyWith({
  String? id,
  PaymentMethod? type,
  String? fingerprint,
  int? expiryMonth,
  int? expiryYear,
  String? last4,
  String? bin,
  String? scheme,
  bool? isDefault,
}) {
  return Instrument(
    id: id ?? this.id,
    type: type ?? this.type,
    fingerprint: fingerprint ?? this.fingerprint,
    expiryMonth: expiryMonth ?? this.expiryMonth,
    expiryYear: expiryYear ?? this.expiryYear,
    last4: last4 ?? this.last4,
    bin: bin ?? this.bin,
    scheme: scheme ?? this.scheme,
    isDefault: isDefault ?? this.isDefault,
  );
}