Skip to content

Commit 0a77627

Browse files
authored
Added Status and cleaned up code
1 parent c816522 commit 0a77627

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/PrintfulProducts.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ public function __construct(PrintfulApiClient $printfulClient)
4444
* @throws Exceptions\PrintfulApiException
4545
* @throws Exceptions\PrintfulException
4646
*/
47-
public function getProducts($offset = 0, $limit = 20)
47+
public function getProducts($status = 'all', $search = '', $offset = 0, $limit = 20)
4848
{
4949
$requestData = [
50+
'status' => (string)$status,
5051
'search' => (string)$search,
5152
'offset' => (int)$offset,
52-
'limit' => (int)$limit,
53+
'limit' => (int)$limit,
5354
];
5455

5556
$response = $this->printfulClient->get(PrintfulProducts::ENDPOINT_PRODUCTS, $requestData);

0 commit comments

Comments
 (0)