SessionBankTransfer.fromJson constructor

SessionBankTransfer.fromJson(
  1. Object? json
)

Implementation

factory SessionBankTransfer.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SessionBankTransfer(
    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) =>
                CheckoutCustomerBalanceBankTransferPaymentMethodOptionsRequestedAddressTypesItem
                    .fromJson(el))
            .toList(),
    type:
        CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferType
            .fromJson(map['type']),
  );
}