KktMonitor::getAll() теперь возвращает коллекцию объектов ККТ

При этом остаётся возможность получить полный ответ через KktMonitor::getResponse()
pull/10/head
Anthony Axenov 2021-11-19 18:29:09 +08:00
parent 92a2c6cc48
commit 2c5144caac
1 changed files with 4 additions and 3 deletions

View File

@ -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());
}
/**