NextAction.fromJson constructor

NextAction.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory NextAction.fromJson(Map<String, Object?> json) => NextAction(
      type: NextActionType.fromJson(json["type"]),
      confirmPayment: json["confirm_payment"] == null
          ? null
          : NextActionConfirm.fromJson(
              (json["confirm_payment"] as Map).cast<String, Object?>(),
            ),
      redirect: json["redirect"] == null
          ? null
          : NextActionRedirect.fromJson(
              (json["redirect"] as Map).cast<String, Object?>(),
            ),
      authorize: json["authorize"] == null
          ? null
          : NextActionAuthorize.fromJson(
              (json["authorize"] as Map).cast<String, Object?>(),
            ),
      requestConfirmation: json["request_confirmation"] == null
          ? null
          : NextActionRequestConfirmation.fromJson(
              (json["request_confirmation"] as Map).cast<String, Object?>(),
            ),
    );