From 2c5144caacd84ccb378b463f3d39bfc9e2aca3d9 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Fri, 19 Nov 2021 18:29:09 +0800 Subject: [PATCH] =?UTF-8?q?KktMonitor::getAll()=20=D1=82=D0=B5=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D1=8C=20=D0=B2=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=20=D0=BA=D0=BE=D0=BB=D0=BB=D0=B5=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D1=8E=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=BA=D1=82=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=9A=D0=9A=D0=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit При этом остаётся возможность получить полный ответ через KktMonitor::getResponse() --- src/Api/KktMonitor.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Api/KktMonitor.php b/src/Api/KktMonitor.php index 8ea7037..d61ddbe 100644 --- a/src/Api/KktMonitor.php +++ b/src/Api/KktMonitor.php @@ -12,6 +12,7 @@ declare(strict_types = 1); namespace AtolOnline\Api; use GuzzleHttp\Exception\GuzzleException; +use Illuminate\Support\Collection; use stdClass; /** @@ -78,13 +79,13 @@ class KktMonitor extends AtolClient * * @param int|null $limit * @param int|null $offset - * @return KktResponse + * @return Collection * @throws GuzzleException * @see https://online.atol.ru/files/API_service_information.pdf Документация, стр 9 */ - public function getAll(?int $limit = null, ?int $offset = null): KktResponse + public function getAll(?int $limit = null, ?int $offset = null): Collection { - return $this->fetchAll($limit, $offset); + return collect($this->fetchAll($limit, $offset)->getContent()); } /**