xero-node 4.35.0 → 4.37.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 (53) 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 +18 -8
  14. package/dist/gen/api/filesApi.js +37 -9
  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/taxType.d.ts +25 -1
  42. package/dist/gen/model/accounting/taxType.js +24 -0
  43. package/dist/gen/model/accounting/taxType.js.map +1 -1
  44. package/dist/gen/model/accounting/tenNinetyNineContact.d.ts +23 -0
  45. package/dist/gen/model/accounting/tenNinetyNineContact.js +28 -0
  46. package/dist/gen/model/accounting/tenNinetyNineContact.js.map +1 -1
  47. package/dist/gen/model/finance/problemType.d.ts +2 -1
  48. package/dist/gen/model/finance/problemType.js +1 -0
  49. package/dist/gen/model/finance/problemType.js.map +1 -1
  50. package/dist/gen/model/payroll-au/leavePeriodStatus.d.ts +3 -1
  51. package/dist/gen/model/payroll-au/leavePeriodStatus.js +2 -0
  52. package/dist/gen/model/payroll-au/leavePeriodStatus.js.map +1 -1
  53. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  * Xero Payroll NZ
4
4
  * This is the Xero Payroll API for orgs in the NZ region.
5
5
  *
6
- * The version of the OpenAPI document: 2.38.0
6
+ * The version of the OpenAPI document: 2.40.1
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 PayrollNzApiApiKeys;
34
34
  class PayrollNzApi {
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.37.0' };
38
38
  this._useQuerystring = false;
39
39
  this.binaryHeaders = {};
40
40
  this.authentications = {
@@ -75,8 +75,9 @@ class PayrollNzApi {
75
75
  * @summary Approves a timesheet
76
76
  * @param xeroTenantId Xero identifier for Tenant
77
77
  * @param timesheetID Identifier for the timesheet
78
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
78
79
  */
79
- approveTimesheet(xeroTenantId, timesheetID, options = { headers: {} }) {
80
+ approveTimesheet(xeroTenantId, timesheetID, idempotencyKey, options = { headers: {} }) {
80
81
  return __awaiter(this, void 0, void 0, function* () {
81
82
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/Approve'
82
83
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)));
@@ -92,6 +93,7 @@ class PayrollNzApi {
92
93
  throw new Error('Required parameter timesheetID was null or undefined when calling approveTimesheet.');
93
94
  }
94
95
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
96
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
95
97
  Object.assign(localVarHeaderParams, options.headers);
96
98
  let localVarUseFormData = false;
97
99
  let localVarRequestOptions = {
@@ -138,8 +140,9 @@ class PayrollNzApi {
138
140
  * @summary Creates a new deduction for a specific employee
139
141
  * @param xeroTenantId Xero identifier for Tenant
140
142
  * @param deduction
143
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
141
144
  */
142
- createDeduction(xeroTenantId, deduction, options = { headers: {} }) {
145
+ createDeduction(xeroTenantId, deduction, idempotencyKey, options = { headers: {} }) {
143
146
  return __awaiter(this, void 0, void 0, function* () {
144
147
  const localVarPath = this.basePath + '/Deductions';
145
148
  let localVarQueryParameters = {};
@@ -154,6 +157,7 @@ class PayrollNzApi {
154
157
  throw new Error('Required parameter deduction was null or undefined when calling createDeduction.');
155
158
  }
156
159
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
160
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
157
161
  Object.assign(localVarHeaderParams, options.headers);
158
162
  let localVarUseFormData = false;
159
163
  let localVarRequestOptions = {
@@ -201,8 +205,9 @@ class PayrollNzApi {
201
205
  * @summary Creates a new earnings rate
202
206
  * @param xeroTenantId Xero identifier for Tenant
203
207
  * @param earningsRate
208
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
204
209
  */
205
- createEarningsRate(xeroTenantId, earningsRate, options = { headers: {} }) {
210
+ createEarningsRate(xeroTenantId, earningsRate, idempotencyKey, options = { headers: {} }) {
206
211
  return __awaiter(this, void 0, void 0, function* () {
207
212
  const localVarPath = this.basePath + '/EarningsRates';
208
213
  let localVarQueryParameters = {};
@@ -217,6 +222,7 @@ class PayrollNzApi {
217
222
  throw new Error('Required parameter earningsRate was null or undefined when calling createEarningsRate.');
218
223
  }
219
224
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
225
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
220
226
  Object.assign(localVarHeaderParams, options.headers);
221
227
  let localVarUseFormData = false;
222
228
  let localVarRequestOptions = {
@@ -264,8 +270,9 @@ class PayrollNzApi {
264
270
  * @summary Creates an employees
265
271
  * @param xeroTenantId Xero identifier for Tenant
266
272
  * @param employee
273
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
267
274
  */
268
- createEmployee(xeroTenantId, employee, options = { headers: {} }) {
275
+ createEmployee(xeroTenantId, employee, idempotencyKey, options = { headers: {} }) {
269
276
  return __awaiter(this, void 0, void 0, function* () {
270
277
  const localVarPath = this.basePath + '/Employees';
271
278
  let localVarQueryParameters = {};
@@ -280,6 +287,7 @@ class PayrollNzApi {
280
287
  throw new Error('Required parameter employee was null or undefined when calling createEmployee.');
281
288
  }
282
289
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
290
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
283
291
  Object.assign(localVarHeaderParams, options.headers);
284
292
  let localVarUseFormData = false;
285
293
  let localVarRequestOptions = {
@@ -328,8 +336,9 @@ class PayrollNzApi {
328
336
  * @param xeroTenantId Xero identifier for Tenant
329
337
  * @param employeeID Employee id for single object
330
338
  * @param earningsTemplate
339
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
331
340
  */
332
- createEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, options = { headers: {} }) {
341
+ createEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, idempotencyKey, options = { headers: {} }) {
333
342
  return __awaiter(this, void 0, void 0, function* () {
334
343
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/PayTemplates/earnings'
335
344
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -349,6 +358,7 @@ class PayrollNzApi {
349
358
  throw new Error('Required parameter earningsTemplate was null or undefined when calling createEmployeeEarningsTemplate.');
350
359
  }
351
360
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
361
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
352
362
  Object.assign(localVarHeaderParams, options.headers);
353
363
  let localVarUseFormData = false;
354
364
  let localVarRequestOptions = {
@@ -397,8 +407,9 @@ class PayrollNzApi {
397
407
  * @param xeroTenantId Xero identifier for Tenant
398
408
  * @param employeeID Employee id for single object
399
409
  * @param employeeLeave
410
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
400
411
  */
401
- createEmployeeLeave(xeroTenantId, employeeID, employeeLeave, options = { headers: {} }) {
412
+ createEmployeeLeave(xeroTenantId, employeeID, employeeLeave, idempotencyKey, options = { headers: {} }) {
402
413
  return __awaiter(this, void 0, void 0, function* () {
403
414
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/Leave'
404
415
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -418,6 +429,7 @@ class PayrollNzApi {
418
429
  throw new Error('Required parameter employeeLeave was null or undefined when calling createEmployeeLeave.');
419
430
  }
420
431
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
432
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
421
433
  Object.assign(localVarHeaderParams, options.headers);
422
434
  let localVarUseFormData = false;
423
435
  let localVarRequestOptions = {
@@ -466,8 +478,9 @@ class PayrollNzApi {
466
478
  * @param xeroTenantId Xero identifier for Tenant
467
479
  * @param employeeID Employee id for single object
468
480
  * @param employeeLeaveSetup
481
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
469
482
  */
470
- createEmployeeLeaveSetup(xeroTenantId, employeeID, employeeLeaveSetup, options = { headers: {} }) {
483
+ createEmployeeLeaveSetup(xeroTenantId, employeeID, employeeLeaveSetup, idempotencyKey, options = { headers: {} }) {
471
484
  return __awaiter(this, void 0, void 0, function* () {
472
485
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/leaveSetup'
473
486
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -487,6 +500,7 @@ class PayrollNzApi {
487
500
  throw new Error('Required parameter employeeLeaveSetup was null or undefined when calling createEmployeeLeaveSetup.');
488
501
  }
489
502
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
503
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
490
504
  Object.assign(localVarHeaderParams, options.headers);
491
505
  let localVarUseFormData = false;
492
506
  let localVarRequestOptions = {
@@ -535,8 +549,9 @@ class PayrollNzApi {
535
549
  * @param xeroTenantId Xero identifier for Tenant
536
550
  * @param employeeID Employee id for single object
537
551
  * @param employeeLeaveType
552
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
538
553
  */
539
- createEmployeeLeaveType(xeroTenantId, employeeID, employeeLeaveType, options = { headers: {} }) {
554
+ createEmployeeLeaveType(xeroTenantId, employeeID, employeeLeaveType, idempotencyKey, options = { headers: {} }) {
540
555
  return __awaiter(this, void 0, void 0, function* () {
541
556
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/LeaveTypes'
542
557
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -556,6 +571,7 @@ class PayrollNzApi {
556
571
  throw new Error('Required parameter employeeLeaveType was null or undefined when calling createEmployeeLeaveType.');
557
572
  }
558
573
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
574
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
559
575
  Object.assign(localVarHeaderParams, options.headers);
560
576
  let localVarUseFormData = false;
561
577
  let localVarRequestOptions = {
@@ -604,8 +620,9 @@ class PayrollNzApi {
604
620
  * @param xeroTenantId Xero identifier for Tenant
605
621
  * @param employeeID Employee id for single object
606
622
  * @param employeeOpeningBalance
623
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
607
624
  */
608
- createEmployeeOpeningBalances(xeroTenantId, employeeID, employeeOpeningBalance, options = { headers: {} }) {
625
+ createEmployeeOpeningBalances(xeroTenantId, employeeID, employeeOpeningBalance, idempotencyKey, options = { headers: {} }) {
609
626
  return __awaiter(this, void 0, void 0, function* () {
610
627
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/openingBalances'
611
628
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -625,6 +642,7 @@ class PayrollNzApi {
625
642
  throw new Error('Required parameter employeeOpeningBalance was null or undefined when calling createEmployeeOpeningBalances.');
626
643
  }
627
644
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
645
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
628
646
  Object.assign(localVarHeaderParams, options.headers);
629
647
  let localVarUseFormData = false;
630
648
  let localVarRequestOptions = {
@@ -673,8 +691,9 @@ class PayrollNzApi {
673
691
  * @param xeroTenantId Xero identifier for Tenant
674
692
  * @param employeeID Employee id for single object
675
693
  * @param paymentMethod
694
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
676
695
  */
677
- createEmployeePaymentMethod(xeroTenantId, employeeID, paymentMethod, options = { headers: {} }) {
696
+ createEmployeePaymentMethod(xeroTenantId, employeeID, paymentMethod, idempotencyKey, options = { headers: {} }) {
678
697
  return __awaiter(this, void 0, void 0, function* () {
679
698
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/PaymentMethods'
680
699
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -694,6 +713,7 @@ class PayrollNzApi {
694
713
  throw new Error('Required parameter paymentMethod was null or undefined when calling createEmployeePaymentMethod.');
695
714
  }
696
715
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
716
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
697
717
  Object.assign(localVarHeaderParams, options.headers);
698
718
  let localVarUseFormData = false;
699
719
  let localVarRequestOptions = {
@@ -742,8 +762,9 @@ class PayrollNzApi {
742
762
  * @param xeroTenantId Xero identifier for Tenant
743
763
  * @param employeeID Employee id for single object
744
764
  * @param salaryAndWage
765
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
745
766
  */
746
- createEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWage, options = { headers: {} }) {
767
+ createEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWage, idempotencyKey, options = { headers: {} }) {
747
768
  return __awaiter(this, void 0, void 0, function* () {
748
769
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/SalaryAndWages'
749
770
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -763,6 +784,7 @@ class PayrollNzApi {
763
784
  throw new Error('Required parameter salaryAndWage was null or undefined when calling createEmployeeSalaryAndWage.');
764
785
  }
765
786
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
787
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
766
788
  Object.assign(localVarHeaderParams, options.headers);
767
789
  let localVarUseFormData = false;
768
790
  let localVarRequestOptions = {
@@ -811,8 +833,9 @@ class PayrollNzApi {
811
833
  * @param xeroTenantId Xero identifier for Tenant
812
834
  * @param employeeID Employee id for single object
813
835
  * @param employment
836
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
814
837
  */
815
- createEmployment(xeroTenantId, employeeID, employment, options = { headers: {} }) {
838
+ createEmployment(xeroTenantId, employeeID, employment, idempotencyKey, options = { headers: {} }) {
816
839
  return __awaiter(this, void 0, void 0, function* () {
817
840
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/Employment'
818
841
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -832,6 +855,7 @@ class PayrollNzApi {
832
855
  throw new Error('Required parameter employment was null or undefined when calling createEmployment.');
833
856
  }
834
857
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
858
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
835
859
  Object.assign(localVarHeaderParams, options.headers);
836
860
  let localVarUseFormData = false;
837
861
  let localVarRequestOptions = {
@@ -879,8 +903,9 @@ class PayrollNzApi {
879
903
  * @summary Creates a new leave type
880
904
  * @param xeroTenantId Xero identifier for Tenant
881
905
  * @param leaveType
906
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
882
907
  */
883
- createLeaveType(xeroTenantId, leaveType, options = { headers: {} }) {
908
+ createLeaveType(xeroTenantId, leaveType, idempotencyKey, options = { headers: {} }) {
884
909
  return __awaiter(this, void 0, void 0, function* () {
885
910
  const localVarPath = this.basePath + '/LeaveTypes';
886
911
  let localVarQueryParameters = {};
@@ -895,6 +920,7 @@ class PayrollNzApi {
895
920
  throw new Error('Required parameter leaveType was null or undefined when calling createLeaveType.');
896
921
  }
897
922
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
923
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
898
924
  Object.assign(localVarHeaderParams, options.headers);
899
925
  let localVarUseFormData = false;
900
926
  let localVarRequestOptions = {
@@ -943,8 +969,9 @@ class PayrollNzApi {
943
969
  * @param xeroTenantId Xero identifier for Tenant
944
970
  * @param employeeID Employee id for single object
945
971
  * @param earningsTemplate
972
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
946
973
  */
947
- createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, options = { headers: {} }) {
974
+ createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeID, earningsTemplate, idempotencyKey, options = { headers: {} }) {
948
975
  return __awaiter(this, void 0, void 0, function* () {
949
976
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/paytemplateearnings'
950
977
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -964,6 +991,7 @@ class PayrollNzApi {
964
991
  throw new Error('Required parameter earningsTemplate was null or undefined when calling createMultipleEmployeeEarningsTemplate.');
965
992
  }
966
993
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
994
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
967
995
  Object.assign(localVarHeaderParams, options.headers);
968
996
  let localVarUseFormData = false;
969
997
  let localVarRequestOptions = {
@@ -1011,8 +1039,9 @@ class PayrollNzApi {
1011
1039
  * @summary Creates a pay run
1012
1040
  * @param xeroTenantId Xero identifier for Tenant
1013
1041
  * @param payRun
1042
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1014
1043
  */
1015
- createPayRun(xeroTenantId, payRun, options = { headers: {} }) {
1044
+ createPayRun(xeroTenantId, payRun, idempotencyKey, options = { headers: {} }) {
1016
1045
  return __awaiter(this, void 0, void 0, function* () {
1017
1046
  const localVarPath = this.basePath + '/PayRuns';
1018
1047
  let localVarQueryParameters = {};
@@ -1027,6 +1056,7 @@ class PayrollNzApi {
1027
1056
  throw new Error('Required parameter payRun was null or undefined when calling createPayRun.');
1028
1057
  }
1029
1058
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1059
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1030
1060
  Object.assign(localVarHeaderParams, options.headers);
1031
1061
  let localVarUseFormData = false;
1032
1062
  let localVarRequestOptions = {
@@ -1074,8 +1104,9 @@ class PayrollNzApi {
1074
1104
  * @summary Creates a new payrun calendar
1075
1105
  * @param xeroTenantId Xero identifier for Tenant
1076
1106
  * @param payRunCalendar
1107
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1077
1108
  */
1078
- createPayRunCalendar(xeroTenantId, payRunCalendar, options = { headers: {} }) {
1109
+ createPayRunCalendar(xeroTenantId, payRunCalendar, idempotencyKey, options = { headers: {} }) {
1079
1110
  return __awaiter(this, void 0, void 0, function* () {
1080
1111
  const localVarPath = this.basePath + '/PayRunCalendars';
1081
1112
  let localVarQueryParameters = {};
@@ -1090,6 +1121,7 @@ class PayrollNzApi {
1090
1121
  throw new Error('Required parameter payRunCalendar was null or undefined when calling createPayRunCalendar.');
1091
1122
  }
1092
1123
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1124
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1093
1125
  Object.assign(localVarHeaderParams, options.headers);
1094
1126
  let localVarUseFormData = false;
1095
1127
  let localVarRequestOptions = {
@@ -1137,8 +1169,9 @@ class PayrollNzApi {
1137
1169
  * @summary Creates a new reimbursement
1138
1170
  * @param xeroTenantId Xero identifier for Tenant
1139
1171
  * @param reimbursement
1172
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1140
1173
  */
1141
- createReimbursement(xeroTenantId, reimbursement, options = { headers: {} }) {
1174
+ createReimbursement(xeroTenantId, reimbursement, idempotencyKey, options = { headers: {} }) {
1142
1175
  return __awaiter(this, void 0, void 0, function* () {
1143
1176
  const localVarPath = this.basePath + '/Reimbursements';
1144
1177
  let localVarQueryParameters = {};
@@ -1153,6 +1186,7 @@ class PayrollNzApi {
1153
1186
  throw new Error('Required parameter reimbursement was null or undefined when calling createReimbursement.');
1154
1187
  }
1155
1188
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1189
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1156
1190
  Object.assign(localVarHeaderParams, options.headers);
1157
1191
  let localVarUseFormData = false;
1158
1192
  let localVarRequestOptions = {
@@ -1200,8 +1234,9 @@ class PayrollNzApi {
1200
1234
  * @summary Creates a new superannuation
1201
1235
  * @param xeroTenantId Xero identifier for Tenant
1202
1236
  * @param benefit
1237
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1203
1238
  */
1204
- createSuperannuation(xeroTenantId, benefit, options = { headers: {} }) {
1239
+ createSuperannuation(xeroTenantId, benefit, idempotencyKey, options = { headers: {} }) {
1205
1240
  return __awaiter(this, void 0, void 0, function* () {
1206
1241
  const localVarPath = this.basePath + '/Superannuations';
1207
1242
  let localVarQueryParameters = {};
@@ -1216,6 +1251,7 @@ class PayrollNzApi {
1216
1251
  throw new Error('Required parameter benefit was null or undefined when calling createSuperannuation.');
1217
1252
  }
1218
1253
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1254
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1219
1255
  Object.assign(localVarHeaderParams, options.headers);
1220
1256
  let localVarUseFormData = false;
1221
1257
  let localVarRequestOptions = {
@@ -1263,8 +1299,9 @@ class PayrollNzApi {
1263
1299
  * @summary Creates a new timesheet
1264
1300
  * @param xeroTenantId Xero identifier for Tenant
1265
1301
  * @param timesheet
1302
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1266
1303
  */
1267
- createTimesheet(xeroTenantId, timesheet, options = { headers: {} }) {
1304
+ createTimesheet(xeroTenantId, timesheet, idempotencyKey, options = { headers: {} }) {
1268
1305
  return __awaiter(this, void 0, void 0, function* () {
1269
1306
  const localVarPath = this.basePath + '/Timesheets';
1270
1307
  let localVarQueryParameters = {};
@@ -1279,6 +1316,7 @@ class PayrollNzApi {
1279
1316
  throw new Error('Required parameter timesheet was null or undefined when calling createTimesheet.');
1280
1317
  }
1281
1318
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1319
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1282
1320
  Object.assign(localVarHeaderParams, options.headers);
1283
1321
  let localVarUseFormData = false;
1284
1322
  let localVarRequestOptions = {
@@ -1327,8 +1365,9 @@ class PayrollNzApi {
1327
1365
  * @param xeroTenantId Xero identifier for Tenant
1328
1366
  * @param timesheetID Identifier for the timesheet
1329
1367
  * @param timesheetLine
1368
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
1330
1369
  */
1331
- createTimesheetLine(xeroTenantId, timesheetID, timesheetLine, options = { headers: {} }) {
1370
+ createTimesheetLine(xeroTenantId, timesheetID, timesheetLine, idempotencyKey, options = { headers: {} }) {
1332
1371
  return __awaiter(this, void 0, void 0, function* () {
1333
1372
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/Lines'
1334
1373
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)));
@@ -1348,6 +1387,7 @@ class PayrollNzApi {
1348
1387
  throw new Error('Required parameter timesheetLine was null or undefined when calling createTimesheetLine.');
1349
1388
  }
1350
1389
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
1390
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
1351
1391
  Object.assign(localVarHeaderParams, options.headers);
1352
1392
  let localVarUseFormData = false;
1353
1393
  let localVarRequestOptions = {
@@ -3900,8 +3940,9 @@ class PayrollNzApi {
3900
3940
  * @summary Reverts a timesheet to draft
3901
3941
  * @param xeroTenantId Xero identifier for Tenant
3902
3942
  * @param timesheetID Identifier for the timesheet
3943
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3903
3944
  */
3904
- revertTimesheet(xeroTenantId, timesheetID, options = { headers: {} }) {
3945
+ revertTimesheet(xeroTenantId, timesheetID, idempotencyKey, options = { headers: {} }) {
3905
3946
  return __awaiter(this, void 0, void 0, function* () {
3906
3947
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/RevertToDraft'
3907
3948
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)));
@@ -3917,6 +3958,7 @@ class PayrollNzApi {
3917
3958
  throw new Error('Required parameter timesheetID was null or undefined when calling revertTimesheet.');
3918
3959
  }
3919
3960
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
3961
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3920
3962
  Object.assign(localVarHeaderParams, options.headers);
3921
3963
  let localVarUseFormData = false;
3922
3964
  let localVarRequestOptions = {
@@ -3964,8 +4006,9 @@ class PayrollNzApi {
3964
4006
  * @param xeroTenantId Xero identifier for Tenant
3965
4007
  * @param employeeID Employee id for single object
3966
4008
  * @param employee
4009
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
3967
4010
  */
3968
- updateEmployee(xeroTenantId, employeeID, employee, options = { headers: {} }) {
4011
+ updateEmployee(xeroTenantId, employeeID, employee, idempotencyKey, options = { headers: {} }) {
3969
4012
  return __awaiter(this, void 0, void 0, function* () {
3970
4013
  const localVarPath = this.basePath + '/Employees/{EmployeeID}'
3971
4014
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -3985,6 +4028,7 @@ class PayrollNzApi {
3985
4028
  throw new Error('Required parameter employee was null or undefined when calling updateEmployee.');
3986
4029
  }
3987
4030
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4031
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
3988
4032
  Object.assign(localVarHeaderParams, options.headers);
3989
4033
  let localVarUseFormData = false;
3990
4034
  let localVarRequestOptions = {
@@ -4034,8 +4078,9 @@ class PayrollNzApi {
4034
4078
  * @param employeeID Employee id for single object
4035
4079
  * @param payTemplateEarningID Id for single pay template earnings object
4036
4080
  * @param earningsTemplate
4081
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4037
4082
  */
4038
- updateEmployeeEarningsTemplate(xeroTenantId, employeeID, payTemplateEarningID, earningsTemplate, options = { headers: {} }) {
4083
+ updateEmployeeEarningsTemplate(xeroTenantId, employeeID, payTemplateEarningID, earningsTemplate, idempotencyKey, options = { headers: {} }) {
4039
4084
  return __awaiter(this, void 0, void 0, function* () {
4040
4085
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}'
4041
4086
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)))
@@ -4060,6 +4105,7 @@ class PayrollNzApi {
4060
4105
  throw new Error('Required parameter earningsTemplate was null or undefined when calling updateEmployeeEarningsTemplate.');
4061
4106
  }
4062
4107
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4108
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4063
4109
  Object.assign(localVarHeaderParams, options.headers);
4064
4110
  let localVarUseFormData = false;
4065
4111
  let localVarRequestOptions = {
@@ -4109,8 +4155,9 @@ class PayrollNzApi {
4109
4155
  * @param employeeID Employee id for single object
4110
4156
  * @param leaveID Leave id for single object
4111
4157
  * @param employeeLeave
4158
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4112
4159
  */
4113
- updateEmployeeLeave(xeroTenantId, employeeID, leaveID, employeeLeave, options = { headers: {} }) {
4160
+ updateEmployeeLeave(xeroTenantId, employeeID, leaveID, employeeLeave, idempotencyKey, options = { headers: {} }) {
4114
4161
  return __awaiter(this, void 0, void 0, function* () {
4115
4162
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/Leave/{LeaveID}'
4116
4163
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)))
@@ -4135,6 +4182,7 @@ class PayrollNzApi {
4135
4182
  throw new Error('Required parameter employeeLeave was null or undefined when calling updateEmployeeLeave.');
4136
4183
  }
4137
4184
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4185
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4138
4186
  Object.assign(localVarHeaderParams, options.headers);
4139
4187
  let localVarUseFormData = false;
4140
4188
  let localVarRequestOptions = {
@@ -4184,8 +4232,9 @@ class PayrollNzApi {
4184
4232
  * @param employeeID Employee id for single object
4185
4233
  * @param salaryAndWagesID Id for single pay template earnings object
4186
4234
  * @param salaryAndWage
4235
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4187
4236
  */
4188
- updateEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWagesID, salaryAndWage, options = { headers: {} }) {
4237
+ updateEmployeeSalaryAndWage(xeroTenantId, employeeID, salaryAndWagesID, salaryAndWage, idempotencyKey, options = { headers: {} }) {
4189
4238
  return __awaiter(this, void 0, void 0, function* () {
4190
4239
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}'
4191
4240
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)))
@@ -4210,6 +4259,7 @@ class PayrollNzApi {
4210
4259
  throw new Error('Required parameter salaryAndWage was null or undefined when calling updateEmployeeSalaryAndWage.');
4211
4260
  }
4212
4261
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4262
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4213
4263
  Object.assign(localVarHeaderParams, options.headers);
4214
4264
  let localVarUseFormData = false;
4215
4265
  let localVarRequestOptions = {
@@ -4258,8 +4308,9 @@ class PayrollNzApi {
4258
4308
  * @param xeroTenantId Xero identifier for Tenant
4259
4309
  * @param employeeID Employee id for single object
4260
4310
  * @param employeeTax
4311
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4261
4312
  */
4262
- updateEmployeeTax(xeroTenantId, employeeID, employeeTax, options = { headers: {} }) {
4313
+ updateEmployeeTax(xeroTenantId, employeeID, employeeTax, idempotencyKey, options = { headers: {} }) {
4263
4314
  return __awaiter(this, void 0, void 0, function* () {
4264
4315
  const localVarPath = this.basePath + '/Employees/{EmployeeID}/Tax'
4265
4316
  .replace('{' + 'EmployeeID' + '}', encodeURIComponent(String(employeeID)));
@@ -4279,6 +4330,7 @@ class PayrollNzApi {
4279
4330
  throw new Error('Required parameter employeeTax was null or undefined when calling updateEmployeeTax.');
4280
4331
  }
4281
4332
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4333
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4282
4334
  Object.assign(localVarHeaderParams, options.headers);
4283
4335
  let localVarUseFormData = false;
4284
4336
  let localVarRequestOptions = {
@@ -4327,8 +4379,9 @@ class PayrollNzApi {
4327
4379
  * @param xeroTenantId Xero identifier for Tenant
4328
4380
  * @param payRunID Identifier for the pay run
4329
4381
  * @param payRun
4382
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4330
4383
  */
4331
- updatePayRun(xeroTenantId, payRunID, payRun, options = { headers: {} }) {
4384
+ updatePayRun(xeroTenantId, payRunID, payRun, idempotencyKey, options = { headers: {} }) {
4332
4385
  return __awaiter(this, void 0, void 0, function* () {
4333
4386
  const localVarPath = this.basePath + '/PayRuns/{PayRunID}'
4334
4387
  .replace('{' + 'PayRunID' + '}', encodeURIComponent(String(payRunID)));
@@ -4348,6 +4401,7 @@ class PayrollNzApi {
4348
4401
  throw new Error('Required parameter payRun was null or undefined when calling updatePayRun.');
4349
4402
  }
4350
4403
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4404
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4351
4405
  Object.assign(localVarHeaderParams, options.headers);
4352
4406
  let localVarUseFormData = false;
4353
4407
  let localVarRequestOptions = {
@@ -4396,8 +4450,9 @@ class PayrollNzApi {
4396
4450
  * @param xeroTenantId Xero identifier for Tenant
4397
4451
  * @param paySlipID Identifier for the payslip
4398
4452
  * @param paySlip
4453
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4399
4454
  */
4400
- updatePaySlipLineItems(xeroTenantId, paySlipID, paySlip, options = { headers: {} }) {
4455
+ updatePaySlipLineItems(xeroTenantId, paySlipID, paySlip, idempotencyKey, options = { headers: {} }) {
4401
4456
  return __awaiter(this, void 0, void 0, function* () {
4402
4457
  const localVarPath = this.basePath + '/PaySlips/{PaySlipID}'
4403
4458
  .replace('{' + 'PaySlipID' + '}', encodeURIComponent(String(paySlipID)));
@@ -4417,6 +4472,7 @@ class PayrollNzApi {
4417
4472
  throw new Error('Required parameter paySlip was null or undefined when calling updatePaySlipLineItems.');
4418
4473
  }
4419
4474
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4475
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4420
4476
  Object.assign(localVarHeaderParams, options.headers);
4421
4477
  let localVarUseFormData = false;
4422
4478
  let localVarRequestOptions = {
@@ -4466,8 +4522,9 @@ class PayrollNzApi {
4466
4522
  * @param timesheetID Identifier for the timesheet
4467
4523
  * @param timesheetLineID Identifier for the timesheet line
4468
4524
  * @param timesheetLine
4525
+ * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4469
4526
  */
4470
- updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine, options = { headers: {} }) {
4527
+ updateTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, timesheetLine, idempotencyKey, options = { headers: {} }) {
4471
4528
  return __awaiter(this, void 0, void 0, function* () {
4472
4529
  const localVarPath = this.basePath + '/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}'
4473
4530
  .replace('{' + 'TimesheetID' + '}', encodeURIComponent(String(timesheetID)))
@@ -4492,6 +4549,7 @@ class PayrollNzApi {
4492
4549
  throw new Error('Required parameter timesheetLine was null or undefined when calling updateTimesheetLine.');
4493
4550
  }
4494
4551
  localVarHeaderParams['Xero-Tenant-Id'] = models_1.ObjectSerializer.serialize(xeroTenantId, "string");
4552
+ localVarHeaderParams['Idempotency-Key'] = models_1.ObjectSerializer.serialize(idempotencyKey, "string");
4495
4553
  Object.assign(localVarHeaderParams, options.headers);
4496
4554
  let localVarUseFormData = false;
4497
4555
  let localVarRequestOptions = {