CustomerBankTransfer.fromJson constructor

CustomerBankTransfer.fromJson(
  1. Object? json
)

Implementation

factory CustomerBankTransfer.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CustomerBankTransfer(
    euBankTransfer: map['eu_bank_transfer'] == null
        ? null
        : SessionEuBankTransfer.fromJson(map['eu_bank_transfer']),
    requestedAddressTypes: map['requested_address_types'] == null
        ? null
        : (map['requested_address_types'] as List<Object?>)
            .map((el) => CustomerRequestedAddressTypesItem.fromJson(el))
            .toList(),
    type:
        CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferType
            .fromJson(map['type']),
  );
}