SetupIntentNextAction.fromJson constructor

SetupIntentNextAction.fromJson(
  1. Object? json
)

Implementation

factory SetupIntentNextAction.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SetupIntentNextAction(
    cashappHandleRedirectOrDisplayQrCode:
        map['cashapp_handle_redirect_or_display_qr_code'] == null
            ? null
            : PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode
                .fromJson(map['cashapp_handle_redirect_or_display_qr_code']),
    redirectToUrl: map['redirect_to_url'] == null
        ? null
        : SetupIntentNextActionRedirectToUrl.fromJson(map['redirect_to_url']),
    type: (map['type'] as String),
    useStripeSdk: map['use_stripe_sdk'] == null
        ? null
        : (map['use_stripe_sdk'] as Object),
    verifyWithMicrodeposits: map['verify_with_microdeposits'] == null
        ? null
        : SetupIntentNextActionVerifyWithMicrodeposits.fromJson(
            map['verify_with_microdeposits']),
  );
}