Remove order
query param from manual_journals request
#104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
The Xero API currently has a bug where all manual journal records created or modified since the last bookmark are returned instead of 100 per page. Xero support noticed this only happens when
order
is added as a query parameter in the request.The tap pages through results until the response has fewer than 100 records, as recommended by Xero. The bug was causing the paging logic to loop until the API quota was exceeded when there were 100+ manual journal records in the response.
This temporary fix removes the
order
query parameter when retrieving data for the manual_journals stream until Xero fixes the bug. It was previouslyorder=UpdatedDateUTC ASC
. Xero's docs say "The default order is UpdatedDateUTC ASC" so the response will still have the data in the expected order.Manual QA steps
Risks
order=UpdatedDateUTC ASC
.Rollback steps