braintree / braintree_python

Braintree Python library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
242 stars 115 forks source link

Pagination on `transactions/advanced_search_ids` endpoint. #101

Closed luanfonceca closed 6 years ago

luanfonceca commented 6 years ago

General information

Issue description

It should be nice if the TransactionGateway.search method to return a PaginatedCollection and PaginatedResult as the DisputeGateway does. I did:

response = self.config.http().post(
    self.config.base_merchant_path() + "/transactions/advanced_search_ids?page=1&page_size=10",
    {"search": self.__criteria(query)}
)

But that didn't worked, i still were receiving:

{'search_results': {'page_size': 50, 'ids': [... 68 items ...]}}
crookedneighbor commented 6 years ago

The transaction search API is older than the disputes API, and by default you can't adjust the page size. There is a little customization you can do, contact our support team for details.