PaymentMethodOptionsCustomerBalanceBankTransfer.fromJson constructor

PaymentMethodOptionsCustomerBalanceBankTransfer.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodOptionsCustomerBalanceBankTransfer.fromJson(
    Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodOptionsCustomerBalanceBankTransfer(
    euBankTransfer: map['eu_bank_transfer'] == null
        ? null
        : PaymentMethodOptionsCustomerBalanceEuBankAccount.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: map['type'] == null
        ? null
        : CheckoutCustomerBalanceBankTransferPaymentMethodOptionsType
            .fromJson(map['type']),
  );
}