xero-node 4.35.0 → 4.36.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 (50) hide show
  1. package/dist/gen/api/accountingApi.d.ts +245 -100
  2. package/dist/gen/api/accountingApi.js +506 -101
  3. package/dist/gen/api/accountingApi.js.map +1 -1
  4. package/dist/gen/api/appStoreApi.d.ts +5 -3
  5. package/dist/gen/api/appStoreApi.js +8 -4
  6. package/dist/gen/api/appStoreApi.js.map +1 -1
  7. package/dist/gen/api/assetApi.d.ts +5 -3
  8. package/dist/gen/api/assetApi.js +8 -4
  9. package/dist/gen/api/assetApi.js.map +1 -1
  10. package/dist/gen/api/bankfeedsApi.d.ts +7 -4
  11. package/dist/gen/api/bankfeedsApi.js +11 -5
  12. package/dist/gen/api/bankfeedsApi.js.map +1 -1
  13. package/dist/gen/api/filesApi.d.ts +13 -7
  14. package/dist/gen/api/filesApi.js +20 -8
  15. package/dist/gen/api/filesApi.js.map +1 -1
  16. package/dist/gen/api/financeApi.d.ts +1 -1
  17. package/dist/gen/api/financeApi.js +2 -2
  18. package/dist/gen/api/payrollAUApi.d.ts +31 -16
  19. package/dist/gen/api/payrollAUApi.js +47 -17
  20. package/dist/gen/api/payrollAUApi.js.map +1 -1
  21. package/dist/gen/api/payrollNZApi.d.ts +59 -30
  22. package/dist/gen/api/payrollNZApi.js +89 -31
  23. package/dist/gen/api/payrollNZApi.js.map +1 -1
  24. package/dist/gen/api/payrollUKApi.d.ts +55 -28
  25. package/dist/gen/api/payrollUKApi.js +83 -29
  26. package/dist/gen/api/payrollUKApi.js.map +1 -1
  27. package/dist/gen/api/projectApi.d.ts +15 -8
  28. package/dist/gen/api/projectApi.js +23 -9
  29. package/dist/gen/api/projectApi.js.map +1 -1
  30. package/dist/gen/model/accounting/accountType.d.ts +1 -5
  31. package/dist/gen/model/accounting/accountType.js +0 -4
  32. package/dist/gen/model/accounting/accountType.js.map +1 -1
  33. package/dist/gen/model/accounting/allocation.d.ts +8 -0
  34. package/dist/gen/model/accounting/allocation.js +10 -0
  35. package/dist/gen/model/accounting/allocation.js.map +1 -1
  36. package/dist/gen/model/accounting/contact.d.ts +0 -4
  37. package/dist/gen/model/accounting/contact.js +0 -5
  38. package/dist/gen/model/accounting/contact.js.map +1 -1
  39. package/dist/gen/model/accounting/models.js +1 -0
  40. package/dist/gen/model/accounting/models.js.map +1 -1
  41. package/dist/gen/model/accounting/tenNinetyNineContact.d.ts +23 -0
  42. package/dist/gen/model/accounting/tenNinetyNineContact.js +28 -0
  43. package/dist/gen/model/accounting/tenNinetyNineContact.js.map +1 -1
  44. package/dist/gen/model/finance/problemType.d.ts +2 -1
  45. package/dist/gen/model/finance/problemType.js +1 -0
  46. package/dist/gen/model/finance/problemType.js.map +1 -1
  47. package/dist/gen/model/payroll-au/leavePeriodStatus.d.ts +3 -1
  48. package/dist/gen/model/payroll-au/leavePeriodStatus.js +2 -0
  49. package/dist/gen/model/payroll-au/leavePeriodStatus.js.map +1 -1
  50. 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: 2.38.0
6
+ * The version of the OpenAPI document: 2.40.0
7
7
  * Contact: api@xero.com
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -34,7 +34,7 @@ var AccountingApiApiKeys;
34
34
  class AccountingApi {
35
35
  constructor(basePathOrUsername, password, basePath) {
36
36
  this._basePath = defaultBasePath;
37
- this.defaultHeaders = { 'user-agent': 'xero-node-4.35.0' };
37
+ this.defaultHeaders = { 'user-agent': 'xero-node-4.36.0' };
38
38
  this._useQuerystring = false;
39
39
  this.binaryHeaders = {};
40
40
  this.authentications = {
@@ -75,8 +75,9 @@ class AccountingApi {
75
75
  * @summary Creates a new chart of accounts
76
76
  * @param xeroTenantId Xero identifier for Tenant
77
77
  * @param account Account object in body of request
78
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
78
79
  */
79
- createAccount(xeroTenantId, account, options = { headers: {} }) {
80
+ createAccount(xeroTenantId, account, idempotencyKey, options = { headers: {} }) {
80
81
  return __awaiter(this, void 0, void 0, function* () {
81
82
  const localVarPath = this.basePath + '/Accounts';
82
83
  let localVarQueryParameters = {};
@@ -91,6 +92,7 @@ class AccountingApi {
91
92
  throw new Error('Required parameter account was null or undefined when calling createAccount.');
92
93
  }
93
94
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
95
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
94
96
  Object.assign(localVarHeaderParams, options.headers);
95
97
  let localVarUseFormData = false;
96
98
  let localVarRequestOptions = {
@@ -140,8 +142,9 @@ class AccountingApi {
140
142
  * @param accountID Unique identifier for Account object
141
143
  * @param fileName Name of the attachment
142
144
  * @param body Byte array of file in body of request
145
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
143
146
  */
144
- createAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, options = { headers: {} }) {
147
+ createAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, idempotencyKey, options = { headers: {} }) {
145
148
  return __awaiter(this, void 0, void 0, function* () {
146
149
  const localVarPath = this.basePath + '/Accounts/{AccountID}/Attachments/{FileName}'
147
150
  .replace('{' + 'AccountID' + '}', encodeURIComponent(String(accountID)))
@@ -168,6 +171,7 @@ class AccountingApi {
168
171
  this.binaryHeaders = { 'Accept': 'application/json' };
169
172
  Object.assign(localVarHeaderParams, this.binaryHeaders);
170
173
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
174
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
171
175
  Object.assign(localVarHeaderParams, options.headers);
172
176
  let localVarUseFormData = false;
173
177
  let localVarRequestOptions = {
@@ -239,8 +243,9 @@ class AccountingApi {
239
243
  * @param bankTransactionID Xero generated unique identifier for a bank transaction
240
244
  * @param fileName Name of the attachment
241
245
  * @param body Byte array of file in body of request
246
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
242
247
  */
243
- createBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, options = { headers: {} }) {
248
+ createBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, idempotencyKey, options = { headers: {} }) {
244
249
  return __awaiter(this, void 0, void 0, function* () {
245
250
  const localVarPath = this.basePath + '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'
246
251
  .replace('{' + 'BankTransactionID' + '}', encodeURIComponent(String(bankTransactionID)))
@@ -267,6 +272,7 @@ class AccountingApi {
267
272
  this.binaryHeaders = { 'Accept': 'application/json' };
268
273
  Object.assign(localVarHeaderParams, this.binaryHeaders);
269
274
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
275
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
270
276
  Object.assign(localVarHeaderParams, options.headers);
271
277
  let localVarUseFormData = false;
272
278
  let localVarRequestOptions = {
@@ -337,8 +343,9 @@ class AccountingApi {
337
343
  * @param xeroTenantId Xero identifier for Tenant
338
344
  * @param bankTransactionID Xero generated unique identifier for a bank transaction
339
345
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
346
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
340
347
  */
341
- createBankTransactionHistoryRecord(xeroTenantId, bankTransactionID, historyRecords, options = { headers: {} }) {
348
+ createBankTransactionHistoryRecord(xeroTenantId, bankTransactionID, historyRecords, idempotencyKey, options = { headers: {} }) {
342
349
  return __awaiter(this, void 0, void 0, function* () {
343
350
  const localVarPath = this.basePath + '/BankTransactions/{BankTransactionID}/History'
344
351
  .replace('{' + 'BankTransactionID' + '}', encodeURIComponent(String(bankTransactionID)));
@@ -358,6 +365,7 @@ class AccountingApi {
358
365
  throw new Error('Required parameter historyRecords was null or undefined when calling createBankTransactionHistoryRecord.');
359
366
  }
360
367
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
368
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
361
369
  Object.assign(localVarHeaderParams, options.headers);
362
370
  let localVarUseFormData = false;
363
371
  let localVarRequestOptions = {
@@ -405,10 +413,11 @@ class AccountingApi {
405
413
  * @summary Creates one or more spent or received money transaction
406
414
  * @param xeroTenantId Xero identifier for Tenant
407
415
  * @param bankTransactions BankTransactions with an array of BankTransaction objects in body of request
416
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
408
417
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
409
418
  * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
410
419
  */
411
- createBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp, options = { headers: {} }) {
420
+ createBankTransactions(xeroTenantId, bankTransactions, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
412
421
  return __awaiter(this, void 0, void 0, function* () {
413
422
  const localVarPath = this.basePath + '/BankTransactions';
414
423
  let localVarQueryParameters = {};
@@ -429,6 +438,7 @@ class AccountingApi {
429
438
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
430
439
  }
431
440
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
441
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
432
442
  Object.assign(localVarHeaderParams, options.headers);
433
443
  let localVarUseFormData = false;
434
444
  let localVarRequestOptions = {
@@ -476,8 +486,9 @@ class AccountingApi {
476
486
  * @summary Creates a bank transfer
477
487
  * @param xeroTenantId Xero identifier for Tenant
478
488
  * @param bankTransfers BankTransfers with array of BankTransfer objects in request body
489
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
479
490
  */
480
- createBankTransfer(xeroTenantId, bankTransfers, options = { headers: {} }) {
491
+ createBankTransfer(xeroTenantId, bankTransfers, idempotencyKey, options = { headers: {} }) {
481
492
  return __awaiter(this, void 0, void 0, function* () {
482
493
  const localVarPath = this.basePath + '/BankTransfers';
483
494
  let localVarQueryParameters = {};
@@ -492,6 +503,7 @@ class AccountingApi {
492
503
  throw new Error('Required parameter bankTransfers was null or undefined when calling createBankTransfer.');
493
504
  }
494
505
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
506
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
495
507
  Object.assign(localVarHeaderParams, options.headers);
496
508
  let localVarUseFormData = false;
497
509
  let localVarRequestOptions = {
@@ -540,8 +552,9 @@ class AccountingApi {
540
552
  * @param bankTransferID Xero generated unique identifier for a bank transfer
541
553
  * @param fileName Name of the attachment
542
554
  * @param body Byte array of file in body of request
555
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
543
556
  */
544
- createBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, options = { headers: {} }) {
557
+ createBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, idempotencyKey, options = { headers: {} }) {
545
558
  return __awaiter(this, void 0, void 0, function* () {
546
559
  const localVarPath = this.basePath + '/BankTransfers/{BankTransferID}/Attachments/{FileName}'
547
560
  .replace('{' + 'BankTransferID' + '}', encodeURIComponent(String(bankTransferID)))
@@ -568,6 +581,7 @@ class AccountingApi {
568
581
  this.binaryHeaders = { 'Accept': 'application/json' };
569
582
  Object.assign(localVarHeaderParams, this.binaryHeaders);
570
583
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
584
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
571
585
  Object.assign(localVarHeaderParams, options.headers);
572
586
  let localVarUseFormData = false;
573
587
  let localVarRequestOptions = {
@@ -638,8 +652,9 @@ class AccountingApi {
638
652
  * @param xeroTenantId Xero identifier for Tenant
639
653
  * @param bankTransferID Xero generated unique identifier for a bank transfer
640
654
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
655
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
641
656
  */
642
- createBankTransferHistoryRecord(xeroTenantId, bankTransferID, historyRecords, options = { headers: {} }) {
657
+ createBankTransferHistoryRecord(xeroTenantId, bankTransferID, historyRecords, idempotencyKey, options = { headers: {} }) {
643
658
  return __awaiter(this, void 0, void 0, function* () {
644
659
  const localVarPath = this.basePath + '/BankTransfers/{BankTransferID}/History'
645
660
  .replace('{' + 'BankTransferID' + '}', encodeURIComponent(String(bankTransferID)));
@@ -659,6 +674,7 @@ class AccountingApi {
659
674
  throw new Error('Required parameter historyRecords was null or undefined when calling createBankTransferHistoryRecord.');
660
675
  }
661
676
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
677
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
662
678
  Object.assign(localVarHeaderParams, options.headers);
663
679
  let localVarUseFormData = false;
664
680
  let localVarRequestOptions = {
@@ -707,8 +723,9 @@ class AccountingApi {
707
723
  * @param xeroTenantId Xero identifier for Tenant
708
724
  * @param batchPayments BatchPayments with an array of Payments in body of request
709
725
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
726
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
710
727
  */
711
- createBatchPayment(xeroTenantId, batchPayments, summarizeErrors, options = { headers: {} }) {
728
+ createBatchPayment(xeroTenantId, batchPayments, summarizeErrors, idempotencyKey, options = { headers: {} }) {
712
729
  return __awaiter(this, void 0, void 0, function* () {
713
730
  const localVarPath = this.basePath + '/BatchPayments';
714
731
  let localVarQueryParameters = {};
@@ -726,6 +743,7 @@ class AccountingApi {
726
743
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
727
744
  }
728
745
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
746
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
729
747
  Object.assign(localVarHeaderParams, options.headers);
730
748
  let localVarUseFormData = false;
731
749
  let localVarRequestOptions = {
@@ -774,8 +792,9 @@ class AccountingApi {
774
792
  * @param xeroTenantId Xero identifier for Tenant
775
793
  * @param batchPaymentID Unique identifier for BatchPayment
776
794
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
795
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
777
796
  */
778
- createBatchPaymentHistoryRecord(xeroTenantId, batchPaymentID, historyRecords, options = { headers: {} }) {
797
+ createBatchPaymentHistoryRecord(xeroTenantId, batchPaymentID, historyRecords, idempotencyKey, options = { headers: {} }) {
779
798
  return __awaiter(this, void 0, void 0, function* () {
780
799
  const localVarPath = this.basePath + '/BatchPayments/{BatchPaymentID}/History'
781
800
  .replace('{' + 'BatchPaymentID' + '}', encodeURIComponent(String(batchPaymentID)));
@@ -795,6 +814,7 @@ class AccountingApi {
795
814
  throw new Error('Required parameter historyRecords was null or undefined when calling createBatchPaymentHistoryRecord.');
796
815
  }
797
816
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
817
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
798
818
  Object.assign(localVarHeaderParams, options.headers);
799
819
  let localVarUseFormData = false;
800
820
  let localVarRequestOptions = {
@@ -843,8 +863,9 @@ class AccountingApi {
843
863
  * @param xeroTenantId Xero identifier for Tenant
844
864
  * @param brandingThemeID Unique identifier for a Branding Theme
845
865
  * @param paymentServices PaymentServices array with PaymentService object in body of request
866
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
846
867
  */
847
- createBrandingThemePaymentServices(xeroTenantId, brandingThemeID, paymentServices, options = { headers: {} }) {
868
+ createBrandingThemePaymentServices(xeroTenantId, brandingThemeID, paymentServices, idempotencyKey, options = { headers: {} }) {
848
869
  return __awaiter(this, void 0, void 0, function* () {
849
870
  const localVarPath = this.basePath + '/BrandingThemes/{BrandingThemeID}/PaymentServices'
850
871
  .replace('{' + 'BrandingThemeID' + '}', encodeURIComponent(String(brandingThemeID)));
@@ -864,6 +885,7 @@ class AccountingApi {
864
885
  throw new Error('Required parameter paymentServices was null or undefined when calling createBrandingThemePaymentServices.');
865
886
  }
866
887
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
888
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
867
889
  Object.assign(localVarHeaderParams, options.headers);
868
890
  let localVarUseFormData = false;
869
891
  let localVarRequestOptions = {
@@ -912,8 +934,9 @@ class AccountingApi {
912
934
  * @param contactID Unique identifier for a Contact
913
935
  * @param fileName Name of the attachment
914
936
  * @param body Byte array of file in body of request
937
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
915
938
  */
916
- createContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, options = { headers: {} }) {
939
+ createContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, idempotencyKey, options = { headers: {} }) {
917
940
  return __awaiter(this, void 0, void 0, function* () {
918
941
  const localVarPath = this.basePath + '/Contacts/{ContactID}/Attachments/{FileName}'
919
942
  .replace('{' + 'ContactID' + '}', encodeURIComponent(String(contactID)))
@@ -940,6 +963,7 @@ class AccountingApi {
940
963
  this.binaryHeaders = { 'Accept': 'application/json' };
941
964
  Object.assign(localVarHeaderParams, this.binaryHeaders);
942
965
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
966
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
943
967
  Object.assign(localVarHeaderParams, options.headers);
944
968
  let localVarUseFormData = false;
945
969
  let localVarRequestOptions = {
@@ -1009,8 +1033,9 @@ class AccountingApi {
1009
1033
  * @summary Creates a contact group
1010
1034
  * @param xeroTenantId Xero identifier for Tenant
1011
1035
  * @param contactGroups ContactGroups with an array of names in request body
1036
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1012
1037
  */
1013
- createContactGroup(xeroTenantId, contactGroups, options = { headers: {} }) {
1038
+ createContactGroup(xeroTenantId, contactGroups, idempotencyKey, options = { headers: {} }) {
1014
1039
  return __awaiter(this, void 0, void 0, function* () {
1015
1040
  const localVarPath = this.basePath + '/ContactGroups';
1016
1041
  let localVarQueryParameters = {};
@@ -1025,6 +1050,7 @@ class AccountingApi {
1025
1050
  throw new Error('Required parameter contactGroups was null or undefined when calling createContactGroup.');
1026
1051
  }
1027
1052
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1053
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1028
1054
  Object.assign(localVarHeaderParams, options.headers);
1029
1055
  let localVarUseFormData = false;
1030
1056
  let localVarRequestOptions = {
@@ -1073,8 +1099,9 @@ class AccountingApi {
1073
1099
  * @param xeroTenantId Xero identifier for Tenant
1074
1100
  * @param contactGroupID Unique identifier for a Contact Group
1075
1101
  * @param contacts Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request
1102
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1076
1103
  */
1077
- createContactGroupContacts(xeroTenantId, contactGroupID, contacts, options = { headers: {} }) {
1104
+ createContactGroupContacts(xeroTenantId, contactGroupID, contacts, idempotencyKey, options = { headers: {} }) {
1078
1105
  return __awaiter(this, void 0, void 0, function* () {
1079
1106
  const localVarPath = this.basePath + '/ContactGroups/{ContactGroupID}/Contacts'
1080
1107
  .replace('{' + 'ContactGroupID' + '}', encodeURIComponent(String(contactGroupID)));
@@ -1094,6 +1121,7 @@ class AccountingApi {
1094
1121
  throw new Error('Required parameter contacts was null or undefined when calling createContactGroupContacts.');
1095
1122
  }
1096
1123
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1124
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1097
1125
  Object.assign(localVarHeaderParams, options.headers);
1098
1126
  let localVarUseFormData = false;
1099
1127
  let localVarRequestOptions = {
@@ -1142,8 +1170,9 @@ class AccountingApi {
1142
1170
  * @param xeroTenantId Xero identifier for Tenant
1143
1171
  * @param contactID Unique identifier for a Contact
1144
1172
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
1173
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1145
1174
  */
1146
- createContactHistory(xeroTenantId, contactID, historyRecords, options = { headers: {} }) {
1175
+ createContactHistory(xeroTenantId, contactID, historyRecords, idempotencyKey, options = { headers: {} }) {
1147
1176
  return __awaiter(this, void 0, void 0, function* () {
1148
1177
  const localVarPath = this.basePath + '/Contacts/{ContactID}/History'
1149
1178
  .replace('{' + 'ContactID' + '}', encodeURIComponent(String(contactID)));
@@ -1163,6 +1192,7 @@ class AccountingApi {
1163
1192
  throw new Error('Required parameter historyRecords was null or undefined when calling createContactHistory.');
1164
1193
  }
1165
1194
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1195
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1166
1196
  Object.assign(localVarHeaderParams, options.headers);
1167
1197
  let localVarUseFormData = false;
1168
1198
  let localVarRequestOptions = {
@@ -1210,9 +1240,10 @@ class AccountingApi {
1210
1240
  * @summary Creates multiple contacts (bulk) in a Xero organisation
1211
1241
  * @param xeroTenantId Xero identifier for Tenant
1212
1242
  * @param contacts Contacts with an array of Contact objects to create in body of request
1243
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1213
1244
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
1214
1245
  */
1215
- createContacts(xeroTenantId, contacts, summarizeErrors, options = { headers: {} }) {
1246
+ createContacts(xeroTenantId, contacts, idempotencyKey, summarizeErrors, options = { headers: {} }) {
1216
1247
  return __awaiter(this, void 0, void 0, function* () {
1217
1248
  const localVarPath = this.basePath + '/Contacts';
1218
1249
  let localVarQueryParameters = {};
@@ -1230,6 +1261,7 @@ class AccountingApi {
1230
1261
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
1231
1262
  }
1232
1263
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1264
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1233
1265
  Object.assign(localVarHeaderParams, options.headers);
1234
1266
  let localVarUseFormData = false;
1235
1267
  let localVarRequestOptions = {
@@ -1278,9 +1310,10 @@ class AccountingApi {
1278
1310
  * @param xeroTenantId Xero identifier for Tenant
1279
1311
  * @param creditNoteID Unique identifier for a Credit Note
1280
1312
  * @param allocations Allocations with array of Allocation object in body of request.
1313
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1281
1314
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
1282
1315
  */
1283
- createCreditNoteAllocation(xeroTenantId, creditNoteID, allocations, summarizeErrors, options = { headers: {} }) {
1316
+ createCreditNoteAllocation(xeroTenantId, creditNoteID, allocations, idempotencyKey, summarizeErrors, options = { headers: {} }) {
1284
1317
  return __awaiter(this, void 0, void 0, function* () {
1285
1318
  const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}/Allocations'
1286
1319
  .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID)));
@@ -1303,6 +1336,7 @@ class AccountingApi {
1303
1336
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
1304
1337
  }
1305
1338
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1339
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1306
1340
  Object.assign(localVarHeaderParams, options.headers);
1307
1341
  let localVarUseFormData = false;
1308
1342
  let localVarRequestOptions = {
@@ -1352,9 +1386,10 @@ class AccountingApi {
1352
1386
  * @param creditNoteID Unique identifier for a Credit Note
1353
1387
  * @param fileName Name of the attachment
1354
1388
  * @param body Byte array of file in body of request
1389
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1355
1390
  * @param includeOnline Allows an attachment to be seen by the end customer within their online invoice
1356
1391
  */
1357
- createCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, includeOnline, options = { headers: {} }) {
1392
+ createCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, idempotencyKey, includeOnline, options = { headers: {} }) {
1358
1393
  return __awaiter(this, void 0, void 0, function* () {
1359
1394
  const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'
1360
1395
  .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID)))
@@ -1384,6 +1419,7 @@ class AccountingApi {
1384
1419
  localVarQueryParameters['IncludeOnline'] = models_1.ObjectSerializer.serialize(includeOnline, "boolean");
1385
1420
  }
1386
1421
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1422
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1387
1423
  Object.assign(localVarHeaderParams, options.headers);
1388
1424
  let localVarUseFormData = false;
1389
1425
  let localVarRequestOptions = {
@@ -1454,8 +1490,9 @@ class AccountingApi {
1454
1490
  * @param xeroTenantId Xero identifier for Tenant
1455
1491
  * @param creditNoteID Unique identifier for a Credit Note
1456
1492
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
1493
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1457
1494
  */
1458
- createCreditNoteHistory(xeroTenantId, creditNoteID, historyRecords, options = { headers: {} }) {
1495
+ createCreditNoteHistory(xeroTenantId, creditNoteID, historyRecords, idempotencyKey, options = { headers: {} }) {
1459
1496
  return __awaiter(this, void 0, void 0, function* () {
1460
1497
  const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}/History'
1461
1498
  .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID)));
@@ -1475,6 +1512,7 @@ class AccountingApi {
1475
1512
  throw new Error('Required parameter historyRecords was null or undefined when calling createCreditNoteHistory.');
1476
1513
  }
1477
1514
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1515
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1478
1516
  Object.assign(localVarHeaderParams, options.headers);
1479
1517
  let localVarUseFormData = false;
1480
1518
  let localVarRequestOptions = {
@@ -1522,10 +1560,11 @@ class AccountingApi {
1522
1560
  * @summary Creates a new credit note
1523
1561
  * @param xeroTenantId Xero identifier for Tenant
1524
1562
  * @param creditNotes Credit Notes with array of CreditNote object in body of request
1563
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1525
1564
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
1526
1565
  * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
1527
1566
  */
1528
- createCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp, options = { headers: {} }) {
1567
+ createCreditNotes(xeroTenantId, creditNotes, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
1529
1568
  return __awaiter(this, void 0, void 0, function* () {
1530
1569
  const localVarPath = this.basePath + '/CreditNotes';
1531
1570
  let localVarQueryParameters = {};
@@ -1546,6 +1585,7 @@ class AccountingApi {
1546
1585
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
1547
1586
  }
1548
1587
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1588
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1549
1589
  Object.assign(localVarHeaderParams, options.headers);
1550
1590
  let localVarUseFormData = false;
1551
1591
  let localVarRequestOptions = {
@@ -1593,8 +1633,9 @@ class AccountingApi {
1593
1633
  * @summary Create a new currency for a Xero organisation
1594
1634
  * @param xeroTenantId Xero identifier for Tenant
1595
1635
  * @param currency Currency object in the body of request
1636
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1596
1637
  */
1597
- createCurrency(xeroTenantId, currency, options = { headers: {} }) {
1638
+ createCurrency(xeroTenantId, currency, idempotencyKey, options = { headers: {} }) {
1598
1639
  return __awaiter(this, void 0, void 0, function* () {
1599
1640
  const localVarPath = this.basePath + '/Currencies';
1600
1641
  let localVarQueryParameters = {};
@@ -1609,6 +1650,7 @@ class AccountingApi {
1609
1650
  throw new Error('Required parameter currency was null or undefined when calling createCurrency.');
1610
1651
  }
1611
1652
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1653
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1612
1654
  Object.assign(localVarHeaderParams, options.headers);
1613
1655
  let localVarUseFormData = false;
1614
1656
  let localVarRequestOptions = {
@@ -1656,9 +1698,10 @@ class AccountingApi {
1656
1698
  * @summary Creates new employees used in Xero payrun
1657
1699
  * @param xeroTenantId Xero identifier for Tenant
1658
1700
  * @param employees Employees with array of Employee object in body of request
1701
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1659
1702
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
1660
1703
  */
1661
- createEmployees(xeroTenantId, employees, summarizeErrors, options = { headers: {} }) {
1704
+ createEmployees(xeroTenantId, employees, idempotencyKey, summarizeErrors, options = { headers: {} }) {
1662
1705
  return __awaiter(this, void 0, void 0, function* () {
1663
1706
  const localVarPath = this.basePath + '/Employees';
1664
1707
  let localVarQueryParameters = {};
@@ -1676,6 +1719,7 @@ class AccountingApi {
1676
1719
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
1677
1720
  }
1678
1721
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1722
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1679
1723
  Object.assign(localVarHeaderParams, options.headers);
1680
1724
  let localVarUseFormData = false;
1681
1725
  let localVarRequestOptions = {
@@ -1724,8 +1768,9 @@ class AccountingApi {
1724
1768
  * @param xeroTenantId Xero identifier for Tenant
1725
1769
  * @param expenseClaimID Unique identifier for a ExpenseClaim
1726
1770
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
1771
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1727
1772
  */
1728
- createExpenseClaimHistory(xeroTenantId, expenseClaimID, historyRecords, options = { headers: {} }) {
1773
+ createExpenseClaimHistory(xeroTenantId, expenseClaimID, historyRecords, idempotencyKey, options = { headers: {} }) {
1729
1774
  return __awaiter(this, void 0, void 0, function* () {
1730
1775
  const localVarPath = this.basePath + '/ExpenseClaims/{ExpenseClaimID}/History'
1731
1776
  .replace('{' + 'ExpenseClaimID' + '}', encodeURIComponent(String(expenseClaimID)));
@@ -1745,6 +1790,7 @@ class AccountingApi {
1745
1790
  throw new Error('Required parameter historyRecords was null or undefined when calling createExpenseClaimHistory.');
1746
1791
  }
1747
1792
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1793
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1748
1794
  Object.assign(localVarHeaderParams, options.headers);
1749
1795
  let localVarUseFormData = false;
1750
1796
  let localVarRequestOptions = {
@@ -1792,8 +1838,9 @@ class AccountingApi {
1792
1838
  * @summary Creates expense claims
1793
1839
  * @param xeroTenantId Xero identifier for Tenant
1794
1840
  * @param expenseClaims ExpenseClaims with array of ExpenseClaim object in body of request
1841
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1795
1842
  */
1796
- createExpenseClaims(xeroTenantId, expenseClaims, options = { headers: {} }) {
1843
+ createExpenseClaims(xeroTenantId, expenseClaims, idempotencyKey, options = { headers: {} }) {
1797
1844
  return __awaiter(this, void 0, void 0, function* () {
1798
1845
  const localVarPath = this.basePath + '/ExpenseClaims';
1799
1846
  let localVarQueryParameters = {};
@@ -1808,6 +1855,7 @@ class AccountingApi {
1808
1855
  throw new Error('Required parameter expenseClaims was null or undefined when calling createExpenseClaims.');
1809
1856
  }
1810
1857
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1858
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1811
1859
  Object.assign(localVarHeaderParams, options.headers);
1812
1860
  let localVarUseFormData = false;
1813
1861
  let localVarRequestOptions = {
@@ -1857,9 +1905,10 @@ class AccountingApi {
1857
1905
  * @param invoiceID Unique identifier for an Invoice
1858
1906
  * @param fileName Name of the attachment
1859
1907
  * @param body Byte array of file in body of request
1908
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1860
1909
  * @param includeOnline Allows an attachment to be seen by the end customer within their online invoice
1861
1910
  */
1862
- createInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, includeOnline, options = { headers: {} }) {
1911
+ createInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, idempotencyKey, includeOnline, options = { headers: {} }) {
1863
1912
  return __awaiter(this, void 0, void 0, function* () {
1864
1913
  const localVarPath = this.basePath + '/Invoices/{InvoiceID}/Attachments/{FileName}'
1865
1914
  .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID)))
@@ -1889,6 +1938,7 @@ class AccountingApi {
1889
1938
  localVarQueryParameters['IncludeOnline'] = models_1.ObjectSerializer.serialize(includeOnline, "boolean");
1890
1939
  }
1891
1940
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1941
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1892
1942
  Object.assign(localVarHeaderParams, options.headers);
1893
1943
  let localVarUseFormData = false;
1894
1944
  let localVarRequestOptions = {
@@ -1959,8 +2009,9 @@ class AccountingApi {
1959
2009
  * @param xeroTenantId Xero identifier for Tenant
1960
2010
  * @param invoiceID Unique identifier for an Invoice
1961
2011
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
2012
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1962
2013
  */
1963
- createInvoiceHistory(xeroTenantId, invoiceID, historyRecords, options = { headers: {} }) {
2014
+ createInvoiceHistory(xeroTenantId, invoiceID, historyRecords, idempotencyKey, options = { headers: {} }) {
1964
2015
  return __awaiter(this, void 0, void 0, function* () {
1965
2016
  const localVarPath = this.basePath + '/Invoices/{InvoiceID}/History'
1966
2017
  .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID)));
@@ -1980,6 +2031,7 @@ class AccountingApi {
1980
2031
  throw new Error('Required parameter historyRecords was null or undefined when calling createInvoiceHistory.');
1981
2032
  }
1982
2033
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2034
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1983
2035
  Object.assign(localVarHeaderParams, options.headers);
1984
2036
  let localVarUseFormData = false;
1985
2037
  let localVarRequestOptions = {
@@ -2027,10 +2079,11 @@ class AccountingApi {
2027
2079
  * @summary Creates one or more sales invoices or purchase bills
2028
2080
  * @param xeroTenantId Xero identifier for Tenant
2029
2081
  * @param invoices Invoices with an array of invoice objects in body of request
2082
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2030
2083
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
2031
2084
  * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
2032
2085
  */
2033
- createInvoices(xeroTenantId, invoices, summarizeErrors, unitdp, options = { headers: {} }) {
2086
+ createInvoices(xeroTenantId, invoices, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
2034
2087
  return __awaiter(this, void 0, void 0, function* () {
2035
2088
  const localVarPath = this.basePath + '/Invoices';
2036
2089
  let localVarQueryParameters = {};
@@ -2051,6 +2104,7 @@ class AccountingApi {
2051
2104
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
2052
2105
  }
2053
2106
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2107
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2054
2108
  Object.assign(localVarHeaderParams, options.headers);
2055
2109
  let localVarUseFormData = false;
2056
2110
  let localVarRequestOptions = {
@@ -2099,8 +2153,9 @@ class AccountingApi {
2099
2153
  * @param xeroTenantId Xero identifier for Tenant
2100
2154
  * @param itemID Unique identifier for an Item
2101
2155
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
2156
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2102
2157
  */
2103
- createItemHistory(xeroTenantId, itemID, historyRecords, options = { headers: {} }) {
2158
+ createItemHistory(xeroTenantId, itemID, historyRecords, idempotencyKey, options = { headers: {} }) {
2104
2159
  return __awaiter(this, void 0, void 0, function* () {
2105
2160
  const localVarPath = this.basePath + '/Items/{ItemID}/History'
2106
2161
  .replace('{' + 'ItemID' + '}', encodeURIComponent(String(itemID)));
@@ -2120,6 +2175,7 @@ class AccountingApi {
2120
2175
  throw new Error('Required parameter historyRecords was null or undefined when calling createItemHistory.');
2121
2176
  }
2122
2177
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2178
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2123
2179
  Object.assign(localVarHeaderParams, options.headers);
2124
2180
  let localVarUseFormData = false;
2125
2181
  let localVarRequestOptions = {
@@ -2167,10 +2223,11 @@ class AccountingApi {
2167
2223
  * @summary Creates one or more items
2168
2224
  * @param xeroTenantId Xero identifier for Tenant
2169
2225
  * @param items Items with an array of Item objects in body of request
2226
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2170
2227
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
2171
2228
  * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
2172
2229
  */
2173
- createItems(xeroTenantId, items, summarizeErrors, unitdp, options = { headers: {} }) {
2230
+ createItems(xeroTenantId, items, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
2174
2231
  return __awaiter(this, void 0, void 0, function* () {
2175
2232
  const localVarPath = this.basePath + '/Items';
2176
2233
  let localVarQueryParameters = {};
@@ -2191,6 +2248,7 @@ class AccountingApi {
2191
2248
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
2192
2249
  }
2193
2250
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2251
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2194
2252
  Object.assign(localVarHeaderParams, options.headers);
2195
2253
  let localVarUseFormData = false;
2196
2254
  let localVarRequestOptions = {
@@ -2238,8 +2296,9 @@ class AccountingApi {
2238
2296
  * @summary Creates linked transactions (billable expenses)
2239
2297
  * @param xeroTenantId Xero identifier for Tenant
2240
2298
  * @param linkedTransaction LinkedTransaction object in body of request
2299
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2241
2300
  */
2242
- createLinkedTransaction(xeroTenantId, linkedTransaction, options = { headers: {} }) {
2301
+ createLinkedTransaction(xeroTenantId, linkedTransaction, idempotencyKey, options = { headers: {} }) {
2243
2302
  return __awaiter(this, void 0, void 0, function* () {
2244
2303
  const localVarPath = this.basePath + '/LinkedTransactions';
2245
2304
  let localVarQueryParameters = {};
@@ -2254,6 +2313,7 @@ class AccountingApi {
2254
2313
  throw new Error('Required parameter linkedTransaction was null or undefined when calling createLinkedTransaction.');
2255
2314
  }
2256
2315
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2316
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2257
2317
  Object.assign(localVarHeaderParams, options.headers);
2258
2318
  let localVarUseFormData = false;
2259
2319
  let localVarRequestOptions = {
@@ -2303,8 +2363,9 @@ class AccountingApi {
2303
2363
  * @param manualJournalID Unique identifier for a ManualJournal
2304
2364
  * @param fileName Name of the attachment
2305
2365
  * @param body Byte array of file in body of request
2366
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2306
2367
  */
2307
- createManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, options = { headers: {} }) {
2368
+ createManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, idempotencyKey, options = { headers: {} }) {
2308
2369
  return __awaiter(this, void 0, void 0, function* () {
2309
2370
  const localVarPath = this.basePath + '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'
2310
2371
  .replace('{' + 'ManualJournalID' + '}', encodeURIComponent(String(manualJournalID)))
@@ -2331,6 +2392,7 @@ class AccountingApi {
2331
2392
  this.binaryHeaders = { 'Accept': 'application/json' };
2332
2393
  Object.assign(localVarHeaderParams, this.binaryHeaders);
2333
2394
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2395
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2334
2396
  Object.assign(localVarHeaderParams, options.headers);
2335
2397
  let localVarUseFormData = false;
2336
2398
  let localVarRequestOptions = {
@@ -2401,8 +2463,9 @@ class AccountingApi {
2401
2463
  * @param xeroTenantId Xero identifier for Tenant
2402
2464
  * @param manualJournalID Unique identifier for a ManualJournal
2403
2465
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
2466
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2404
2467
  */
2405
- createManualJournalHistoryRecord(xeroTenantId, manualJournalID, historyRecords, options = { headers: {} }) {
2468
+ createManualJournalHistoryRecord(xeroTenantId, manualJournalID, historyRecords, idempotencyKey, options = { headers: {} }) {
2406
2469
  return __awaiter(this, void 0, void 0, function* () {
2407
2470
  const localVarPath = this.basePath + '/ManualJournals/{ManualJournalID}/History'
2408
2471
  .replace('{' + 'ManualJournalID' + '}', encodeURIComponent(String(manualJournalID)));
@@ -2422,6 +2485,7 @@ class AccountingApi {
2422
2485
  throw new Error('Required parameter historyRecords was null or undefined when calling createManualJournalHistoryRecord.');
2423
2486
  }
2424
2487
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2488
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2425
2489
  Object.assign(localVarHeaderParams, options.headers);
2426
2490
  let localVarUseFormData = false;
2427
2491
  let localVarRequestOptions = {
@@ -2469,9 +2533,10 @@ class AccountingApi {
2469
2533
  * @summary Creates one or more manual journals
2470
2534
  * @param xeroTenantId Xero identifier for Tenant
2471
2535
  * @param manualJournals ManualJournals array with ManualJournal object in body of request
2536
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2472
2537
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
2473
2538
  */
2474
- createManualJournals(xeroTenantId, manualJournals, summarizeErrors, options = { headers: {} }) {
2539
+ createManualJournals(xeroTenantId, manualJournals, idempotencyKey, summarizeErrors, options = { headers: {} }) {
2475
2540
  return __awaiter(this, void 0, void 0, function* () {
2476
2541
  const localVarPath = this.basePath + '/ManualJournals';
2477
2542
  let localVarQueryParameters = {};
@@ -2489,6 +2554,7 @@ class AccountingApi {
2489
2554
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
2490
2555
  }
2491
2556
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2557
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2492
2558
  Object.assign(localVarHeaderParams, options.headers);
2493
2559
  let localVarUseFormData = false;
2494
2560
  let localVarRequestOptions = {
@@ -2537,9 +2603,10 @@ class AccountingApi {
2537
2603
  * @param xeroTenantId Xero identifier for Tenant
2538
2604
  * @param overpaymentID Unique identifier for a Overpayment
2539
2605
  * @param allocations Allocations array with Allocation object in body of request
2606
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2540
2607
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
2541
2608
  */
2542
- createOverpaymentAllocations(xeroTenantId, overpaymentID, allocations, summarizeErrors, options = { headers: {} }) {
2609
+ createOverpaymentAllocations(xeroTenantId, overpaymentID, allocations, idempotencyKey, summarizeErrors, options = { headers: {} }) {
2543
2610
  return __awaiter(this, void 0, void 0, function* () {
2544
2611
  const localVarPath = this.basePath + '/Overpayments/{OverpaymentID}/Allocations'
2545
2612
  .replace('{' + 'OverpaymentID' + '}', encodeURIComponent(String(overpaymentID)));
@@ -2562,6 +2629,7 @@ class AccountingApi {
2562
2629
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
2563
2630
  }
2564
2631
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2632
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2565
2633
  Object.assign(localVarHeaderParams, options.headers);
2566
2634
  let localVarUseFormData = false;
2567
2635
  let localVarRequestOptions = {
@@ -2610,8 +2678,9 @@ class AccountingApi {
2610
2678
  * @param xeroTenantId Xero identifier for Tenant
2611
2679
  * @param overpaymentID Unique identifier for a Overpayment
2612
2680
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
2681
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2613
2682
  */
2614
- createOverpaymentHistory(xeroTenantId, overpaymentID, historyRecords, options = { headers: {} }) {
2683
+ createOverpaymentHistory(xeroTenantId, overpaymentID, historyRecords, idempotencyKey, options = { headers: {} }) {
2615
2684
  return __awaiter(this, void 0, void 0, function* () {
2616
2685
  const localVarPath = this.basePath + '/Overpayments/{OverpaymentID}/History'
2617
2686
  .replace('{' + 'OverpaymentID' + '}', encodeURIComponent(String(overpaymentID)));
@@ -2631,6 +2700,7 @@ class AccountingApi {
2631
2700
  throw new Error('Required parameter historyRecords was null or undefined when calling createOverpaymentHistory.');
2632
2701
  }
2633
2702
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2703
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2634
2704
  Object.assign(localVarHeaderParams, options.headers);
2635
2705
  let localVarUseFormData = false;
2636
2706
  let localVarRequestOptions = {
@@ -2678,8 +2748,9 @@ class AccountingApi {
2678
2748
  * @summary Creates a single payment for invoice or credit notes
2679
2749
  * @param xeroTenantId Xero identifier for Tenant
2680
2750
  * @param payment Request body with a single Payment object
2751
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2681
2752
  */
2682
- createPayment(xeroTenantId, payment, options = { headers: {} }) {
2753
+ createPayment(xeroTenantId, payment, idempotencyKey, options = { headers: {} }) {
2683
2754
  return __awaiter(this, void 0, void 0, function* () {
2684
2755
  const localVarPath = this.basePath + '/Payments';
2685
2756
  let localVarQueryParameters = {};
@@ -2694,6 +2765,7 @@ class AccountingApi {
2694
2765
  throw new Error('Required parameter payment was null or undefined when calling createPayment.');
2695
2766
  }
2696
2767
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2768
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2697
2769
  Object.assign(localVarHeaderParams, options.headers);
2698
2770
  let localVarUseFormData = false;
2699
2771
  let localVarRequestOptions = {
@@ -2742,8 +2814,9 @@ class AccountingApi {
2742
2814
  * @param xeroTenantId Xero identifier for Tenant
2743
2815
  * @param paymentID Unique identifier for a Payment
2744
2816
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
2817
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2745
2818
  */
2746
- createPaymentHistory(xeroTenantId, paymentID, historyRecords, options = { headers: {} }) {
2819
+ createPaymentHistory(xeroTenantId, paymentID, historyRecords, idempotencyKey, options = { headers: {} }) {
2747
2820
  return __awaiter(this, void 0, void 0, function* () {
2748
2821
  const localVarPath = this.basePath + '/Payments/{PaymentID}/History'
2749
2822
  .replace('{' + 'PaymentID' + '}', encodeURIComponent(String(paymentID)));
@@ -2763,6 +2836,7 @@ class AccountingApi {
2763
2836
  throw new Error('Required parameter historyRecords was null or undefined when calling createPaymentHistory.');
2764
2837
  }
2765
2838
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2839
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2766
2840
  Object.assign(localVarHeaderParams, options.headers);
2767
2841
  let localVarUseFormData = false;
2768
2842
  let localVarRequestOptions = {
@@ -2810,8 +2884,9 @@ class AccountingApi {
2810
2884
  * @summary Creates a payment service
2811
2885
  * @param xeroTenantId Xero identifier for Tenant
2812
2886
  * @param paymentServices PaymentServices array with PaymentService object in body of request
2887
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2813
2888
  */
2814
- createPaymentService(xeroTenantId, paymentServices, options = { headers: {} }) {
2889
+ createPaymentService(xeroTenantId, paymentServices, idempotencyKey, options = { headers: {} }) {
2815
2890
  return __awaiter(this, void 0, void 0, function* () {
2816
2891
  const localVarPath = this.basePath + '/PaymentServices';
2817
2892
  let localVarQueryParameters = {};
@@ -2826,6 +2901,7 @@ class AccountingApi {
2826
2901
  throw new Error('Required parameter paymentServices was null or undefined when calling createPaymentService.');
2827
2902
  }
2828
2903
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2904
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2829
2905
  Object.assign(localVarHeaderParams, options.headers);
2830
2906
  let localVarUseFormData = false;
2831
2907
  let localVarRequestOptions = {
@@ -2873,9 +2949,10 @@ class AccountingApi {
2873
2949
  * @summary Creates multiple payments for invoices or credit notes
2874
2950
  * @param xeroTenantId Xero identifier for Tenant
2875
2951
  * @param payments Payments array with Payment object in body of request
2952
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2876
2953
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
2877
2954
  */
2878
- createPayments(xeroTenantId, payments, summarizeErrors, options = { headers: {} }) {
2955
+ createPayments(xeroTenantId, payments, idempotencyKey, summarizeErrors, options = { headers: {} }) {
2879
2956
  return __awaiter(this, void 0, void 0, function* () {
2880
2957
  const localVarPath = this.basePath + '/Payments';
2881
2958
  let localVarQueryParameters = {};
@@ -2893,6 +2970,7 @@ class AccountingApi {
2893
2970
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
2894
2971
  }
2895
2972
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
2973
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2896
2974
  Object.assign(localVarHeaderParams, options.headers);
2897
2975
  let localVarUseFormData = false;
2898
2976
  let localVarRequestOptions = {
@@ -2941,9 +3019,10 @@ class AccountingApi {
2941
3019
  * @param xeroTenantId Xero identifier for Tenant
2942
3020
  * @param prepaymentID Unique identifier for a PrePayment
2943
3021
  * @param allocations Allocations with an array of Allocation object in body of request
3022
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2944
3023
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
2945
3024
  */
2946
- createPrepaymentAllocations(xeroTenantId, prepaymentID, allocations, summarizeErrors, options = { headers: {} }) {
3025
+ createPrepaymentAllocations(xeroTenantId, prepaymentID, allocations, idempotencyKey, summarizeErrors, options = { headers: {} }) {
2947
3026
  return __awaiter(this, void 0, void 0, function* () {
2948
3027
  const localVarPath = this.basePath + '/Prepayments/{PrepaymentID}/Allocations'
2949
3028
  .replace('{' + 'PrepaymentID' + '}', encodeURIComponent(String(prepaymentID)));
@@ -2966,6 +3045,7 @@ class AccountingApi {
2966
3045
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
2967
3046
  }
2968
3047
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3048
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
2969
3049
  Object.assign(localVarHeaderParams, options.headers);
2970
3050
  let localVarUseFormData = false;
2971
3051
  let localVarRequestOptions = {
@@ -3014,8 +3094,9 @@ class AccountingApi {
3014
3094
  * @param xeroTenantId Xero identifier for Tenant
3015
3095
  * @param prepaymentID Unique identifier for a PrePayment
3016
3096
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
3097
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3017
3098
  */
3018
- createPrepaymentHistory(xeroTenantId, prepaymentID, historyRecords, options = { headers: {} }) {
3099
+ createPrepaymentHistory(xeroTenantId, prepaymentID, historyRecords, idempotencyKey, options = { headers: {} }) {
3019
3100
  return __awaiter(this, void 0, void 0, function* () {
3020
3101
  const localVarPath = this.basePath + '/Prepayments/{PrepaymentID}/History'
3021
3102
  .replace('{' + 'PrepaymentID' + '}', encodeURIComponent(String(prepaymentID)));
@@ -3035,6 +3116,7 @@ class AccountingApi {
3035
3116
  throw new Error('Required parameter historyRecords was null or undefined when calling createPrepaymentHistory.');
3036
3117
  }
3037
3118
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3119
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3038
3120
  Object.assign(localVarHeaderParams, options.headers);
3039
3121
  let localVarUseFormData = false;
3040
3122
  let localVarRequestOptions = {
@@ -3084,8 +3166,9 @@ class AccountingApi {
3084
3166
  * @param purchaseOrderID Unique identifier for an Purchase Order
3085
3167
  * @param fileName Name of the attachment
3086
3168
  * @param body Byte array of file in body of request
3169
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3087
3170
  */
3088
- createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, options = { headers: {} }) {
3171
+ createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey, options = { headers: {} }) {
3089
3172
  return __awaiter(this, void 0, void 0, function* () {
3090
3173
  const localVarPath = this.basePath + '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}'
3091
3174
  .replace('{' + 'PurchaseOrderID' + '}', encodeURIComponent(String(purchaseOrderID)))
@@ -3112,6 +3195,7 @@ class AccountingApi {
3112
3195
  this.binaryHeaders = { 'Accept': 'application/json' };
3113
3196
  Object.assign(localVarHeaderParams, this.binaryHeaders);
3114
3197
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3198
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3115
3199
  Object.assign(localVarHeaderParams, options.headers);
3116
3200
  let localVarUseFormData = false;
3117
3201
  let localVarRequestOptions = {
@@ -3182,8 +3266,9 @@ class AccountingApi {
3182
3266
  * @param xeroTenantId Xero identifier for Tenant
3183
3267
  * @param purchaseOrderID Unique identifier for an Purchase Order
3184
3268
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
3269
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3185
3270
  */
3186
- createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords, options = { headers: {} }) {
3271
+ createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords, idempotencyKey, options = { headers: {} }) {
3187
3272
  return __awaiter(this, void 0, void 0, function* () {
3188
3273
  const localVarPath = this.basePath + '/PurchaseOrders/{PurchaseOrderID}/History'
3189
3274
  .replace('{' + 'PurchaseOrderID' + '}', encodeURIComponent(String(purchaseOrderID)));
@@ -3203,6 +3288,7 @@ class AccountingApi {
3203
3288
  throw new Error('Required parameter historyRecords was null or undefined when calling createPurchaseOrderHistory.');
3204
3289
  }
3205
3290
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3291
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3206
3292
  Object.assign(localVarHeaderParams, options.headers);
3207
3293
  let localVarUseFormData = false;
3208
3294
  let localVarRequestOptions = {
@@ -3250,9 +3336,10 @@ class AccountingApi {
3250
3336
  * @summary Creates one or more purchase orders
3251
3337
  * @param xeroTenantId Xero identifier for Tenant
3252
3338
  * @param purchaseOrders PurchaseOrders with an array of PurchaseOrder object in body of request
3339
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3253
3340
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
3254
3341
  */
3255
- createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors, options = { headers: {} }) {
3342
+ createPurchaseOrders(xeroTenantId, purchaseOrders, idempotencyKey, summarizeErrors, options = { headers: {} }) {
3256
3343
  return __awaiter(this, void 0, void 0, function* () {
3257
3344
  const localVarPath = this.basePath + '/PurchaseOrders';
3258
3345
  let localVarQueryParameters = {};
@@ -3270,6 +3357,7 @@ class AccountingApi {
3270
3357
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
3271
3358
  }
3272
3359
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3360
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3273
3361
  Object.assign(localVarHeaderParams, options.headers);
3274
3362
  let localVarUseFormData = false;
3275
3363
  let localVarRequestOptions = {
@@ -3319,8 +3407,9 @@ class AccountingApi {
3319
3407
  * @param quoteID Unique identifier for an Quote
3320
3408
  * @param fileName Name of the attachment
3321
3409
  * @param body Byte array of file in body of request
3410
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3322
3411
  */
3323
- createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, options = { headers: {} }) {
3412
+ createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, idempotencyKey, options = { headers: {} }) {
3324
3413
  return __awaiter(this, void 0, void 0, function* () {
3325
3414
  const localVarPath = this.basePath + '/Quotes/{QuoteID}/Attachments/{FileName}'
3326
3415
  .replace('{' + 'QuoteID' + '}', encodeURIComponent(String(quoteID)))
@@ -3347,6 +3436,7 @@ class AccountingApi {
3347
3436
  this.binaryHeaders = { 'Accept': 'application/json' };
3348
3437
  Object.assign(localVarHeaderParams, this.binaryHeaders);
3349
3438
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3439
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3350
3440
  Object.assign(localVarHeaderParams, options.headers);
3351
3441
  let localVarUseFormData = false;
3352
3442
  let localVarRequestOptions = {
@@ -3417,8 +3507,9 @@ class AccountingApi {
3417
3507
  * @param xeroTenantId Xero identifier for Tenant
3418
3508
  * @param quoteID Unique identifier for an Quote
3419
3509
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
3510
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3420
3511
  */
3421
- createQuoteHistory(xeroTenantId, quoteID, historyRecords, options = { headers: {} }) {
3512
+ createQuoteHistory(xeroTenantId, quoteID, historyRecords, idempotencyKey, options = { headers: {} }) {
3422
3513
  return __awaiter(this, void 0, void 0, function* () {
3423
3514
  const localVarPath = this.basePath + '/Quotes/{QuoteID}/History'
3424
3515
  .replace('{' + 'QuoteID' + '}', encodeURIComponent(String(quoteID)));
@@ -3438,6 +3529,7 @@ class AccountingApi {
3438
3529
  throw new Error('Required parameter historyRecords was null or undefined when calling createQuoteHistory.');
3439
3530
  }
3440
3531
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3532
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3441
3533
  Object.assign(localVarHeaderParams, options.headers);
3442
3534
  let localVarUseFormData = false;
3443
3535
  let localVarRequestOptions = {
@@ -3485,9 +3577,10 @@ class AccountingApi {
3485
3577
  * @summary Create one or more quotes
3486
3578
  * @param xeroTenantId Xero identifier for Tenant
3487
3579
  * @param quotes Quotes with an array of Quote object in body of request
3580
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3488
3581
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
3489
3582
  */
3490
- createQuotes(xeroTenantId, quotes, summarizeErrors, options = { headers: {} }) {
3583
+ createQuotes(xeroTenantId, quotes, idempotencyKey, summarizeErrors, options = { headers: {} }) {
3491
3584
  return __awaiter(this, void 0, void 0, function* () {
3492
3585
  const localVarPath = this.basePath + '/Quotes';
3493
3586
  let localVarQueryParameters = {};
@@ -3505,6 +3598,7 @@ class AccountingApi {
3505
3598
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
3506
3599
  }
3507
3600
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3601
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3508
3602
  Object.assign(localVarHeaderParams, options.headers);
3509
3603
  let localVarUseFormData = false;
3510
3604
  let localVarRequestOptions = {
@@ -3552,9 +3646,10 @@ class AccountingApi {
3552
3646
  * @summary Creates draft expense claim receipts for any user
3553
3647
  * @param xeroTenantId Xero identifier for Tenant
3554
3648
  * @param receipts Receipts with an array of Receipt object in body of request
3649
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3555
3650
  * @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
3556
3651
  */
3557
- createReceipt(xeroTenantId, receipts, unitdp, options = { headers: {} }) {
3652
+ createReceipt(xeroTenantId, receipts, idempotencyKey, unitdp, options = { headers: {} }) {
3558
3653
  return __awaiter(this, void 0, void 0, function* () {
3559
3654
  const localVarPath = this.basePath + '/Receipts';
3560
3655
  let localVarQueryParameters = {};
@@ -3572,6 +3667,7 @@ class AccountingApi {
3572
3667
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
3573
3668
  }
3574
3669
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3670
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3575
3671
  Object.assign(localVarHeaderParams, options.headers);
3576
3672
  let localVarUseFormData = false;
3577
3673
  let localVarRequestOptions = {
@@ -3621,8 +3717,9 @@ class AccountingApi {
3621
3717
  * @param receiptID Unique identifier for a Receipt
3622
3718
  * @param fileName Name of the attachment
3623
3719
  * @param body Byte array of file in body of request
3720
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3624
3721
  */
3625
- createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, options = { headers: {} }) {
3722
+ createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, idempotencyKey, options = { headers: {} }) {
3626
3723
  return __awaiter(this, void 0, void 0, function* () {
3627
3724
  const localVarPath = this.basePath + '/Receipts/{ReceiptID}/Attachments/{FileName}'
3628
3725
  .replace('{' + 'ReceiptID' + '}', encodeURIComponent(String(receiptID)))
@@ -3649,6 +3746,7 @@ class AccountingApi {
3649
3746
  this.binaryHeaders = { 'Accept': 'application/json' };
3650
3747
  Object.assign(localVarHeaderParams, this.binaryHeaders);
3651
3748
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3749
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3652
3750
  Object.assign(localVarHeaderParams, options.headers);
3653
3751
  let localVarUseFormData = false;
3654
3752
  let localVarRequestOptions = {
@@ -3719,8 +3817,9 @@ class AccountingApi {
3719
3817
  * @param xeroTenantId Xero identifier for Tenant
3720
3818
  * @param receiptID Unique identifier for a Receipt
3721
3819
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
3820
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3722
3821
  */
3723
- createReceiptHistory(xeroTenantId, receiptID, historyRecords, options = { headers: {} }) {
3822
+ createReceiptHistory(xeroTenantId, receiptID, historyRecords, idempotencyKey, options = { headers: {} }) {
3724
3823
  return __awaiter(this, void 0, void 0, function* () {
3725
3824
  const localVarPath = this.basePath + '/Receipts/{ReceiptID}/History'
3726
3825
  .replace('{' + 'ReceiptID' + '}', encodeURIComponent(String(receiptID)));
@@ -3740,6 +3839,7 @@ class AccountingApi {
3740
3839
  throw new Error('Required parameter historyRecords was null or undefined when calling createReceiptHistory.');
3741
3840
  }
3742
3841
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3842
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3743
3843
  Object.assign(localVarHeaderParams, options.headers);
3744
3844
  let localVarUseFormData = false;
3745
3845
  let localVarRequestOptions = {
@@ -3789,8 +3889,9 @@ class AccountingApi {
3789
3889
  * @param repeatingInvoiceID Unique identifier for a Repeating Invoice
3790
3890
  * @param fileName Name of the attachment
3791
3891
  * @param body Byte array of file in body of request
3892
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3792
3893
  */
3793
- createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, options = { headers: {} }) {
3894
+ createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey, options = { headers: {} }) {
3794
3895
  return __awaiter(this, void 0, void 0, function* () {
3795
3896
  const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'
3796
3897
  .replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID)))
@@ -3817,6 +3918,7 @@ class AccountingApi {
3817
3918
  this.binaryHeaders = { 'Accept': 'application/json' };
3818
3919
  Object.assign(localVarHeaderParams, this.binaryHeaders);
3819
3920
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3921
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3820
3922
  Object.assign(localVarHeaderParams, options.headers);
3821
3923
  let localVarUseFormData = false;
3822
3924
  let localVarRequestOptions = {
@@ -3887,8 +3989,9 @@ class AccountingApi {
3887
3989
  * @param xeroTenantId Xero identifier for Tenant
3888
3990
  * @param repeatingInvoiceID Unique identifier for a Repeating Invoice
3889
3991
  * @param historyRecords HistoryRecords containing an array of HistoryRecord objects in body of request
3992
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3890
3993
  */
3891
- createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords, options = { headers: {} }) {
3994
+ createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords, idempotencyKey, options = { headers: {} }) {
3892
3995
  return __awaiter(this, void 0, void 0, function* () {
3893
3996
  const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}/History'
3894
3997
  .replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID)));
@@ -3908,6 +4011,7 @@ class AccountingApi {
3908
4011
  throw new Error('Required parameter historyRecords was null or undefined when calling createRepeatingInvoiceHistory.');
3909
4012
  }
3910
4013
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4014
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3911
4015
  Object.assign(localVarHeaderParams, options.headers);
3912
4016
  let localVarUseFormData = false;
3913
4017
  let localVarRequestOptions = {
@@ -3955,9 +4059,10 @@ class AccountingApi {
3955
4059
  * @summary Creates one or more repeating invoice templates
3956
4060
  * @param xeroTenantId Xero identifier for Tenant
3957
4061
  * @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
4062
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3958
4063
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
3959
4064
  */
3960
- createRepeatingInvoices(xeroTenantId, repeatingInvoices, summarizeErrors, options = { headers: {} }) {
4065
+ createRepeatingInvoices(xeroTenantId, repeatingInvoices, idempotencyKey, summarizeErrors, options = { headers: {} }) {
3961
4066
  return __awaiter(this, void 0, void 0, function* () {
3962
4067
  const localVarPath = this.basePath + '/RepeatingInvoices';
3963
4068
  let localVarQueryParameters = {};
@@ -3975,6 +4080,7 @@ class AccountingApi {
3975
4080
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
3976
4081
  }
3977
4082
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4083
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3978
4084
  Object.assign(localVarHeaderParams, options.headers);
3979
4085
  let localVarUseFormData = false;
3980
4086
  let localVarRequestOptions = {
@@ -4022,8 +4128,9 @@ class AccountingApi {
4022
4128
  * @summary Creates one or more tax rates
4023
4129
  * @param xeroTenantId Xero identifier for Tenant
4024
4130
  * @param taxRates TaxRates array with TaxRate object in body of request
4131
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4025
4132
  */
4026
- createTaxRates(xeroTenantId, taxRates, options = { headers: {} }) {
4133
+ createTaxRates(xeroTenantId, taxRates, idempotencyKey, options = { headers: {} }) {
4027
4134
  return __awaiter(this, void 0, void 0, function* () {
4028
4135
  const localVarPath = this.basePath + '/TaxRates';
4029
4136
  let localVarQueryParameters = {};
@@ -4038,6 +4145,7 @@ class AccountingApi {
4038
4145
  throw new Error('Required parameter taxRates was null or undefined when calling createTaxRates.');
4039
4146
  }
4040
4147
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4148
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4041
4149
  Object.assign(localVarHeaderParams, options.headers);
4042
4150
  let localVarUseFormData = false;
4043
4151
  let localVarRequestOptions = {
@@ -4085,8 +4193,9 @@ class AccountingApi {
4085
4193
  * @summary Create tracking categories
4086
4194
  * @param xeroTenantId Xero identifier for Tenant
4087
4195
  * @param trackingCategory TrackingCategory object in body of request
4196
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4088
4197
  */
4089
- createTrackingCategory(xeroTenantId, trackingCategory, options = { headers: {} }) {
4198
+ createTrackingCategory(xeroTenantId, trackingCategory, idempotencyKey, options = { headers: {} }) {
4090
4199
  return __awaiter(this, void 0, void 0, function* () {
4091
4200
  const localVarPath = this.basePath + '/TrackingCategories';
4092
4201
  let localVarQueryParameters = {};
@@ -4101,6 +4210,7 @@ class AccountingApi {
4101
4210
  throw new Error('Required parameter trackingCategory was null or undefined when calling createTrackingCategory.');
4102
4211
  }
4103
4212
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4213
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4104
4214
  Object.assign(localVarHeaderParams, options.headers);
4105
4215
  let localVarUseFormData = false;
4106
4216
  let localVarRequestOptions = {
@@ -4149,8 +4259,9 @@ class AccountingApi {
4149
4259
  * @param xeroTenantId Xero identifier for Tenant
4150
4260
  * @param trackingCategoryID Unique identifier for a TrackingCategory
4151
4261
  * @param trackingOption TrackingOption object in body of request
4262
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4152
4263
  */
4153
- createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption, options = { headers: {} }) {
4264
+ createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption, idempotencyKey, options = { headers: {} }) {
4154
4265
  return __awaiter(this, void 0, void 0, function* () {
4155
4266
  const localVarPath = this.basePath + '/TrackingCategories/{TrackingCategoryID}/Options'
4156
4267
  .replace('{' + 'TrackingCategoryID' + '}', encodeURIComponent(String(trackingCategoryID)));
@@ -4170,6 +4281,7 @@ class AccountingApi {
4170
4281
  throw new Error('Required parameter trackingOption was null or undefined when calling createTrackingOptions.');
4171
4282
  }
4172
4283
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4284
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4173
4285
  Object.assign(localVarHeaderParams, options.headers);
4174
4286
  let localVarUseFormData = false;
4175
4287
  let localVarRequestOptions = {
@@ -4280,8 +4392,9 @@ class AccountingApi {
4280
4392
  * @summary Updates a specific batch payment for invoices and credit notes
4281
4393
  * @param xeroTenantId Xero identifier for Tenant
4282
4394
  * @param batchPaymentDelete
4395
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4283
4396
  */
4284
- deleteBatchPayment(xeroTenantId, batchPaymentDelete, options = { headers: {} }) {
4397
+ deleteBatchPayment(xeroTenantId, batchPaymentDelete, idempotencyKey, options = { headers: {} }) {
4285
4398
  return __awaiter(this, void 0, void 0, function* () {
4286
4399
  const localVarPath = this.basePath + '/BatchPayments';
4287
4400
  let localVarQueryParameters = {};
@@ -4296,6 +4409,7 @@ class AccountingApi {
4296
4409
  throw new Error('Required parameter batchPaymentDelete was null or undefined when calling deleteBatchPayment.');
4297
4410
  }
4298
4411
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4412
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4299
4413
  Object.assign(localVarHeaderParams, options.headers);
4300
4414
  let localVarUseFormData = false;
4301
4415
  let localVarRequestOptions = {
@@ -4344,8 +4458,9 @@ class AccountingApi {
4344
4458
  * @param xeroTenantId Xero identifier for Tenant
4345
4459
  * @param batchPaymentID Unique identifier for BatchPayment
4346
4460
  * @param batchPaymentDeleteByUrlParam
4461
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4347
4462
  */
4348
- deleteBatchPaymentByUrlParam(xeroTenantId, batchPaymentID, batchPaymentDeleteByUrlParam, options = { headers: {} }) {
4463
+ deleteBatchPaymentByUrlParam(xeroTenantId, batchPaymentID, batchPaymentDeleteByUrlParam, idempotencyKey, options = { headers: {} }) {
4349
4464
  return __awaiter(this, void 0, void 0, function* () {
4350
4465
  const localVarPath = this.basePath + '/BatchPayments/{BatchPaymentID}'
4351
4466
  .replace('{' + 'BatchPaymentID' + '}', encodeURIComponent(String(batchPaymentID)));
@@ -4365,6 +4480,7 @@ class AccountingApi {
4365
4480
  throw new Error('Required parameter batchPaymentDeleteByUrlParam was null or undefined when calling deleteBatchPaymentByUrlParam.');
4366
4481
  }
4367
4482
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4483
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4368
4484
  Object.assign(localVarHeaderParams, options.headers);
4369
4485
  let localVarUseFormData = false;
4370
4486
  let localVarRequestOptions = {
@@ -4537,6 +4653,75 @@ class AccountingApi {
4537
4653
  });
4538
4654
  });
4539
4655
  }
4656
+ /**
4657
+ *
4658
+ * @summary Deletes an Allocation from a Credit Note
4659
+ * @param xeroTenantId Xero identifier for Tenant
4660
+ * @param creditNoteID Unique identifier for a Credit Note
4661
+ * @param allocationID Unique identifier for Allocation object
4662
+ */
4663
+ deleteCreditNoteAllocations(xeroTenantId, creditNoteID, allocationID, options = { headers: {} }) {
4664
+ return __awaiter(this, void 0, void 0, function* () {
4665
+ const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}/Allocations/{AllocationID}'
4666
+ .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID)))
4667
+ .replace('{' + 'AllocationID' + '}', encodeURIComponent(String(allocationID)));
4668
+ let localVarQueryParameters = {};
4669
+ let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
4670
+ let localVarFormParams = {};
4671
+ // verify required parameter 'xeroTenantId' is not null or undefined
4672
+ if (xeroTenantId === null || xeroTenantId === undefined) {
4673
+ throw new Error('Required parameter xeroTenantId was null or undefined when calling deleteCreditNoteAllocations.');
4674
+ }
4675
+ // verify required parameter 'creditNoteID' is not null or undefined
4676
+ if (creditNoteID === null || creditNoteID === undefined) {
4677
+ throw new Error('Required parameter creditNoteID was null or undefined when calling deleteCreditNoteAllocations.');
4678
+ }
4679
+ // verify required parameter 'allocationID' is not null or undefined
4680
+ if (allocationID === null || allocationID === undefined) {
4681
+ throw new Error('Required parameter allocationID was null or undefined when calling deleteCreditNoteAllocations.');
4682
+ }
4683
+ localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4684
+ Object.assign(localVarHeaderParams, options.headers);
4685
+ let localVarUseFormData = false;
4686
+ let localVarRequestOptions = {
4687
+ method: 'DELETE',
4688
+ qs: localVarQueryParameters,
4689
+ headers: localVarHeaderParams,
4690
+ uri: localVarPath,
4691
+ useQuerystring: this._useQuerystring,
4692
+ json: true,
4693
+ };
4694
+ let authenticationPromise = Promise.resolve();
4695
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
4696
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
4697
+ return authenticationPromise.then(() => {
4698
+ if (Object.keys(localVarFormParams).length) {
4699
+ if (localVarUseFormData) {
4700
+ localVarRequestOptions.formData = localVarFormParams;
4701
+ }
4702
+ else {
4703
+ localVarRequestOptions.form = localVarFormParams;
4704
+ }
4705
+ }
4706
+ return new Promise((resolve, reject) => {
4707
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
4708
+ if (error) {
4709
+ reject(error);
4710
+ }
4711
+ else {
4712
+ body = models_1.ObjectSerializer.deserialize(body, "Allocation");
4713
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
4714
+ resolve({ response: response, body: body });
4715
+ }
4716
+ else {
4717
+ reject({ response: response, body: body });
4718
+ }
4719
+ }
4720
+ });
4721
+ });
4722
+ });
4723
+ });
4724
+ }
4540
4725
  /**
4541
4726
  *
4542
4727
  * @summary Deletes a specific item
@@ -4661,14 +4846,84 @@ class AccountingApi {
4661
4846
  });
4662
4847
  });
4663
4848
  }
4849
+ /**
4850
+ *
4851
+ * @summary Deletes an Allocation from an overpayment
4852
+ * @param xeroTenantId Xero identifier for Tenant
4853
+ * @param overpaymentID Unique identifier for a Overpayment
4854
+ * @param allocationID Unique identifier for Allocation object
4855
+ */
4856
+ deleteOverpaymentAllocations(xeroTenantId, overpaymentID, allocationID, options = { headers: {} }) {
4857
+ return __awaiter(this, void 0, void 0, function* () {
4858
+ const localVarPath = this.basePath + '/Overpayments/{OverpaymentID}/Allocations/{AllocationID}'
4859
+ .replace('{' + 'OverpaymentID' + '}', encodeURIComponent(String(overpaymentID)))
4860
+ .replace('{' + 'AllocationID' + '}', encodeURIComponent(String(allocationID)));
4861
+ let localVarQueryParameters = {};
4862
+ let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
4863
+ let localVarFormParams = {};
4864
+ // verify required parameter 'xeroTenantId' is not null or undefined
4865
+ if (xeroTenantId === null || xeroTenantId === undefined) {
4866
+ throw new Error('Required parameter xeroTenantId was null or undefined when calling deleteOverpaymentAllocations.');
4867
+ }
4868
+ // verify required parameter 'overpaymentID' is not null or undefined
4869
+ if (overpaymentID === null || overpaymentID === undefined) {
4870
+ throw new Error('Required parameter overpaymentID was null or undefined when calling deleteOverpaymentAllocations.');
4871
+ }
4872
+ // verify required parameter 'allocationID' is not null or undefined
4873
+ if (allocationID === null || allocationID === undefined) {
4874
+ throw new Error('Required parameter allocationID was null or undefined when calling deleteOverpaymentAllocations.');
4875
+ }
4876
+ localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4877
+ Object.assign(localVarHeaderParams, options.headers);
4878
+ let localVarUseFormData = false;
4879
+ let localVarRequestOptions = {
4880
+ method: 'DELETE',
4881
+ qs: localVarQueryParameters,
4882
+ headers: localVarHeaderParams,
4883
+ uri: localVarPath,
4884
+ useQuerystring: this._useQuerystring,
4885
+ json: true,
4886
+ };
4887
+ let authenticationPromise = Promise.resolve();
4888
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
4889
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
4890
+ return authenticationPromise.then(() => {
4891
+ if (Object.keys(localVarFormParams).length) {
4892
+ if (localVarUseFormData) {
4893
+ localVarRequestOptions.formData = localVarFormParams;
4894
+ }
4895
+ else {
4896
+ localVarRequestOptions.form = localVarFormParams;
4897
+ }
4898
+ }
4899
+ return new Promise((resolve, reject) => {
4900
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
4901
+ if (error) {
4902
+ reject(error);
4903
+ }
4904
+ else {
4905
+ body = models_1.ObjectSerializer.deserialize(body, "Allocation");
4906
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
4907
+ resolve({ response: response, body: body });
4908
+ }
4909
+ else {
4910
+ reject({ response: response, body: body });
4911
+ }
4912
+ }
4913
+ });
4914
+ });
4915
+ });
4916
+ });
4917
+ }
4664
4918
  /**
4665
4919
  *
4666
4920
  * @summary Updates a specific payment for invoices and credit notes
4667
4921
  * @param xeroTenantId Xero identifier for Tenant
4668
4922
  * @param paymentID Unique identifier for a Payment
4669
4923
  * @param paymentDelete
4924
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4670
4925
  */
4671
- deletePayment(xeroTenantId, paymentID, paymentDelete, options = { headers: {} }) {
4926
+ deletePayment(xeroTenantId, paymentID, paymentDelete, idempotencyKey, options = { headers: {} }) {
4672
4927
  return __awaiter(this, void 0, void 0, function* () {
4673
4928
  const localVarPath = this.basePath + '/Payments/{PaymentID}'
4674
4929
  .replace('{' + 'PaymentID' + '}', encodeURIComponent(String(paymentID)));
@@ -4688,6 +4943,7 @@ class AccountingApi {
4688
4943
  throw new Error('Required parameter paymentDelete was null or undefined when calling deletePayment.');
4689
4944
  }
4690
4945
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4946
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4691
4947
  Object.assign(localVarHeaderParams, options.headers);
4692
4948
  let localVarUseFormData = false;
4693
4949
  let localVarRequestOptions = {
@@ -4730,6 +4986,75 @@ class AccountingApi {
4730
4986
  });
4731
4987
  });
4732
4988
  }
4989
+ /**
4990
+ *
4991
+ * @summary Deletes an Allocation from a Prepayment
4992
+ * @param xeroTenantId Xero identifier for Tenant
4993
+ * @param prepaymentID Unique identifier for a PrePayment
4994
+ * @param allocationID Unique identifier for Allocation object
4995
+ */
4996
+ deletePrepaymentAllocations(xeroTenantId, prepaymentID, allocationID, options = { headers: {} }) {
4997
+ return __awaiter(this, void 0, void 0, function* () {
4998
+ const localVarPath = this.basePath + '/Prepayments/{PrepaymentID}/Allocations/{AllocationID}'
4999
+ .replace('{' + 'PrepaymentID' + '}', encodeURIComponent(String(prepaymentID)))
5000
+ .replace('{' + 'AllocationID' + '}', encodeURIComponent(String(allocationID)));
5001
+ let localVarQueryParameters = {};
5002
+ let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
5003
+ let localVarFormParams = {};
5004
+ // verify required parameter 'xeroTenantId' is not null or undefined
5005
+ if (xeroTenantId === null || xeroTenantId === undefined) {
5006
+ throw new Error('Required parameter xeroTenantId was null or undefined when calling deletePrepaymentAllocations.');
5007
+ }
5008
+ // verify required parameter 'prepaymentID' is not null or undefined
5009
+ if (prepaymentID === null || prepaymentID === undefined) {
5010
+ throw new Error('Required parameter prepaymentID was null or undefined when calling deletePrepaymentAllocations.');
5011
+ }
5012
+ // verify required parameter 'allocationID' is not null or undefined
5013
+ if (allocationID === null || allocationID === undefined) {
5014
+ throw new Error('Required parameter allocationID was null or undefined when calling deletePrepaymentAllocations.');
5015
+ }
5016
+ localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
5017
+ Object.assign(localVarHeaderParams, options.headers);
5018
+ let localVarUseFormData = false;
5019
+ let localVarRequestOptions = {
5020
+ method: 'DELETE',
5021
+ qs: localVarQueryParameters,
5022
+ headers: localVarHeaderParams,
5023
+ uri: localVarPath,
5024
+ useQuerystring: this._useQuerystring,
5025
+ json: true,
5026
+ };
5027
+ let authenticationPromise = Promise.resolve();
5028
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
5029
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
5030
+ return authenticationPromise.then(() => {
5031
+ if (Object.keys(localVarFormParams).length) {
5032
+ if (localVarUseFormData) {
5033
+ localVarRequestOptions.formData = localVarFormParams;
5034
+ }
5035
+ else {
5036
+ localVarRequestOptions.form = localVarFormParams;
5037
+ }
5038
+ }
5039
+ return new Promise((resolve, reject) => {
5040
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
5041
+ if (error) {
5042
+ reject(error);
5043
+ }
5044
+ else {
5045
+ body = models_1.ObjectSerializer.deserialize(body, "Allocation");
5046
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
5047
+ resolve({ response: response, body: body });
5048
+ }
5049
+ else {
5050
+ reject({ response: response, body: body });
5051
+ }
5052
+ }
5053
+ });
5054
+ });
5055
+ });
5056
+ });
5057
+ }
4733
5058
  /**
4734
5059
  *
4735
5060
  * @summary Deletes a specific tracking category
@@ -4868,8 +5193,9 @@ class AccountingApi {
4868
5193
  * @param xeroTenantId Xero identifier for Tenant
4869
5194
  * @param invoiceID Unique identifier for an Invoice
4870
5195
  * @param requestEmpty
5196
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4871
5197
  */
4872
- emailInvoice(xeroTenantId, invoiceID, requestEmpty, options = { headers: {} }) {
5198
+ emailInvoice(xeroTenantId, invoiceID, requestEmpty, idempotencyKey, options = { headers: {} }) {
4873
5199
  return __awaiter(this, void 0, void 0, function* () {
4874
5200
  const localVarPath = this.basePath + '/Invoices/{InvoiceID}/Email'
4875
5201
  .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID)));
@@ -4889,6 +5215,7 @@ class AccountingApi {
4889
5215
  throw new Error('Required parameter requestEmpty was null or undefined when calling emailInvoice.');
4890
5216
  }
4891
5217
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
5218
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4892
5219
  Object.assign(localVarHeaderParams, options.headers);
4893
5220
  let localVarUseFormData = false;
4894
5221
  let localVarRequestOptions = {
@@ -13599,8 +13926,9 @@ class AccountingApi {
13599
13926
  * @summary Sets the chart of accounts, the conversion date and conversion balances
13600
13927
  * @param xeroTenantId Xero identifier for Tenant
13601
13928
  * @param setup Object including an accounts array, a conversion balances array and a conversion date object in body of request
13929
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
13602
13930
  */
13603
- postSetup(xeroTenantId, setup, options = { headers: {} }) {
13931
+ postSetup(xeroTenantId, setup, idempotencyKey, options = { headers: {} }) {
13604
13932
  return __awaiter(this, void 0, void 0, function* () {
13605
13933
  const localVarPath = this.basePath + '/Setup';
13606
13934
  let localVarQueryParameters = {};
@@ -13615,6 +13943,7 @@ class AccountingApi {
13615
13943
  throw new Error('Required parameter setup was null or undefined when calling postSetup.');
13616
13944
  }
13617
13945
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
13946
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
13618
13947
  Object.assign(localVarHeaderParams, options.headers);
13619
13948
  let localVarUseFormData = false;
13620
13949
  let localVarRequestOptions = {
@@ -13663,8 +13992,9 @@ class AccountingApi {
13663
13992
  * @param xeroTenantId Xero identifier for Tenant
13664
13993
  * @param accountID Unique identifier for Account object
13665
13994
  * @param accounts Request of type Accounts array with one Account
13995
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
13666
13996
  */
13667
- updateAccount(xeroTenantId, accountID, accounts, options = { headers: {} }) {
13997
+ updateAccount(xeroTenantId, accountID, accounts, idempotencyKey, options = { headers: {} }) {
13668
13998
  return __awaiter(this, void 0, void 0, function* () {
13669
13999
  const localVarPath = this.basePath + '/Accounts/{AccountID}'
13670
14000
  .replace('{' + 'AccountID' + '}', encodeURIComponent(String(accountID)));
@@ -13684,6 +14014,7 @@ class AccountingApi {
13684
14014
  throw new Error('Required parameter accounts was null or undefined when calling updateAccount.');
13685
14015
  }
13686
14016
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14017
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
13687
14018
  Object.assign(localVarHeaderParams, options.headers);
13688
14019
  let localVarUseFormData = false;
13689
14020
  let localVarRequestOptions = {
@@ -13733,8 +14064,9 @@ class AccountingApi {
13733
14064
  * @param accountID Unique identifier for Account object
13734
14065
  * @param fileName Name of the attachment
13735
14066
  * @param body Byte array of file in body of request
14067
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
13736
14068
  */
13737
- updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, options = { headers: {} }) {
14069
+ updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, idempotencyKey, options = { headers: {} }) {
13738
14070
  return __awaiter(this, void 0, void 0, function* () {
13739
14071
  const localVarPath = this.basePath + '/Accounts/{AccountID}/Attachments/{FileName}'
13740
14072
  .replace('{' + 'AccountID' + '}', encodeURIComponent(String(accountID)))
@@ -13761,6 +14093,7 @@ class AccountingApi {
13761
14093
  this.binaryHeaders = { 'Accept': 'application/json' };
13762
14094
  Object.assign(localVarHeaderParams, this.binaryHeaders);
13763
14095
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14096
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
13764
14097
  Object.assign(localVarHeaderParams, options.headers);
13765
14098
  let localVarUseFormData = false;
13766
14099
  let localVarRequestOptions = {
@@ -13831,9 +14164,10 @@ class AccountingApi {
13831
14164
  * @param xeroTenantId Xero identifier for Tenant
13832
14165
  * @param bankTransactionID Xero generated unique identifier for a bank transaction
13833
14166
  * @param bankTransactions
14167
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
13834
14168
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
13835
14169
  */
13836
- updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp, options = { headers: {} }) {
14170
+ updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, idempotencyKey, unitdp, options = { headers: {} }) {
13837
14171
  return __awaiter(this, void 0, void 0, function* () {
13838
14172
  const localVarPath = this.basePath + '/BankTransactions/{BankTransactionID}'
13839
14173
  .replace('{' + 'BankTransactionID' + '}', encodeURIComponent(String(bankTransactionID)));
@@ -13856,6 +14190,7 @@ class AccountingApi {
13856
14190
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
13857
14191
  }
13858
14192
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14193
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
13859
14194
  Object.assign(localVarHeaderParams, options.headers);
13860
14195
  let localVarUseFormData = false;
13861
14196
  let localVarRequestOptions = {
@@ -13905,8 +14240,9 @@ class AccountingApi {
13905
14240
  * @param bankTransactionID Xero generated unique identifier for a bank transaction
13906
14241
  * @param fileName Name of the attachment
13907
14242
  * @param body Byte array of file in body of request
14243
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
13908
14244
  */
13909
- updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, options = { headers: {} }) {
14245
+ updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, idempotencyKey, options = { headers: {} }) {
13910
14246
  return __awaiter(this, void 0, void 0, function* () {
13911
14247
  const localVarPath = this.basePath + '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'
13912
14248
  .replace('{' + 'BankTransactionID' + '}', encodeURIComponent(String(bankTransactionID)))
@@ -13933,6 +14269,7 @@ class AccountingApi {
13933
14269
  this.binaryHeaders = { 'Accept': 'application/json' };
13934
14270
  Object.assign(localVarHeaderParams, this.binaryHeaders);
13935
14271
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14272
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
13936
14273
  Object.assign(localVarHeaderParams, options.headers);
13937
14274
  let localVarUseFormData = false;
13938
14275
  let localVarRequestOptions = {
@@ -14003,8 +14340,9 @@ class AccountingApi {
14003
14340
  * @param bankTransferID Xero generated unique identifier for a bank transfer
14004
14341
  * @param fileName Name of the attachment
14005
14342
  * @param body Byte array of file in body of request
14343
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14006
14344
  */
14007
- updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, options = { headers: {} }) {
14345
+ updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, idempotencyKey, options = { headers: {} }) {
14008
14346
  return __awaiter(this, void 0, void 0, function* () {
14009
14347
  const localVarPath = this.basePath + '/BankTransfers/{BankTransferID}/Attachments/{FileName}'
14010
14348
  .replace('{' + 'BankTransferID' + '}', encodeURIComponent(String(bankTransferID)))
@@ -14031,6 +14369,7 @@ class AccountingApi {
14031
14369
  this.binaryHeaders = { 'Accept': 'application/json' };
14032
14370
  Object.assign(localVarHeaderParams, this.binaryHeaders);
14033
14371
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14372
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14034
14373
  Object.assign(localVarHeaderParams, options.headers);
14035
14374
  let localVarUseFormData = false;
14036
14375
  let localVarRequestOptions = {
@@ -14101,8 +14440,9 @@ class AccountingApi {
14101
14440
  * @param xeroTenantId Xero identifier for Tenant
14102
14441
  * @param contactID Unique identifier for a Contact
14103
14442
  * @param contacts an array of Contacts containing single Contact object with properties to update
14443
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14104
14444
  */
14105
- updateContact(xeroTenantId, contactID, contacts, options = { headers: {} }) {
14445
+ updateContact(xeroTenantId, contactID, contacts, idempotencyKey, options = { headers: {} }) {
14106
14446
  return __awaiter(this, void 0, void 0, function* () {
14107
14447
  const localVarPath = this.basePath + '/Contacts/{ContactID}'
14108
14448
  .replace('{' + 'ContactID' + '}', encodeURIComponent(String(contactID)));
@@ -14122,6 +14462,7 @@ class AccountingApi {
14122
14462
  throw new Error('Required parameter contacts was null or undefined when calling updateContact.');
14123
14463
  }
14124
14464
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14465
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14125
14466
  Object.assign(localVarHeaderParams, options.headers);
14126
14467
  let localVarUseFormData = false;
14127
14468
  let localVarRequestOptions = {
@@ -14170,8 +14511,9 @@ class AccountingApi {
14170
14511
  * @param contactID Unique identifier for a Contact
14171
14512
  * @param fileName Name of the attachment
14172
14513
  * @param body Byte array of file in body of request
14514
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14173
14515
  */
14174
- updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, options = { headers: {} }) {
14516
+ updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, idempotencyKey, options = { headers: {} }) {
14175
14517
  return __awaiter(this, void 0, void 0, function* () {
14176
14518
  const localVarPath = this.basePath + '/Contacts/{ContactID}/Attachments/{FileName}'
14177
14519
  .replace('{' + 'ContactID' + '}', encodeURIComponent(String(contactID)))
@@ -14198,6 +14540,7 @@ class AccountingApi {
14198
14540
  this.binaryHeaders = { 'Accept': 'application/json' };
14199
14541
  Object.assign(localVarHeaderParams, this.binaryHeaders);
14200
14542
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14543
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14201
14544
  Object.assign(localVarHeaderParams, options.headers);
14202
14545
  let localVarUseFormData = false;
14203
14546
  let localVarRequestOptions = {
@@ -14268,8 +14611,9 @@ class AccountingApi {
14268
14611
  * @param xeroTenantId Xero identifier for Tenant
14269
14612
  * @param contactGroupID Unique identifier for a Contact Group
14270
14613
  * @param contactGroups an array of Contact groups with Name of specific group to update
14614
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14271
14615
  */
14272
- updateContactGroup(xeroTenantId, contactGroupID, contactGroups, options = { headers: {} }) {
14616
+ updateContactGroup(xeroTenantId, contactGroupID, contactGroups, idempotencyKey, options = { headers: {} }) {
14273
14617
  return __awaiter(this, void 0, void 0, function* () {
14274
14618
  const localVarPath = this.basePath + '/ContactGroups/{ContactGroupID}'
14275
14619
  .replace('{' + 'ContactGroupID' + '}', encodeURIComponent(String(contactGroupID)));
@@ -14289,6 +14633,7 @@ class AccountingApi {
14289
14633
  throw new Error('Required parameter contactGroups was null or undefined when calling updateContactGroup.');
14290
14634
  }
14291
14635
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14636
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14292
14637
  Object.assign(localVarHeaderParams, options.headers);
14293
14638
  let localVarUseFormData = false;
14294
14639
  let localVarRequestOptions = {
@@ -14337,9 +14682,10 @@ class AccountingApi {
14337
14682
  * @param xeroTenantId Xero identifier for Tenant
14338
14683
  * @param creditNoteID Unique identifier for a Credit Note
14339
14684
  * @param creditNotes an array of Credit Notes containing credit note details to update
14685
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14340
14686
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
14341
14687
  */
14342
- updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp, options = { headers: {} }) {
14688
+ updateCreditNote(xeroTenantId, creditNoteID, creditNotes, idempotencyKey, unitdp, options = { headers: {} }) {
14343
14689
  return __awaiter(this, void 0, void 0, function* () {
14344
14690
  const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}'
14345
14691
  .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID)));
@@ -14362,6 +14708,7 @@ class AccountingApi {
14362
14708
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
14363
14709
  }
14364
14710
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14711
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14365
14712
  Object.assign(localVarHeaderParams, options.headers);
14366
14713
  let localVarUseFormData = false;
14367
14714
  let localVarRequestOptions = {
@@ -14411,8 +14758,9 @@ class AccountingApi {
14411
14758
  * @param creditNoteID Unique identifier for a Credit Note
14412
14759
  * @param fileName Name of the attachment
14413
14760
  * @param body Byte array of file in body of request
14761
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14414
14762
  */
14415
- updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, options = { headers: {} }) {
14763
+ updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, idempotencyKey, options = { headers: {} }) {
14416
14764
  return __awaiter(this, void 0, void 0, function* () {
14417
14765
  const localVarPath = this.basePath + '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'
14418
14766
  .replace('{' + 'CreditNoteID' + '}', encodeURIComponent(String(creditNoteID)))
@@ -14439,6 +14787,7 @@ class AccountingApi {
14439
14787
  this.binaryHeaders = { 'Accept': 'application/json' };
14440
14788
  Object.assign(localVarHeaderParams, this.binaryHeaders);
14441
14789
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14790
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14442
14791
  Object.assign(localVarHeaderParams, options.headers);
14443
14792
  let localVarUseFormData = false;
14444
14793
  let localVarRequestOptions = {
@@ -14509,8 +14858,9 @@ class AccountingApi {
14509
14858
  * @param xeroTenantId Xero identifier for Tenant
14510
14859
  * @param expenseClaimID Unique identifier for a ExpenseClaim
14511
14860
  * @param expenseClaims
14861
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14512
14862
  */
14513
- updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims, options = { headers: {} }) {
14863
+ updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims, idempotencyKey, options = { headers: {} }) {
14514
14864
  return __awaiter(this, void 0, void 0, function* () {
14515
14865
  const localVarPath = this.basePath + '/ExpenseClaims/{ExpenseClaimID}'
14516
14866
  .replace('{' + 'ExpenseClaimID' + '}', encodeURIComponent(String(expenseClaimID)));
@@ -14530,6 +14880,7 @@ class AccountingApi {
14530
14880
  throw new Error('Required parameter expenseClaims was null or undefined when calling updateExpenseClaim.');
14531
14881
  }
14532
14882
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14883
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14533
14884
  Object.assign(localVarHeaderParams, options.headers);
14534
14885
  let localVarUseFormData = false;
14535
14886
  let localVarRequestOptions = {
@@ -14578,9 +14929,10 @@ class AccountingApi {
14578
14929
  * @param xeroTenantId Xero identifier for Tenant
14579
14930
  * @param invoiceID Unique identifier for an Invoice
14580
14931
  * @param invoices
14932
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14581
14933
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
14582
14934
  */
14583
- updateInvoice(xeroTenantId, invoiceID, invoices, unitdp, options = { headers: {} }) {
14935
+ updateInvoice(xeroTenantId, invoiceID, invoices, idempotencyKey, unitdp, options = { headers: {} }) {
14584
14936
  return __awaiter(this, void 0, void 0, function* () {
14585
14937
  const localVarPath = this.basePath + '/Invoices/{InvoiceID}'
14586
14938
  .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID)));
@@ -14603,6 +14955,7 @@ class AccountingApi {
14603
14955
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
14604
14956
  }
14605
14957
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
14958
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14606
14959
  Object.assign(localVarHeaderParams, options.headers);
14607
14960
  let localVarUseFormData = false;
14608
14961
  let localVarRequestOptions = {
@@ -14652,8 +15005,9 @@ class AccountingApi {
14652
15005
  * @param invoiceID Unique identifier for an Invoice
14653
15006
  * @param fileName Name of the attachment
14654
15007
  * @param body Byte array of file in body of request
15008
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14655
15009
  */
14656
- updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, options = { headers: {} }) {
15010
+ updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, idempotencyKey, options = { headers: {} }) {
14657
15011
  return __awaiter(this, void 0, void 0, function* () {
14658
15012
  const localVarPath = this.basePath + '/Invoices/{InvoiceID}/Attachments/{FileName}'
14659
15013
  .replace('{' + 'InvoiceID' + '}', encodeURIComponent(String(invoiceID)))
@@ -14680,6 +15034,7 @@ class AccountingApi {
14680
15034
  this.binaryHeaders = { 'Accept': 'application/json' };
14681
15035
  Object.assign(localVarHeaderParams, this.binaryHeaders);
14682
15036
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15037
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14683
15038
  Object.assign(localVarHeaderParams, options.headers);
14684
15039
  let localVarUseFormData = false;
14685
15040
  let localVarRequestOptions = {
@@ -14750,9 +15105,10 @@ class AccountingApi {
14750
15105
  * @param xeroTenantId Xero identifier for Tenant
14751
15106
  * @param itemID Unique identifier for an Item
14752
15107
  * @param items
15108
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14753
15109
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
14754
15110
  */
14755
- updateItem(xeroTenantId, itemID, items, unitdp, options = { headers: {} }) {
15111
+ updateItem(xeroTenantId, itemID, items, idempotencyKey, unitdp, options = { headers: {} }) {
14756
15112
  return __awaiter(this, void 0, void 0, function* () {
14757
15113
  const localVarPath = this.basePath + '/Items/{ItemID}'
14758
15114
  .replace('{' + 'ItemID' + '}', encodeURIComponent(String(itemID)));
@@ -14775,6 +15131,7 @@ class AccountingApi {
14775
15131
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
14776
15132
  }
14777
15133
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15134
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14778
15135
  Object.assign(localVarHeaderParams, options.headers);
14779
15136
  let localVarUseFormData = false;
14780
15137
  let localVarRequestOptions = {
@@ -14823,8 +15180,9 @@ class AccountingApi {
14823
15180
  * @param xeroTenantId Xero identifier for Tenant
14824
15181
  * @param linkedTransactionID Unique identifier for a LinkedTransaction
14825
15182
  * @param linkedTransactions
15183
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14826
15184
  */
14827
- updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions, options = { headers: {} }) {
15185
+ updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions, idempotencyKey, options = { headers: {} }) {
14828
15186
  return __awaiter(this, void 0, void 0, function* () {
14829
15187
  const localVarPath = this.basePath + '/LinkedTransactions/{LinkedTransactionID}'
14830
15188
  .replace('{' + 'LinkedTransactionID' + '}', encodeURIComponent(String(linkedTransactionID)));
@@ -14844,6 +15202,7 @@ class AccountingApi {
14844
15202
  throw new Error('Required parameter linkedTransactions was null or undefined when calling updateLinkedTransaction.');
14845
15203
  }
14846
15204
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15205
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14847
15206
  Object.assign(localVarHeaderParams, options.headers);
14848
15207
  let localVarUseFormData = false;
14849
15208
  let localVarRequestOptions = {
@@ -14892,8 +15251,9 @@ class AccountingApi {
14892
15251
  * @param xeroTenantId Xero identifier for Tenant
14893
15252
  * @param manualJournalID Unique identifier for a ManualJournal
14894
15253
  * @param manualJournals
15254
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14895
15255
  */
14896
- updateManualJournal(xeroTenantId, manualJournalID, manualJournals, options = { headers: {} }) {
15256
+ updateManualJournal(xeroTenantId, manualJournalID, manualJournals, idempotencyKey, options = { headers: {} }) {
14897
15257
  return __awaiter(this, void 0, void 0, function* () {
14898
15258
  const localVarPath = this.basePath + '/ManualJournals/{ManualJournalID}'
14899
15259
  .replace('{' + 'ManualJournalID' + '}', encodeURIComponent(String(manualJournalID)));
@@ -14913,6 +15273,7 @@ class AccountingApi {
14913
15273
  throw new Error('Required parameter manualJournals was null or undefined when calling updateManualJournal.');
14914
15274
  }
14915
15275
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15276
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14916
15277
  Object.assign(localVarHeaderParams, options.headers);
14917
15278
  let localVarUseFormData = false;
14918
15279
  let localVarRequestOptions = {
@@ -14962,8 +15323,9 @@ class AccountingApi {
14962
15323
  * @param manualJournalID Unique identifier for a ManualJournal
14963
15324
  * @param fileName Name of the attachment
14964
15325
  * @param body Byte array of file in body of request
15326
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
14965
15327
  */
14966
- updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, options = { headers: {} }) {
15328
+ updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, idempotencyKey, options = { headers: {} }) {
14967
15329
  return __awaiter(this, void 0, void 0, function* () {
14968
15330
  const localVarPath = this.basePath + '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'
14969
15331
  .replace('{' + 'ManualJournalID' + '}', encodeURIComponent(String(manualJournalID)))
@@ -14990,6 +15352,7 @@ class AccountingApi {
14990
15352
  this.binaryHeaders = { 'Accept': 'application/json' };
14991
15353
  Object.assign(localVarHeaderParams, this.binaryHeaders);
14992
15354
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15355
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
14993
15356
  Object.assign(localVarHeaderParams, options.headers);
14994
15357
  let localVarUseFormData = false;
14995
15358
  let localVarRequestOptions = {
@@ -15059,10 +15422,11 @@ class AccountingApi {
15059
15422
  * @summary Updates or creates one or more spent or received money transaction
15060
15423
  * @param xeroTenantId Xero identifier for Tenant
15061
15424
  * @param bankTransactions
15425
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15062
15426
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15063
15427
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
15064
15428
  */
15065
- updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp, options = { headers: {} }) {
15429
+ updateOrCreateBankTransactions(xeroTenantId, bankTransactions, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
15066
15430
  return __awaiter(this, void 0, void 0, function* () {
15067
15431
  const localVarPath = this.basePath + '/BankTransactions';
15068
15432
  let localVarQueryParameters = {};
@@ -15083,6 +15447,7 @@ class AccountingApi {
15083
15447
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
15084
15448
  }
15085
15449
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15450
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15086
15451
  Object.assign(localVarHeaderParams, options.headers);
15087
15452
  let localVarUseFormData = false;
15088
15453
  let localVarRequestOptions = {
@@ -15130,9 +15495,10 @@ class AccountingApi {
15130
15495
  * @summary Updates or creates one or more contacts in a Xero organisation
15131
15496
  * @param xeroTenantId Xero identifier for Tenant
15132
15497
  * @param contacts
15498
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15133
15499
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15134
15500
  */
15135
- updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors, options = { headers: {} }) {
15501
+ updateOrCreateContacts(xeroTenantId, contacts, idempotencyKey, summarizeErrors, options = { headers: {} }) {
15136
15502
  return __awaiter(this, void 0, void 0, function* () {
15137
15503
  const localVarPath = this.basePath + '/Contacts';
15138
15504
  let localVarQueryParameters = {};
@@ -15150,6 +15516,7 @@ class AccountingApi {
15150
15516
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
15151
15517
  }
15152
15518
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15519
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15153
15520
  Object.assign(localVarHeaderParams, options.headers);
15154
15521
  let localVarUseFormData = false;
15155
15522
  let localVarRequestOptions = {
@@ -15197,10 +15564,11 @@ class AccountingApi {
15197
15564
  * @summary Updates or creates one or more credit notes
15198
15565
  * @param xeroTenantId Xero identifier for Tenant
15199
15566
  * @param creditNotes an array of Credit Notes with a single CreditNote object.
15567
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15200
15568
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15201
15569
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
15202
15570
  */
15203
- updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp, options = { headers: {} }) {
15571
+ updateOrCreateCreditNotes(xeroTenantId, creditNotes, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
15204
15572
  return __awaiter(this, void 0, void 0, function* () {
15205
15573
  const localVarPath = this.basePath + '/CreditNotes';
15206
15574
  let localVarQueryParameters = {};
@@ -15221,6 +15589,7 @@ class AccountingApi {
15221
15589
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
15222
15590
  }
15223
15591
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15592
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15224
15593
  Object.assign(localVarHeaderParams, options.headers);
15225
15594
  let localVarUseFormData = false;
15226
15595
  let localVarRequestOptions = {
@@ -15268,9 +15637,10 @@ class AccountingApi {
15268
15637
  * @summary Creates a single new employees used in Xero payrun
15269
15638
  * @param xeroTenantId Xero identifier for Tenant
15270
15639
  * @param employees Employees with array of Employee object in body of request
15640
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15271
15641
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15272
15642
  */
15273
- updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors, options = { headers: {} }) {
15643
+ updateOrCreateEmployees(xeroTenantId, employees, idempotencyKey, summarizeErrors, options = { headers: {} }) {
15274
15644
  return __awaiter(this, void 0, void 0, function* () {
15275
15645
  const localVarPath = this.basePath + '/Employees';
15276
15646
  let localVarQueryParameters = {};
@@ -15288,6 +15658,7 @@ class AccountingApi {
15288
15658
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
15289
15659
  }
15290
15660
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15661
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15291
15662
  Object.assign(localVarHeaderParams, options.headers);
15292
15663
  let localVarUseFormData = false;
15293
15664
  let localVarRequestOptions = {
@@ -15335,10 +15706,11 @@ class AccountingApi {
15335
15706
  * @summary Updates or creates one or more sales invoices or purchase bills
15336
15707
  * @param xeroTenantId Xero identifier for Tenant
15337
15708
  * @param invoices
15709
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15338
15710
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15339
15711
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
15340
15712
  */
15341
- updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp, options = { headers: {} }) {
15713
+ updateOrCreateInvoices(xeroTenantId, invoices, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
15342
15714
  return __awaiter(this, void 0, void 0, function* () {
15343
15715
  const localVarPath = this.basePath + '/Invoices';
15344
15716
  let localVarQueryParameters = {};
@@ -15359,6 +15731,7 @@ class AccountingApi {
15359
15731
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
15360
15732
  }
15361
15733
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15734
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15362
15735
  Object.assign(localVarHeaderParams, options.headers);
15363
15736
  let localVarUseFormData = false;
15364
15737
  let localVarRequestOptions = {
@@ -15406,10 +15779,11 @@ class AccountingApi {
15406
15779
  * @summary Updates or creates one or more items
15407
15780
  * @param xeroTenantId Xero identifier for Tenant
15408
15781
  * @param items
15782
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15409
15783
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15410
15784
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
15411
15785
  */
15412
- updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp, options = { headers: {} }) {
15786
+ updateOrCreateItems(xeroTenantId, items, idempotencyKey, summarizeErrors, unitdp, options = { headers: {} }) {
15413
15787
  return __awaiter(this, void 0, void 0, function* () {
15414
15788
  const localVarPath = this.basePath + '/Items';
15415
15789
  let localVarQueryParameters = {};
@@ -15430,6 +15804,7 @@ class AccountingApi {
15430
15804
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
15431
15805
  }
15432
15806
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15807
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15433
15808
  Object.assign(localVarHeaderParams, options.headers);
15434
15809
  let localVarUseFormData = false;
15435
15810
  let localVarRequestOptions = {
@@ -15477,9 +15852,10 @@ class AccountingApi {
15477
15852
  * @summary Updates or creates a single manual journal
15478
15853
  * @param xeroTenantId Xero identifier for Tenant
15479
15854
  * @param manualJournals ManualJournals array with ManualJournal object in body of request
15855
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15480
15856
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15481
15857
  */
15482
- updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors, options = { headers: {} }) {
15858
+ updateOrCreateManualJournals(xeroTenantId, manualJournals, idempotencyKey, summarizeErrors, options = { headers: {} }) {
15483
15859
  return __awaiter(this, void 0, void 0, function* () {
15484
15860
  const localVarPath = this.basePath + '/ManualJournals';
15485
15861
  let localVarQueryParameters = {};
@@ -15497,6 +15873,7 @@ class AccountingApi {
15497
15873
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
15498
15874
  }
15499
15875
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15876
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15500
15877
  Object.assign(localVarHeaderParams, options.headers);
15501
15878
  let localVarUseFormData = false;
15502
15879
  let localVarRequestOptions = {
@@ -15544,9 +15921,10 @@ class AccountingApi {
15544
15921
  * @summary Updates or creates one or more purchase orders
15545
15922
  * @param xeroTenantId Xero identifier for Tenant
15546
15923
  * @param purchaseOrders
15924
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15547
15925
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15548
15926
  */
15549
- updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors, options = { headers: {} }) {
15927
+ updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, idempotencyKey, summarizeErrors, options = { headers: {} }) {
15550
15928
  return __awaiter(this, void 0, void 0, function* () {
15551
15929
  const localVarPath = this.basePath + '/PurchaseOrders';
15552
15930
  let localVarQueryParameters = {};
@@ -15564,6 +15942,7 @@ class AccountingApi {
15564
15942
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
15565
15943
  }
15566
15944
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
15945
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15567
15946
  Object.assign(localVarHeaderParams, options.headers);
15568
15947
  let localVarUseFormData = false;
15569
15948
  let localVarRequestOptions = {
@@ -15611,9 +15990,10 @@ class AccountingApi {
15611
15990
  * @summary Updates or creates one or more quotes
15612
15991
  * @param xeroTenantId Xero identifier for Tenant
15613
15992
  * @param quotes
15993
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15614
15994
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15615
15995
  */
15616
- updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors, options = { headers: {} }) {
15996
+ updateOrCreateQuotes(xeroTenantId, quotes, idempotencyKey, summarizeErrors, options = { headers: {} }) {
15617
15997
  return __awaiter(this, void 0, void 0, function* () {
15618
15998
  const localVarPath = this.basePath + '/Quotes';
15619
15999
  let localVarQueryParameters = {};
@@ -15631,6 +16011,7 @@ class AccountingApi {
15631
16011
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
15632
16012
  }
15633
16013
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16014
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15634
16015
  Object.assign(localVarHeaderParams, options.headers);
15635
16016
  let localVarUseFormData = false;
15636
16017
  let localVarRequestOptions = {
@@ -15678,9 +16059,10 @@ class AccountingApi {
15678
16059
  * @summary Creates or deletes one or more repeating invoice templates
15679
16060
  * @param xeroTenantId Xero identifier for Tenant
15680
16061
  * @param repeatingInvoices RepeatingInvoices with an array of repeating invoice objects in body of request
16062
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15681
16063
  * @param summarizeErrors If false return 200 OK and mix of successfully created objects and any with validation errors
15682
16064
  */
15683
- updateOrCreateRepeatingInvoices(xeroTenantId, repeatingInvoices, summarizeErrors, options = { headers: {} }) {
16065
+ updateOrCreateRepeatingInvoices(xeroTenantId, repeatingInvoices, idempotencyKey, summarizeErrors, options = { headers: {} }) {
15684
16066
  return __awaiter(this, void 0, void 0, function* () {
15685
16067
  const localVarPath = this.basePath + '/RepeatingInvoices';
15686
16068
  let localVarQueryParameters = {};
@@ -15698,6 +16080,7 @@ class AccountingApi {
15698
16080
  localVarQueryParameters['summarizeErrors'] = models_1.ObjectSerializer.serialize(summarizeErrors, "boolean");
15699
16081
  }
15700
16082
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16083
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15701
16084
  Object.assign(localVarHeaderParams, options.headers);
15702
16085
  let localVarUseFormData = false;
15703
16086
  let localVarRequestOptions = {
@@ -15746,8 +16129,9 @@ class AccountingApi {
15746
16129
  * @param xeroTenantId Xero identifier for Tenant
15747
16130
  * @param purchaseOrderID Unique identifier for an Purchase Order
15748
16131
  * @param purchaseOrders
16132
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15749
16133
  */
15750
- updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders, options = { headers: {} }) {
16134
+ updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders, idempotencyKey, options = { headers: {} }) {
15751
16135
  return __awaiter(this, void 0, void 0, function* () {
15752
16136
  const localVarPath = this.basePath + '/PurchaseOrders/{PurchaseOrderID}'
15753
16137
  .replace('{' + 'PurchaseOrderID' + '}', encodeURIComponent(String(purchaseOrderID)));
@@ -15767,6 +16151,7 @@ class AccountingApi {
15767
16151
  throw new Error('Required parameter purchaseOrders was null or undefined when calling updatePurchaseOrder.');
15768
16152
  }
15769
16153
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16154
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15770
16155
  Object.assign(localVarHeaderParams, options.headers);
15771
16156
  let localVarUseFormData = false;
15772
16157
  let localVarRequestOptions = {
@@ -15816,8 +16201,9 @@ class AccountingApi {
15816
16201
  * @param purchaseOrderID Unique identifier for an Purchase Order
15817
16202
  * @param fileName Name of the attachment
15818
16203
  * @param body Byte array of file in body of request
16204
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15819
16205
  */
15820
- updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, options = { headers: {} }) {
16206
+ updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey, options = { headers: {} }) {
15821
16207
  return __awaiter(this, void 0, void 0, function* () {
15822
16208
  const localVarPath = this.basePath + '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}'
15823
16209
  .replace('{' + 'PurchaseOrderID' + '}', encodeURIComponent(String(purchaseOrderID)))
@@ -15844,6 +16230,7 @@ class AccountingApi {
15844
16230
  this.binaryHeaders = { 'Accept': 'application/json' };
15845
16231
  Object.assign(localVarHeaderParams, this.binaryHeaders);
15846
16232
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16233
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15847
16234
  Object.assign(localVarHeaderParams, options.headers);
15848
16235
  let localVarUseFormData = false;
15849
16236
  let localVarRequestOptions = {
@@ -15914,8 +16301,9 @@ class AccountingApi {
15914
16301
  * @param xeroTenantId Xero identifier for Tenant
15915
16302
  * @param quoteID Unique identifier for an Quote
15916
16303
  * @param quotes
16304
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15917
16305
  */
15918
- updateQuote(xeroTenantId, quoteID, quotes, options = { headers: {} }) {
16306
+ updateQuote(xeroTenantId, quoteID, quotes, idempotencyKey, options = { headers: {} }) {
15919
16307
  return __awaiter(this, void 0, void 0, function* () {
15920
16308
  const localVarPath = this.basePath + '/Quotes/{QuoteID}'
15921
16309
  .replace('{' + 'QuoteID' + '}', encodeURIComponent(String(quoteID)));
@@ -15935,6 +16323,7 @@ class AccountingApi {
15935
16323
  throw new Error('Required parameter quotes was null or undefined when calling updateQuote.');
15936
16324
  }
15937
16325
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16326
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
15938
16327
  Object.assign(localVarHeaderParams, options.headers);
15939
16328
  let localVarUseFormData = false;
15940
16329
  let localVarRequestOptions = {
@@ -15984,8 +16373,9 @@ class AccountingApi {
15984
16373
  * @param quoteID Unique identifier for an Quote
15985
16374
  * @param fileName Name of the attachment
15986
16375
  * @param body Byte array of file in body of request
16376
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
15987
16377
  */
15988
- updateQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, options = { headers: {} }) {
16378
+ updateQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, idempotencyKey, options = { headers: {} }) {
15989
16379
  return __awaiter(this, void 0, void 0, function* () {
15990
16380
  const localVarPath = this.basePath + '/Quotes/{QuoteID}/Attachments/{FileName}'
15991
16381
  .replace('{' + 'QuoteID' + '}', encodeURIComponent(String(quoteID)))
@@ -16012,6 +16402,7 @@ class AccountingApi {
16012
16402
  this.binaryHeaders = { 'Accept': 'application/json' };
16013
16403
  Object.assign(localVarHeaderParams, this.binaryHeaders);
16014
16404
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16405
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16015
16406
  Object.assign(localVarHeaderParams, options.headers);
16016
16407
  let localVarUseFormData = false;
16017
16408
  let localVarRequestOptions = {
@@ -16082,9 +16473,10 @@ class AccountingApi {
16082
16473
  * @param xeroTenantId Xero identifier for Tenant
16083
16474
  * @param receiptID Unique identifier for a Receipt
16084
16475
  * @param receipts
16476
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16085
16477
  * @param unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
16086
16478
  */
16087
- updateReceipt(xeroTenantId, receiptID, receipts, unitdp, options = { headers: {} }) {
16479
+ updateReceipt(xeroTenantId, receiptID, receipts, idempotencyKey, unitdp, options = { headers: {} }) {
16088
16480
  return __awaiter(this, void 0, void 0, function* () {
16089
16481
  const localVarPath = this.basePath + '/Receipts/{ReceiptID}'
16090
16482
  .replace('{' + 'ReceiptID' + '}', encodeURIComponent(String(receiptID)));
@@ -16107,6 +16499,7 @@ class AccountingApi {
16107
16499
  localVarQueryParameters['unitdp'] = models_1.ObjectSerializer.serialize(unitdp, "number");
16108
16500
  }
16109
16501
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16502
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16110
16503
  Object.assign(localVarHeaderParams, options.headers);
16111
16504
  let localVarUseFormData = false;
16112
16505
  let localVarRequestOptions = {
@@ -16156,8 +16549,9 @@ class AccountingApi {
16156
16549
  * @param receiptID Unique identifier for a Receipt
16157
16550
  * @param fileName Name of the attachment
16158
16551
  * @param body Byte array of file in body of request
16552
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16159
16553
  */
16160
- updateReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, options = { headers: {} }) {
16554
+ updateReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, idempotencyKey, options = { headers: {} }) {
16161
16555
  return __awaiter(this, void 0, void 0, function* () {
16162
16556
  const localVarPath = this.basePath + '/Receipts/{ReceiptID}/Attachments/{FileName}'
16163
16557
  .replace('{' + 'ReceiptID' + '}', encodeURIComponent(String(receiptID)))
@@ -16184,6 +16578,7 @@ class AccountingApi {
16184
16578
  this.binaryHeaders = { 'Accept': 'application/json' };
16185
16579
  Object.assign(localVarHeaderParams, this.binaryHeaders);
16186
16580
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16581
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16187
16582
  Object.assign(localVarHeaderParams, options.headers);
16188
16583
  let localVarUseFormData = false;
16189
16584
  let localVarRequestOptions = {
@@ -16254,8 +16649,9 @@ class AccountingApi {
16254
16649
  * @param xeroTenantId Xero identifier for Tenant
16255
16650
  * @param repeatingInvoiceID Unique identifier for a Repeating Invoice
16256
16651
  * @param repeatingInvoices
16652
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16257
16653
  */
16258
- updateRepeatingInvoice(xeroTenantId, repeatingInvoiceID, repeatingInvoices, options = { headers: {} }) {
16654
+ updateRepeatingInvoice(xeroTenantId, repeatingInvoiceID, repeatingInvoices, idempotencyKey, options = { headers: {} }) {
16259
16655
  return __awaiter(this, void 0, void 0, function* () {
16260
16656
  const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}'
16261
16657
  .replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID)));
@@ -16275,6 +16671,7 @@ class AccountingApi {
16275
16671
  throw new Error('Required parameter repeatingInvoices was null or undefined when calling updateRepeatingInvoice.');
16276
16672
  }
16277
16673
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16674
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16278
16675
  Object.assign(localVarHeaderParams, options.headers);
16279
16676
  let localVarUseFormData = false;
16280
16677
  let localVarRequestOptions = {
@@ -16324,8 +16721,9 @@ class AccountingApi {
16324
16721
  * @param repeatingInvoiceID Unique identifier for a Repeating Invoice
16325
16722
  * @param fileName Name of the attachment
16326
16723
  * @param body Byte array of file in body of request
16724
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16327
16725
  */
16328
- updateRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, options = { headers: {} }) {
16726
+ updateRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey, options = { headers: {} }) {
16329
16727
  return __awaiter(this, void 0, void 0, function* () {
16330
16728
  const localVarPath = this.basePath + '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'
16331
16729
  .replace('{' + 'RepeatingInvoiceID' + '}', encodeURIComponent(String(repeatingInvoiceID)))
@@ -16352,6 +16750,7 @@ class AccountingApi {
16352
16750
  this.binaryHeaders = { 'Accept': 'application/json' };
16353
16751
  Object.assign(localVarHeaderParams, this.binaryHeaders);
16354
16752
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16753
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16355
16754
  Object.assign(localVarHeaderParams, options.headers);
16356
16755
  let localVarUseFormData = false;
16357
16756
  let localVarRequestOptions = {
@@ -16421,8 +16820,9 @@ class AccountingApi {
16421
16820
  * @summary Updates tax rates
16422
16821
  * @param xeroTenantId Xero identifier for Tenant
16423
16822
  * @param taxRates
16823
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16424
16824
  */
16425
- updateTaxRate(xeroTenantId, taxRates, options = { headers: {} }) {
16825
+ updateTaxRate(xeroTenantId, taxRates, idempotencyKey, options = { headers: {} }) {
16426
16826
  return __awaiter(this, void 0, void 0, function* () {
16427
16827
  const localVarPath = this.basePath + '/TaxRates';
16428
16828
  let localVarQueryParameters = {};
@@ -16437,6 +16837,7 @@ class AccountingApi {
16437
16837
  throw new Error('Required parameter taxRates was null or undefined when calling updateTaxRate.');
16438
16838
  }
16439
16839
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16840
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16440
16841
  Object.assign(localVarHeaderParams, options.headers);
16441
16842
  let localVarUseFormData = false;
16442
16843
  let localVarRequestOptions = {
@@ -16485,8 +16886,9 @@ class AccountingApi {
16485
16886
  * @param xeroTenantId Xero identifier for Tenant
16486
16887
  * @param trackingCategoryID Unique identifier for a TrackingCategory
16487
16888
  * @param trackingCategory
16889
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16488
16890
  */
16489
- updateTrackingCategory(xeroTenantId, trackingCategoryID, trackingCategory, options = { headers: {} }) {
16891
+ updateTrackingCategory(xeroTenantId, trackingCategoryID, trackingCategory, idempotencyKey, options = { headers: {} }) {
16490
16892
  return __awaiter(this, void 0, void 0, function* () {
16491
16893
  const localVarPath = this.basePath + '/TrackingCategories/{TrackingCategoryID}'
16492
16894
  .replace('{' + 'TrackingCategoryID' + '}', encodeURIComponent(String(trackingCategoryID)));
@@ -16506,6 +16908,7 @@ class AccountingApi {
16506
16908
  throw new Error('Required parameter trackingCategory was null or undefined when calling updateTrackingCategory.');
16507
16909
  }
16508
16910
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16911
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16509
16912
  Object.assign(localVarHeaderParams, options.headers);
16510
16913
  let localVarUseFormData = false;
16511
16914
  let localVarRequestOptions = {
@@ -16555,8 +16958,9 @@ class AccountingApi {
16555
16958
  * @param trackingCategoryID Unique identifier for a TrackingCategory
16556
16959
  * @param trackingOptionID Unique identifier for a Tracking Option
16557
16960
  * @param trackingOption
16961
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
16558
16962
  */
16559
- updateTrackingOptions(xeroTenantId, trackingCategoryID, trackingOptionID, trackingOption, options = { headers: {} }) {
16963
+ updateTrackingOptions(xeroTenantId, trackingCategoryID, trackingOptionID, trackingOption, idempotencyKey, options = { headers: {} }) {
16560
16964
  return __awaiter(this, void 0, void 0, function* () {
16561
16965
  const localVarPath = this.basePath + '/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}'
16562
16966
  .replace('{' + 'TrackingCategoryID' + '}', encodeURIComponent(String(trackingCategoryID)))
@@ -16581,6 +16985,7 @@ class AccountingApi {
16581
16985
  throw new Error('Required parameter trackingOption was null or undefined when calling updateTrackingOptions.');
16582
16986
  }
16583
16987
  localVarHeaderParams['xero-tenant-id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
16988
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
16584
16989
  Object.assign(localVarHeaderParams, options.headers);
16585
16990
  let localVarUseFormData = false;
16586
16991
  let localVarRequestOptions = {