Skip to content

Xero-node pagination doesn't work #694

Closed
@dungphaminfostatus

Description

@dungphaminfostatus

SDK you're using (please complete the following information):

  • Version 8.0.0

Describe the bug
I'm using xero-node 8.0.0 in my project. Based on the official document, I expected to get "pageInfo" when I passed page and pageSize in but now it's undefined.

To Reproduce
Snippet:
await this.xero.getClientCredentialsToken()
const xeroTenantId = ''
const ifModifiedSince: Date = null
const where = ''
const order = 'InvoiceNumber ASC'
const iDs = []
const invoiceNumbers = []
const contactIDs = [cliId];
const statuses = [Invoice.StatusEnum.AUTHORISED.toString(), Invoice.StatusEnum.PAID.toString()]
const includeArchived = false;
const createdByMyApp = false;
const unitdp = null;
const summaryOnly = false;
const pageSize = limit;
const searchTerm = 'SearchTerm=REF12';
const invoices = await this.xero.accountingApi.getInvoices(
xeroTenantId,
ifModifiedSince,
where,
order,
iDs,
invoiceNumbers,
contactIDs,
statuses,
page,
includeArchived,
createdByMyApp,
unitdp,
summaryOnly,
pageSize
)
console.log(invoices)

Actual result
body: GetInvoicesResponse {
id: '93464360-19c5-4961-ac68-d322e7e6a48e',
status: 'OK',
providerName: 'Csp',
dateTimeUTC: 2024-07-08T10:56:50.022Z,
pageInfo: undefined,
invoices: [ [Invoice], [Invoice], [Invoice] ]
}

Expected behavior
The pageInfo should not be undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions