xero-node 18.0.0 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/gen/api/accountingApi.d.ts +48 -8
  2. package/dist/gen/api/accountingApi.js +195 -15
  3. package/dist/gen/api/accountingApi.js.map +1 -1
  4. package/dist/gen/api/appStoreApi.d.ts +1 -1
  5. package/dist/gen/api/appStoreApi.js +2 -2
  6. package/dist/gen/api/assetApi.d.ts +1 -1
  7. package/dist/gen/api/assetApi.js +2 -2
  8. package/dist/gen/api/bankfeedsApi.d.ts +1 -1
  9. package/dist/gen/api/bankfeedsApi.js +2 -2
  10. package/dist/gen/api/filesApi.d.ts +1 -1
  11. package/dist/gen/api/filesApi.js +2 -2
  12. package/dist/gen/api/financeApi.d.ts +1 -1
  13. package/dist/gen/api/financeApi.js +2 -2
  14. package/dist/gen/api/payrollAUApi.d.ts +1 -1
  15. package/dist/gen/api/payrollAUApi.js +2 -2
  16. package/dist/gen/api/payrollAUV2Api.d.ts +1 -1
  17. package/dist/gen/api/payrollAUV2Api.js +2 -2
  18. package/dist/gen/api/payrollNZApi.d.ts +1 -1
  19. package/dist/gen/api/payrollNZApi.js +2 -2
  20. package/dist/gen/api/payrollUKApi.d.ts +1 -1
  21. package/dist/gen/api/payrollUKApi.js +2 -2
  22. package/dist/gen/api/projectApi.d.ts +1 -1
  23. package/dist/gen/api/projectApi.js +2 -2
  24. package/dist/gen/model/accounting/bankTransfer.d.ts +19 -0
  25. package/dist/gen/model/accounting/bankTransfer.js +22 -0
  26. package/dist/gen/model/accounting/bankTransfer.js.map +1 -1
  27. package/dist/gen/model/accounting/bankTransferDelete.d.ts +21 -0
  28. package/dist/gen/model/accounting/bankTransferDelete.js +23 -0
  29. package/dist/gen/model/accounting/bankTransferDelete.js.map +1 -0
  30. package/dist/gen/model/accounting/bankTransferDeleteByUrlParam.d.ts +17 -0
  31. package/dist/gen/model/accounting/bankTransferDeleteByUrlParam.js +18 -0
  32. package/dist/gen/model/accounting/bankTransferDeleteByUrlParam.js.map +1 -0
  33. package/dist/gen/model/accounting/bankTransfersDelete.d.ts +15 -0
  34. package/dist/gen/model/accounting/bankTransfersDelete.js +18 -0
  35. package/dist/gen/model/accounting/bankTransfersDelete.js.map +1 -0
  36. package/dist/gen/model/accounting/creditNote.d.ts +4 -0
  37. package/dist/gen/model/accounting/creditNote.js +5 -0
  38. package/dist/gen/model/accounting/creditNote.js.map +1 -1
  39. package/dist/gen/model/accounting/invoice.d.ts +5 -1
  40. package/dist/gen/model/accounting/invoice.js +5 -0
  41. package/dist/gen/model/accounting/invoice.js.map +1 -1
  42. package/dist/gen/model/accounting/item.d.ts +9 -1
  43. package/dist/gen/model/accounting/item.js +10 -0
  44. package/dist/gen/model/accounting/item.js.map +1 -1
  45. package/dist/gen/model/accounting/models.d.ts +4 -0
  46. package/dist/gen/model/accounting/models.js +13 -0
  47. package/dist/gen/model/accounting/models.js.map +1 -1
  48. package/dist/gen/model/accounting/overpayment.d.ts +4 -0
  49. package/dist/gen/model/accounting/overpayment.js +5 -0
  50. package/dist/gen/model/accounting/overpayment.js.map +1 -1
  51. package/dist/gen/model/accounting/payment.d.ts +4 -0
  52. package/dist/gen/model/accounting/payment.js +5 -0
  53. package/dist/gen/model/accounting/payment.js.map +1 -1
  54. package/dist/gen/model/accounting/prepayment.d.ts +4 -0
  55. package/dist/gen/model/accounting/prepayment.js +5 -0
  56. package/dist/gen/model/accounting/prepayment.js.map +1 -1
  57. package/dist/gen/model/accounting/trackingReference.d.ts +29 -0
  58. package/dist/gen/model/accounting/trackingReference.js +33 -0
  59. package/dist/gen/model/accounting/trackingReference.js.map +1 -0
  60. package/dist/model/ApiError.js +12 -10
  61. package/dist/model/ApiError.js.map +1 -1
  62. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  * Xero Accounting API
3
3
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
- * The version of the OpenAPI document: 16.0.0
5
+ * The version of the OpenAPI document: 16.2.0
6
6
  * Contact: api@xero.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -17,7 +17,9 @@ import { Allocation } from '../model/accounting/allocation';
17
17
  import { Allocations } from '../model/accounting/allocations';
18
18
  import { Attachments } from '../model/accounting/attachments';
19
19
  import { BankTransactions } from '../model/accounting/bankTransactions';
20
+ import { BankTransferDeleteByUrlParam } from '../model/accounting/bankTransferDeleteByUrlParam';
20
21
  import { BankTransfers } from '../model/accounting/bankTransfers';
22
+ import { BankTransfersDelete } from '../model/accounting/bankTransfersDelete';
21
23
  import { BatchPaymentDelete } from '../model/accounting/batchPaymentDelete';
22
24
  import { BatchPaymentDeleteByUrlParam } from '../model/accounting/batchPaymentDeleteByUrlParam';
23
25
  import { BatchPayments } from '../model/accounting/batchPayments';
@@ -496,8 +498,9 @@ export declare class AccountingApi {
496
498
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
497
499
  * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
498
500
  * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
501
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
499
502
  */
500
- createInvoices(xeroTenantId: string, invoices: Invoices, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, options?: {
503
+ createInvoices(xeroTenantId: string, invoices: Invoices, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, allowBackorders?: boolean, options?: {
501
504
  headers: {
502
505
  [name: string]: string;
503
506
  };
@@ -986,6 +989,38 @@ export declare class AccountingApi {
986
989
  response: AxiosResponse;
987
990
  body: Accounts;
988
991
  }>;
992
+ /**
993
+ *
994
+ * @summary Deletes a specific bank transfer
995
+ * @param xeroTenantId Xero identifier for Tenant
996
+ * @param bankTransferID Xero generated unique identifier for a bank transfer
997
+ * @param bankTransferDeleteByUrlParam
998
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
999
+ */
1000
+ deleteBankTransfer(xeroTenantId: string, bankTransferID: string, bankTransferDeleteByUrlParam: BankTransferDeleteByUrlParam, idempotencyKey?: string, options?: {
1001
+ headers: {
1002
+ [name: string]: string;
1003
+ };
1004
+ }): Promise<{
1005
+ response: AxiosResponse;
1006
+ body: BankTransfers;
1007
+ }>;
1008
+ /**
1009
+ *
1010
+ * @summary Deletes one or more bank transfers
1011
+ * @param xeroTenantId Xero identifier for Tenant
1012
+ * @param bankTransfersDelete BankTransfers with array of BankTransfer objects in request body
1013
+ * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
1014
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1015
+ */
1016
+ deleteBankTransfers(xeroTenantId: string, bankTransfersDelete: BankTransfersDelete, summarizeErrors?: boolean, idempotencyKey?: string, options?: {
1017
+ headers: {
1018
+ [name: string]: string;
1019
+ };
1020
+ }): Promise<{
1021
+ response: AxiosResponse;
1022
+ body: BankTransfers;
1023
+ }>;
989
1024
  /**
990
1025
  *
991
1026
  * @summary Updates a specific batch payment for invoices and credit notes
@@ -1327,8 +1362,9 @@ export declare class AccountingApi {
1327
1362
  * @param page Up to 100 bank transactions will be returned in a single API call with line items details
1328
1363
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
1329
1364
  * @param pageSize Number of records to retrieve per page
1365
+ * @param references Filter by a comma-separated list of References
1330
1366
  */
1331
- getBankTransactions(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, options?: {
1367
+ getBankTransactions(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, references?: Array<string>, options?: {
1332
1368
  headers: {
1333
1369
  [name: string]: string;
1334
1370
  };
@@ -1431,8 +1467,9 @@ export declare class AccountingApi {
1431
1467
  * @param ifModifiedSince Only records created or modified since this timestamp will be returned
1432
1468
  * @param where Filter by an any element
1433
1469
  * @param order Order by an any element
1470
+ * @param includeDeleted e.g. includeDeleted&#x3D;true - Bank transfers with a status of DELETED will be included in the response
1434
1471
  */
1435
- getBankTransfers(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, options?: {
1472
+ getBankTransfers(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, includeDeleted?: boolean, options?: {
1436
1473
  headers: {
1437
1474
  [name: string]: string;
1438
1475
  };
@@ -2417,12 +2454,13 @@ export declare class AccountingApi {
2417
2454
  * @param ifModifiedSince Only records created or modified since this timestamp will be returned
2418
2455
  * @param where Filter by an any element
2419
2456
  * @param order Order by an any element
2420
- * @param page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
2457
+ * @param page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment
2421
2458
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
2422
2459
  * @param pageSize Number of records to retrieve per page
2423
2460
  * @param invoiceNumbers Filter by a comma-separated list of InvoiceNumbers
2461
+ * @param references Filter by a comma-separated list of References
2424
2462
  */
2425
- getPrepayments(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, invoiceNumbers?: Array<string>, options?: {
2463
+ getPrepayments(xeroTenantId: string, ifModifiedSince?: Date, where?: string, order?: string, page?: number, unitdp?: number, pageSize?: number, invoiceNumbers?: Array<string>, references?: Array<string>, options?: {
2426
2464
  headers: {
2427
2465
  [name: string]: string;
2428
2466
  };
@@ -3315,8 +3353,9 @@ export declare class AccountingApi {
3315
3353
  * @param invoices
3316
3354
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
3317
3355
  * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3356
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
3318
3357
  */
3319
- updateInvoice(xeroTenantId: string, invoiceID: string, invoices: Invoices, unitdp?: number, idempotencyKey?: string, options?: {
3358
+ updateInvoice(xeroTenantId: string, invoiceID: string, invoices: Invoices, unitdp?: number, idempotencyKey?: string, allowBackorders?: boolean, options?: {
3320
3359
  headers: {
3321
3360
  [name: string]: string;
3322
3361
  };
@@ -3465,8 +3504,9 @@ export declare class AccountingApi {
3465
3504
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
3466
3505
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
3467
3506
  * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3507
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
3468
3508
  */
3469
- updateOrCreateInvoices(xeroTenantId: string, invoices: Invoices, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, options?: {
3509
+ updateOrCreateInvoices(xeroTenantId: string, invoices: Invoices, summarizeErrors?: boolean, unitdp?: number, idempotencyKey?: string, allowBackorders?: boolean, options?: {
3470
3510
  headers: {
3471
3511
  [name: string]: string;
3472
3512
  };
@@ -3,7 +3,7 @@
3
3
  * Xero Accounting API
4
4
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
  *
6
- * The version of the OpenAPI document: 16.0.0
6
+ * The version of the OpenAPI document: 16.2.0
7
7
  * Contact: api@xero.com
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -39,7 +39,7 @@ var AccountingApiApiKeys;
39
39
  class AccountingApi {
40
40
  constructor(basePathOrUsername, password, basePath) {
41
41
  this._basePath = defaultBasePath;
42
- this.defaultHeaders = { 'user-agent': 'xero-node-18.0.0' };
42
+ this.defaultHeaders = { 'user-agent': 'xero-node-19.1.0' };
43
43
  this._useQuerystring = false;
44
44
  this.binaryHeaders = {};
45
45
  this.authentications = {
@@ -2206,9 +2206,10 @@ class AccountingApi {
2206
2206
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
2207
2207
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
2208
2208
  * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2209
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
2209
2210
  */
2210
- createInvoices(xeroTenantId_1, invoices_1, summarizeErrors_1, unitdp_1, idempotencyKey_1) {
2211
- return __awaiter(this, arguments, void 0, function* (xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, options = { headers: {} }) {
2211
+ createInvoices(xeroTenantId_1, invoices_1, summarizeErrors_1, unitdp_1, idempotencyKey_1, allowBackorders_1) {
2212
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, allowBackorders, options = { headers: {} }) {
2212
2213
  const localVarPath = this.basePath + '/Invoices';
2213
2214
  let localVarQueryParameters = {};
2214
2215
  let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
@@ -2232,6 +2233,9 @@ class AccountingApi {
2232
2233
  if (unitdp !== undefined) {
2233
2234
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
2234
2235
  }
2236
+ if (allowBackorders !== undefined) {
2237
+ localVarQueryParameters['allowBackorders'] = models_1.ObjectSerializer.serialize(allowBackorders, "boolean");
2238
+ }
2235
2239
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2236
2240
  localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2237
2241
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -4750,6 +4754,162 @@ class AccountingApi {
4750
4754
  });
4751
4755
  });
4752
4756
  }
4757
+ /**
4758
+ *
4759
+ * @summary Deletes a specific bank transfer
4760
+ * @param xeroTenantId Xero identifier for Tenant
4761
+ * @param bankTransferID Xero generated unique identifier for a bank transfer
4762
+ * @param bankTransferDeleteByUrlParam
4763
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4764
+ */
4765
+ deleteBankTransfer(xeroTenantId_1, bankTransferID_1, bankTransferDeleteByUrlParam_1, idempotencyKey_1) {
4766
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, bankTransferID, bankTransferDeleteByUrlParam, idempotencyKey, options = { headers: {} }) {
4767
+ const localVarPath = this.basePath + '/BankTransfers/{BankTransferID}'
4768
+ .replace('{' + 'BankTransferID' + '}', encodeURIComponent(String(bankTransferID)));
4769
+ let localVarQueryParameters = {};
4770
+ let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
4771
+ let localVarFormParams = {};
4772
+ let acceptHeadersFromSpec = [
4773
+ "application/json"
4774
+ ];
4775
+ const isBufferType = acceptHeadersFromSpec.includes("application/pdf") || acceptHeadersFromSpec.includes("application/octet-stream") || acceptHeadersFromSpec.includes("application/jpg");
4776
+ const responseTypeOption = isBufferType ? "arraybuffer" : "json";
4777
+ // verify required parameter 'xeroTenantId' is not null or undefined
4778
+ if (xeroTenantId === null || xeroTenantId === undefined) {
4779
+ throw new Error('Required parameter xeroTenantId was null or undefined when calling deleteBankTransfer.');
4780
+ }
4781
+ // verify required parameter 'bankTransferID' is not null or undefined
4782
+ if (bankTransferID === null || bankTransferID === undefined) {
4783
+ throw new Error('Required parameter bankTransferID was null or undefined when calling deleteBankTransfer.');
4784
+ }
4785
+ // verify required parameter 'bankTransferDeleteByUrlParam' is not null or undefined
4786
+ if (bankTransferDeleteByUrlParam === null || bankTransferDeleteByUrlParam === undefined) {
4787
+ throw new Error('Required parameter bankTransferDeleteByUrlParam was null or undefined when calling deleteBankTransfer.');
4788
+ }
4789
+ localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4790
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4791
+ localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
4792
+ Object.assign(localVarHeaderParams, options.headers);
4793
+ let localVarUseFormData = false;
4794
+ let localVarRequestOptions = {
4795
+ method: 'POST',
4796
+ params: localVarQueryParameters,
4797
+ headers: localVarHeaderParams,
4798
+ url: localVarPath,
4799
+ responseType: responseTypeOption,
4800
+ data: models_1.ObjectSerializer.serialize(bankTransferDeleteByUrlParam, "BankTransferDeleteByUrlParam"),
4801
+ };
4802
+ let authenticationPromise = Promise.resolve();
4803
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
4804
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
4805
+ return authenticationPromise.then(() => {
4806
+ if (Object.keys(localVarFormParams).length) {
4807
+ if (localVarUseFormData) {
4808
+ localVarRequestOptions.data = localVarFormParams;
4809
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarRequestOptions.headers), { 'Content-Type': 'multipart/form-data' });
4810
+ }
4811
+ else {
4812
+ localVarRequestOptions.data = localVarFormParams;
4813
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarRequestOptions.headers), { 'content-type': 'application/x-www-form-urlencoded' });
4814
+ }
4815
+ }
4816
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
4817
+ let body = null;
4818
+ try {
4819
+ const response = yield (0, axios_1.default)(localVarRequestOptions);
4820
+ body = models_1.ObjectSerializer.deserialize(response.data, "BankTransfers");
4821
+ if (response.status && response.status >= 200 && response.status <= 299) {
4822
+ resolve({ response: response, body: body });
4823
+ }
4824
+ else {
4825
+ reject({ response: response, body: body });
4826
+ }
4827
+ }
4828
+ catch (error) {
4829
+ const errorResponse = new ApiError_1.ApiError(error);
4830
+ reject(JSON.stringify(errorResponse.generateError()));
4831
+ }
4832
+ }));
4833
+ });
4834
+ });
4835
+ }
4836
+ /**
4837
+ *
4838
+ * @summary Deletes one or more bank transfers
4839
+ * @param xeroTenantId Xero identifier for Tenant
4840
+ * @param bankTransfersDelete BankTransfers with array of BankTransfer objects in request body
4841
+ * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
4842
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4843
+ */
4844
+ deleteBankTransfers(xeroTenantId_1, bankTransfersDelete_1, summarizeErrors_1, idempotencyKey_1) {
4845
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, bankTransfersDelete, summarizeErrors, idempotencyKey, options = { headers: {} }) {
4846
+ const localVarPath = this.basePath + '/BankTransfers';
4847
+ let localVarQueryParameters = {};
4848
+ let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
4849
+ let localVarFormParams = {};
4850
+ let acceptHeadersFromSpec = [
4851
+ "application/json"
4852
+ ];
4853
+ const isBufferType = acceptHeadersFromSpec.includes("application/pdf") || acceptHeadersFromSpec.includes("application/octet-stream") || acceptHeadersFromSpec.includes("application/jpg");
4854
+ const responseTypeOption = isBufferType ? "arraybuffer" : "json";
4855
+ // verify required parameter 'xeroTenantId' is not null or undefined
4856
+ if (xeroTenantId === null || xeroTenantId === undefined) {
4857
+ throw new Error('Required parameter xeroTenantId was null or undefined when calling deleteBankTransfers.');
4858
+ }
4859
+ // verify required parameter 'bankTransfersDelete' is not null or undefined
4860
+ if (bankTransfersDelete === null || bankTransfersDelete === undefined) {
4861
+ throw new Error('Required parameter bankTransfersDelete was null or undefined when calling deleteBankTransfers.');
4862
+ }
4863
+ if (summarizeErrors !== undefined) {
4864
+ localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
4865
+ }
4866
+ localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4867
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4868
+ localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
4869
+ Object.assign(localVarHeaderParams, options.headers);
4870
+ let localVarUseFormData = false;
4871
+ let localVarRequestOptions = {
4872
+ method: 'POST',
4873
+ params: localVarQueryParameters,
4874
+ headers: localVarHeaderParams,
4875
+ url: localVarPath,
4876
+ responseType: responseTypeOption,
4877
+ data: models_1.ObjectSerializer.serialize(bankTransfersDelete, "BankTransfersDelete"),
4878
+ };
4879
+ let authenticationPromise = Promise.resolve();
4880
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
4881
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
4882
+ return authenticationPromise.then(() => {
4883
+ if (Object.keys(localVarFormParams).length) {
4884
+ if (localVarUseFormData) {
4885
+ localVarRequestOptions.data = localVarFormParams;
4886
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarRequestOptions.headers), { 'Content-Type': 'multipart/form-data' });
4887
+ }
4888
+ else {
4889
+ localVarRequestOptions.data = localVarFormParams;
4890
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarRequestOptions.headers), { 'content-type': 'application/x-www-form-urlencoded' });
4891
+ }
4892
+ }
4893
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
4894
+ let body = null;
4895
+ try {
4896
+ const response = yield (0, axios_1.default)(localVarRequestOptions);
4897
+ body = models_1.ObjectSerializer.deserialize(response.data, "BankTransfers");
4898
+ if (response.status && response.status >= 200 && response.status <= 299) {
4899
+ resolve({ response: response, body: body });
4900
+ }
4901
+ else {
4902
+ reject({ response: response, body: body });
4903
+ }
4904
+ }
4905
+ catch (error) {
4906
+ const errorResponse = new ApiError_1.ApiError(error);
4907
+ reject(JSON.stringify(errorResponse.generateError()));
4908
+ }
4909
+ }));
4910
+ });
4911
+ });
4912
+ }
4753
4913
  /**
4754
4914
  *
4755
4915
  * @summary Updates a specific batch payment for invoices and credit notes
@@ -6445,9 +6605,10 @@ class AccountingApi {
6445
6605
  * @param page Up to 100 bank transactions will be returned in a single API call with line items details
6446
6606
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
6447
6607
  * @param pageSize Number of records to retrieve per page
6608
+ * @param references Filter by a comma-separated list of References
6448
6609
  */
6449
- getBankTransactions(xeroTenantId_1, ifModifiedSince_1, where_1, order_1, page_1, unitdp_1, pageSize_1) {
6450
- return __awaiter(this, arguments, void 0, function* (xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, options = { headers: {} }) {
6610
+ getBankTransactions(xeroTenantId_1, ifModifiedSince_1, where_1, order_1, page_1, unitdp_1, pageSize_1, references_1) {
6611
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, references, options = { headers: {} }) {
6451
6612
  const localVarPath = this.basePath + '/BankTransactions';
6452
6613
  let localVarQueryParameters = {};
6453
6614
  let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
@@ -6476,6 +6637,9 @@ class AccountingApi {
6476
6637
  if (pageSize !== undefined) {
6477
6638
  localVarQueryParameters['pageSize'] = models_1.ObjectSerializer.serialize(pageSize, "number");
6478
6639
  }
6640
+ if (references !== undefined) {
6641
+ localVarQueryParameters['References'] = models_1.ObjectSerializer.serialize(references, "Array<string>");
6642
+ }
6479
6643
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
6480
6644
  localVarHeaderParams['If-Modified-Since'] = models_1.ObjectSerializer.serialize(ifModifiedSince, "Date");
6481
6645
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -6986,9 +7150,10 @@ class AccountingApi {
6986
7150
  * @param ifModifiedSince Only records created or modified since this timestamp will be returned
6987
7151
  * @param where Filter by an any element
6988
7152
  * @param order Order by an any element
7153
+ * @param includeDeleted e.g. includeDeleted&#x3D;true - Bank transfers with a status of DELETED will be included in the response
6989
7154
  */
6990
- getBankTransfers(xeroTenantId_1, ifModifiedSince_1, where_1, order_1) {
6991
- return __awaiter(this, arguments, void 0, function* (xeroTenantId, ifModifiedSince, where, order, options = { headers: {} }) {
7155
+ getBankTransfers(xeroTenantId_1, ifModifiedSince_1, where_1, order_1, includeDeleted_1) {
7156
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, ifModifiedSince, where, order, includeDeleted, options = { headers: {} }) {
6992
7157
  const localVarPath = this.basePath + '/BankTransfers';
6993
7158
  let localVarQueryParameters = {};
6994
7159
  let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
@@ -7008,6 +7173,9 @@ class AccountingApi {
7008
7173
  if (order !== undefined) {
7009
7174
  localVarQueryParameters['order'] = models_1.ObjectSerializer.serialize(order, "string");
7010
7175
  }
7176
+ if (includeDeleted !== undefined) {
7177
+ localVarQueryParameters['includeDeleted'] = models_1.ObjectSerializer.serialize(includeDeleted, "boolean");
7178
+ }
7011
7179
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
7012
7180
  localVarHeaderParams['If-Modified-Since'] = models_1.ObjectSerializer.serialize(ifModifiedSince, "Date");
7013
7181
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -11940,13 +12108,14 @@ class AccountingApi {
11940
12108
  * @param ifModifiedSince Only records created or modified since this timestamp will be returned
11941
12109
  * @param where Filter by an any element
11942
12110
  * @param order Order by an any element
11943
- * @param page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
12111
+ * @param page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment
11944
12112
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11945
12113
  * @param pageSize Number of records to retrieve per page
11946
12114
  * @param invoiceNumbers Filter by a comma-separated list of InvoiceNumbers
12115
+ * @param references Filter by a comma-separated list of References
11947
12116
  */
11948
- getPrepayments(xeroTenantId_1, ifModifiedSince_1, where_1, order_1, page_1, unitdp_1, pageSize_1, invoiceNumbers_1) {
11949
- return __awaiter(this, arguments, void 0, function* (xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, invoiceNumbers, options = { headers: {} }) {
12117
+ getPrepayments(xeroTenantId_1, ifModifiedSince_1, where_1, order_1, page_1, unitdp_1, pageSize_1, invoiceNumbers_1, references_1) {
12118
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, invoiceNumbers, references, options = { headers: {} }) {
11950
12119
  const localVarPath = this.basePath + '/Prepayments';
11951
12120
  let localVarQueryParameters = {};
11952
12121
  let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
@@ -11978,6 +12147,9 @@ class AccountingApi {
11978
12147
  if (invoiceNumbers !== undefined) {
11979
12148
  localVarQueryParameters['InvoiceNumbers'] = models_1.ObjectSerializer.serialize(invoiceNumbers, "Array<string>");
11980
12149
  }
12150
+ if (references !== undefined) {
12151
+ localVarQueryParameters['References'] = models_1.ObjectSerializer.serialize(references, "Array<string>");
12152
+ }
11981
12153
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
11982
12154
  localVarHeaderParams['If-Modified-Since'] = models_1.ObjectSerializer.serialize(ifModifiedSince, "Date");
11983
12155
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -16547,9 +16719,10 @@ class AccountingApi {
16547
16719
  * @param invoices
16548
16720
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
16549
16721
  * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16722
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
16550
16723
  */
16551
- updateInvoice(xeroTenantId_1, invoiceID_1, invoices_1, unitdp_1, idempotencyKey_1) {
16552
- return __awaiter(this, arguments, void 0, function* (xeroTenantId, invoiceID, invoices, unitdp, idempotencyKey, options = { headers: {} }) {
16724
+ updateInvoice(xeroTenantId_1, invoiceID_1, invoices_1, unitdp_1, idempotencyKey_1, allowBackorders_1) {
16725
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, invoiceID, invoices, unitdp, idempotencyKey, allowBackorders, options = { headers: {} }) {
16553
16726
  const localVarPath = this.basePath + '/Invoices/{InvoiceID}'
16554
16727
  .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID)));
16555
16728
  let localVarQueryParameters = {};
@@ -16575,6 +16748,9 @@ class AccountingApi {
16575
16748
  if (unitdp !== undefined) {
16576
16749
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
16577
16750
  }
16751
+ if (allowBackorders !== undefined) {
16752
+ localVarQueryParameters['allowBackorders'] = models_1.ObjectSerializer.serialize(allowBackorders, "boolean");
16753
+ }
16578
16754
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16579
16755
  localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16580
16756
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -17324,9 +17500,10 @@ class AccountingApi {
17324
17500
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
17325
17501
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
17326
17502
  * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
17503
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
17327
17504
  */
17328
- updateOrCreateInvoices(xeroTenantId_1, invoices_1, summarizeErrors_1, unitdp_1, idempotencyKey_1) {
17329
- return __awaiter(this, arguments, void 0, function* (xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, options = { headers: {} }) {
17505
+ updateOrCreateInvoices(xeroTenantId_1, invoices_1, summarizeErrors_1, unitdp_1, idempotencyKey_1, allowBackorders_1) {
17506
+ return __awaiter(this, arguments, void 0, function* (xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, allowBackorders, options = { headers: {} }) {
17330
17507
  const localVarPath = this.basePath + '/Invoices';
17331
17508
  let localVarQueryParameters = {};
17332
17509
  let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
@@ -17350,6 +17527,9 @@ class AccountingApi {
17350
17527
  if (unitdp !== undefined) {
17351
17528
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
17352
17529
  }
17530
+ if (allowBackorders !== undefined) {
17531
+ localVarQueryParameters['allowBackorders'] = models_1.ObjectSerializer.serialize(allowBackorders, "boolean");
17532
+ }
17353
17533
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
17354
17534
  localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
17355
17535
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();