xero-ruby 3.16.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/xero-ruby/api/accounting_api.rb +645 -3
- data/lib/xero-ruby/api/app_store_api.rb +6 -0
- data/lib/xero-ruby/api/asset_api.rb +16 -6
- data/lib/xero-ruby/api/files_api.rb +156 -20
- data/lib/xero-ruby/api/payroll_au_api.rb +326 -30
- data/lib/xero-ruby/api/payroll_nz_api.rb +417 -7
- data/lib/xero-ruby/api/payroll_uk_api.rb +81 -0
- data/lib/xero-ruby/api/project_api.rb +21 -0
- data/lib/xero-ruby/api_client.rb +7 -7
- data/lib/xero-ruby/models/accounting/account_type.rb +0 -4
- data/lib/xero-ruby/models/accounting/allocation.rb +21 -1
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +23 -1
- data/lib/xero-ruby/models/accounting/contact.rb +1 -11
- data/lib/xero-ruby/models/accounting/contacts.rb +23 -1
- data/lib/xero-ruby/models/accounting/credit_note.rb +17 -5
- data/lib/xero-ruby/models/accounting/credit_notes.rb +23 -1
- data/lib/xero-ruby/models/accounting/currency_code.rb +10 -8
- data/lib/xero-ruby/models/accounting/invoice.rb +16 -4
- data/lib/xero-ruby/models/accounting/invoice_address.rb +338 -0
- data/lib/xero-ruby/models/accounting/invoices.rb +23 -1
- data/lib/xero-ruby/models/accounting/journals.rb +13 -1
- data/lib/xero-ruby/models/accounting/line_item.rb +75 -4
- data/lib/xero-ruby/models/accounting/manual_journals.rb +23 -1
- data/lib/xero-ruby/models/accounting/organisation.rb +9 -2
- data/lib/xero-ruby/models/accounting/overpayments.rb +23 -1
- data/lib/xero-ruby/models/accounting/pagination.rb +252 -0
- data/lib/xero-ruby/models/accounting/payment.rb +16 -4
- data/lib/xero-ruby/models/accounting/payments.rb +23 -1
- data/lib/xero-ruby/models/accounting/prepayments.rb +23 -1
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +23 -1
- data/lib/xero-ruby/models/accounting/tax_breakdown_component.rb +351 -0
- data/lib/xero-ruby/models/accounting/tax_rate.rb +13 -6
- data/lib/xero-ruby/models/accounting/tax_type.rb +45 -4
- data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +75 -4
- data/lib/xero-ruby/models/files/association.rb +31 -1
- data/lib/xero-ruby/models/finance/current_statement_response.rb +1 -1
- data/lib/xero-ruby/models/finance/data_source_response.rb +13 -43
- data/lib/xero-ruby/models/finance/problem_type.rb +1 -0
- data/lib/xero-ruby/models/finance/statement_line_response.rb +11 -1
- data/lib/xero-ruby/models/finance/statement_response.rb +24 -4
- data/lib/xero-ruby/models/payroll_au/allowance_type.rb +0 -1
- data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +0 -1
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +21 -1
- data/lib/xero-ruby/models/payroll_au/leave_application.rb +11 -1
- data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +14 -4
- data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +0 -1
- data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +2 -0
- data/lib/xero-ruby/models/payroll_au/opening_balances.rb +16 -4
- data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -0
- data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -0
- data/lib/xero-ruby/models/payroll_nz/employee.rb +34 -4
- data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +56 -6
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +47 -7
- data/lib/xero-ruby/models/payroll_nz/employee_working_pattern.rb +242 -0
- data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks.rb +254 -0
- data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_object.rb +242 -0
- data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_request.rb +244 -0
- data/lib/xero-ruby/models/payroll_nz/employee_working_patterns_object.rb +244 -0
- data/lib/xero-ruby/models/payroll_nz/employment.rb +24 -4
- data/lib/xero-ruby/models/payroll_nz/leave_period.rb +35 -4
- data/lib/xero-ruby/models/payroll_nz/leave_type.rb +24 -4
- data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +28 -4
- data/lib/xero-ruby/models/payroll_nz/working_week.rb +317 -0
- data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -3
- data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +14 -4
- data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby/where.rb +37 -37
- data/lib/xero-ruby.rb +11 -0
- data/spec/api_client_spec.rb +56 -56
- data/spec/api_error_spec.rb +1 -1
- data/spec/configuration_spec.rb +2 -2
- data/spec/helper_methods_spec.rb +3 -3
- data/spec/where_spec.rb +2 -2
- metadata +38 -27
|
@@ -20,6 +20,7 @@ module XeroRuby
|
|
|
20
20
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
21
21
|
# @param timesheet_id [String] Identifier for the timesheet
|
|
22
22
|
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
23
24
|
# @return [TimesheetObject]
|
|
24
25
|
def approve_timesheet(xero_tenant_id, timesheet_id, opts = {})
|
|
25
26
|
data, _status_code, _headers = approve_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
|
|
@@ -30,6 +31,7 @@ module XeroRuby
|
|
|
30
31
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
31
32
|
# @param timesheet_id [String] Identifier for the timesheet
|
|
32
33
|
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
33
35
|
# @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers
|
|
34
36
|
def approve_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
|
|
35
37
|
opts = options.dup
|
|
@@ -62,6 +64,7 @@ module XeroRuby
|
|
|
62
64
|
# HTTP header 'Accept' (if needed)
|
|
63
65
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
64
66
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
67
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
65
68
|
|
|
66
69
|
# form parameters
|
|
67
70
|
form_params = opts[:form_params] || {}
|
|
@@ -95,6 +98,7 @@ module XeroRuby
|
|
|
95
98
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
96
99
|
# @param deduction [Deduction]
|
|
97
100
|
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
98
102
|
# @return [DeductionObject]
|
|
99
103
|
def create_deduction(xero_tenant_id, deduction, opts = {})
|
|
100
104
|
data, _status_code, _headers = create_deduction_with_http_info(xero_tenant_id, deduction, opts)
|
|
@@ -105,6 +109,7 @@ module XeroRuby
|
|
|
105
109
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
106
110
|
# @param deduction [Deduction]
|
|
107
111
|
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
108
113
|
# @return [Array<(DeductionObject, Integer, Hash)>] DeductionObject data, response status code and response headers
|
|
109
114
|
def create_deduction_with_http_info(xero_tenant_id, deduction, options = {})
|
|
110
115
|
opts = options.dup
|
|
@@ -139,6 +144,7 @@ module XeroRuby
|
|
|
139
144
|
# HTTP header 'Content-Type'
|
|
140
145
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
141
146
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
147
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
142
148
|
|
|
143
149
|
# form parameters
|
|
144
150
|
form_params = opts[:form_params] || {}
|
|
@@ -172,6 +178,7 @@ module XeroRuby
|
|
|
172
178
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
173
179
|
# @param earnings_rate [EarningsRate]
|
|
174
180
|
# @param [Hash] opts the optional parameters
|
|
181
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
175
182
|
# @return [EarningsRateObject]
|
|
176
183
|
def create_earnings_rate(xero_tenant_id, earnings_rate, opts = {})
|
|
177
184
|
data, _status_code, _headers = create_earnings_rate_with_http_info(xero_tenant_id, earnings_rate, opts)
|
|
@@ -182,6 +189,7 @@ module XeroRuby
|
|
|
182
189
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
183
190
|
# @param earnings_rate [EarningsRate]
|
|
184
191
|
# @param [Hash] opts the optional parameters
|
|
192
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
185
193
|
# @return [Array<(EarningsRateObject, Integer, Hash)>] EarningsRateObject data, response status code and response headers
|
|
186
194
|
def create_earnings_rate_with_http_info(xero_tenant_id, earnings_rate, options = {})
|
|
187
195
|
opts = options.dup
|
|
@@ -216,6 +224,7 @@ module XeroRuby
|
|
|
216
224
|
# HTTP header 'Content-Type'
|
|
217
225
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
218
226
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
227
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
219
228
|
|
|
220
229
|
# form parameters
|
|
221
230
|
form_params = opts[:form_params] || {}
|
|
@@ -249,6 +258,7 @@ module XeroRuby
|
|
|
249
258
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
250
259
|
# @param employee [Employee]
|
|
251
260
|
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
252
262
|
# @return [EmployeeObject]
|
|
253
263
|
def create_employee(xero_tenant_id, employee, opts = {})
|
|
254
264
|
data, _status_code, _headers = create_employee_with_http_info(xero_tenant_id, employee, opts)
|
|
@@ -259,6 +269,7 @@ module XeroRuby
|
|
|
259
269
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
260
270
|
# @param employee [Employee]
|
|
261
271
|
# @param [Hash] opts the optional parameters
|
|
272
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
262
273
|
# @return [Array<(EmployeeObject, Integer, Hash)>] EmployeeObject data, response status code and response headers
|
|
263
274
|
def create_employee_with_http_info(xero_tenant_id, employee, options = {})
|
|
264
275
|
opts = options.dup
|
|
@@ -293,6 +304,7 @@ module XeroRuby
|
|
|
293
304
|
# HTTP header 'Content-Type'
|
|
294
305
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
295
306
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
307
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
296
308
|
|
|
297
309
|
# form parameters
|
|
298
310
|
form_params = opts[:form_params] || {}
|
|
@@ -327,6 +339,7 @@ module XeroRuby
|
|
|
327
339
|
# @param employee_id [String] Employee id for single object
|
|
328
340
|
# @param earnings_template [EarningsTemplate]
|
|
329
341
|
# @param [Hash] opts the optional parameters
|
|
342
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
330
343
|
# @return [EarningsTemplateObject]
|
|
331
344
|
def create_employee_earnings_template(xero_tenant_id, employee_id, earnings_template, opts = {})
|
|
332
345
|
data, _status_code, _headers = create_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, opts)
|
|
@@ -338,6 +351,7 @@ module XeroRuby
|
|
|
338
351
|
# @param employee_id [String] Employee id for single object
|
|
339
352
|
# @param earnings_template [EarningsTemplate]
|
|
340
353
|
# @param [Hash] opts the optional parameters
|
|
354
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
341
355
|
# @return [Array<(EarningsTemplateObject, Integer, Hash)>] EarningsTemplateObject data, response status code and response headers
|
|
342
356
|
def create_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, options = {})
|
|
343
357
|
opts = options.dup
|
|
@@ -357,7 +371,7 @@ module XeroRuby
|
|
|
357
371
|
fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollNzApi.create_employee_earnings_template"
|
|
358
372
|
end
|
|
359
373
|
# resource path
|
|
360
|
-
local_var_path = '/Employees/{EmployeeID}/PayTemplates/
|
|
374
|
+
local_var_path = '/Employees/{EmployeeID}/PayTemplates/Earnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
361
375
|
|
|
362
376
|
# camelize keys of incoming `where` opts
|
|
363
377
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
@@ -376,6 +390,7 @@ module XeroRuby
|
|
|
376
390
|
# HTTP header 'Content-Type'
|
|
377
391
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
378
392
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
393
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
379
394
|
|
|
380
395
|
# form parameters
|
|
381
396
|
form_params = opts[:form_params] || {}
|
|
@@ -410,6 +425,7 @@ module XeroRuby
|
|
|
410
425
|
# @param employee_id [String] Employee id for single object
|
|
411
426
|
# @param employee_leave [EmployeeLeave]
|
|
412
427
|
# @param [Hash] opts the optional parameters
|
|
428
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
413
429
|
# @return [EmployeeLeaveObject]
|
|
414
430
|
def create_employee_leave(xero_tenant_id, employee_id, employee_leave, opts = {})
|
|
415
431
|
data, _status_code, _headers = create_employee_leave_with_http_info(xero_tenant_id, employee_id, employee_leave, opts)
|
|
@@ -421,6 +437,7 @@ module XeroRuby
|
|
|
421
437
|
# @param employee_id [String] Employee id for single object
|
|
422
438
|
# @param employee_leave [EmployeeLeave]
|
|
423
439
|
# @param [Hash] opts the optional parameters
|
|
440
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
424
441
|
# @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers
|
|
425
442
|
def create_employee_leave_with_http_info(xero_tenant_id, employee_id, employee_leave, options = {})
|
|
426
443
|
opts = options.dup
|
|
@@ -459,6 +476,7 @@ module XeroRuby
|
|
|
459
476
|
# HTTP header 'Content-Type'
|
|
460
477
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
461
478
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
479
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
462
480
|
|
|
463
481
|
# form parameters
|
|
464
482
|
form_params = opts[:form_params] || {}
|
|
@@ -493,6 +511,7 @@ module XeroRuby
|
|
|
493
511
|
# @param employee_id [String] Employee id for single object
|
|
494
512
|
# @param employee_leave_setup [EmployeeLeaveSetup]
|
|
495
513
|
# @param [Hash] opts the optional parameters
|
|
514
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
496
515
|
# @return [EmployeeLeaveSetupObject]
|
|
497
516
|
def create_employee_leave_setup(xero_tenant_id, employee_id, employee_leave_setup, opts = {})
|
|
498
517
|
data, _status_code, _headers = create_employee_leave_setup_with_http_info(xero_tenant_id, employee_id, employee_leave_setup, opts)
|
|
@@ -504,6 +523,7 @@ module XeroRuby
|
|
|
504
523
|
# @param employee_id [String] Employee id for single object
|
|
505
524
|
# @param employee_leave_setup [EmployeeLeaveSetup]
|
|
506
525
|
# @param [Hash] opts the optional parameters
|
|
526
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
507
527
|
# @return [Array<(EmployeeLeaveSetupObject, Integer, Hash)>] EmployeeLeaveSetupObject data, response status code and response headers
|
|
508
528
|
def create_employee_leave_setup_with_http_info(xero_tenant_id, employee_id, employee_leave_setup, options = {})
|
|
509
529
|
opts = options.dup
|
|
@@ -523,7 +543,7 @@ module XeroRuby
|
|
|
523
543
|
fail ArgumentError, "Missing the required parameter 'employee_leave_setup' when calling PayrollNzApi.create_employee_leave_setup"
|
|
524
544
|
end
|
|
525
545
|
# resource path
|
|
526
|
-
local_var_path = '/Employees/{EmployeeID}/
|
|
546
|
+
local_var_path = '/Employees/{EmployeeID}/LeaveSetup'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
527
547
|
|
|
528
548
|
# camelize keys of incoming `where` opts
|
|
529
549
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
@@ -542,6 +562,7 @@ module XeroRuby
|
|
|
542
562
|
# HTTP header 'Content-Type'
|
|
543
563
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
544
564
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
565
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
545
566
|
|
|
546
567
|
# form parameters
|
|
547
568
|
form_params = opts[:form_params] || {}
|
|
@@ -576,6 +597,7 @@ module XeroRuby
|
|
|
576
597
|
# @param employee_id [String] Employee id for single object
|
|
577
598
|
# @param employee_leave_type [EmployeeLeaveType]
|
|
578
599
|
# @param [Hash] opts the optional parameters
|
|
600
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
579
601
|
# @return [EmployeeLeaveTypeObject]
|
|
580
602
|
def create_employee_leave_type(xero_tenant_id, employee_id, employee_leave_type, opts = {})
|
|
581
603
|
data, _status_code, _headers = create_employee_leave_type_with_http_info(xero_tenant_id, employee_id, employee_leave_type, opts)
|
|
@@ -587,6 +609,7 @@ module XeroRuby
|
|
|
587
609
|
# @param employee_id [String] Employee id for single object
|
|
588
610
|
# @param employee_leave_type [EmployeeLeaveType]
|
|
589
611
|
# @param [Hash] opts the optional parameters
|
|
612
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
590
613
|
# @return [Array<(EmployeeLeaveTypeObject, Integer, Hash)>] EmployeeLeaveTypeObject data, response status code and response headers
|
|
591
614
|
def create_employee_leave_type_with_http_info(xero_tenant_id, employee_id, employee_leave_type, options = {})
|
|
592
615
|
opts = options.dup
|
|
@@ -625,6 +648,7 @@ module XeroRuby
|
|
|
625
648
|
# HTTP header 'Content-Type'
|
|
626
649
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
627
650
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
651
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
628
652
|
|
|
629
653
|
# form parameters
|
|
630
654
|
form_params = opts[:form_params] || {}
|
|
@@ -659,6 +683,7 @@ module XeroRuby
|
|
|
659
683
|
# @param employee_id [String] Employee id for single object
|
|
660
684
|
# @param employee_opening_balance [Array<EmployeeOpeningBalance>]
|
|
661
685
|
# @param [Hash] opts the optional parameters
|
|
686
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
662
687
|
# @return [EmployeeOpeningBalancesObject]
|
|
663
688
|
def create_employee_opening_balances(xero_tenant_id, employee_id, employee_opening_balance, opts = {})
|
|
664
689
|
data, _status_code, _headers = create_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balance, opts)
|
|
@@ -670,6 +695,7 @@ module XeroRuby
|
|
|
670
695
|
# @param employee_id [String] Employee id for single object
|
|
671
696
|
# @param employee_opening_balance [Array<EmployeeOpeningBalance>]
|
|
672
697
|
# @param [Hash] opts the optional parameters
|
|
698
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
673
699
|
# @return [Array<(EmployeeOpeningBalancesObject, Integer, Hash)>] EmployeeOpeningBalancesObject data, response status code and response headers
|
|
674
700
|
def create_employee_opening_balances_with_http_info(xero_tenant_id, employee_id, employee_opening_balance, options = {})
|
|
675
701
|
opts = options.dup
|
|
@@ -689,7 +715,7 @@ module XeroRuby
|
|
|
689
715
|
fail ArgumentError, "Missing the required parameter 'employee_opening_balance' when calling PayrollNzApi.create_employee_opening_balances"
|
|
690
716
|
end
|
|
691
717
|
# resource path
|
|
692
|
-
local_var_path = '/Employees/{EmployeeID}/
|
|
718
|
+
local_var_path = '/Employees/{EmployeeID}/OpeningBalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
693
719
|
|
|
694
720
|
# camelize keys of incoming `where` opts
|
|
695
721
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
@@ -708,6 +734,7 @@ module XeroRuby
|
|
|
708
734
|
# HTTP header 'Content-Type'
|
|
709
735
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
710
736
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
737
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
711
738
|
|
|
712
739
|
# form parameters
|
|
713
740
|
form_params = opts[:form_params] || {}
|
|
@@ -742,6 +769,7 @@ module XeroRuby
|
|
|
742
769
|
# @param employee_id [String] Employee id for single object
|
|
743
770
|
# @param payment_method [PaymentMethod]
|
|
744
771
|
# @param [Hash] opts the optional parameters
|
|
772
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
745
773
|
# @return [PaymentMethodObject]
|
|
746
774
|
def create_employee_payment_method(xero_tenant_id, employee_id, payment_method, opts = {})
|
|
747
775
|
data, _status_code, _headers = create_employee_payment_method_with_http_info(xero_tenant_id, employee_id, payment_method, opts)
|
|
@@ -753,6 +781,7 @@ module XeroRuby
|
|
|
753
781
|
# @param employee_id [String] Employee id for single object
|
|
754
782
|
# @param payment_method [PaymentMethod]
|
|
755
783
|
# @param [Hash] opts the optional parameters
|
|
784
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
756
785
|
# @return [Array<(PaymentMethodObject, Integer, Hash)>] PaymentMethodObject data, response status code and response headers
|
|
757
786
|
def create_employee_payment_method_with_http_info(xero_tenant_id, employee_id, payment_method, options = {})
|
|
758
787
|
opts = options.dup
|
|
@@ -791,6 +820,7 @@ module XeroRuby
|
|
|
791
820
|
# HTTP header 'Content-Type'
|
|
792
821
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
793
822
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
823
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
794
824
|
|
|
795
825
|
# form parameters
|
|
796
826
|
form_params = opts[:form_params] || {}
|
|
@@ -825,6 +855,7 @@ module XeroRuby
|
|
|
825
855
|
# @param employee_id [String] Employee id for single object
|
|
826
856
|
# @param salary_and_wage [SalaryAndWage]
|
|
827
857
|
# @param [Hash] opts the optional parameters
|
|
858
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
828
859
|
# @return [SalaryAndWageObject]
|
|
829
860
|
def create_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wage, opts = {})
|
|
830
861
|
data, _status_code, _headers = create_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wage, opts)
|
|
@@ -836,6 +867,7 @@ module XeroRuby
|
|
|
836
867
|
# @param employee_id [String] Employee id for single object
|
|
837
868
|
# @param salary_and_wage [SalaryAndWage]
|
|
838
869
|
# @param [Hash] opts the optional parameters
|
|
870
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
839
871
|
# @return [Array<(SalaryAndWageObject, Integer, Hash)>] SalaryAndWageObject data, response status code and response headers
|
|
840
872
|
def create_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wage, options = {})
|
|
841
873
|
opts = options.dup
|
|
@@ -874,6 +906,7 @@ module XeroRuby
|
|
|
874
906
|
# HTTP header 'Content-Type'
|
|
875
907
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
876
908
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
909
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
877
910
|
|
|
878
911
|
# form parameters
|
|
879
912
|
form_params = opts[:form_params] || {}
|
|
@@ -903,11 +936,98 @@ module XeroRuby
|
|
|
903
936
|
return data, status_code, headers
|
|
904
937
|
end
|
|
905
938
|
|
|
939
|
+
# Creates an employee working pattern
|
|
940
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
941
|
+
# @param employee_id [String] Employee id for single object
|
|
942
|
+
# @param employee_working_pattern_with_working_weeks_request [EmployeeWorkingPatternWithWorkingWeeksRequest]
|
|
943
|
+
# @param [Hash] opts the optional parameters
|
|
944
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
945
|
+
# @return [EmployeeWorkingPatternWithWorkingWeeksObject]
|
|
946
|
+
def create_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, opts = {})
|
|
947
|
+
data, _status_code, _headers = create_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, opts)
|
|
948
|
+
data
|
|
949
|
+
end
|
|
950
|
+
|
|
951
|
+
# Creates an employee working pattern
|
|
952
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
953
|
+
# @param employee_id [String] Employee id for single object
|
|
954
|
+
# @param employee_working_pattern_with_working_weeks_request [EmployeeWorkingPatternWithWorkingWeeksRequest]
|
|
955
|
+
# @param [Hash] opts the optional parameters
|
|
956
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
957
|
+
# @return [Array<(EmployeeWorkingPatternWithWorkingWeeksObject, Integer, Hash)>] EmployeeWorkingPatternWithWorkingWeeksObject data, response status code and response headers
|
|
958
|
+
def create_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, options = {})
|
|
959
|
+
opts = options.dup
|
|
960
|
+
if @api_client.config.debugging
|
|
961
|
+
@api_client.config.logger.debug 'Calling API: PayrollNzApi.create_employee_working_pattern ...'
|
|
962
|
+
end
|
|
963
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
964
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
965
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.create_employee_working_pattern"
|
|
966
|
+
end
|
|
967
|
+
# verify the required parameter 'employee_id' is set
|
|
968
|
+
if @api_client.config.client_side_validation && employee_id.nil?
|
|
969
|
+
fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.create_employee_working_pattern"
|
|
970
|
+
end
|
|
971
|
+
# verify the required parameter 'employee_working_pattern_with_working_weeks_request' is set
|
|
972
|
+
if @api_client.config.client_side_validation && employee_working_pattern_with_working_weeks_request.nil?
|
|
973
|
+
fail ArgumentError, "Missing the required parameter 'employee_working_pattern_with_working_weeks_request' when calling PayrollNzApi.create_employee_working_pattern"
|
|
974
|
+
end
|
|
975
|
+
# resource path
|
|
976
|
+
local_var_path = '/Employees/{EmployeeID}/Working-Patterns'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
977
|
+
|
|
978
|
+
# camelize keys of incoming `where` opts
|
|
979
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
980
|
+
|
|
981
|
+
# query parameters
|
|
982
|
+
query_params = opts[:query_params] || {}
|
|
983
|
+
|
|
984
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
985
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
986
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
987
|
+
|
|
988
|
+
# header parameters
|
|
989
|
+
header_params = opts[:header_params] || {}
|
|
990
|
+
# HTTP header 'Accept' (if needed)
|
|
991
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
992
|
+
# HTTP header 'Content-Type'
|
|
993
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
994
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
995
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
996
|
+
|
|
997
|
+
# form parameters
|
|
998
|
+
form_params = opts[:form_params] || {}
|
|
999
|
+
|
|
1000
|
+
# http body (model)
|
|
1001
|
+
post_body = opts[:body] || @api_client.object_to_http_body(employee_working_pattern_with_working_weeks_request)
|
|
1002
|
+
|
|
1003
|
+
# return_type
|
|
1004
|
+
return_type = opts[:return_type] || 'EmployeeWorkingPatternWithWorkingWeeksObject'
|
|
1005
|
+
|
|
1006
|
+
# auth_names
|
|
1007
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
1008
|
+
|
|
1009
|
+
new_options = opts.merge(
|
|
1010
|
+
:header_params => header_params,
|
|
1011
|
+
:query_params => query_params,
|
|
1012
|
+
:form_params => form_params,
|
|
1013
|
+
:body => post_body,
|
|
1014
|
+
:auth_names => auth_names,
|
|
1015
|
+
:return_type => return_type
|
|
1016
|
+
)
|
|
1017
|
+
|
|
1018
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollNzApi", new_options)
|
|
1019
|
+
if @api_client.config.debugging
|
|
1020
|
+
@api_client.config.logger.debug "API called: PayrollNzApi#create_employee_working_pattern\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1021
|
+
end
|
|
1022
|
+
return data, status_code, headers
|
|
1023
|
+
end
|
|
1024
|
+
|
|
906
1025
|
# Creates an employment detail for a specific employee
|
|
907
1026
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
908
1027
|
# @param employee_id [String] Employee id for single object
|
|
909
1028
|
# @param employment [Employment]
|
|
910
1029
|
# @param [Hash] opts the optional parameters
|
|
1030
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
911
1031
|
# @return [EmploymentObject]
|
|
912
1032
|
def create_employment(xero_tenant_id, employee_id, employment, opts = {})
|
|
913
1033
|
data, _status_code, _headers = create_employment_with_http_info(xero_tenant_id, employee_id, employment, opts)
|
|
@@ -919,6 +1039,7 @@ module XeroRuby
|
|
|
919
1039
|
# @param employee_id [String] Employee id for single object
|
|
920
1040
|
# @param employment [Employment]
|
|
921
1041
|
# @param [Hash] opts the optional parameters
|
|
1042
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
922
1043
|
# @return [Array<(EmploymentObject, Integer, Hash)>] EmploymentObject data, response status code and response headers
|
|
923
1044
|
def create_employment_with_http_info(xero_tenant_id, employee_id, employment, options = {})
|
|
924
1045
|
opts = options.dup
|
|
@@ -957,6 +1078,7 @@ module XeroRuby
|
|
|
957
1078
|
# HTTP header 'Content-Type'
|
|
958
1079
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
959
1080
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1081
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
960
1082
|
|
|
961
1083
|
# form parameters
|
|
962
1084
|
form_params = opts[:form_params] || {}
|
|
@@ -990,6 +1112,7 @@ module XeroRuby
|
|
|
990
1112
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
991
1113
|
# @param leave_type [LeaveType]
|
|
992
1114
|
# @param [Hash] opts the optional parameters
|
|
1115
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
993
1116
|
# @return [LeaveTypeObject]
|
|
994
1117
|
def create_leave_type(xero_tenant_id, leave_type, opts = {})
|
|
995
1118
|
data, _status_code, _headers = create_leave_type_with_http_info(xero_tenant_id, leave_type, opts)
|
|
@@ -1000,6 +1123,7 @@ module XeroRuby
|
|
|
1000
1123
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1001
1124
|
# @param leave_type [LeaveType]
|
|
1002
1125
|
# @param [Hash] opts the optional parameters
|
|
1126
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1003
1127
|
# @return [Array<(LeaveTypeObject, Integer, Hash)>] LeaveTypeObject data, response status code and response headers
|
|
1004
1128
|
def create_leave_type_with_http_info(xero_tenant_id, leave_type, options = {})
|
|
1005
1129
|
opts = options.dup
|
|
@@ -1034,6 +1158,7 @@ module XeroRuby
|
|
|
1034
1158
|
# HTTP header 'Content-Type'
|
|
1035
1159
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1036
1160
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1161
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1037
1162
|
|
|
1038
1163
|
# form parameters
|
|
1039
1164
|
form_params = opts[:form_params] || {}
|
|
@@ -1068,6 +1193,7 @@ module XeroRuby
|
|
|
1068
1193
|
# @param employee_id [String] Employee id for single object
|
|
1069
1194
|
# @param earnings_template [Array<EarningsTemplate>]
|
|
1070
1195
|
# @param [Hash] opts the optional parameters
|
|
1196
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1071
1197
|
# @return [EmployeeEarningsTemplates]
|
|
1072
1198
|
def create_multiple_employee_earnings_template(xero_tenant_id, employee_id, earnings_template, opts = {})
|
|
1073
1199
|
data, _status_code, _headers = create_multiple_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, opts)
|
|
@@ -1079,6 +1205,7 @@ module XeroRuby
|
|
|
1079
1205
|
# @param employee_id [String] Employee id for single object
|
|
1080
1206
|
# @param earnings_template [Array<EarningsTemplate>]
|
|
1081
1207
|
# @param [Hash] opts the optional parameters
|
|
1208
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1082
1209
|
# @return [Array<(EmployeeEarningsTemplates, Integer, Hash)>] EmployeeEarningsTemplates data, response status code and response headers
|
|
1083
1210
|
def create_multiple_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, earnings_template, options = {})
|
|
1084
1211
|
opts = options.dup
|
|
@@ -1098,7 +1225,7 @@ module XeroRuby
|
|
|
1098
1225
|
fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollNzApi.create_multiple_employee_earnings_template"
|
|
1099
1226
|
end
|
|
1100
1227
|
# resource path
|
|
1101
|
-
local_var_path = '/Employees/{EmployeeID}/
|
|
1228
|
+
local_var_path = '/Employees/{EmployeeID}/PayTemplateEarnings'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
1102
1229
|
|
|
1103
1230
|
# camelize keys of incoming `where` opts
|
|
1104
1231
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
@@ -1117,6 +1244,7 @@ module XeroRuby
|
|
|
1117
1244
|
# HTTP header 'Content-Type'
|
|
1118
1245
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1119
1246
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1247
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1120
1248
|
|
|
1121
1249
|
# form parameters
|
|
1122
1250
|
form_params = opts[:form_params] || {}
|
|
@@ -1150,6 +1278,7 @@ module XeroRuby
|
|
|
1150
1278
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1151
1279
|
# @param pay_run [PayRun]
|
|
1152
1280
|
# @param [Hash] opts the optional parameters
|
|
1281
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1153
1282
|
# @return [PayRunObject]
|
|
1154
1283
|
def create_pay_run(xero_tenant_id, pay_run, opts = {})
|
|
1155
1284
|
data, _status_code, _headers = create_pay_run_with_http_info(xero_tenant_id, pay_run, opts)
|
|
@@ -1160,6 +1289,7 @@ module XeroRuby
|
|
|
1160
1289
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1161
1290
|
# @param pay_run [PayRun]
|
|
1162
1291
|
# @param [Hash] opts the optional parameters
|
|
1292
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1163
1293
|
# @return [Array<(PayRunObject, Integer, Hash)>] PayRunObject data, response status code and response headers
|
|
1164
1294
|
def create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {})
|
|
1165
1295
|
opts = options.dup
|
|
@@ -1194,6 +1324,7 @@ module XeroRuby
|
|
|
1194
1324
|
# HTTP header 'Content-Type'
|
|
1195
1325
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1196
1326
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1327
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1197
1328
|
|
|
1198
1329
|
# form parameters
|
|
1199
1330
|
form_params = opts[:form_params] || {}
|
|
@@ -1227,6 +1358,7 @@ module XeroRuby
|
|
|
1227
1358
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1228
1359
|
# @param pay_run_calendar [PayRunCalendar]
|
|
1229
1360
|
# @param [Hash] opts the optional parameters
|
|
1361
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1230
1362
|
# @return [PayRunCalendarObject]
|
|
1231
1363
|
def create_pay_run_calendar(xero_tenant_id, pay_run_calendar, opts = {})
|
|
1232
1364
|
data, _status_code, _headers = create_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar, opts)
|
|
@@ -1237,6 +1369,7 @@ module XeroRuby
|
|
|
1237
1369
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1238
1370
|
# @param pay_run_calendar [PayRunCalendar]
|
|
1239
1371
|
# @param [Hash] opts the optional parameters
|
|
1372
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1240
1373
|
# @return [Array<(PayRunCalendarObject, Integer, Hash)>] PayRunCalendarObject data, response status code and response headers
|
|
1241
1374
|
def create_pay_run_calendar_with_http_info(xero_tenant_id, pay_run_calendar, options = {})
|
|
1242
1375
|
opts = options.dup
|
|
@@ -1271,6 +1404,7 @@ module XeroRuby
|
|
|
1271
1404
|
# HTTP header 'Content-Type'
|
|
1272
1405
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1273
1406
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1407
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1274
1408
|
|
|
1275
1409
|
# form parameters
|
|
1276
1410
|
form_params = opts[:form_params] || {}
|
|
@@ -1304,6 +1438,7 @@ module XeroRuby
|
|
|
1304
1438
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1305
1439
|
# @param reimbursement [Reimbursement]
|
|
1306
1440
|
# @param [Hash] opts the optional parameters
|
|
1441
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1307
1442
|
# @return [ReimbursementObject]
|
|
1308
1443
|
def create_reimbursement(xero_tenant_id, reimbursement, opts = {})
|
|
1309
1444
|
data, _status_code, _headers = create_reimbursement_with_http_info(xero_tenant_id, reimbursement, opts)
|
|
@@ -1314,6 +1449,7 @@ module XeroRuby
|
|
|
1314
1449
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1315
1450
|
# @param reimbursement [Reimbursement]
|
|
1316
1451
|
# @param [Hash] opts the optional parameters
|
|
1452
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1317
1453
|
# @return [Array<(ReimbursementObject, Integer, Hash)>] ReimbursementObject data, response status code and response headers
|
|
1318
1454
|
def create_reimbursement_with_http_info(xero_tenant_id, reimbursement, options = {})
|
|
1319
1455
|
opts = options.dup
|
|
@@ -1348,6 +1484,7 @@ module XeroRuby
|
|
|
1348
1484
|
# HTTP header 'Content-Type'
|
|
1349
1485
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1350
1486
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1487
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1351
1488
|
|
|
1352
1489
|
# form parameters
|
|
1353
1490
|
form_params = opts[:form_params] || {}
|
|
@@ -1381,6 +1518,7 @@ module XeroRuby
|
|
|
1381
1518
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1382
1519
|
# @param benefit [Benefit]
|
|
1383
1520
|
# @param [Hash] opts the optional parameters
|
|
1521
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1384
1522
|
# @return [SuperannuationObject]
|
|
1385
1523
|
def create_superannuation(xero_tenant_id, benefit, opts = {})
|
|
1386
1524
|
data, _status_code, _headers = create_superannuation_with_http_info(xero_tenant_id, benefit, opts)
|
|
@@ -1391,6 +1529,7 @@ module XeroRuby
|
|
|
1391
1529
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1392
1530
|
# @param benefit [Benefit]
|
|
1393
1531
|
# @param [Hash] opts the optional parameters
|
|
1532
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1394
1533
|
# @return [Array<(SuperannuationObject, Integer, Hash)>] SuperannuationObject data, response status code and response headers
|
|
1395
1534
|
def create_superannuation_with_http_info(xero_tenant_id, benefit, options = {})
|
|
1396
1535
|
opts = options.dup
|
|
@@ -1425,6 +1564,7 @@ module XeroRuby
|
|
|
1425
1564
|
# HTTP header 'Content-Type'
|
|
1426
1565
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1427
1566
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1567
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1428
1568
|
|
|
1429
1569
|
# form parameters
|
|
1430
1570
|
form_params = opts[:form_params] || {}
|
|
@@ -1458,6 +1598,7 @@ module XeroRuby
|
|
|
1458
1598
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1459
1599
|
# @param timesheet [Timesheet]
|
|
1460
1600
|
# @param [Hash] opts the optional parameters
|
|
1601
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1461
1602
|
# @return [TimesheetObject]
|
|
1462
1603
|
def create_timesheet(xero_tenant_id, timesheet, opts = {})
|
|
1463
1604
|
data, _status_code, _headers = create_timesheet_with_http_info(xero_tenant_id, timesheet, opts)
|
|
@@ -1468,6 +1609,7 @@ module XeroRuby
|
|
|
1468
1609
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1469
1610
|
# @param timesheet [Timesheet]
|
|
1470
1611
|
# @param [Hash] opts the optional parameters
|
|
1612
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1471
1613
|
# @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers
|
|
1472
1614
|
def create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {})
|
|
1473
1615
|
opts = options.dup
|
|
@@ -1502,6 +1644,7 @@ module XeroRuby
|
|
|
1502
1644
|
# HTTP header 'Content-Type'
|
|
1503
1645
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1504
1646
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1647
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1505
1648
|
|
|
1506
1649
|
# form parameters
|
|
1507
1650
|
form_params = opts[:form_params] || {}
|
|
@@ -1536,6 +1679,7 @@ module XeroRuby
|
|
|
1536
1679
|
# @param timesheet_id [String] Identifier for the timesheet
|
|
1537
1680
|
# @param timesheet_line [TimesheetLine]
|
|
1538
1681
|
# @param [Hash] opts the optional parameters
|
|
1682
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1539
1683
|
# @return [TimesheetLineObject]
|
|
1540
1684
|
def create_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line, opts = {})
|
|
1541
1685
|
data, _status_code, _headers = create_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line, opts)
|
|
@@ -1547,6 +1691,7 @@ module XeroRuby
|
|
|
1547
1691
|
# @param timesheet_id [String] Identifier for the timesheet
|
|
1548
1692
|
# @param timesheet_line [TimesheetLine]
|
|
1549
1693
|
# @param [Hash] opts the optional parameters
|
|
1694
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
1550
1695
|
# @return [Array<(TimesheetLineObject, Integer, Hash)>] TimesheetLineObject data, response status code and response headers
|
|
1551
1696
|
def create_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line, options = {})
|
|
1552
1697
|
opts = options.dup
|
|
@@ -1585,6 +1730,7 @@ module XeroRuby
|
|
|
1585
1730
|
# HTTP header 'Content-Type'
|
|
1586
1731
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1587
1732
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
1733
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1588
1734
|
|
|
1589
1735
|
# form parameters
|
|
1590
1736
|
form_params = opts[:form_params] || {}
|
|
@@ -1649,7 +1795,7 @@ module XeroRuby
|
|
|
1649
1795
|
fail ArgumentError, "Missing the required parameter 'pay_template_earning_id' when calling PayrollNzApi.delete_employee_earnings_template"
|
|
1650
1796
|
end
|
|
1651
1797
|
# resource path
|
|
1652
|
-
local_var_path = '/Employees/{EmployeeID}/PayTemplates/
|
|
1798
|
+
local_var_path = '/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)
|
|
1653
1799
|
|
|
1654
1800
|
# camelize keys of incoming `where` opts
|
|
1655
1801
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
@@ -1857,6 +2003,87 @@ module XeroRuby
|
|
|
1857
2003
|
return data, status_code, headers
|
|
1858
2004
|
end
|
|
1859
2005
|
|
|
2006
|
+
# deletes employee's working patterns
|
|
2007
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
2008
|
+
# @param employee_id [String] Employee id for single object
|
|
2009
|
+
# @param employee_working_pattern_id [String] Employee working pattern id for single object
|
|
2010
|
+
# @param [Hash] opts the optional parameters
|
|
2011
|
+
# @return [EmployeeLeaveObject]
|
|
2012
|
+
def delete_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id, opts = {})
|
|
2013
|
+
data, _status_code, _headers = delete_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, opts)
|
|
2014
|
+
data
|
|
2015
|
+
end
|
|
2016
|
+
|
|
2017
|
+
# deletes employee's working patterns
|
|
2018
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
2019
|
+
# @param employee_id [String] Employee id for single object
|
|
2020
|
+
# @param employee_working_pattern_id [String] Employee working pattern id for single object
|
|
2021
|
+
# @param [Hash] opts the optional parameters
|
|
2022
|
+
# @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers
|
|
2023
|
+
def delete_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, options = {})
|
|
2024
|
+
opts = options.dup
|
|
2025
|
+
if @api_client.config.debugging
|
|
2026
|
+
@api_client.config.logger.debug 'Calling API: PayrollNzApi.delete_employee_working_pattern ...'
|
|
2027
|
+
end
|
|
2028
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
2029
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
2030
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.delete_employee_working_pattern"
|
|
2031
|
+
end
|
|
2032
|
+
# verify the required parameter 'employee_id' is set
|
|
2033
|
+
if @api_client.config.client_side_validation && employee_id.nil?
|
|
2034
|
+
fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.delete_employee_working_pattern"
|
|
2035
|
+
end
|
|
2036
|
+
# verify the required parameter 'employee_working_pattern_id' is set
|
|
2037
|
+
if @api_client.config.client_side_validation && employee_working_pattern_id.nil?
|
|
2038
|
+
fail ArgumentError, "Missing the required parameter 'employee_working_pattern_id' when calling PayrollNzApi.delete_employee_working_pattern"
|
|
2039
|
+
end
|
|
2040
|
+
# resource path
|
|
2041
|
+
local_var_path = '/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'EmployeeWorkingPatternID' + '}', employee_working_pattern_id.to_s)
|
|
2042
|
+
|
|
2043
|
+
# camelize keys of incoming `where` opts
|
|
2044
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
2045
|
+
|
|
2046
|
+
# query parameters
|
|
2047
|
+
query_params = opts[:query_params] || {}
|
|
2048
|
+
|
|
2049
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
2050
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
2051
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
2052
|
+
|
|
2053
|
+
# header parameters
|
|
2054
|
+
header_params = opts[:header_params] || {}
|
|
2055
|
+
# HTTP header 'Accept' (if needed)
|
|
2056
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2057
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
2058
|
+
|
|
2059
|
+
# form parameters
|
|
2060
|
+
form_params = opts[:form_params] || {}
|
|
2061
|
+
|
|
2062
|
+
# http body (model)
|
|
2063
|
+
post_body = opts[:body]
|
|
2064
|
+
|
|
2065
|
+
# return_type
|
|
2066
|
+
return_type = opts[:return_type] || 'EmployeeLeaveObject'
|
|
2067
|
+
|
|
2068
|
+
# auth_names
|
|
2069
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
2070
|
+
|
|
2071
|
+
new_options = opts.merge(
|
|
2072
|
+
:header_params => header_params,
|
|
2073
|
+
:query_params => query_params,
|
|
2074
|
+
:form_params => form_params,
|
|
2075
|
+
:body => post_body,
|
|
2076
|
+
:auth_names => auth_names,
|
|
2077
|
+
:return_type => return_type
|
|
2078
|
+
)
|
|
2079
|
+
|
|
2080
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "PayrollNzApi", new_options)
|
|
2081
|
+
if @api_client.config.debugging
|
|
2082
|
+
@api_client.config.logger.debug "API called: PayrollNzApi#delete_employee_working_pattern\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2083
|
+
end
|
|
2084
|
+
return data, status_code, headers
|
|
2085
|
+
end
|
|
2086
|
+
|
|
1860
2087
|
# Deletes a timesheet
|
|
1861
2088
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
1862
2089
|
# @param timesheet_id [String] Identifier for the timesheet
|
|
@@ -2717,7 +2944,7 @@ module XeroRuby
|
|
|
2717
2944
|
fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.get_employee_opening_balances"
|
|
2718
2945
|
end
|
|
2719
2946
|
# resource path
|
|
2720
|
-
local_var_path = '/Employees/{EmployeeID}/
|
|
2947
|
+
local_var_path = '/Employees/{EmployeeID}/OpeningBalances'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
2721
2948
|
|
|
2722
2949
|
# camelize keys of incoming `where` opts
|
|
2723
2950
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
@@ -3147,6 +3374,162 @@ module XeroRuby
|
|
|
3147
3374
|
return data, status_code, headers
|
|
3148
3375
|
end
|
|
3149
3376
|
|
|
3377
|
+
# Retrieves employee's working patterns
|
|
3378
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
3379
|
+
# @param employee_id [String] Employee id for single object
|
|
3380
|
+
# @param employee_working_pattern_id [String] Employee working pattern id for single object
|
|
3381
|
+
# @param [Hash] opts the optional parameters
|
|
3382
|
+
# @return [EmployeeWorkingPatternWithWorkingWeeksObject]
|
|
3383
|
+
def get_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id, opts = {})
|
|
3384
|
+
data, _status_code, _headers = get_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, opts)
|
|
3385
|
+
data
|
|
3386
|
+
end
|
|
3387
|
+
|
|
3388
|
+
# Retrieves employee's working patterns
|
|
3389
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
3390
|
+
# @param employee_id [String] Employee id for single object
|
|
3391
|
+
# @param employee_working_pattern_id [String] Employee working pattern id for single object
|
|
3392
|
+
# @param [Hash] opts the optional parameters
|
|
3393
|
+
# @return [Array<(EmployeeWorkingPatternWithWorkingWeeksObject, Integer, Hash)>] EmployeeWorkingPatternWithWorkingWeeksObject data, response status code and response headers
|
|
3394
|
+
def get_employee_working_pattern_with_http_info(xero_tenant_id, employee_id, employee_working_pattern_id, options = {})
|
|
3395
|
+
opts = options.dup
|
|
3396
|
+
if @api_client.config.debugging
|
|
3397
|
+
@api_client.config.logger.debug 'Calling API: PayrollNzApi.get_employee_working_pattern ...'
|
|
3398
|
+
end
|
|
3399
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
3400
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
3401
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.get_employee_working_pattern"
|
|
3402
|
+
end
|
|
3403
|
+
# verify the required parameter 'employee_id' is set
|
|
3404
|
+
if @api_client.config.client_side_validation && employee_id.nil?
|
|
3405
|
+
fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.get_employee_working_pattern"
|
|
3406
|
+
end
|
|
3407
|
+
# verify the required parameter 'employee_working_pattern_id' is set
|
|
3408
|
+
if @api_client.config.client_side_validation && employee_working_pattern_id.nil?
|
|
3409
|
+
fail ArgumentError, "Missing the required parameter 'employee_working_pattern_id' when calling PayrollNzApi.get_employee_working_pattern"
|
|
3410
|
+
end
|
|
3411
|
+
# resource path
|
|
3412
|
+
local_var_path = '/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'EmployeeWorkingPatternID' + '}', employee_working_pattern_id.to_s)
|
|
3413
|
+
|
|
3414
|
+
# camelize keys of incoming `where` opts
|
|
3415
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
3416
|
+
|
|
3417
|
+
# query parameters
|
|
3418
|
+
query_params = opts[:query_params] || {}
|
|
3419
|
+
|
|
3420
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
3421
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
3422
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
3423
|
+
|
|
3424
|
+
# header parameters
|
|
3425
|
+
header_params = opts[:header_params] || {}
|
|
3426
|
+
# HTTP header 'Accept' (if needed)
|
|
3427
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3428
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
3429
|
+
|
|
3430
|
+
# form parameters
|
|
3431
|
+
form_params = opts[:form_params] || {}
|
|
3432
|
+
|
|
3433
|
+
# http body (model)
|
|
3434
|
+
post_body = opts[:body]
|
|
3435
|
+
|
|
3436
|
+
# return_type
|
|
3437
|
+
return_type = opts[:return_type] || 'EmployeeWorkingPatternWithWorkingWeeksObject'
|
|
3438
|
+
|
|
3439
|
+
# auth_names
|
|
3440
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
3441
|
+
|
|
3442
|
+
new_options = opts.merge(
|
|
3443
|
+
:header_params => header_params,
|
|
3444
|
+
:query_params => query_params,
|
|
3445
|
+
:form_params => form_params,
|
|
3446
|
+
:body => post_body,
|
|
3447
|
+
:auth_names => auth_names,
|
|
3448
|
+
:return_type => return_type
|
|
3449
|
+
)
|
|
3450
|
+
|
|
3451
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollNzApi", new_options)
|
|
3452
|
+
if @api_client.config.debugging
|
|
3453
|
+
@api_client.config.logger.debug "API called: PayrollNzApi#get_employee_working_pattern\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3454
|
+
end
|
|
3455
|
+
return data, status_code, headers
|
|
3456
|
+
end
|
|
3457
|
+
|
|
3458
|
+
# Retrieves employee's working patterns
|
|
3459
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
3460
|
+
# @param employee_id [String] Employee id for single object
|
|
3461
|
+
# @param [Hash] opts the optional parameters
|
|
3462
|
+
# @return [EmployeeWorkingPatternsObject]
|
|
3463
|
+
def get_employee_working_patterns(xero_tenant_id, employee_id, opts = {})
|
|
3464
|
+
data, _status_code, _headers = get_employee_working_patterns_with_http_info(xero_tenant_id, employee_id, opts)
|
|
3465
|
+
data
|
|
3466
|
+
end
|
|
3467
|
+
|
|
3468
|
+
# Retrieves employee's working patterns
|
|
3469
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
3470
|
+
# @param employee_id [String] Employee id for single object
|
|
3471
|
+
# @param [Hash] opts the optional parameters
|
|
3472
|
+
# @return [Array<(EmployeeWorkingPatternsObject, Integer, Hash)>] EmployeeWorkingPatternsObject data, response status code and response headers
|
|
3473
|
+
def get_employee_working_patterns_with_http_info(xero_tenant_id, employee_id, options = {})
|
|
3474
|
+
opts = options.dup
|
|
3475
|
+
if @api_client.config.debugging
|
|
3476
|
+
@api_client.config.logger.debug 'Calling API: PayrollNzApi.get_employee_working_patterns ...'
|
|
3477
|
+
end
|
|
3478
|
+
# verify the required parameter 'xero_tenant_id' is set
|
|
3479
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
|
3480
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.get_employee_working_patterns"
|
|
3481
|
+
end
|
|
3482
|
+
# verify the required parameter 'employee_id' is set
|
|
3483
|
+
if @api_client.config.client_side_validation && employee_id.nil?
|
|
3484
|
+
fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollNzApi.get_employee_working_patterns"
|
|
3485
|
+
end
|
|
3486
|
+
# resource path
|
|
3487
|
+
local_var_path = '/Employees/{EmployeeID}/Working-Patterns'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
|
3488
|
+
|
|
3489
|
+
# camelize keys of incoming `where` opts
|
|
3490
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
3491
|
+
|
|
3492
|
+
# query parameters
|
|
3493
|
+
query_params = opts[:query_params] || {}
|
|
3494
|
+
|
|
3495
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
|
3496
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
|
3497
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
|
3498
|
+
|
|
3499
|
+
# header parameters
|
|
3500
|
+
header_params = opts[:header_params] || {}
|
|
3501
|
+
# HTTP header 'Accept' (if needed)
|
|
3502
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3503
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
3504
|
+
|
|
3505
|
+
# form parameters
|
|
3506
|
+
form_params = opts[:form_params] || {}
|
|
3507
|
+
|
|
3508
|
+
# http body (model)
|
|
3509
|
+
post_body = opts[:body]
|
|
3510
|
+
|
|
3511
|
+
# return_type
|
|
3512
|
+
return_type = opts[:return_type] || 'EmployeeWorkingPatternsObject'
|
|
3513
|
+
|
|
3514
|
+
# auth_names
|
|
3515
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
|
3516
|
+
|
|
3517
|
+
new_options = opts.merge(
|
|
3518
|
+
:header_params => header_params,
|
|
3519
|
+
:query_params => query_params,
|
|
3520
|
+
:form_params => form_params,
|
|
3521
|
+
:body => post_body,
|
|
3522
|
+
:auth_names => auth_names,
|
|
3523
|
+
:return_type => return_type
|
|
3524
|
+
)
|
|
3525
|
+
|
|
3526
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollNzApi", new_options)
|
|
3527
|
+
if @api_client.config.debugging
|
|
3528
|
+
@api_client.config.logger.debug "API called: PayrollNzApi#get_employee_working_patterns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3529
|
+
end
|
|
3530
|
+
return data, status_code, headers
|
|
3531
|
+
end
|
|
3532
|
+
|
|
3150
3533
|
# Retrieves employees
|
|
3151
3534
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
3152
3535
|
# @param [Hash] opts the optional parameters
|
|
@@ -4572,6 +4955,7 @@ module XeroRuby
|
|
|
4572
4955
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
4573
4956
|
# @param timesheet_id [String] Identifier for the timesheet
|
|
4574
4957
|
# @param [Hash] opts the optional parameters
|
|
4958
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4575
4959
|
# @return [TimesheetObject]
|
|
4576
4960
|
def revert_timesheet(xero_tenant_id, timesheet_id, opts = {})
|
|
4577
4961
|
data, _status_code, _headers = revert_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
|
|
@@ -4582,6 +4966,7 @@ module XeroRuby
|
|
|
4582
4966
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
|
4583
4967
|
# @param timesheet_id [String] Identifier for the timesheet
|
|
4584
4968
|
# @param [Hash] opts the optional parameters
|
|
4969
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4585
4970
|
# @return [Array<(TimesheetObject, Integer, Hash)>] TimesheetObject data, response status code and response headers
|
|
4586
4971
|
def revert_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
|
|
4587
4972
|
opts = options.dup
|
|
@@ -4614,6 +4999,7 @@ module XeroRuby
|
|
|
4614
4999
|
# HTTP header 'Accept' (if needed)
|
|
4615
5000
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4616
5001
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5002
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4617
5003
|
|
|
4618
5004
|
# form parameters
|
|
4619
5005
|
form_params = opts[:form_params] || {}
|
|
@@ -4648,6 +5034,7 @@ module XeroRuby
|
|
|
4648
5034
|
# @param employee_id [String] Employee id for single object
|
|
4649
5035
|
# @param employee [Employee]
|
|
4650
5036
|
# @param [Hash] opts the optional parameters
|
|
5037
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4651
5038
|
# @return [EmployeeObject]
|
|
4652
5039
|
def update_employee(xero_tenant_id, employee_id, employee, opts = {})
|
|
4653
5040
|
data, _status_code, _headers = update_employee_with_http_info(xero_tenant_id, employee_id, employee, opts)
|
|
@@ -4659,6 +5046,7 @@ module XeroRuby
|
|
|
4659
5046
|
# @param employee_id [String] Employee id for single object
|
|
4660
5047
|
# @param employee [Employee]
|
|
4661
5048
|
# @param [Hash] opts the optional parameters
|
|
5049
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4662
5050
|
# @return [Array<(EmployeeObject, Integer, Hash)>] EmployeeObject data, response status code and response headers
|
|
4663
5051
|
def update_employee_with_http_info(xero_tenant_id, employee_id, employee, options = {})
|
|
4664
5052
|
opts = options.dup
|
|
@@ -4697,6 +5085,7 @@ module XeroRuby
|
|
|
4697
5085
|
# HTTP header 'Content-Type'
|
|
4698
5086
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
4699
5087
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5088
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4700
5089
|
|
|
4701
5090
|
# form parameters
|
|
4702
5091
|
form_params = opts[:form_params] || {}
|
|
@@ -4732,6 +5121,7 @@ module XeroRuby
|
|
|
4732
5121
|
# @param pay_template_earning_id [String] Id for single pay template earnings object
|
|
4733
5122
|
# @param earnings_template [EarningsTemplate]
|
|
4734
5123
|
# @param [Hash] opts the optional parameters
|
|
5124
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4735
5125
|
# @return [EarningsTemplateObject]
|
|
4736
5126
|
def update_employee_earnings_template(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, opts = {})
|
|
4737
5127
|
data, _status_code, _headers = update_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, opts)
|
|
@@ -4744,6 +5134,7 @@ module XeroRuby
|
|
|
4744
5134
|
# @param pay_template_earning_id [String] Id for single pay template earnings object
|
|
4745
5135
|
# @param earnings_template [EarningsTemplate]
|
|
4746
5136
|
# @param [Hash] opts the optional parameters
|
|
5137
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4747
5138
|
# @return [Array<(EarningsTemplateObject, Integer, Hash)>] EarningsTemplateObject data, response status code and response headers
|
|
4748
5139
|
def update_employee_earnings_template_with_http_info(xero_tenant_id, employee_id, pay_template_earning_id, earnings_template, options = {})
|
|
4749
5140
|
opts = options.dup
|
|
@@ -4767,7 +5158,7 @@ module XeroRuby
|
|
|
4767
5158
|
fail ArgumentError, "Missing the required parameter 'earnings_template' when calling PayrollNzApi.update_employee_earnings_template"
|
|
4768
5159
|
end
|
|
4769
5160
|
# resource path
|
|
4770
|
-
local_var_path = '/Employees/{EmployeeID}/PayTemplates/
|
|
5161
|
+
local_var_path = '/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s).sub('{' + 'PayTemplateEarningID' + '}', pay_template_earning_id.to_s)
|
|
4771
5162
|
|
|
4772
5163
|
# camelize keys of incoming `where` opts
|
|
4773
5164
|
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
|
@@ -4786,6 +5177,7 @@ module XeroRuby
|
|
|
4786
5177
|
# HTTP header 'Content-Type'
|
|
4787
5178
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
4788
5179
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5180
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4789
5181
|
|
|
4790
5182
|
# form parameters
|
|
4791
5183
|
form_params = opts[:form_params] || {}
|
|
@@ -4821,6 +5213,7 @@ module XeroRuby
|
|
|
4821
5213
|
# @param leave_id [String] Leave id for single object
|
|
4822
5214
|
# @param employee_leave [EmployeeLeave]
|
|
4823
5215
|
# @param [Hash] opts the optional parameters
|
|
5216
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4824
5217
|
# @return [EmployeeLeaveObject]
|
|
4825
5218
|
def update_employee_leave(xero_tenant_id, employee_id, leave_id, employee_leave, opts = {})
|
|
4826
5219
|
data, _status_code, _headers = update_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, employee_leave, opts)
|
|
@@ -4833,6 +5226,7 @@ module XeroRuby
|
|
|
4833
5226
|
# @param leave_id [String] Leave id for single object
|
|
4834
5227
|
# @param employee_leave [EmployeeLeave]
|
|
4835
5228
|
# @param [Hash] opts the optional parameters
|
|
5229
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4836
5230
|
# @return [Array<(EmployeeLeaveObject, Integer, Hash)>] EmployeeLeaveObject data, response status code and response headers
|
|
4837
5231
|
def update_employee_leave_with_http_info(xero_tenant_id, employee_id, leave_id, employee_leave, options = {})
|
|
4838
5232
|
opts = options.dup
|
|
@@ -4875,6 +5269,7 @@ module XeroRuby
|
|
|
4875
5269
|
# HTTP header 'Content-Type'
|
|
4876
5270
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
4877
5271
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5272
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4878
5273
|
|
|
4879
5274
|
# form parameters
|
|
4880
5275
|
form_params = opts[:form_params] || {}
|
|
@@ -4910,6 +5305,7 @@ module XeroRuby
|
|
|
4910
5305
|
# @param salary_and_wages_id [String] Id for single pay template earnings object
|
|
4911
5306
|
# @param salary_and_wage [SalaryAndWage]
|
|
4912
5307
|
# @param [Hash] opts the optional parameters
|
|
5308
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4913
5309
|
# @return [SalaryAndWageObject]
|
|
4914
5310
|
def update_employee_salary_and_wage(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, opts = {})
|
|
4915
5311
|
data, _status_code, _headers = update_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, opts)
|
|
@@ -4922,6 +5318,7 @@ module XeroRuby
|
|
|
4922
5318
|
# @param salary_and_wages_id [String] Id for single pay template earnings object
|
|
4923
5319
|
# @param salary_and_wage [SalaryAndWage]
|
|
4924
5320
|
# @param [Hash] opts the optional parameters
|
|
5321
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
4925
5322
|
# @return [Array<(SalaryAndWageObject, Integer, Hash)>] SalaryAndWageObject data, response status code and response headers
|
|
4926
5323
|
def update_employee_salary_and_wage_with_http_info(xero_tenant_id, employee_id, salary_and_wages_id, salary_and_wage, options = {})
|
|
4927
5324
|
opts = options.dup
|
|
@@ -4964,6 +5361,7 @@ module XeroRuby
|
|
|
4964
5361
|
# HTTP header 'Content-Type'
|
|
4965
5362
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
4966
5363
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5364
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4967
5365
|
|
|
4968
5366
|
# form parameters
|
|
4969
5367
|
form_params = opts[:form_params] || {}
|
|
@@ -4998,6 +5396,7 @@ module XeroRuby
|
|
|
4998
5396
|
# @param employee_id [String] Employee id for single object
|
|
4999
5397
|
# @param employee_tax [EmployeeTax]
|
|
5000
5398
|
# @param [Hash] opts the optional parameters
|
|
5399
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5001
5400
|
# @return [EmployeeTaxObject]
|
|
5002
5401
|
def update_employee_tax(xero_tenant_id, employee_id, employee_tax, opts = {})
|
|
5003
5402
|
data, _status_code, _headers = update_employee_tax_with_http_info(xero_tenant_id, employee_id, employee_tax, opts)
|
|
@@ -5009,6 +5408,7 @@ module XeroRuby
|
|
|
5009
5408
|
# @param employee_id [String] Employee id for single object
|
|
5010
5409
|
# @param employee_tax [EmployeeTax]
|
|
5011
5410
|
# @param [Hash] opts the optional parameters
|
|
5411
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5012
5412
|
# @return [Array<(EmployeeTaxObject, Integer, Hash)>] EmployeeTaxObject data, response status code and response headers
|
|
5013
5413
|
def update_employee_tax_with_http_info(xero_tenant_id, employee_id, employee_tax, options = {})
|
|
5014
5414
|
opts = options.dup
|
|
@@ -5047,6 +5447,7 @@ module XeroRuby
|
|
|
5047
5447
|
# HTTP header 'Content-Type'
|
|
5048
5448
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
5049
5449
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5450
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
5050
5451
|
|
|
5051
5452
|
# form parameters
|
|
5052
5453
|
form_params = opts[:form_params] || {}
|
|
@@ -5081,6 +5482,7 @@ module XeroRuby
|
|
|
5081
5482
|
# @param pay_run_id [String] Identifier for the pay run
|
|
5082
5483
|
# @param pay_run [PayRun]
|
|
5083
5484
|
# @param [Hash] opts the optional parameters
|
|
5485
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5084
5486
|
# @return [PayRunObject]
|
|
5085
5487
|
def update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts = {})
|
|
5086
5488
|
data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, opts)
|
|
@@ -5092,6 +5494,7 @@ module XeroRuby
|
|
|
5092
5494
|
# @param pay_run_id [String] Identifier for the pay run
|
|
5093
5495
|
# @param pay_run [PayRun]
|
|
5094
5496
|
# @param [Hash] opts the optional parameters
|
|
5497
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5095
5498
|
# @return [Array<(PayRunObject, Integer, Hash)>] PayRunObject data, response status code and response headers
|
|
5096
5499
|
def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, options = {})
|
|
5097
5500
|
opts = options.dup
|
|
@@ -5130,6 +5533,7 @@ module XeroRuby
|
|
|
5130
5533
|
# HTTP header 'Content-Type'
|
|
5131
5534
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
5132
5535
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5536
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
5133
5537
|
|
|
5134
5538
|
# form parameters
|
|
5135
5539
|
form_params = opts[:form_params] || {}
|
|
@@ -5164,6 +5568,7 @@ module XeroRuby
|
|
|
5164
5568
|
# @param pay_slip_id [String] Identifier for the payslip
|
|
5165
5569
|
# @param pay_slip [PaySlip]
|
|
5166
5570
|
# @param [Hash] opts the optional parameters
|
|
5571
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5167
5572
|
# @return [PaySlipObject]
|
|
5168
5573
|
def update_pay_slip_line_items(xero_tenant_id, pay_slip_id, pay_slip, opts = {})
|
|
5169
5574
|
data, _status_code, _headers = update_pay_slip_line_items_with_http_info(xero_tenant_id, pay_slip_id, pay_slip, opts)
|
|
@@ -5175,6 +5580,7 @@ module XeroRuby
|
|
|
5175
5580
|
# @param pay_slip_id [String] Identifier for the payslip
|
|
5176
5581
|
# @param pay_slip [PaySlip]
|
|
5177
5582
|
# @param [Hash] opts the optional parameters
|
|
5583
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5178
5584
|
# @return [Array<(PaySlipObject, Integer, Hash)>] PaySlipObject data, response status code and response headers
|
|
5179
5585
|
def update_pay_slip_line_items_with_http_info(xero_tenant_id, pay_slip_id, pay_slip, options = {})
|
|
5180
5586
|
opts = options.dup
|
|
@@ -5213,6 +5619,7 @@ module XeroRuby
|
|
|
5213
5619
|
# HTTP header 'Content-Type'
|
|
5214
5620
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
5215
5621
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5622
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
5216
5623
|
|
|
5217
5624
|
# form parameters
|
|
5218
5625
|
form_params = opts[:form_params] || {}
|
|
@@ -5248,6 +5655,7 @@ module XeroRuby
|
|
|
5248
5655
|
# @param timesheet_line_id [String] Identifier for the timesheet line
|
|
5249
5656
|
# @param timesheet_line [TimesheetLine]
|
|
5250
5657
|
# @param [Hash] opts the optional parameters
|
|
5658
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5251
5659
|
# @return [TimesheetLineObject]
|
|
5252
5660
|
def update_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, opts = {})
|
|
5253
5661
|
data, _status_code, _headers = update_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, opts)
|
|
@@ -5260,6 +5668,7 @@ module XeroRuby
|
|
|
5260
5668
|
# @param timesheet_line_id [String] Identifier for the timesheet line
|
|
5261
5669
|
# @param timesheet_line [TimesheetLine]
|
|
5262
5670
|
# @param [Hash] opts the optional parameters
|
|
5671
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
|
5263
5672
|
# @return [Array<(TimesheetLineObject, Integer, Hash)>] TimesheetLineObject data, response status code and response headers
|
|
5264
5673
|
def update_timesheet_line_with_http_info(xero_tenant_id, timesheet_id, timesheet_line_id, timesheet_line, options = {})
|
|
5265
5674
|
opts = options.dup
|
|
@@ -5302,6 +5711,7 @@ module XeroRuby
|
|
|
5302
5711
|
# HTTP header 'Content-Type'
|
|
5303
5712
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
5304
5713
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
|
5714
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
5305
5715
|
|
|
5306
5716
|
# form parameters
|
|
5307
5717
|
form_params = opts[:form_params] || {}
|