From 3d20c0af381404c709c0952798e30bb6d72cad22 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Wed, 10 Jul 2024 13:31:56 +0530 Subject: [PATCH 1/4] build from OAS 5.0.1 --- docs/accounting/index.html | 346 ++++-------------- package-lock.json | 4 +- src/gen/api/accountingApi.ts | 73 ++-- src/gen/model/accounting/bankTransactions.ts | 7 + src/gen/model/accounting/contacts.ts | 7 + src/gen/model/accounting/creditNotes.ts | 7 + .../accounting/getBankTransactionsResponse.ts | 50 --- .../model/accounting/getContactsResponse.ts | 50 --- .../accounting/getCreditNotesResponse.ts | 50 --- .../model/accounting/getInvoicesResponse.ts | 50 --- .../accounting/getManualJournalsResponse.ts | 50 --- .../accounting/getOverpaymentsResponse.ts | 50 --- .../model/accounting/getPaymentsResponse.ts | 50 --- .../accounting/getPrepaymentsResponse.ts | 50 --- .../accounting/getPurchaseOrdersResponse.ts | 50 --- src/gen/model/accounting/invoices.ts | 7 + src/gen/model/accounting/manualJournals.ts | 7 + src/gen/model/accounting/models.ts | 33 +- src/gen/model/accounting/overpayments.ts | 7 + .../accounting/{pageInfo.ts => pagination.ts} | 23 +- src/gen/model/accounting/payments.ts | 7 + src/gen/model/accounting/prepayments.ts | 7 + src/gen/model/accounting/purchaseOrders.ts | 7 + 23 files changed, 192 insertions(+), 800 deletions(-) delete mode 100644 src/gen/model/accounting/getBankTransactionsResponse.ts delete mode 100644 src/gen/model/accounting/getContactsResponse.ts delete mode 100644 src/gen/model/accounting/getCreditNotesResponse.ts delete mode 100644 src/gen/model/accounting/getInvoicesResponse.ts delete mode 100644 src/gen/model/accounting/getManualJournalsResponse.ts delete mode 100644 src/gen/model/accounting/getOverpaymentsResponse.ts delete mode 100644 src/gen/model/accounting/getPaymentsResponse.ts delete mode 100644 src/gen/model/accounting/getPrepaymentsResponse.ts delete mode 100644 src/gen/model/accounting/getPurchaseOrdersResponse.ts rename src/gen/model/accounting/{pageInfo.ts => pagination.ts} (58%) diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 022f9e82..762c969b 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -1465,6 +1465,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "BankTransactions" : { "type" : "array", "items" : { @@ -2320,6 +2323,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "Contacts" : { "type" : "array", "items" : { @@ -2555,6 +2561,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "CreditNotes" : { "type" : "array", "items" : { @@ -2859,267 +2868,6 @@ "externalDocs" : { "url" : "http://developer.xero.com/documentation/api/organisation/" } -}; - defs["GetBankTransactionsResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "BankTransactions" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BankTransaction" - } - } - }, - "description" : "" -}; - defs["GetContactsResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "Contacts" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Contact" - } - } - }, - "description" : "" -}; - defs["GetCreditNotesResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "CreditNotes" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/CreditNote" - } - } - }, - "description" : "" -}; - defs["GetInvoicesResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "Invoices" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Invoice" - } - } - }, - "description" : "" -}; - defs["GetManualJournalsResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "ManualJournals" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ManualJournal" - } - } - }, - "description" : "" -}; - defs["GetOverpaymentsResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "Overpayments" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Overpayment" - } - } - }, - "description" : "" -}; - defs["GetPaymentsResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "Payments" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Payment" - } - } - }, - "description" : "" -}; - defs["GetPrepaymentsResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "Prepayments" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Prepayment" - } - } - }, - "description" : "" -}; - defs["GetPurchaseOrdersResponse"] = { - "title" : "", - "type" : "object", - "properties" : { - "Id" : { - "type" : "string" - }, - "Status" : { - "type" : "string" - }, - "ProviderName" : { - "type" : "string" - }, - "DateTimeUTC" : { - "type" : "string" - }, - "PageInfo" : { - "$ref" : "#/components/schemas/PageInfo" - }, - "PurchaseOrders" : { - "minItems" : 1, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PurchaseOrder" - } - } - }, - "description" : "" }; defs["HistoryRecord"] = { "title" : "", @@ -3529,6 +3277,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "Invoices" : { "type" : "array", "items" : { @@ -4165,6 +3916,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "ManualJournals" : { "type" : "array", "items" : { @@ -4499,6 +4253,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "Overpayments" : { "type" : "array", "items" : { @@ -4509,24 +4266,24 @@ "description" : "", "x-isObjectArray" : true }; - defs["PageInfo"] = { + defs["Pagination"] = { "title" : "", "type" : "object", "properties" : { - "Page" : { + "page" : { "type" : "integer" }, - "PageSize" : { + "pageSize" : { "type" : "integer" }, - "TotalPages" : { + "pageCount" : { "type" : "integer" }, - "TotalRows" : { + "itemCount" : { "type" : "integer" } }, - "description" : "Pagination information" + "description" : "" }; defs["Payment"] = { "title" : "", @@ -4764,6 +4521,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "Payments" : { "type" : "array", "items" : { @@ -4929,6 +4689,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "Prepayments" : { "type" : "array", "items" : { @@ -5128,6 +4891,9 @@ "title" : "", "type" : "object", "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, "PurchaseOrders" : { "type" : "array", "items" : { @@ -30274,9 +30040,10 @@

Usage and SDK Samples

const order = 'Status ASC'; const page = 1; const unitdp = 4; +const pageSize = 100; try { - const response = await xero.accountingApi.getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp); + const response = await xero.accountingApi.getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -30436,6 +30203,26 @@

Parameters

+ + + pageSize + + + +
+
+
+ + Integer + + +
+Number of records to retrieve per page +
+
+
+
+ @@ -31223,9 +31010,10 @@

Usage and SDK Samples

const order = 'Reference ASC'; const page = 1; const unitdp = 4; +const pageSize = 100; try { - const response = await xero.accountingApi.getPrepayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp); + const response = await xero.accountingApi.getPrepayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize); console.log(response.body || response.response.statusCode) } catch (err) { const error = JSON.stringify(err.response.body, null, 2) @@ -31385,6 +31173,26 @@

Parameters

+ + + pageSize + + + +
+
+
+ + Integer + + +
+Number of records to retrieve per page +
+
+
+
+ diff --git a/package-lock.json b/package-lock.json index ecd18ee4..078984f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "xero-node", - "version": "7.0.0", + "version": "8.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "xero-node", - "version": "7.0.0", + "version": "8.1.0", "license": "MIT", "dependencies": { "axios": "^1.6.5", diff --git a/src/gen/api/accountingApi.ts b/src/gen/api/accountingApi.ts index bda0121f..c2f25fc3 100644 --- a/src/gen/api/accountingApi.ts +++ b/src/gen/api/accountingApi.ts @@ -36,15 +36,6 @@ import { Currencies } from '../model/accounting/currencies'; import { Currency } from '../model/accounting/currency'; import { Employees } from '../model/accounting/employees'; import { ExpenseClaims } from '../model/accounting/expenseClaims'; -import { GetBankTransactionsResponse } from '../model/accounting/getBankTransactionsResponse'; -import { GetContactsResponse } from '../model/accounting/getContactsResponse'; -import { GetCreditNotesResponse } from '../model/accounting/getCreditNotesResponse'; -import { GetInvoicesResponse } from '../model/accounting/getInvoicesResponse'; -import { GetManualJournalsResponse } from '../model/accounting/getManualJournalsResponse'; -import { GetOverpaymentsResponse } from '../model/accounting/getOverpaymentsResponse'; -import { GetPaymentsResponse } from '../model/accounting/getPaymentsResponse'; -import { GetPrepaymentsResponse } from '../model/accounting/getPrepaymentsResponse'; -import { GetPurchaseOrdersResponse } from '../model/accounting/getPurchaseOrdersResponse'; import { HistoryRecords } from '../model/accounting/historyRecords'; import { ImportSummaryObject } from '../model/accounting/importSummaryObject'; import { InvoiceReminders } from '../model/accounting/invoiceReminders'; @@ -6825,7 +6816,7 @@ export class AccountingApi { * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts * @param pageSize Number of records to retrieve per page */ - public async getBankTransactions (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetBankTransactionsResponse; }> { + public async getBankTransactions (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: BankTransactions; }> { const localVarPath = this.basePath + '/BankTransactions'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -6890,11 +6881,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetBankTransactionsResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: BankTransactions; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetBankTransactionsResponse"); + body = ObjectSerializer.deserialize(response.data, "BankTransactions"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -8778,7 +8769,7 @@ export class AccountingApi { * @param searchTerm Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. * @param pageSize Number of records to retrieve per page */ - public async getContacts (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, iDs?: Array, page?: number, includeArchived?: boolean, summaryOnly?: boolean, searchTerm?: string, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetContactsResponse; }> { + public async getContacts (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, iDs?: Array, page?: number, includeArchived?: boolean, summaryOnly?: boolean, searchTerm?: string, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Contacts; }> { const localVarPath = this.basePath + '/Contacts'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -8855,11 +8846,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetContactsResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: Contacts; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetContactsResponse"); + body = ObjectSerializer.deserialize(response.data, "Contacts"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -9361,7 +9352,7 @@ export class AccountingApi { * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts * @param pageSize Number of records to retrieve per page */ - public async getCreditNotes (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetCreditNotesResponse; }> { + public async getCreditNotes (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: CreditNotes; }> { const localVarPath = this.basePath + '/CreditNotes'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -9426,11 +9417,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetCreditNotesResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: CreditNotes; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetCreditNotesResponse"); + body = ObjectSerializer.deserialize(response.data, "CreditNotes"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -10464,7 +10455,7 @@ export class AccountingApi { * @param pageSize Number of records to retrieve per page * @param searchTerm Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference. */ - public async getInvoices (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, iDs?: Array, invoiceNumbers?: Array, contactIDs?: Array, statuses?: Array, page?: number, includeArchived?: boolean, createdByMyApp?: boolean, unitdp?: number, summaryOnly?: boolean, pageSize?: number, searchTerm?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetInvoicesResponse; }> { + public async getInvoices (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, iDs?: Array, invoiceNumbers?: Array, contactIDs?: Array, statuses?: Array, page?: number, includeArchived?: boolean, createdByMyApp?: boolean, unitdp?: number, summaryOnly?: boolean, pageSize?: number, searchTerm?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Invoices; }> { const localVarPath = this.basePath + '/Invoices'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -10561,11 +10552,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetInvoicesResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: Invoices; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetInvoicesResponse"); + body = ObjectSerializer.deserialize(response.data, "Invoices"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -11548,7 +11539,7 @@ export class AccountingApi { * @param page e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment * @param pageSize Number of records to retrieve per page */ - public async getManualJournals (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetManualJournalsResponse; }> { + public async getManualJournals (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: ManualJournals; }> { const localVarPath = this.basePath + '/ManualJournals'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -11609,11 +11600,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetManualJournalsResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: ManualJournals; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetManualJournalsResponse"); + body = ObjectSerializer.deserialize(response.data, "ManualJournals"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -12140,8 +12131,9 @@ export class AccountingApi { * @param order Order by an any element * @param page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + * @param pageSize Number of records to retrieve per page */ - public async getOverpayments (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetOverpaymentsResponse; }> { + public async getOverpayments (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Overpayments; }> { const localVarPath = this.basePath + '/Overpayments'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -12173,6 +12165,10 @@ export class AccountingApi { localVarQueryParameters['unitdp'] = ObjectSerializer.serialize(unitdp, "number"); } + if (pageSize !== undefined) { + localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); + } + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['If-Modified-Since'] = ObjectSerializer.serialize(ifModifiedSince, "Date"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -12202,11 +12198,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetOverpaymentsResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: Overpayments; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetOverpaymentsResponse"); + body = ObjectSerializer.deserialize(response.data, "Overpayments"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -12445,7 +12441,7 @@ export class AccountingApi { * @param page Up to 100 payments will be returned in a single API call * @param pageSize Number of records to retrieve per page */ - public async getPayments (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetPaymentsResponse; }> { + public async getPayments (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Payments; }> { const localVarPath = this.basePath + '/Payments'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -12506,11 +12502,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetPaymentsResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: Payments; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetPaymentsResponse"); + body = ObjectSerializer.deserialize(response.data, "Payments"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -12681,8 +12677,9 @@ export class AccountingApi { * @param order Order by an any element * @param page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + * @param pageSize Number of records to retrieve per page */ - public async getPrepayments (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetPrepaymentsResponse; }> { + public async getPrepayments (xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: Prepayments; }> { const localVarPath = this.basePath + '/Prepayments'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -12714,6 +12711,10 @@ export class AccountingApi { localVarQueryParameters['unitdp'] = ObjectSerializer.serialize(unitdp, "number"); } + if (pageSize !== undefined) { + localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); + } + localVarHeaderParams['xero-tenant-id'] = ObjectSerializer.serialize(xeroTenantId, "string"); localVarHeaderParams['If-Modified-Since'] = ObjectSerializer.serialize(ifModifiedSince, "Date"); localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join(); @@ -12743,11 +12744,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetPrepaymentsResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: Prepayments; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetPrepaymentsResponse"); + body = ObjectSerializer.deserialize(response.data, "Prepayments"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { @@ -13319,7 +13320,7 @@ export class AccountingApi { * @param page To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. * @param pageSize Number of records to retrieve per page */ - public async getPurchaseOrders (xeroTenantId: string, ifModifiedSince?: Date, status?: 'DRAFT' | 'SUBMITTED' | 'AUTHORISED' | 'BILLED' | 'DELETED', dateFrom?: string, dateTo?: string, order?: string, page?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: GetPurchaseOrdersResponse; }> { + public async getPurchaseOrders (xeroTenantId: string, ifModifiedSince?: Date, status?: 'DRAFT' | 'SUBMITTED' | 'AUTHORISED' | 'BILLED' | 'DELETED', dateFrom?: string, dateTo?: string, order?: string, page?: number, pageSize?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: AxiosResponse; body: PurchaseOrders; }> { const localVarPath = this.basePath + '/PurchaseOrders'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -13388,11 +13389,11 @@ export class AccountingApi { localVarRequestOptions.headers = { ...localVarRequestOptions.headers, 'content-type': 'application/x-www-form-urlencoded' }; } } - return new Promise<{ response: AxiosResponse; body: GetPurchaseOrdersResponse; }>(async (resolve, reject) => { + return new Promise<{ response: AxiosResponse; body: PurchaseOrders; }>(async (resolve, reject) => { let body = null try { const response = await axios(localVarRequestOptions) - body = ObjectSerializer.deserialize(response.data, "GetPurchaseOrdersResponse"); + body = ObjectSerializer.deserialize(response.data, "PurchaseOrders"); if (response.status && response.status >= 200 && response.status <= 299) { resolve({ response: response, body: body }); } else { diff --git a/src/gen/model/accounting/bankTransactions.ts b/src/gen/model/accounting/bankTransactions.ts index 3aa8c1f8..4eee07f5 100644 --- a/src/gen/model/accounting/bankTransactions.ts +++ b/src/gen/model/accounting/bankTransactions.ts @@ -1,11 +1,18 @@ import { BankTransaction } from '././bankTransaction'; +import { Pagination } from '././pagination'; export class BankTransactions { + 'pagination'?: Pagination; 'bankTransactions'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "bankTransactions", "baseName": "BankTransactions", diff --git a/src/gen/model/accounting/contacts.ts b/src/gen/model/accounting/contacts.ts index e57651e8..37e61e58 100644 --- a/src/gen/model/accounting/contacts.ts +++ b/src/gen/model/accounting/contacts.ts @@ -1,11 +1,18 @@ import { Contact } from '././contact'; +import { Pagination } from '././pagination'; export class Contacts { + 'pagination'?: Pagination; 'contacts'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "contacts", "baseName": "Contacts", diff --git a/src/gen/model/accounting/creditNotes.ts b/src/gen/model/accounting/creditNotes.ts index aa961b6b..58319d4e 100644 --- a/src/gen/model/accounting/creditNotes.ts +++ b/src/gen/model/accounting/creditNotes.ts @@ -1,11 +1,18 @@ import { CreditNote } from '././creditNote'; +import { Pagination } from '././pagination'; export class CreditNotes { + 'pagination'?: Pagination; 'creditNotes'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "creditNotes", "baseName": "CreditNotes", diff --git a/src/gen/model/accounting/getBankTransactionsResponse.ts b/src/gen/model/accounting/getBankTransactionsResponse.ts deleted file mode 100644 index 43c95297..00000000 --- a/src/gen/model/accounting/getBankTransactionsResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { BankTransaction } from '././bankTransaction'; -import { PageInfo } from '././pageInfo'; - -export class GetBankTransactionsResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'bankTransactions'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "bankTransactions", - "baseName": "BankTransactions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetBankTransactionsResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getContactsResponse.ts b/src/gen/model/accounting/getContactsResponse.ts deleted file mode 100644 index 4456cc55..00000000 --- a/src/gen/model/accounting/getContactsResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Contact } from '././contact'; -import { PageInfo } from '././pageInfo'; - -export class GetContactsResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'contacts'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "contacts", - "baseName": "Contacts", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetContactsResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getCreditNotesResponse.ts b/src/gen/model/accounting/getCreditNotesResponse.ts deleted file mode 100644 index 073e2afd..00000000 --- a/src/gen/model/accounting/getCreditNotesResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { CreditNote } from '././creditNote'; -import { PageInfo } from '././pageInfo'; - -export class GetCreditNotesResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'creditNotes'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "creditNotes", - "baseName": "CreditNotes", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetCreditNotesResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getInvoicesResponse.ts b/src/gen/model/accounting/getInvoicesResponse.ts deleted file mode 100644 index 261826d1..00000000 --- a/src/gen/model/accounting/getInvoicesResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Invoice } from '././invoice'; -import { PageInfo } from '././pageInfo'; - -export class GetInvoicesResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'invoices'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "invoices", - "baseName": "Invoices", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetInvoicesResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getManualJournalsResponse.ts b/src/gen/model/accounting/getManualJournalsResponse.ts deleted file mode 100644 index dc0e5022..00000000 --- a/src/gen/model/accounting/getManualJournalsResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ManualJournal } from '././manualJournal'; -import { PageInfo } from '././pageInfo'; - -export class GetManualJournalsResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'manualJournals'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "manualJournals", - "baseName": "ManualJournals", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetManualJournalsResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getOverpaymentsResponse.ts b/src/gen/model/accounting/getOverpaymentsResponse.ts deleted file mode 100644 index b2668e7a..00000000 --- a/src/gen/model/accounting/getOverpaymentsResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Overpayment } from '././overpayment'; -import { PageInfo } from '././pageInfo'; - -export class GetOverpaymentsResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'overpayments'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "overpayments", - "baseName": "Overpayments", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetOverpaymentsResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getPaymentsResponse.ts b/src/gen/model/accounting/getPaymentsResponse.ts deleted file mode 100644 index fd057ff9..00000000 --- a/src/gen/model/accounting/getPaymentsResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { PageInfo } from '././pageInfo'; -import { Payment } from '././payment'; - -export class GetPaymentsResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'payments'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "payments", - "baseName": "Payments", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetPaymentsResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getPrepaymentsResponse.ts b/src/gen/model/accounting/getPrepaymentsResponse.ts deleted file mode 100644 index 2d9d09a1..00000000 --- a/src/gen/model/accounting/getPrepaymentsResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { PageInfo } from '././pageInfo'; -import { Prepayment } from '././prepayment'; - -export class GetPrepaymentsResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'prepayments'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "prepayments", - "baseName": "Prepayments", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetPrepaymentsResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/getPurchaseOrdersResponse.ts b/src/gen/model/accounting/getPurchaseOrdersResponse.ts deleted file mode 100644 index 4ecd266c..00000000 --- a/src/gen/model/accounting/getPurchaseOrdersResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { PageInfo } from '././pageInfo'; -import { PurchaseOrder } from '././purchaseOrder'; - -export class GetPurchaseOrdersResponse { - 'id'?: string; - 'status'?: string; - 'providerName'?: string; - 'dateTimeUTC'?: string; - 'pageInfo'?: PageInfo; - 'purchaseOrders'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "Id", - "type": "string" - }, - { - "name": "status", - "baseName": "Status", - "type": "string" - }, - { - "name": "providerName", - "baseName": "ProviderName", - "type": "string" - }, - { - "name": "dateTimeUTC", - "baseName": "DateTimeUTC", - "type": "string" - }, - { - "name": "pageInfo", - "baseName": "PageInfo", - "type": "PageInfo" - }, - { - "name": "purchaseOrders", - "baseName": "PurchaseOrders", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return GetPurchaseOrdersResponse.attributeTypeMap; - } -} - diff --git a/src/gen/model/accounting/invoices.ts b/src/gen/model/accounting/invoices.ts index 3a695866..b5aac365 100644 --- a/src/gen/model/accounting/invoices.ts +++ b/src/gen/model/accounting/invoices.ts @@ -1,11 +1,18 @@ import { Invoice } from '././invoice'; +import { Pagination } from '././pagination'; export class Invoices { + 'pagination'?: Pagination; 'invoices'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "invoices", "baseName": "Invoices", diff --git a/src/gen/model/accounting/manualJournals.ts b/src/gen/model/accounting/manualJournals.ts index 3c772197..4eeb8d82 100644 --- a/src/gen/model/accounting/manualJournals.ts +++ b/src/gen/model/accounting/manualJournals.ts @@ -1,11 +1,18 @@ import { ManualJournal } from '././manualJournal'; +import { Pagination } from '././pagination'; export class ManualJournals { + 'pagination'?: Pagination; 'manualJournals'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "manualJournals", "baseName": "ManualJournals", diff --git a/src/gen/model/accounting/models.ts b/src/gen/model/accounting/models.ts index db16744f..6a99d9bd 100644 --- a/src/gen/model/accounting/models.ts +++ b/src/gen/model/accounting/models.ts @@ -52,15 +52,6 @@ export * from '././employees'; export * from '././expenseClaim'; export * from '././expenseClaims'; export * from '././externalLink'; -export * from '././getBankTransactionsResponse'; -export * from '././getContactsResponse'; -export * from '././getCreditNotesResponse'; -export * from '././getInvoicesResponse'; -export * from '././getManualJournalsResponse'; -export * from '././getOverpaymentsResponse'; -export * from '././getPaymentsResponse'; -export * from '././getPrepaymentsResponse'; -export * from '././getPurchaseOrdersResponse'; export * from '././historyRecord'; export * from '././historyRecords'; export * from '././importSummary'; @@ -92,7 +83,7 @@ export * from '././organisation'; export * from '././organisations'; export * from '././overpayment'; export * from '././overpayments'; -export * from '././pageInfo'; +export * from '././pagination'; export * from '././payment'; export * from '././paymentDelete'; export * from '././paymentService'; @@ -196,15 +187,6 @@ import { Employees } from '././employees'; import { ExpenseClaim } from '././expenseClaim'; import { ExpenseClaims } from '././expenseClaims'; import { ExternalLink } from '././externalLink'; -import { GetBankTransactionsResponse } from '././getBankTransactionsResponse'; -import { GetContactsResponse } from '././getContactsResponse'; -import { GetCreditNotesResponse } from '././getCreditNotesResponse'; -import { GetInvoicesResponse } from '././getInvoicesResponse'; -import { GetManualJournalsResponse } from '././getManualJournalsResponse'; -import { GetOverpaymentsResponse } from '././getOverpaymentsResponse'; -import { GetPaymentsResponse } from '././getPaymentsResponse'; -import { GetPrepaymentsResponse } from '././getPrepaymentsResponse'; -import { GetPurchaseOrdersResponse } from '././getPurchaseOrdersResponse'; import { HistoryRecord } from '././historyRecord'; import { HistoryRecords } from '././historyRecords'; import { ImportSummary } from '././importSummary'; @@ -236,7 +218,7 @@ import { Organisation } from '././organisation'; import { Organisations } from '././organisations'; import { Overpayment } from '././overpayment'; import { Overpayments } from '././overpayments'; -import { PageInfo } from '././pageInfo'; +import { Pagination } from '././pagination'; import { Payment } from '././payment'; import { PaymentDelete } from '././paymentDelete'; import { PaymentService } from '././paymentService'; @@ -419,15 +401,6 @@ let typeMap: {[index: string]: any} = { "ExpenseClaim": ExpenseClaim, "ExpenseClaims": ExpenseClaims, "ExternalLink": ExternalLink, - "GetBankTransactionsResponse": GetBankTransactionsResponse, - "GetContactsResponse": GetContactsResponse, - "GetCreditNotesResponse": GetCreditNotesResponse, - "GetInvoicesResponse": GetInvoicesResponse, - "GetManualJournalsResponse": GetManualJournalsResponse, - "GetOverpaymentsResponse": GetOverpaymentsResponse, - "GetPaymentsResponse": GetPaymentsResponse, - "GetPrepaymentsResponse": GetPrepaymentsResponse, - "GetPurchaseOrdersResponse": GetPurchaseOrdersResponse, "HistoryRecord": HistoryRecord, "HistoryRecords": HistoryRecords, "ImportSummary": ImportSummary, @@ -458,7 +431,7 @@ let typeMap: {[index: string]: any} = { "Organisations": Organisations, "Overpayment": Overpayment, "Overpayments": Overpayments, - "PageInfo": PageInfo, + "Pagination": Pagination, "Payment": Payment, "PaymentDelete": PaymentDelete, "PaymentService": PaymentService, diff --git a/src/gen/model/accounting/overpayments.ts b/src/gen/model/accounting/overpayments.ts index bf4d75b1..36ce1789 100644 --- a/src/gen/model/accounting/overpayments.ts +++ b/src/gen/model/accounting/overpayments.ts @@ -1,11 +1,18 @@ import { Overpayment } from '././overpayment'; +import { Pagination } from '././pagination'; export class Overpayments { + 'pagination'?: Pagination; 'overpayments'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "overpayments", "baseName": "Overpayments", diff --git a/src/gen/model/accounting/pageInfo.ts b/src/gen/model/accounting/pagination.ts similarity index 58% rename from src/gen/model/accounting/pageInfo.ts rename to src/gen/model/accounting/pagination.ts index c5fcad34..ac3898a6 100644 --- a/src/gen/model/accounting/pageInfo.ts +++ b/src/gen/model/accounting/pagination.ts @@ -1,39 +1,36 @@ -/** -* Pagination information -*/ -export class PageInfo { +export class Pagination { 'page'?: number; 'pageSize'?: number; - 'totalPages'?: number; - 'totalRows'?: number; + 'pageCount'?: number; + 'itemCount'?: number; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { "name": "page", - "baseName": "Page", + "baseName": "page", "type": "number" }, { "name": "pageSize", - "baseName": "PageSize", + "baseName": "pageSize", "type": "number" }, { - "name": "totalPages", - "baseName": "TotalPages", + "name": "pageCount", + "baseName": "pageCount", "type": "number" }, { - "name": "totalRows", - "baseName": "TotalRows", + "name": "itemCount", + "baseName": "itemCount", "type": "number" } ]; static getAttributeTypeMap() { - return PageInfo.attributeTypeMap; + return Pagination.attributeTypeMap; } } diff --git a/src/gen/model/accounting/payments.ts b/src/gen/model/accounting/payments.ts index d6a26d1f..0589447a 100644 --- a/src/gen/model/accounting/payments.ts +++ b/src/gen/model/accounting/payments.ts @@ -1,11 +1,18 @@ +import { Pagination } from '././pagination'; import { Payment } from '././payment'; export class Payments { + 'pagination'?: Pagination; 'payments'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "payments", "baseName": "Payments", diff --git a/src/gen/model/accounting/prepayments.ts b/src/gen/model/accounting/prepayments.ts index 6cb916f1..fd2dfedf 100644 --- a/src/gen/model/accounting/prepayments.ts +++ b/src/gen/model/accounting/prepayments.ts @@ -1,11 +1,18 @@ +import { Pagination } from '././pagination'; import { Prepayment } from '././prepayment'; export class Prepayments { + 'pagination'?: Pagination; 'prepayments'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "prepayments", "baseName": "Prepayments", diff --git a/src/gen/model/accounting/purchaseOrders.ts b/src/gen/model/accounting/purchaseOrders.ts index d4247826..2fdf3b6e 100644 --- a/src/gen/model/accounting/purchaseOrders.ts +++ b/src/gen/model/accounting/purchaseOrders.ts @@ -1,11 +1,18 @@ +import { Pagination } from '././pagination'; import { PurchaseOrder } from '././purchaseOrder'; export class PurchaseOrders { + 'pagination'?: Pagination; 'purchaseOrders'?: Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pagination", + "baseName": "pagination", + "type": "Pagination" + }, { "name": "purchaseOrders", "baseName": "PurchaseOrders", From 8b917b288b0d05a5ea9bb3060f807d3337d05e8f Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Wed, 10 Jul 2024 14:56:45 +0530 Subject: [PATCH 2/4] OAS version number changes --- src/gen/api/accountingApi.ts | 2 +- src/gen/api/appStoreApi.ts | 2 +- src/gen/api/assetApi.ts | 2 +- src/gen/api/bankfeedsApi.ts | 2 +- src/gen/api/filesApi.ts | 2 +- src/gen/api/financeApi.ts | 2 +- src/gen/api/payrollAUApi.ts | 2 +- src/gen/api/payrollNZApi.ts | 2 +- src/gen/api/payrollUKApi.ts | 2 +- src/gen/api/projectApi.ts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gen/api/accountingApi.ts b/src/gen/api/accountingApi.ts index c2f25fc3..8d7f99b9 100644 --- a/src/gen/api/accountingApi.ts +++ b/src/gen/api/accountingApi.ts @@ -2,7 +2,7 @@ * Xero Accounting API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/appStoreApi.ts b/src/gen/api/appStoreApi.ts index 3330ffe3..67116b44 100644 --- a/src/gen/api/appStoreApi.ts +++ b/src/gen/api/appStoreApi.ts @@ -2,7 +2,7 @@ * Xero AppStore API * These endpoints are for Xero Partners to interact with the App Store Billing platform * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/assetApi.ts b/src/gen/api/assetApi.ts index ff04ca75..748f8789 100644 --- a/src/gen/api/assetApi.ts +++ b/src/gen/api/assetApi.ts @@ -2,7 +2,7 @@ * Xero Assets API * The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc. * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/bankfeedsApi.ts b/src/gen/api/bankfeedsApi.ts index 96ab8448..78abdaa9 100644 --- a/src/gen/api/bankfeedsApi.ts +++ b/src/gen/api/bankfeedsApi.ts @@ -2,7 +2,7 @@ * Xero Bank Feeds API * The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you\'re an existing financial services partner that wants access, contact your local Partner Manager. If you\'re a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner. * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/filesApi.ts b/src/gen/api/filesApi.ts index 1619fca4..36f51939 100644 --- a/src/gen/api/filesApi.ts +++ b/src/gen/api/filesApi.ts @@ -2,7 +2,7 @@ * Xero Files API * These endpoints are specific to Xero Files API * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/financeApi.ts b/src/gen/api/financeApi.ts index 8eea7972..730aae46 100644 --- a/src/gen/api/financeApi.ts +++ b/src/gen/api/financeApi.ts @@ -2,7 +2,7 @@ * Xero Finance API * The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/payrollAUApi.ts b/src/gen/api/payrollAUApi.ts index 05a112e0..caea4d89 100644 --- a/src/gen/api/payrollAUApi.ts +++ b/src/gen/api/payrollAUApi.ts @@ -2,7 +2,7 @@ * Xero Payroll AU API * This is the Xero Payroll API for orgs in Australia region. * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/payrollNZApi.ts b/src/gen/api/payrollNZApi.ts index ea684197..586c037e 100644 --- a/src/gen/api/payrollNZApi.ts +++ b/src/gen/api/payrollNZApi.ts @@ -2,7 +2,7 @@ * Xero Payroll NZ * This is the Xero Payroll API for orgs in the NZ region. * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/payrollUKApi.ts b/src/gen/api/payrollUKApi.ts index 717f1ed6..d4946fad 100644 --- a/src/gen/api/payrollUKApi.ts +++ b/src/gen/api/payrollUKApi.ts @@ -2,7 +2,7 @@ * Xero Payroll UK * This is the Xero Payroll API for orgs in the UK region. * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/gen/api/projectApi.ts b/src/gen/api/projectApi.ts index f6a5eae2..6932eba9 100644 --- a/src/gen/api/projectApi.ts +++ b/src/gen/api/projectApi.ts @@ -2,7 +2,7 @@ * Xero Projects API * This is the Xero Projects API * - * The version of the OpenAPI document: 5.0.0 + * The version of the OpenAPI document: 5.0.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). From 8ff94263a5d0b98da72de10998f35a5f95208fdc Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Wed, 10 Jul 2024 17:30:57 +0530 Subject: [PATCH 3/4] new OAS 5.0.1 changes --- docs/accounting/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 762c969b..ecb9e7ce 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -12871,14 +12871,14 @@

Usage and SDK Samples

const manualJournalLines = []; const credit: ManualJournalLine = { - lineAmount: 100.0, + lineAmount: -100.0, accountCode: "400", description: "Hello there" }; manualJournalLines.push(credit) const debit: ManualJournalLine = { - lineAmount: -100.0, + lineAmount: 100.0, accountCode: "120", description: "Hello there" }; @@ -40928,14 +40928,14 @@

Usage and SDK Samples

const manualJournalLines = []; const credit: ManualJournalLine = { - lineAmount: 100.0, + lineAmount: -100.0, accountCode: "400", description: "Hello there" }; manualJournalLines.push(credit) const debit: ManualJournalLine = { - lineAmount: -100.0, + lineAmount: 100.0, accountCode: "120", description: "Hello there" }; @@ -42516,14 +42516,14 @@

Usage and SDK Samples

const manualJournalLines = []; const credit: ManualJournalLine = { - lineAmount: 100.0, + lineAmount: -100.0, accountCode: "400", description: "Hello there" }; manualJournalLines.push(credit) const debit: ManualJournalLine = { - lineAmount: -100.0, + lineAmount: 100.0, accountCode: "120", description: "Hello there" }; From 1f3cbe9e69d5433f099f7f813373c39115516249 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Thu, 11 Jul 2024 19:46:56 +0530 Subject: [PATCH 4/4] Build from OAS 6.0.0 --- docs/accounting/index.html | 2 +- docs/appstore/index.html | 2 +- docs/assets/index.html | 2 +- docs/bankfeeds/index.html | 2 +- docs/files/index.html | 2 +- docs/finance/index.html | 2 +- docs/payroll-au/index.html | 2 +- docs/payroll-nz/index.html | 2 +- docs/payroll-uk/index.html | 2 +- docs/projects/index.html | 2 +- package.json | 2 +- src/gen/api/accountingApi.ts | 4 ++-- src/gen/api/appStoreApi.ts | 4 ++-- src/gen/api/assetApi.ts | 4 ++-- src/gen/api/bankfeedsApi.ts | 4 ++-- src/gen/api/filesApi.ts | 4 ++-- src/gen/api/financeApi.ts | 4 ++-- src/gen/api/payrollAUApi.ts | 4 ++-- src/gen/api/payrollNZApi.ts | 4 ++-- src/gen/api/payrollUKApi.ts | 4 ++-- src/gen/api/projectApi.ts | 4 ++-- 21 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/accounting/index.html b/docs/accounting/index.html index ecb9e7ce..1eda8d3d 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -6147,7 +6147,7 @@