Vonage / vonage-php-code-snippets

PHP code examples for using Vonage APIs
MIT License
29 stars 55 forks source link

How can i get all OwnedNumbers, not only ten? #69

Closed erimeilis closed 2 years ago

erimeilis commented 3 years ago

Need do get the full list of owned numbers, pages. So is there any option of offset/size for ->numbers()->searchOwned()?

SecondeJK commented 2 years ago

Hi @erimeilis, This is done by passing in a filter. For example:

$ownedNumberFilter = new \Vonage\Numbers\Filter\OwnedNumbers();
$ownedNumberFilter->setPageSize(50);
$client->numbers->searchOwned($ownedNumberFilter());