From 89c747b126bc526804eefe8fcadfd13d6e897f7a Mon Sep 17 00:00:00 2001 From: Pavel Kaspar Date: Fri, 21 May 2021 08:03:08 +0200 Subject: [PATCH 1/4] Return PDF document source --- src/Api/Documents.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } From 034dbda8c388e829a2ffb7713fd2c1abadbe2e89 Mon Sep 17 00:00:00 2001 From: Pavel Kaspar Date: Fri, 21 May 2021 12:33:06 +0200 Subject: [PATCH 2/4] Update Clients.php --- src/Api/Clients.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Api/Clients.php b/src/Api/Clients.php index faed327..cb8fcd8 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; } From 2ba4300ef7e0862ac5c8a48af5e631fd6777ff7e Mon Sep 17 00:00:00 2001 From: Pavel Kaspar Date: Fri, 21 May 2021 12:35:21 +0200 Subject: [PATCH 3/4] Update Products.php --- src/Api/Products.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } From c6c5a632114333cfb793d931c164b6d52cb013d1 Mon Sep 17 00:00:00 2001 From: Pavel Kaspar Date: Fri, 21 May 2021 12:35:31 +0200 Subject: [PATCH 4/4] Update Clients.php --- src/Api/Clients.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Clients.php b/src/Api/Clients.php index cb8fcd8..65b4218 100644 --- a/src/Api/Clients.php +++ b/src/Api/Clients.php @@ -25,7 +25,7 @@ public function __construct(Client $curl) */ public function listAll($page = 1, $limit = 10) { - $response = $this->curl->get('/clients', [ + $response = $this->curl->get('/clients/', [ 'page' => $page, 'limit' => $limit, ]);