Package com.qtsurfer.api.sdk.internal
Class ValidationOutcomes
java.lang.Object
com.qtsurfer.api.sdk.internal.ValidationOutcomes
Reads the queued-or-not distinction off the HTTP status of a validation
request.
The api-client's convenience overload returns only the deserialized
body, which is the same type for both answers, so the SDK calls the
WithHttpInfo variant and interprets the status here. 202 is
the only status that means a check was started; every other success carries
the state the platform already holds.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationOutcomeof(String strategyId, com.qtsurfer.api.client.invoker.ApiResponse<com.qtsurfer.api.client.model.StrategyState> response)
-
Method Details
-
of
public static ValidationOutcome of(String strategyId, com.qtsurfer.api.client.invoker.ApiResponse<com.qtsurfer.api.client.model.StrategyState> response) - Parameters:
strategyId- the id the caller asked about — echoed into aValidationOutcome.Queued, which does not depend on the response body carrying oneresponse- the raw api-client response- Returns:
- the outcome the status describes
- Throws:
QTSError- if a non-queued response carried no body to read
-