TokenBankAccount.fromJson constructor

TokenBankAccount.fromJson(
  1. Object? json
)

Implementation

factory TokenBankAccount.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TokenBankAccount(
    accountHolderName: map['account_holder_name'] == null
        ? null
        : (map['account_holder_name'] as String),
    accountHolderType: map['account_holder_type'] == null
        ? null
        : IssuingCardholderType.fromJson(map['account_holder_type']),
    accountNumber: (map['account_number'] as String),
    accountType: map['account_type'] == null
        ? null
        : ExternalAccountAccountType.fromJson(map['account_type']),
    country: (map['country'] as String),
    currency: map['currency'] == null ? null : (map['currency'] as String),
    paymentMethod: map['payment_method'] == null
        ? null
        : (map['payment_method'] as String),
    routingNumber: map['routing_number'] == null
        ? null
        : (map['routing_number'] as String),
  );
}