Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/Endpoint/CustomersEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,23 @@ public function __construct(ClientInterface $client, SerializerInterface $serial
/**
* Get a list of all customers
*
* @param int $page The start page
* @param int $pageSize The page size
* @return Response\GetCustomersResponse The Response
*
* @throws QuotaExceededException If the maximum number of calls per second exceeded
* @throws Exception If the response cannot be parsed
*/
public function getCustomers()
public function getCustomers($page = 1, $pageSize = 50)
{
$query = [
'page' => max(1, $page),
'pageSize' => max(1, $pageSize),
];

return $this->client->get(
'customers',
[],
$query,
Response\GetCustomersResponse::class
);
}
Expand Down