EasyPost / easypost-java

EasyPost Shipping API Client Library for Java
https://easypost.com/docs/api
MIT License
53 stars 37 forks source link

[feat] Functionality to get the next page of a paginated collection #243

Closed nwithan8 closed 1 year ago

nwithan8 commented 1 year ago

Description

This is effectively a Java port of the same functionality in the .NET library. For more details about how this works, please see the linked PR.

This PR requires the introduction of a new PaginatedCollection class that will sit in the inheritance chain between any XCollection (i.e. AddressCollection) and the base EasyPostResource class. This is needed to ensure each object that we can get the next page of will have a hasMore property, and helps limit the scope of type parameters needed for the abstracted core functionality.

This PR:

Testing

Pull Request Type

Please select the option(s) that are relevant to this PR.