in lib/Api/DispatchApi.php [3038:3097]
public function tryToGetSlotWithHttpInfo($varForms)
{
$returnType = '\Yjopenapi\Client\Model\TryToGetSlotResult';
$request = $this->tryToGetSlotRequest($varForms);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
$content = $responseBody->getContents();
if (!in_array($returnType, ['string','integer','bool'])) {
$content = json_decode($content);
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Yjopenapi\Client\Model\TryToGetSlotResult',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
}