diff --git a/src/Api/Clients.php b/src/Api/Clients.php index faed327..65b4218 100644 --- a/src/Api/Clients.php +++ b/src/Api/Clients.php @@ -23,9 +23,12 @@ public function __construct(Client $curl) /** * @return \iInvoices\Api\Responses\Collection */ - public function listAll() + public function listAll($page = 1, $limit = 10) { - $response = $this->curl->get('/clients'); + $response = $this->curl->get('/clients/', [ + 'page' => $page, + 'limit' => $limit, + ]); return $response; } diff --git a/src/Api/Documents.php b/src/Api/Documents.php index ebbf77b..529c33e 100644 --- a/src/Api/Documents.php +++ b/src/Api/Documents.php @@ -65,7 +65,9 @@ public function delete($id) public function download($id) { - $this->curl->get('/documents/' . $id . '/download'); + $response = $this->curl->get('/documents/' . $id . '/download'); + + return $response; } diff --git a/src/Api/Products.php b/src/Api/Products.php index 551c25f..fec0857 100644 --- a/src/Api/Products.php +++ b/src/Api/Products.php @@ -23,9 +23,12 @@ public function __construct(Client $curl) /** * @return \iInvoices\Api\Responses\Collection */ - public function listAll() + public function listAll($page = 1, $limit = 10) { - $response = $this->curl->get('/products'); + $response = $this->curl->get('/products/', [ + 'page' => $page, + 'limit' => $limit, + ]); return $response; }