mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2024-11-26 09:54:15 +00:00
Фикс исключения некорректного UUID в методе Kkt::getDocumentStatus()
This commit is contained in:
parent
954843e3ad
commit
2d29ff3994
@ -11,10 +11,10 @@ namespace AtolOnline\Api;
|
|||||||
|
|
||||||
use AtolOnline\{Entities\Document,
|
use AtolOnline\{Entities\Document,
|
||||||
Exceptions\AtolCorrectionInfoException,
|
Exceptions\AtolCorrectionInfoException,
|
||||||
|
Exceptions\AtolInvalidUuidException,
|
||||||
Exceptions\AtolKktLoginEmptyException,
|
Exceptions\AtolKktLoginEmptyException,
|
||||||
Exceptions\AtolKktLoginTooLongException,
|
Exceptions\AtolKktLoginTooLongException,
|
||||||
Exceptions\AtolKktPasswordEmptyException,
|
Exceptions\AtolKktPasswordEmptyException,
|
||||||
Exceptions\AtolUuidValidateException,
|
|
||||||
Exceptions\AtolWrongDocumentTypeException
|
Exceptions\AtolWrongDocumentTypeException
|
||||||
};
|
};
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
@ -327,13 +327,13 @@ class Kkt extends Client
|
|||||||
*
|
*
|
||||||
* @param string $uuid UUID регистрации
|
* @param string $uuid UUID регистрации
|
||||||
* @return \AtolOnline\Api\KktResponse
|
* @return \AtolOnline\Api\KktResponse
|
||||||
* @throws \AtolOnline\Exceptions\AtolUuidValidateException Некорректный UUID документа
|
* @throws \AtolOnline\Exceptions\AtolInvalidUuidException Некорректный UUID документа
|
||||||
*/
|
*/
|
||||||
public function getDocumentStatus(string $uuid)
|
public function getDocumentStatus(string $uuid)
|
||||||
{
|
{
|
||||||
$uuid = trim($uuid);
|
$uuid = trim($uuid);
|
||||||
if (!Uuid::isValid($uuid)) {
|
if (!Uuid::isValid($uuid)) {
|
||||||
throw new AtolUuidValidateException($uuid);
|
throw new AtolInvalidUuidException($uuid);
|
||||||
}
|
}
|
||||||
$this->auth();
|
$this->auth();
|
||||||
return $this->sendAtolRequest('GET', 'report/'.$uuid);
|
return $this->sendAtolRequest('GET', 'report/'.$uuid);
|
||||||
|
Loading…
Reference in New Issue
Block a user