diff --git a/src/Endpoint/CustomersEndpoint.php b/src/Endpoint/CustomersEndpoint.php index f8ff79e..267045d 100644 --- a/src/Endpoint/CustomersEndpoint.php +++ b/src/Endpoint/CustomersEndpoint.php @@ -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 ); }