Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source-braintree-native: throw search limit error before iterating th…
…rough results The Braintree SDK exposes a `maximum_size` property for `ResourceCollection`s that indicate how many results were found in a specific date window. This can be used to throw search limit errors sooner. The `disputes` stream cannot use the `maximum_size` property because the Braintree SDK returns a `PaginatedCollection` instead of a `ResourceCollection` for `disputes`, and `PaginatedCollection`s don't have a `maximum_size` property. Note: Braintree states that `maximum_size` is an approximation due to race conditions between the first API call to get all matching resource IDs and the subsequent API calls to paginate through the actual resources; if a resource no longer matches the original seach criteria during the subsequent calls, it won't be returned. However, this shouldn't be an issue for the connector since our search criteria is only based on the `created_at` field, and I don't anticipate that field would change after being set.
- Loading branch information