Closed malle-pietje closed 2 years ago
This combination of filtering and paging does seem to work with a test/sandbox administration but need to test it against a live environment:
public function listInvoices($page, $per_page = 100, $filter = '')
{
$params = [
'per_page' => $per_page,
'page' => $page
];
if (!empty($filter)) {
$params['filter'] = $filter;
}
return $this->moneybird_client->salesInvoice()->get($params);
}
Working with this client I'm running into an issue where I need to fetch invoices for a certain time period using filters. The maximum number of SalesInvoices returned for a single request is 100, how do we use paging in these cases?
For now I've created this method in one of my classes:
I have tried to combine the two but that doesn't work.