PaymentMethodDetailsUsBankAccount.fromJson constructor

PaymentMethodDetailsUsBankAccount.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodDetailsUsBankAccount.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodDetailsUsBankAccount(
    accountHolderType: map['account_holder_type'] == null
        ? null
        : InboundTransfersPaymentMethodDetailsUsBankAccountAccountHolderType
            .fromJson(map['account_holder_type']),
    accountType: map['account_type'] == null
        ? null
        : InboundTransfersPaymentMethodDetailsUsBankAccountAccountType
            .fromJson(map['account_type']),
    bankName: map['bank_name'] == null ? null : (map['bank_name'] as String),
    fingerprint:
        map['fingerprint'] == null ? null : (map['fingerprint'] as String),
    last4: map['last4'] == null ? null : (map['last4'] as String),
    mandate:
        map['mandate'] == null ? null : MandateOrId.fromJson(map['mandate']),
    paymentReference: map['payment_reference'] == null
        ? null
        : (map['payment_reference'] as String),
    routingNumber: map['routing_number'] == null
        ? null
        : (map['routing_number'] as String),
  );
}