SetupIntentPaymentMethodOptions.fromJson constructor

SetupIntentPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory SetupIntentPaymentMethodOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SetupIntentPaymentMethodOptions(
    acssDebit: map['acss_debit'] == null
        ? null
        : SetupIntentPaymentMethodOptionsAcssDebit.fromJson(
            map['acss_debit']),
    card: map['card'] == null
        ? null
        : SetupIntentPaymentMethodOptionsCard.fromJson(map['card']),
    link: map['link'] == null
        ? null
        : SetupIntentPaymentMethodOptionsLink.fromJson(map['link']),
    paypal: map['paypal'] == null
        ? null
        : SetupIntentPaymentMethodOptionsPaypal.fromJson(map['paypal']),
    sepaDebit: map['sepa_debit'] == null
        ? null
        : SetupIntentPaymentMethodOptionsSepaDebit.fromJson(
            map['sepa_debit']),
    usBankAccount: map['us_bank_account'] == null
        ? null
        : SetupIntentPaymentMethodOptionsUsBankAccount.fromJson(
            map['us_bank_account']),
  );
}