You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, if line_items is accessed either directly or indirectly (e.g. through Invoice#total_tax) a new request is made to Xero for the invoice details. The line_items are in fact already accessible within the invoice model, but ignored.
The text was updated successfully, but these errors were encountered:
pinfieldharm
changed the title
Invoices loaded with pagination needlessly load line item separately
Invoices loaded with pagination needlessly load line items separately
Sep 24, 2014
The Xeroizer library doesn't currently support pagination.
Happy to receive a PR for this issue to implement pagination. It should happen at a lower level in the API and have a way to configure which endpoints support pagination.
This should still be optional (with potentially a global configuration default) as many existing users may expect calls to these endpoints to contain all records.
When using pagination, you should return the correct result for Xeroizer::Record::Base#complete_record_downloaded? for the configured models.
When Invoices are loaded with a page specified, e.g.
client.Invoice.all(page: 1)
Xero returns line items inline with the invoices:However, if line_items is accessed either directly or indirectly (e.g. through
Invoice#total_tax
) a new request is made to Xero for the invoice details. The line_items are in fact already accessible within the invoice model, but ignored.The text was updated successfully, but these errors were encountered: