SetupIntentCreateOptionsPaymentMethodOptions.fromJson constructor

SetupIntentCreateOptionsPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory SetupIntentCreateOptionsPaymentMethodOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SetupIntentCreateOptionsPaymentMethodOptions(
    acssDebit: map['acss_debit'] == null
        ? null
        : SetupIntentAcssDebit.fromJson(map['acss_debit']),
    card: map['card'] == null ? null : SetupIntentCard.fromJson(map['card']),
    link: map['link'] == null ? null : SetupIntentLink.fromJson(map['link']),
    paypal: map['paypal'] == null
        ? null
        : SetupIntentPaypal.fromJson(map['paypal']),
    sepaDebit: map['sepa_debit'] == null
        ? null
        : SetupIntentSepaDebit.fromJson(map['sepa_debit']),
    usBankAccount: map['us_bank_account'] == null
        ? null
        : SetupIntentUsBankAccount.fromJson(map['us_bank_account']),
  );
}