Skip to content

missing pagination in CustomersEndpoint getCustomers()  #51

Description

@gbsnj

missing pagination signature and implementation in getCustomers() results in not getting all customers.

Function should look like:

public function getCustomers($page = 1, $pageSize = 50, \DateTime $minCreatedAt = null)
{
$query = [
'page' => max(1, $page),
'pageSize' => max(1, $pageSize),
];

if ($minCreatedAt !== null && $minCreatedAt instanceof \DateTime) {
    $query['minCreatedAt'] = $minCreatedAt->format('c');
}
return $this->client->get(
    'customers',
    $query,
    Response\GetCustomersResponse::class
);

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions