Skip to content

missing pagination in CustomersEndpoint getCustomers()  #51

@gbsnj

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
);

}

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