InvoicesPaymentMethodOptions.fromJson constructor

InvoicesPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory InvoicesPaymentMethodOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return InvoicesPaymentMethodOptions(
    acssDebit: map['acss_debit'] == null
        ? null
        : InvoicePaymentMethodOptionsAcssDebit.fromJson(map['acss_debit']),
    bancontact: map['bancontact'] == null
        ? null
        : InvoicePaymentMethodOptionsBancontact.fromJson(map['bancontact']),
    card: map['card'] == null
        ? null
        : InvoicePaymentMethodOptionsCard.fromJson(map['card']),
    customerBalance: map['customer_balance'] == null
        ? null
        : InvoicePaymentMethodOptionsCustomerBalance.fromJson(
            map['customer_balance']),
    konbini: map['konbini'] == null ? null : (map['konbini'] as Object),
    sepaDebit:
        map['sepa_debit'] == null ? null : (map['sepa_debit'] as Object),
    usBankAccount: map['us_bank_account'] == null
        ? null
        : InvoicePaymentMethodOptionsUsBankAccount.fromJson(
            map['us_bank_account']),
  );
}