I am using v3.0.2.
The Invoice.LineItems is always returning an empty array to me.
But I checked the invoice in Xero, and sure there is some LineItem in each invoice.
const XeroClient = require('xero-node').AccountingAPIClient;
const config = require('./config.json');
(async () => {
const xero = new XeroClient(config);
const result = await xero.invoices.get();
for (const invoice of result.Invoices) {
console.log(invoice);
if (invoice.LineItems) {
for (const LineItem of invoice.LineItems) {
console.log(LineItem);
}
}
}
}
I am using
v3.0.2.The Invoice.LineItems is always returning an empty array to me.
But I checked the invoice in Xero, and sure there is some LineItem in each invoice.