team-telnyx / telnyx-ruby

Telnyx API Ruby Client
https://developers.telnyx.com/docs/api/v2/overview
MIT License
24 stars 17 forks source link

Make ListObject#page_size behave like ListObject#page_number #36

Closed nathan-cruz77 closed 4 years ago

nathan-cruz77 commented 4 years ago

The page_size method was not behaving like page_number. It was being used to fetch the page size from the filters, not metadata.

This commit fixes it by renaming the method to filter_page_size and adding a new method, page_size, which fetches the page size from metadata, providing a more uniform API.

nathan-cruz77 commented 4 years ago

Looks good to me @nathan-cruz77 . Could you also ensure that the README details are up to date for pagination here?

The use case this PR fixes is already covered in https://github.com/team-telnyx/telnyx-ruby#iterating-over-a-resource.