xero-node 8.0.0 → 9.0.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 (58) hide show
  1. package/dist/gen/api/accountingApi.d.ts +16 -22
  2. package/dist/gen/api/accountingApi.js +70 -234
  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/payrollNZApi.d.ts +1 -1
  17. package/dist/gen/api/payrollNZApi.js +2 -2
  18. package/dist/gen/api/payrollUKApi.d.ts +1 -1
  19. package/dist/gen/api/payrollUKApi.js +2 -2
  20. package/dist/gen/api/projectApi.d.ts +1 -1
  21. package/dist/gen/api/projectApi.js +2 -2
  22. package/dist/gen/model/accounting/bankTransactions.d.ts +2 -0
  23. package/dist/gen/model/accounting/bankTransactions.js +5 -0
  24. package/dist/gen/model/accounting/bankTransactions.js.map +1 -1
  25. package/dist/gen/model/accounting/contacts.d.ts +2 -0
  26. package/dist/gen/model/accounting/contacts.js +5 -0
  27. package/dist/gen/model/accounting/contacts.js.map +1 -1
  28. package/dist/gen/model/accounting/creditNotes.d.ts +2 -0
  29. package/dist/gen/model/accounting/creditNotes.js +5 -0
  30. package/dist/gen/model/accounting/creditNotes.js.map +1 -1
  31. package/dist/gen/model/accounting/invoices.d.ts +2 -0
  32. package/dist/gen/model/accounting/invoices.js +5 -0
  33. package/dist/gen/model/accounting/invoices.js.map +1 -1
  34. package/dist/gen/model/accounting/manualJournals.d.ts +2 -0
  35. package/dist/gen/model/accounting/manualJournals.js +5 -0
  36. package/dist/gen/model/accounting/manualJournals.js.map +1 -1
  37. package/dist/gen/model/accounting/models.d.ts +1 -10
  38. package/dist/gen/model/accounting/models.js +3 -30
  39. package/dist/gen/model/accounting/models.js.map +1 -1
  40. package/dist/gen/model/accounting/organisation.d.ts +4 -0
  41. package/dist/gen/model/accounting/organisation.js +4 -0
  42. package/dist/gen/model/accounting/organisation.js.map +1 -1
  43. package/dist/gen/model/accounting/overpayments.d.ts +2 -0
  44. package/dist/gen/model/accounting/overpayments.js +5 -0
  45. package/dist/gen/model/accounting/overpayments.js.map +1 -1
  46. package/dist/gen/model/accounting/pagination.d.ts +17 -0
  47. package/dist/gen/model/accounting/pagination.js +33 -0
  48. package/dist/gen/model/accounting/pagination.js.map +1 -0
  49. package/dist/gen/model/accounting/payments.d.ts +2 -0
  50. package/dist/gen/model/accounting/payments.js +5 -0
  51. package/dist/gen/model/accounting/payments.js.map +1 -1
  52. package/dist/gen/model/accounting/prepayments.d.ts +2 -0
  53. package/dist/gen/model/accounting/prepayments.js +5 -0
  54. package/dist/gen/model/accounting/prepayments.js.map +1 -1
  55. package/dist/gen/model/accounting/purchaseOrders.d.ts +2 -0
  56. package/dist/gen/model/accounting/purchaseOrders.js +5 -0
  57. package/dist/gen/model/accounting/purchaseOrders.js.map +1 -1
  58. package/package.json +1 -1
@@ -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: 5.0.0
6
+ * The version of the OpenAPI document: 6.0.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-8.0.0' };
42
+ this.defaultHeaders = { 'user-agent': 'xero-node-9.0.0' };
43
43
  this._useQuerystring = false;
44
44
  this.binaryHeaders = {};
45
45
  this.authentications = {
@@ -233,17 +233,12 @@ class AccountingApi {
233
233
  });
234
234
  });
235
235
  }).then((fileContents) => {
236
- localVarRequestOptions.data = fileContents;
236
+ const file = Buffer.concat(fileContents);
237
+ localVarRequestOptions.data = file;
237
238
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
238
239
  let body = null;
239
240
  try {
240
241
  const response = yield (0, axios_1.default)(localVarRequestOptions);
241
- try {
242
- body = JSON.parse(response.data);
243
- }
244
- catch (err) {
245
- console.log('JSON parse body failed');
246
- }
247
242
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
248
243
  if (response.status && response.status >= 200 && response.status <= 299) {
249
244
  resolve({ response: response, body: body });
@@ -345,17 +340,12 @@ class AccountingApi {
345
340
  });
346
341
  });
347
342
  }).then((fileContents) => {
348
- localVarRequestOptions.data = fileContents;
343
+ const file = Buffer.concat(fileContents);
344
+ localVarRequestOptions.data = file;
349
345
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
350
346
  let body = null;
351
347
  try {
352
348
  const response = yield (0, axios_1.default)(localVarRequestOptions);
353
- try {
354
- body = JSON.parse(response.data);
355
- }
356
- catch (err) {
357
- console.log('JSON parse body failed');
358
- }
359
349
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
360
350
  if (response.status && response.status >= 200 && response.status <= 299) {
361
351
  resolve({ response: response, body: body });
@@ -689,17 +679,12 @@ class AccountingApi {
689
679
  });
690
680
  });
691
681
  }).then((fileContents) => {
692
- localVarRequestOptions.data = fileContents;
682
+ const file = Buffer.concat(fileContents);
683
+ localVarRequestOptions.data = file;
693
684
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
694
685
  let body = null;
695
686
  try {
696
687
  const response = yield (0, axios_1.default)(localVarRequestOptions);
697
- try {
698
- body = JSON.parse(response.data);
699
- }
700
- catch (err) {
701
- console.log('JSON parse body failed');
702
- }
703
688
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
704
689
  if (response.status && response.status >= 200 && response.status <= 299) {
705
690
  resolve({ response: response, body: body });
@@ -1114,17 +1099,12 @@ class AccountingApi {
1114
1099
  });
1115
1100
  });
1116
1101
  }).then((fileContents) => {
1117
- localVarRequestOptions.data = fileContents;
1102
+ const file = Buffer.concat(fileContents);
1103
+ localVarRequestOptions.data = file;
1118
1104
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
1119
1105
  let body = null;
1120
1106
  try {
1121
1107
  const response = yield (0, axios_1.default)(localVarRequestOptions);
1122
- try {
1123
- body = JSON.parse(response.data);
1124
- }
1125
- catch (err) {
1126
- console.log('JSON parse body failed');
1127
- }
1128
1108
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
1129
1109
  if (response.status && response.status >= 200 && response.status <= 299) {
1130
1110
  resolve({ response: response, body: body });
@@ -1621,17 +1601,12 @@ class AccountingApi {
1621
1601
  });
1622
1602
  });
1623
1603
  }).then((fileContents) => {
1624
- localVarRequestOptions.data = fileContents;
1604
+ const file = Buffer.concat(fileContents);
1605
+ localVarRequestOptions.data = file;
1625
1606
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
1626
1607
  let body = null;
1627
1608
  try {
1628
1609
  const response = yield (0, axios_1.default)(localVarRequestOptions);
1629
- try {
1630
- body = JSON.parse(response.data);
1631
- }
1632
- catch (err) {
1633
- console.log('JSON parse body failed');
1634
- }
1635
1610
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
1636
1611
  if (response.status && response.status >= 200 && response.status <= 299) {
1637
1612
  resolve({ response: response, body: body });
@@ -2199,17 +2174,12 @@ class AccountingApi {
2199
2174
  });
2200
2175
  });
2201
2176
  }).then((fileContents) => {
2202
- localVarRequestOptions.data = fileContents;
2177
+ const file = Buffer.concat(fileContents);
2178
+ localVarRequestOptions.data = file;
2203
2179
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
2204
2180
  let body = null;
2205
2181
  try {
2206
2182
  const response = yield (0, axios_1.default)(localVarRequestOptions);
2207
- try {
2208
- body = JSON.parse(response.data);
2209
- }
2210
- catch (err) {
2211
- console.log('JSON parse body failed');
2212
- }
2213
2183
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
2214
2184
  if (response.status && response.status >= 200 && response.status <= 299) {
2215
2185
  resolve({ response: response, body: body });
@@ -2704,17 +2674,12 @@ class AccountingApi {
2704
2674
  });
2705
2675
  });
2706
2676
  }).then((fileContents) => {
2707
- localVarRequestOptions.data = fileContents;
2677
+ const file = Buffer.concat(fileContents);
2678
+ localVarRequestOptions.data = file;
2708
2679
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
2709
2680
  let body = null;
2710
2681
  try {
2711
2682
  const response = yield (0, axios_1.default)(localVarRequestOptions);
2712
- try {
2713
- body = JSON.parse(response.data);
2714
- }
2715
- catch (err) {
2716
- console.log('JSON parse body failed');
2717
- }
2718
2683
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
2719
2684
  if (response.status && response.status >= 200 && response.status <= 299) {
2720
2685
  resolve({ response: response, body: body });
@@ -3598,17 +3563,12 @@ class AccountingApi {
3598
3563
  });
3599
3564
  });
3600
3565
  }).then((fileContents) => {
3601
- localVarRequestOptions.data = fileContents;
3566
+ const file = Buffer.concat(fileContents);
3567
+ localVarRequestOptions.data = file;
3602
3568
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
3603
3569
  let body = null;
3604
3570
  try {
3605
3571
  const response = yield (0, axios_1.default)(localVarRequestOptions);
3606
- try {
3607
- body = JSON.parse(response.data);
3608
- }
3609
- catch (err) {
3610
- console.log('JSON parse body failed');
3611
- }
3612
3572
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
3613
3573
  if (response.status && response.status >= 200 && response.status <= 299) {
3614
3574
  resolve({ response: response, body: body });
@@ -3866,17 +3826,12 @@ class AccountingApi {
3866
3826
  });
3867
3827
  });
3868
3828
  }).then((fileContents) => {
3869
- localVarRequestOptions.data = fileContents;
3829
+ const file = Buffer.concat(fileContents);
3830
+ localVarRequestOptions.data = file;
3870
3831
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
3871
3832
  let body = null;
3872
3833
  try {
3873
3834
  const response = yield (0, axios_1.default)(localVarRequestOptions);
3874
- try {
3875
- body = JSON.parse(response.data);
3876
- }
3877
- catch (err) {
3878
- console.log('JSON parse body failed');
3879
- }
3880
3835
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
3881
3836
  if (response.status && response.status >= 200 && response.status <= 299) {
3882
3837
  resolve({ response: response, body: body });
@@ -4211,17 +4166,12 @@ class AccountingApi {
4211
4166
  });
4212
4167
  });
4213
4168
  }).then((fileContents) => {
4214
- localVarRequestOptions.data = fileContents;
4169
+ const file = Buffer.concat(fileContents);
4170
+ localVarRequestOptions.data = file;
4215
4171
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
4216
4172
  let body = null;
4217
4173
  try {
4218
4174
  const response = yield (0, axios_1.default)(localVarRequestOptions);
4219
- try {
4220
- body = JSON.parse(response.data);
4221
- }
4222
- catch (err) {
4223
- console.log('JSON parse body failed');
4224
- }
4225
4175
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
4226
4176
  if (response.status && response.status >= 200 && response.status <= 299) {
4227
4177
  resolve({ response: response, body: body });
@@ -4402,17 +4352,12 @@ class AccountingApi {
4402
4352
  });
4403
4353
  });
4404
4354
  }).then((fileContents) => {
4405
- localVarRequestOptions.data = fileContents;
4355
+ const file = Buffer.concat(fileContents);
4356
+ localVarRequestOptions.data = file;
4406
4357
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
4407
4358
  let body = null;
4408
4359
  try {
4409
4360
  const response = yield (0, axios_1.default)(localVarRequestOptions);
4410
- try {
4411
- body = JSON.parse(response.data);
4412
- }
4413
- catch (err) {
4414
- console.log('JSON parse body failed');
4415
- }
4416
4361
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
4417
4362
  if (response.status && response.status >= 200 && response.status <= 299) {
4418
4363
  resolve({ response: response, body: body });
@@ -6159,12 +6104,6 @@ class AccountingApi {
6159
6104
  let body = null;
6160
6105
  try {
6161
6106
  const response = yield (0, axios_1.default)(localVarRequestOptions);
6162
- try {
6163
- body = JSON.parse(response.data);
6164
- }
6165
- catch (err) {
6166
- console.log('JSON parse body failed');
6167
- }
6168
6107
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
6169
6108
  if (response.status && response.status >= 200 && response.status <= 299) {
6170
6109
  resolve({ response: response, body: body });
@@ -6557,12 +6496,6 @@ class AccountingApi {
6557
6496
  let body = null;
6558
6497
  try {
6559
6498
  const response = yield (0, axios_1.default)(localVarRequestOptions);
6560
- try {
6561
- body = JSON.parse(response.data);
6562
- }
6563
- catch (err) {
6564
- console.log('JSON parse body failed');
6565
- }
6566
6499
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
6567
6500
  if (response.status && response.status >= 200 && response.status <= 299) {
6568
6501
  resolve({ response: response, body: body });
@@ -6651,7 +6584,7 @@ class AccountingApi {
6651
6584
  let body = null;
6652
6585
  try {
6653
6586
  const response = yield (0, axios_1.default)(localVarRequestOptions);
6654
- body = models_1.ObjectSerializer.deserialize(response.data, "GetBankTransactionsResponse");
6587
+ body = models_1.ObjectSerializer.deserialize(response.data, "BankTransactions");
6655
6588
  if (response.status && response.status >= 200 && response.status <= 299) {
6656
6589
  resolve({ response: response, body: body });
6657
6590
  }
@@ -7035,12 +6968,6 @@ class AccountingApi {
7035
6968
  let body = null;
7036
6969
  try {
7037
6970
  const response = yield (0, axios_1.default)(localVarRequestOptions);
7038
- try {
7039
- body = JSON.parse(response.data);
7040
- }
7041
- catch (err) {
7042
- console.log('JSON parse body failed');
7043
- }
7044
6971
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
7045
6972
  if (response.status && response.status >= 200 && response.status <= 299) {
7046
6973
  resolve({ response: response, body: body });
@@ -8089,12 +8016,6 @@ class AccountingApi {
8089
8016
  let body = null;
8090
8017
  try {
8091
8018
  const response = yield (0, axios_1.default)(localVarRequestOptions);
8092
- try {
8093
- body = JSON.parse(response.data);
8094
- }
8095
- catch (err) {
8096
- console.log('JSON parse body failed');
8097
- }
8098
8019
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
8099
8020
  if (response.status && response.status >= 200 && response.status <= 299) {
8100
8021
  resolve({ response: response, body: body });
@@ -8557,7 +8478,7 @@ class AccountingApi {
8557
8478
  let body = null;
8558
8479
  try {
8559
8480
  const response = yield (0, axios_1.default)(localVarRequestOptions);
8560
- body = models_1.ObjectSerializer.deserialize(response.data, "GetContactsResponse");
8481
+ body = models_1.ObjectSerializer.deserialize(response.data, "Contacts");
8561
8482
  if (response.status && response.status >= 200 && response.status <= 299) {
8562
8483
  resolve({ response: response, body: body });
8563
8484
  }
@@ -8945,12 +8866,6 @@ class AccountingApi {
8945
8866
  let body = null;
8946
8867
  try {
8947
8868
  const response = yield (0, axios_1.default)(localVarRequestOptions);
8948
- try {
8949
- body = JSON.parse(response.data);
8950
- }
8951
- catch (err) {
8952
- console.log('JSON parse body failed');
8953
- }
8954
8869
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
8955
8870
  if (response.status && response.status >= 200 && response.status <= 299) {
8956
8871
  resolve({ response: response, body: body });
@@ -9111,7 +9026,7 @@ class AccountingApi {
9111
9026
  let body = null;
9112
9027
  try {
9113
9028
  const response = yield (0, axios_1.default)(localVarRequestOptions);
9114
- body = models_1.ObjectSerializer.deserialize(response.data, "GetCreditNotesResponse");
9029
+ body = models_1.ObjectSerializer.deserialize(response.data, "CreditNotes");
9115
9030
  if (response.status && response.status >= 200 && response.status <= 299) {
9116
9031
  resolve({ response: response, body: body });
9117
9032
  }
@@ -9941,12 +9856,6 @@ class AccountingApi {
9941
9856
  let body = null;
9942
9857
  try {
9943
9858
  const response = yield (0, axios_1.default)(localVarRequestOptions);
9944
- try {
9945
- body = JSON.parse(response.data);
9946
- }
9947
- catch (err) {
9948
- console.log('JSON parse body failed');
9949
- }
9950
9859
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
9951
9860
  if (response.status && response.status >= 200 && response.status <= 299) {
9952
9861
  resolve({ response: response, body: body });
@@ -10118,8 +10027,9 @@ class AccountingApi {
10118
10027
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
10119
10028
  * @param summaryOnly Use summaryOnly&#x3D;true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
10120
10029
  * @param pageSize Number of records to retrieve per page
10030
+ * @param searchTerm Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference.
10121
10031
  */
10122
- getInvoices(xeroTenantId, ifModifiedSince, where, order, iDs, invoiceNumbers, contactIDs, statuses, page, includeArchived, createdByMyApp, unitdp, summaryOnly, pageSize, options = { headers: {} }) {
10032
+ getInvoices(xeroTenantId, ifModifiedSince, where, order, iDs, invoiceNumbers, contactIDs, statuses, page, includeArchived, createdByMyApp, unitdp, summaryOnly, pageSize, searchTerm, options = { headers: {} }) {
10123
10033
  return __awaiter(this, void 0, void 0, function* () {
10124
10034
  const localVarPath = this.basePath + '/Invoices';
10125
10035
  let localVarQueryParameters = {};
@@ -10170,6 +10080,9 @@ class AccountingApi {
10170
10080
  if (pageSize !== undefined) {
10171
10081
  localVarQueryParameters['pageSize'] = models_1.ObjectSerializer.serialize(pageSize, "number");
10172
10082
  }
10083
+ if (searchTerm !== undefined) {
10084
+ localVarQueryParameters['searchTerm'] = models_1.ObjectSerializer.serialize(searchTerm, "string");
10085
+ }
10173
10086
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
10174
10087
  localVarHeaderParams['If-Modified-Since'] = models_1.ObjectSerializer.serialize(ifModifiedSince, "Date");
10175
10088
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -10201,7 +10114,7 @@ class AccountingApi {
10201
10114
  let body = null;
10202
10115
  try {
10203
10116
  const response = yield (0, axios_1.default)(localVarRequestOptions);
10204
- body = models_1.ObjectSerializer.deserialize(response.data, "GetInvoicesResponse");
10117
+ body = models_1.ObjectSerializer.deserialize(response.data, "Invoices");
10205
10118
  if (response.status && response.status >= 200 && response.status <= 299) {
10206
10119
  resolve({ response: response, body: body });
10207
10120
  }
@@ -11123,12 +11036,6 @@ class AccountingApi {
11123
11036
  let body = null;
11124
11037
  try {
11125
11038
  const response = yield (0, axios_1.default)(localVarRequestOptions);
11126
- try {
11127
- body = JSON.parse(response.data);
11128
- }
11129
- catch (err) {
11130
- console.log('JSON parse body failed');
11131
- }
11132
11039
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
11133
11040
  if (response.status && response.status >= 200 && response.status <= 299) {
11134
11041
  resolve({ response: response, body: body });
@@ -11213,7 +11120,7 @@ class AccountingApi {
11213
11120
  let body = null;
11214
11121
  try {
11215
11122
  const response = yield (0, axios_1.default)(localVarRequestOptions);
11216
- body = models_1.ObjectSerializer.deserialize(response.data, "GetManualJournalsResponse");
11123
+ body = models_1.ObjectSerializer.deserialize(response.data, "ManualJournals");
11217
11124
  if (response.status && response.status >= 200 && response.status <= 299) {
11218
11125
  resolve({ response: response, body: body });
11219
11126
  }
@@ -11730,8 +11637,9 @@ class AccountingApi {
11730
11637
  * @param order Order by an any element
11731
11638
  * @param page e.g. page&#x3D;1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
11732
11639
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11640
+ * @param pageSize Number of records to retrieve per page
11733
11641
  */
11734
- getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp, options = { headers: {} }) {
11642
+ getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, options = { headers: {} }) {
11735
11643
  return __awaiter(this, void 0, void 0, function* () {
11736
11644
  const localVarPath = this.basePath + '/Overpayments';
11737
11645
  let localVarQueryParameters = {};
@@ -11758,6 +11666,9 @@ class AccountingApi {
11758
11666
  if (unitdp !== undefined) {
11759
11667
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
11760
11668
  }
11669
+ if (pageSize !== undefined) {
11670
+ localVarQueryParameters['pageSize'] = models_1.ObjectSerializer.serialize(pageSize, "number");
11671
+ }
11761
11672
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
11762
11673
  localVarHeaderParams['If-Modified-Since'] = models_1.ObjectSerializer.serialize(ifModifiedSince, "Date");
11763
11674
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -11789,7 +11700,7 @@ class AccountingApi {
11789
11700
  let body = null;
11790
11701
  try {
11791
11702
  const response = yield (0, axios_1.default)(localVarRequestOptions);
11792
- body = models_1.ObjectSerializer.deserialize(response.data, "GetOverpaymentsResponse");
11703
+ body = models_1.ObjectSerializer.deserialize(response.data, "Overpayments");
11793
11704
  if (response.status && response.status >= 200 && response.status <= 299) {
11794
11705
  resolve({ response: response, body: body });
11795
11706
  }
@@ -12083,7 +11994,7 @@ class AccountingApi {
12083
11994
  let body = null;
12084
11995
  try {
12085
11996
  const response = yield (0, axios_1.default)(localVarRequestOptions);
12086
- body = models_1.ObjectSerializer.deserialize(response.data, "GetPaymentsResponse");
11997
+ body = models_1.ObjectSerializer.deserialize(response.data, "Payments");
12087
11998
  if (response.status && response.status >= 200 && response.status <= 299) {
12088
11999
  resolve({ response: response, body: body });
12089
12000
  }
@@ -12252,8 +12163,9 @@ class AccountingApi {
12252
12163
  * @param order Order by an any element
12253
12164
  * @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
12254
12165
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
12166
+ * @param pageSize Number of records to retrieve per page
12255
12167
  */
12256
- getPrepayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp, options = { headers: {} }) {
12168
+ getPrepayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, options = { headers: {} }) {
12257
12169
  return __awaiter(this, void 0, void 0, function* () {
12258
12170
  const localVarPath = this.basePath + '/Prepayments';
12259
12171
  let localVarQueryParameters = {};
@@ -12280,6 +12192,9 @@ class AccountingApi {
12280
12192
  if (unitdp !== undefined) {
12281
12193
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
12282
12194
  }
12195
+ if (pageSize !== undefined) {
12196
+ localVarQueryParameters['pageSize'] = models_1.ObjectSerializer.serialize(pageSize, "number");
12197
+ }
12283
12198
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
12284
12199
  localVarHeaderParams['If-Modified-Since'] = models_1.ObjectSerializer.serialize(ifModifiedSince, "Date");
12285
12200
  localVarHeaderParams['Accept'] = acceptHeadersFromSpec.join();
@@ -12311,7 +12226,7 @@ class AccountingApi {
12311
12226
  let body = null;
12312
12227
  try {
12313
12228
  const response = yield (0, axios_1.default)(localVarRequestOptions);
12314
- body = models_1.ObjectSerializer.deserialize(response.data, "GetPrepaymentsResponse");
12229
+ body = models_1.ObjectSerializer.deserialize(response.data, "Prepayments");
12315
12230
  if (response.status && response.status >= 200 && response.status <= 299) {
12316
12231
  resolve({ response: response, body: body });
12317
12232
  }
@@ -12695,12 +12610,6 @@ class AccountingApi {
12695
12610
  let body = null;
12696
12611
  try {
12697
12612
  const response = yield (0, axios_1.default)(localVarRequestOptions);
12698
- try {
12699
- body = JSON.parse(response.data);
12700
- }
12701
- catch (err) {
12702
- console.log('JSON parse body failed');
12703
- }
12704
12613
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
12705
12614
  if (response.status && response.status >= 200 && response.status <= 299) {
12706
12615
  resolve({ response: response, body: body });
@@ -12937,7 +12846,7 @@ class AccountingApi {
12937
12846
  let body = null;
12938
12847
  try {
12939
12848
  const response = yield (0, axios_1.default)(localVarRequestOptions);
12940
- body = models_1.ObjectSerializer.deserialize(response.data, "GetPurchaseOrdersResponse");
12849
+ body = models_1.ObjectSerializer.deserialize(response.data, "PurchaseOrders");
12941
12850
  if (response.status && response.status >= 200 && response.status <= 299) {
12942
12851
  resolve({ response: response, body: body });
12943
12852
  }
@@ -13321,12 +13230,6 @@ class AccountingApi {
13321
13230
  let body = null;
13322
13231
  try {
13323
13232
  const response = yield (0, axios_1.default)(localVarRequestOptions);
13324
- try {
13325
- body = JSON.parse(response.data);
13326
- }
13327
- catch (err) {
13328
- console.log('JSON parse body failed');
13329
- }
13330
13233
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
13331
13234
  if (response.status && response.status >= 200 && response.status <= 299) {
13332
13235
  resolve({ response: response, body: body });
@@ -13819,12 +13722,6 @@ class AccountingApi {
13819
13722
  let body = null;
13820
13723
  try {
13821
13724
  const response = yield (0, axios_1.default)(localVarRequestOptions);
13822
- try {
13823
- body = JSON.parse(response.data);
13824
- }
13825
- catch (err) {
13826
- console.log('JSON parse body failed');
13827
- }
13828
13725
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
13829
13726
  if (response.status && response.status >= 200 && response.status <= 299) {
13830
13727
  resolve({ response: response, body: body });
@@ -14289,12 +14186,6 @@ class AccountingApi {
14289
14186
  let body = null;
14290
14187
  try {
14291
14188
  const response = yield (0, axios_1.default)(localVarRequestOptions);
14292
- try {
14293
- body = JSON.parse(response.data);
14294
- }
14295
- catch (err) {
14296
- console.log('JSON parse body failed');
14297
- }
14298
14189
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
14299
14190
  if (response.status && response.status >= 200 && response.status <= 299) {
14300
14191
  resolve({ response: response, body: body });
@@ -16014,17 +15905,12 @@ class AccountingApi {
16014
15905
  });
16015
15906
  });
16016
15907
  }).then((fileContents) => {
16017
- localVarRequestOptions.data = fileContents;
15908
+ const file = Buffer.concat(fileContents);
15909
+ localVarRequestOptions.data = file;
16018
15910
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
16019
15911
  let body = null;
16020
15912
  try {
16021
15913
  const response = yield (0, axios_1.default)(localVarRequestOptions);
16022
- try {
16023
- body = JSON.parse(response.data);
16024
- }
16025
- catch (err) {
16026
- console.log('JSON parse body failed');
16027
- }
16028
15914
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
16029
15915
  if (response.status && response.status >= 200 && response.status <= 299) {
16030
15916
  resolve({ response: response, body: body });
@@ -16209,17 +16095,12 @@ class AccountingApi {
16209
16095
  });
16210
16096
  });
16211
16097
  }).then((fileContents) => {
16212
- localVarRequestOptions.data = fileContents;
16098
+ const file = Buffer.concat(fileContents);
16099
+ localVarRequestOptions.data = file;
16213
16100
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
16214
16101
  let body = null;
16215
16102
  try {
16216
16103
  const response = yield (0, axios_1.default)(localVarRequestOptions);
16217
- try {
16218
- body = JSON.parse(response.data);
16219
- }
16220
- catch (err) {
16221
- console.log('JSON parse body failed');
16222
- }
16223
16104
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
16224
16105
  if (response.status && response.status >= 200 && response.status <= 299) {
16225
16106
  resolve({ response: response, body: body });
@@ -16320,17 +16201,12 @@ class AccountingApi {
16320
16201
  });
16321
16202
  });
16322
16203
  }).then((fileContents) => {
16323
- localVarRequestOptions.data = fileContents;
16204
+ const file = Buffer.concat(fileContents);
16205
+ localVarRequestOptions.data = file;
16324
16206
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
16325
16207
  let body = null;
16326
16208
  try {
16327
16209
  const response = yield (0, axios_1.default)(localVarRequestOptions);
16328
- try {
16329
- body = JSON.parse(response.data);
16330
- }
16331
- catch (err) {
16332
- console.log('JSON parse body failed');
16333
- }
16334
16210
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
16335
16211
  if (response.status && response.status >= 200 && response.status <= 299) {
16336
16212
  resolve({ response: response, body: body });
@@ -16510,17 +16386,12 @@ class AccountingApi {
16510
16386
  });
16511
16387
  });
16512
16388
  }).then((fileContents) => {
16513
- localVarRequestOptions.data = fileContents;
16389
+ const file = Buffer.concat(fileContents);
16390
+ localVarRequestOptions.data = file;
16514
16391
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
16515
16392
  let body = null;
16516
16393
  try {
16517
16394
  const response = yield (0, axios_1.default)(localVarRequestOptions);
16518
- try {
16519
- body = JSON.parse(response.data);
16520
- }
16521
- catch (err) {
16522
- console.log('JSON parse body failed');
16523
- }
16524
16395
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
16525
16396
  if (response.status && response.status >= 200 && response.status <= 299) {
16526
16397
  resolve({ response: response, body: body });
@@ -16784,17 +16655,12 @@ class AccountingApi {
16784
16655
  });
16785
16656
  });
16786
16657
  }).then((fileContents) => {
16787
- localVarRequestOptions.data = fileContents;
16658
+ const file = Buffer.concat(fileContents);
16659
+ localVarRequestOptions.data = file;
16788
16660
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
16789
16661
  let body = null;
16790
16662
  try {
16791
16663
  const response = yield (0, axios_1.default)(localVarRequestOptions);
16792
- try {
16793
- body = JSON.parse(response.data);
16794
- }
16795
- catch (err) {
16796
- console.log('JSON parse body failed');
16797
- }
16798
16664
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
16799
16665
  if (response.status && response.status >= 200 && response.status <= 299) {
16800
16666
  resolve({ response: response, body: body });
@@ -17058,17 +16924,12 @@ class AccountingApi {
17058
16924
  });
17059
16925
  });
17060
16926
  }).then((fileContents) => {
17061
- localVarRequestOptions.data = fileContents;
16927
+ const file = Buffer.concat(fileContents);
16928
+ localVarRequestOptions.data = file;
17062
16929
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
17063
16930
  let body = null;
17064
16931
  try {
17065
16932
  const response = yield (0, axios_1.default)(localVarRequestOptions);
17066
- try {
17067
- body = JSON.parse(response.data);
17068
- }
17069
- catch (err) {
17070
- console.log('JSON parse body failed');
17071
- }
17072
16933
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
17073
16934
  if (response.status && response.status >= 200 && response.status <= 299) {
17074
16935
  resolve({ response: response, body: body });
@@ -17411,17 +17272,12 @@ class AccountingApi {
17411
17272
  });
17412
17273
  });
17413
17274
  }).then((fileContents) => {
17414
- localVarRequestOptions.data = fileContents;
17275
+ const file = Buffer.concat(fileContents);
17276
+ localVarRequestOptions.data = file;
17415
17277
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
17416
17278
  let body = null;
17417
17279
  try {
17418
17280
  const response = yield (0, axios_1.default)(localVarRequestOptions);
17419
- try {
17420
- body = JSON.parse(response.data);
17421
- }
17422
- catch (err) {
17423
- console.log('JSON parse body failed');
17424
- }
17425
17281
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
17426
17282
  if (response.status && response.status >= 200 && response.status <= 299) {
17427
17283
  resolve({ response: response, body: body });
@@ -18388,17 +18244,12 @@ class AccountingApi {
18388
18244
  });
18389
18245
  });
18390
18246
  }).then((fileContents) => {
18391
- localVarRequestOptions.data = fileContents;
18247
+ const file = Buffer.concat(fileContents);
18248
+ localVarRequestOptions.data = file;
18392
18249
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
18393
18250
  let body = null;
18394
18251
  try {
18395
18252
  const response = yield (0, axios_1.default)(localVarRequestOptions);
18396
- try {
18397
- body = JSON.parse(response.data);
18398
- }
18399
- catch (err) {
18400
- console.log('JSON parse body failed');
18401
- }
18402
18253
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
18403
18254
  if (response.status && response.status >= 200 && response.status <= 299) {
18404
18255
  resolve({ response: response, body: body });
@@ -18579,17 +18430,12 @@ class AccountingApi {
18579
18430
  });
18580
18431
  });
18581
18432
  }).then((fileContents) => {
18582
- localVarRequestOptions.data = fileContents;
18433
+ const file = Buffer.concat(fileContents);
18434
+ localVarRequestOptions.data = file;
18583
18435
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
18584
18436
  let body = null;
18585
18437
  try {
18586
18438
  const response = yield (0, axios_1.default)(localVarRequestOptions);
18587
- try {
18588
- body = JSON.parse(response.data);
18589
- }
18590
- catch (err) {
18591
- console.log('JSON parse body failed');
18592
- }
18593
18439
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
18594
18440
  if (response.status && response.status >= 200 && response.status <= 299) {
18595
18441
  resolve({ response: response, body: body });
@@ -18774,17 +18620,12 @@ class AccountingApi {
18774
18620
  });
18775
18621
  });
18776
18622
  }).then((fileContents) => {
18777
- localVarRequestOptions.data = fileContents;
18623
+ const file = Buffer.concat(fileContents);
18624
+ localVarRequestOptions.data = file;
18778
18625
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
18779
18626
  let body = null;
18780
18627
  try {
18781
18628
  const response = yield (0, axios_1.default)(localVarRequestOptions);
18782
- try {
18783
- body = JSON.parse(response.data);
18784
- }
18785
- catch (err) {
18786
- console.log('JSON parse body failed');
18787
- }
18788
18629
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
18789
18630
  if (response.status && response.status >= 200 && response.status <= 299) {
18790
18631
  resolve({ response: response, body: body });
@@ -18965,17 +18806,12 @@ class AccountingApi {
18965
18806
  });
18966
18807
  });
18967
18808
  }).then((fileContents) => {
18968
- localVarRequestOptions.data = fileContents;
18809
+ const file = Buffer.concat(fileContents);
18810
+ localVarRequestOptions.data = file;
18969
18811
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
18970
18812
  let body = null;
18971
18813
  try {
18972
18814
  const response = yield (0, axios_1.default)(localVarRequestOptions);
18973
- try {
18974
- body = JSON.parse(response.data);
18975
- }
18976
- catch (err) {
18977
- console.log('JSON parse body failed');
18978
- }
18979
18815
  body = models_1.ObjectSerializer.deserialize(response.data, "Attachments");
18980
18816
  if (response.status && response.status >= 200 && response.status <= 299) {
18981
18817
  resolve({ response: response, body: body });