SubscriptionPaymentMethodOptions.fromJson constructor

SubscriptionPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory SubscriptionPaymentMethodOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SubscriptionPaymentMethodOptions(
    acssDebit: map['acss_debit'] == null
        ? null
        : InvoiceAcssDebit.fromJson(map['acss_debit']),
    bancontact: map['bancontact'] == null
        ? null
        : InvoiceBancontact.fromJson(map['bancontact']),
    card: map['card'] == null ? null : SubscriptionCard.fromJson(map['card']),
    customerBalance: map['customer_balance'] == null
        ? null
        : InvoiceCustomerBalance.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
        : InvoiceUsBankAccount.fromJson(map['us_bank_account']),
  );
}