CheckoutCardPaymentMethodOptions.fromJson constructor

CheckoutCardPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory CheckoutCardPaymentMethodOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CheckoutCardPaymentMethodOptions(
    installments: map['installments'] == null
        ? null
        : CheckoutCardInstallmentsOptions.fromJson(map['installments']),
    requestThreeDSecure:
        CheckoutCardPaymentMethodOptionsRequestThreeDSecure.fromJson(
            map['request_three_d_secure']),
    setupFutureUsage: map['setup_future_usage'] == null
        ? null
        : CheckoutAcssDebitPaymentMethodOptionsSetupFutureUsage.fromJson(
            map['setup_future_usage']),
    statementDescriptorSuffixKana:
        map['statement_descriptor_suffix_kana'] == null
            ? null
            : (map['statement_descriptor_suffix_kana'] as String),
    statementDescriptorSuffixKanji:
        map['statement_descriptor_suffix_kanji'] == null
            ? null
            : (map['statement_descriptor_suffix_kanji'] as String),
  );
}