xero-ruby 3.9.0 → 7.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/README.md +2 -2
- data/lib/xero-ruby/api/accounting_api.rb +1136 -46
- data/lib/xero-ruby/api/app_store_api.rb +244 -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 +87 -0
- data/lib/xero-ruby/api/payroll_uk_api.rb +81 -0
- data/lib/xero-ruby/api/project_api.rb +286 -2
- data/lib/xero-ruby/api_client.rb +9 -3
- data/lib/xero-ruby/models/accounting/account.rb +1 -1
- 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/batch_payment.rb +2 -2
- data/lib/xero-ruby/models/accounting/batch_payment_delete.rb +244 -0
- data/lib/xero-ruby/models/accounting/batch_payment_delete_by_url_param.rb +229 -0
- data/lib/xero-ruby/models/accounting/contact.rb +1 -11
- data/lib/xero-ruby/models/accounting/currency_code.rb +10 -8
- data/lib/xero-ruby/models/accounting/journal_line.rb +1 -1
- data/lib/xero-ruby/models/accounting/line_item.rb +2 -2
- data/lib/xero-ruby/models/accounting/organisation.rb +6 -2
- data/lib/xero-ruby/models/accounting/payment.rb +26 -4
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +53 -5
- data/lib/xero-ruby/models/accounting/tax_rate.rb +23 -5
- data/lib/xero-ruby/models/accounting/tax_type.rb +60 -3
- data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +75 -4
- data/lib/xero-ruby/models/accounting/time_zone.rb +123 -91
- data/lib/xero-ruby/models/app_store/create_usage_record.rb +243 -0
- data/lib/xero-ruby/models/app_store/update_usage_record.rb +228 -0
- data/lib/xero-ruby/models/app_store/usage_record.rb +332 -0
- data/lib/xero-ruby/models/app_store/usage_records_list.rb +230 -0
- data/lib/xero-ruby/models/files/association.rb +31 -1
- 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 +284 -0
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +21 -1
- data/lib/xero-ruby/models/payroll_au/earnings_type.rb +2 -0
- data/lib/xero-ruby/models/payroll_au/employee.rb +42 -2
- data/lib/xero-ruby/models/payroll_au/employment_basis.rb +1 -0
- data/lib/xero-ruby/models/payroll_au/employment_type.rb +36 -0
- data/lib/xero-ruby/models/payroll_au/income_type.rb +39 -0
- data/lib/xero-ruby/models/payroll_au/leave_application.rb +11 -1
- data/lib/xero-ruby/models/payroll_au/leave_category_code.rb +46 -0
- 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/leave_type.rb +24 -4
- 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_au/senior_marital_status.rb +37 -0
- data/lib/xero-ruby/models/payroll_au/settings.rb +14 -4
- data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +51 -1
- data/lib/xero-ruby/models/payroll_au/tax_scale_type.rb +40 -0
- data/lib/xero-ruby/models/payroll_au/work_condition.rb +37 -0
- data/lib/xero-ruby/models/payroll_nz/employee.rb +14 -4
- data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -3
- data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
- data/lib/xero-ruby/models/projects/task.rb +6 -6
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +1 -1
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby/where.rb +2 -0
- data/lib/xero-ruby.rb +15 -0
- metadata +30 -15
@@ -16,10 +16,89 @@ module XeroRuby
|
|
16
16
|
def initialize(api_client = ApiClient.new)
|
17
17
|
@api_client = api_client
|
18
18
|
end
|
19
|
+
# Approve a requested leave application by a unique leave application id
|
20
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
21
|
+
# @param leave_application_id [String] Leave Application id for single object
|
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.
|
24
|
+
# @return [LeaveApplications]
|
25
|
+
def approve_leave_application(xero_tenant_id, leave_application_id, opts = {})
|
26
|
+
data, _status_code, _headers = approve_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Approve a requested leave application by a unique leave application id
|
31
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
32
|
+
# @param leave_application_id [String] Leave Application id for single object
|
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.
|
35
|
+
# @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
36
|
+
def approve_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
|
37
|
+
opts = options.dup
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: PayrollAuApi.approve_leave_application ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'xero_tenant_id' is set
|
42
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.approve_leave_application"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'leave_application_id' is set
|
46
|
+
if @api_client.config.client_side_validation && leave_application_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.approve_leave_application"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/LeaveApplications/{LeaveApplicationID}/approve'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
|
51
|
+
|
52
|
+
# camelize keys of incoming `where` opts
|
53
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = opts[:query_params] || {}
|
57
|
+
|
58
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
59
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
60
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
61
|
+
|
62
|
+
# header parameters
|
63
|
+
header_params = opts[:header_params] || {}
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
66
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
67
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
68
|
+
|
69
|
+
# form parameters
|
70
|
+
form_params = opts[:form_params] || {}
|
71
|
+
|
72
|
+
# http body (model)
|
73
|
+
post_body = opts[:body]
|
74
|
+
|
75
|
+
# return_type
|
76
|
+
return_type = opts[:return_type] || 'LeaveApplications'
|
77
|
+
|
78
|
+
# auth_names
|
79
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
80
|
+
|
81
|
+
new_options = opts.merge(
|
82
|
+
:header_params => header_params,
|
83
|
+
:query_params => query_params,
|
84
|
+
:form_params => form_params,
|
85
|
+
:body => post_body,
|
86
|
+
:auth_names => auth_names,
|
87
|
+
:return_type => return_type
|
88
|
+
)
|
89
|
+
|
90
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug "API called: PayrollAuApi#approve_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
|
+
end
|
94
|
+
return data, status_code, headers
|
95
|
+
end
|
96
|
+
|
19
97
|
# Creates a payroll employee
|
20
98
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
21
99
|
# @param employee [Array<Employee>]
|
22
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.
|
23
102
|
# @return [Employees]
|
24
103
|
def create_employee(xero_tenant_id, employee, opts = {})
|
25
104
|
data, _status_code, _headers = create_employee_with_http_info(xero_tenant_id, employee, opts)
|
@@ -30,6 +109,7 @@ module XeroRuby
|
|
30
109
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
31
110
|
# @param employee [Array<Employee>]
|
32
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.
|
33
113
|
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
34
114
|
def create_employee_with_http_info(xero_tenant_id, employee, options = {})
|
35
115
|
opts = options.dup
|
@@ -64,6 +144,7 @@ module XeroRuby
|
|
64
144
|
# HTTP header 'Content-Type'
|
65
145
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
66
146
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
147
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
67
148
|
|
68
149
|
# form parameters
|
69
150
|
form_params = opts[:form_params] || {}
|
@@ -97,6 +178,7 @@ module XeroRuby
|
|
97
178
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
98
179
|
# @param leave_application [Array<LeaveApplication>]
|
99
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.
|
100
182
|
# @return [LeaveApplications]
|
101
183
|
def create_leave_application(xero_tenant_id, leave_application, opts = {})
|
102
184
|
data, _status_code, _headers = create_leave_application_with_http_info(xero_tenant_id, leave_application, opts)
|
@@ -107,6 +189,7 @@ module XeroRuby
|
|
107
189
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
108
190
|
# @param leave_application [Array<LeaveApplication>]
|
109
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.
|
110
193
|
# @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
111
194
|
def create_leave_application_with_http_info(xero_tenant_id, leave_application, options = {})
|
112
195
|
opts = options.dup
|
@@ -141,6 +224,7 @@ module XeroRuby
|
|
141
224
|
# HTTP header 'Content-Type'
|
142
225
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
143
226
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
227
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
144
228
|
|
145
229
|
# form parameters
|
146
230
|
form_params = opts[:form_params] || {}
|
@@ -174,6 +258,7 @@ module XeroRuby
|
|
174
258
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
175
259
|
# @param pay_item [PayItem]
|
176
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.
|
177
262
|
# @return [PayItems]
|
178
263
|
def create_pay_item(xero_tenant_id, pay_item, opts = {})
|
179
264
|
data, _status_code, _headers = create_pay_item_with_http_info(xero_tenant_id, pay_item, opts)
|
@@ -184,6 +269,7 @@ module XeroRuby
|
|
184
269
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
185
270
|
# @param pay_item [PayItem]
|
186
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.
|
187
273
|
# @return [Array<(PayItems, Integer, Hash)>] PayItems data, response status code and response headers
|
188
274
|
def create_pay_item_with_http_info(xero_tenant_id, pay_item, options = {})
|
189
275
|
opts = options.dup
|
@@ -218,6 +304,7 @@ module XeroRuby
|
|
218
304
|
# HTTP header 'Content-Type'
|
219
305
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
220
306
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
307
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
221
308
|
|
222
309
|
# form parameters
|
223
310
|
form_params = opts[:form_params] || {}
|
@@ -251,6 +338,7 @@ module XeroRuby
|
|
251
338
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
252
339
|
# @param pay_run [Array<PayRun>]
|
253
340
|
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
254
342
|
# @return [PayRuns]
|
255
343
|
def create_pay_run(xero_tenant_id, pay_run, opts = {})
|
256
344
|
data, _status_code, _headers = create_pay_run_with_http_info(xero_tenant_id, pay_run, opts)
|
@@ -261,6 +349,7 @@ module XeroRuby
|
|
261
349
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
262
350
|
# @param pay_run [Array<PayRun>]
|
263
351
|
# @param [Hash] opts the optional parameters
|
352
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
264
353
|
# @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
|
265
354
|
def create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {})
|
266
355
|
opts = options.dup
|
@@ -295,6 +384,7 @@ module XeroRuby
|
|
295
384
|
# HTTP header 'Content-Type'
|
296
385
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
297
386
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
387
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
298
388
|
|
299
389
|
# form parameters
|
300
390
|
form_params = opts[:form_params] || {}
|
@@ -328,6 +418,7 @@ module XeroRuby
|
|
328
418
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
329
419
|
# @param payroll_calendar [Array<PayrollCalendar>]
|
330
420
|
# @param [Hash] opts the optional parameters
|
421
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
331
422
|
# @return [PayrollCalendars]
|
332
423
|
def create_payroll_calendar(xero_tenant_id, payroll_calendar, opts = {})
|
333
424
|
data, _status_code, _headers = create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, opts)
|
@@ -338,6 +429,7 @@ module XeroRuby
|
|
338
429
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
339
430
|
# @param payroll_calendar [Array<PayrollCalendar>]
|
340
431
|
# @param [Hash] opts the optional parameters
|
432
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
341
433
|
# @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
|
342
434
|
def create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, options = {})
|
343
435
|
opts = options.dup
|
@@ -372,6 +464,7 @@ module XeroRuby
|
|
372
464
|
# HTTP header 'Content-Type'
|
373
465
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
374
466
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
467
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
375
468
|
|
376
469
|
# form parameters
|
377
470
|
form_params = opts[:form_params] || {}
|
@@ -405,6 +498,7 @@ module XeroRuby
|
|
405
498
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
406
499
|
# @param super_fund [Array<SuperFund>]
|
407
500
|
# @param [Hash] opts the optional parameters
|
501
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
408
502
|
# @return [SuperFunds]
|
409
503
|
def create_superfund(xero_tenant_id, super_fund, opts = {})
|
410
504
|
data, _status_code, _headers = create_superfund_with_http_info(xero_tenant_id, super_fund, opts)
|
@@ -415,6 +509,7 @@ module XeroRuby
|
|
415
509
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
416
510
|
# @param super_fund [Array<SuperFund>]
|
417
511
|
# @param [Hash] opts the optional parameters
|
512
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
418
513
|
# @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
|
419
514
|
def create_superfund_with_http_info(xero_tenant_id, super_fund, options = {})
|
420
515
|
opts = options.dup
|
@@ -449,6 +544,7 @@ module XeroRuby
|
|
449
544
|
# HTTP header 'Content-Type'
|
450
545
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
451
546
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
547
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
452
548
|
|
453
549
|
# form parameters
|
454
550
|
form_params = opts[:form_params] || {}
|
@@ -482,6 +578,7 @@ module XeroRuby
|
|
482
578
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
483
579
|
# @param timesheet [Array<Timesheet>]
|
484
580
|
# @param [Hash] opts the optional parameters
|
581
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
485
582
|
# @return [Timesheets]
|
486
583
|
def create_timesheet(xero_tenant_id, timesheet, opts = {})
|
487
584
|
data, _status_code, _headers = create_timesheet_with_http_info(xero_tenant_id, timesheet, opts)
|
@@ -492,6 +589,7 @@ module XeroRuby
|
|
492
589
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
493
590
|
# @param timesheet [Array<Timesheet>]
|
494
591
|
# @param [Hash] opts the optional parameters
|
592
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
495
593
|
# @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
|
496
594
|
def create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {})
|
497
595
|
opts = options.dup
|
@@ -526,6 +624,7 @@ module XeroRuby
|
|
526
624
|
# HTTP header 'Content-Type'
|
527
625
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
528
626
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
627
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
529
628
|
|
530
629
|
# form parameters
|
531
630
|
form_params = opts[:form_params] || {}
|
@@ -867,6 +966,87 @@ module XeroRuby
|
|
867
966
|
return data, status_code, headers
|
868
967
|
end
|
869
968
|
|
969
|
+
# Retrieves leave applications including leave requests
|
970
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
971
|
+
# @param [Hash] opts the optional parameters
|
972
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
973
|
+
# @option opts [String] :where Filter by an any element
|
974
|
+
# @option opts [String] :order Order by an any element
|
975
|
+
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
976
|
+
# @return [LeaveApplications]
|
977
|
+
def get_leave_applications_v2(xero_tenant_id, opts = {})
|
978
|
+
data, _status_code, _headers = get_leave_applications_v2_with_http_info(xero_tenant_id, opts)
|
979
|
+
data
|
980
|
+
end
|
981
|
+
|
982
|
+
# Retrieves leave applications including leave requests
|
983
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
984
|
+
# @param [Hash] opts the optional parameters
|
985
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
986
|
+
# @option opts [String] :where Filter by an any element
|
987
|
+
# @option opts [String] :order Order by an any element
|
988
|
+
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
989
|
+
# @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
990
|
+
def get_leave_applications_v2_with_http_info(xero_tenant_id, options = {})
|
991
|
+
opts = options.dup
|
992
|
+
if @api_client.config.debugging
|
993
|
+
@api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_applications_v2 ...'
|
994
|
+
end
|
995
|
+
# verify the required parameter 'xero_tenant_id' is set
|
996
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
997
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_applications_v2"
|
998
|
+
end
|
999
|
+
# resource path
|
1000
|
+
local_var_path = '/LeaveApplications/v2'
|
1001
|
+
|
1002
|
+
# camelize keys of incoming `where` opts
|
1003
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
1004
|
+
|
1005
|
+
# query parameters
|
1006
|
+
query_params = opts[:query_params] || {}
|
1007
|
+
query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
|
1008
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
1009
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1010
|
+
|
1011
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
1012
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
1013
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
1014
|
+
|
1015
|
+
# header parameters
|
1016
|
+
header_params = opts[:header_params] || {}
|
1017
|
+
# HTTP header 'Accept' (if needed)
|
1018
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1019
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
1020
|
+
header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?
|
1021
|
+
|
1022
|
+
# form parameters
|
1023
|
+
form_params = opts[:form_params] || {}
|
1024
|
+
|
1025
|
+
# http body (model)
|
1026
|
+
post_body = opts[:body]
|
1027
|
+
|
1028
|
+
# return_type
|
1029
|
+
return_type = opts[:return_type] || 'LeaveApplications'
|
1030
|
+
|
1031
|
+
# auth_names
|
1032
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
1033
|
+
|
1034
|
+
new_options = opts.merge(
|
1035
|
+
:header_params => header_params,
|
1036
|
+
:query_params => query_params,
|
1037
|
+
:form_params => form_params,
|
1038
|
+
:body => post_body,
|
1039
|
+
:auth_names => auth_names,
|
1040
|
+
:return_type => return_type
|
1041
|
+
)
|
1042
|
+
|
1043
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
|
1044
|
+
if @api_client.config.debugging
|
1045
|
+
@api_client.config.logger.debug "API called: PayrollAuApi#get_leave_applications_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1046
|
+
end
|
1047
|
+
return data, status_code, headers
|
1048
|
+
end
|
1049
|
+
|
870
1050
|
# Retrieves pay items
|
871
1051
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
872
1052
|
# @param [Hash] opts the optional parameters
|
@@ -1791,15 +1971,94 @@ module XeroRuby
|
|
1791
1971
|
return data, status_code, headers
|
1792
1972
|
end
|
1793
1973
|
|
1974
|
+
# Reject a leave application by a unique leave application id
|
1975
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1976
|
+
# @param leave_application_id [String] Leave Application id for single object
|
1977
|
+
# @param [Hash] opts the optional parameters
|
1978
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1979
|
+
# @return [LeaveApplications]
|
1980
|
+
def reject_leave_application(xero_tenant_id, leave_application_id, opts = {})
|
1981
|
+
data, _status_code, _headers = reject_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
|
1982
|
+
data
|
1983
|
+
end
|
1984
|
+
|
1985
|
+
# Reject a leave application by a unique leave application id
|
1986
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1987
|
+
# @param leave_application_id [String] Leave Application id for single object
|
1988
|
+
# @param [Hash] opts the optional parameters
|
1989
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1990
|
+
# @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
1991
|
+
def reject_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
|
1992
|
+
opts = options.dup
|
1993
|
+
if @api_client.config.debugging
|
1994
|
+
@api_client.config.logger.debug 'Calling API: PayrollAuApi.reject_leave_application ...'
|
1995
|
+
end
|
1996
|
+
# verify the required parameter 'xero_tenant_id' is set
|
1997
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
1998
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.reject_leave_application"
|
1999
|
+
end
|
2000
|
+
# verify the required parameter 'leave_application_id' is set
|
2001
|
+
if @api_client.config.client_side_validation && leave_application_id.nil?
|
2002
|
+
fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.reject_leave_application"
|
2003
|
+
end
|
2004
|
+
# resource path
|
2005
|
+
local_var_path = '/LeaveApplications/{LeaveApplicationID}/reject'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)
|
2006
|
+
|
2007
|
+
# camelize keys of incoming `where` opts
|
2008
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
2009
|
+
|
2010
|
+
# query parameters
|
2011
|
+
query_params = opts[:query_params] || {}
|
2012
|
+
|
2013
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
2014
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
2015
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
2016
|
+
|
2017
|
+
# header parameters
|
2018
|
+
header_params = opts[:header_params] || {}
|
2019
|
+
# HTTP header 'Accept' (if needed)
|
2020
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2021
|
+
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2022
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2023
|
+
|
2024
|
+
# form parameters
|
2025
|
+
form_params = opts[:form_params] || {}
|
2026
|
+
|
2027
|
+
# http body (model)
|
2028
|
+
post_body = opts[:body]
|
2029
|
+
|
2030
|
+
# return_type
|
2031
|
+
return_type = opts[:return_type] || 'LeaveApplications'
|
2032
|
+
|
2033
|
+
# auth_names
|
2034
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
2035
|
+
|
2036
|
+
new_options = opts.merge(
|
2037
|
+
:header_params => header_params,
|
2038
|
+
:query_params => query_params,
|
2039
|
+
:form_params => form_params,
|
2040
|
+
:body => post_body,
|
2041
|
+
:auth_names => auth_names,
|
2042
|
+
:return_type => return_type
|
2043
|
+
)
|
2044
|
+
|
2045
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
|
2046
|
+
if @api_client.config.debugging
|
2047
|
+
@api_client.config.logger.debug "API called: PayrollAuApi#reject_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2048
|
+
end
|
2049
|
+
return data, status_code, headers
|
2050
|
+
end
|
2051
|
+
|
1794
2052
|
# Updates an employee's detail
|
1795
2053
|
# Update properties on a single employee
|
1796
2054
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1797
2055
|
# @param employee_id [String] Employee id for single object
|
2056
|
+
# @param employee [Array<Employee>]
|
1798
2057
|
# @param [Hash] opts the optional parameters
|
1799
|
-
# @option opts [
|
2058
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1800
2059
|
# @return [Employees]
|
1801
|
-
def update_employee(xero_tenant_id, employee_id, opts = {})
|
1802
|
-
data, _status_code, _headers = update_employee_with_http_info(xero_tenant_id, employee_id, opts)
|
2060
|
+
def update_employee(xero_tenant_id, employee_id, employee, opts = {})
|
2061
|
+
data, _status_code, _headers = update_employee_with_http_info(xero_tenant_id, employee_id, employee, opts)
|
1803
2062
|
data
|
1804
2063
|
end
|
1805
2064
|
|
@@ -1807,10 +2066,11 @@ module XeroRuby
|
|
1807
2066
|
# Update properties on a single employee
|
1808
2067
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1809
2068
|
# @param employee_id [String] Employee id for single object
|
2069
|
+
# @param employee [Array<Employee>]
|
1810
2070
|
# @param [Hash] opts the optional parameters
|
1811
|
-
# @option opts [
|
2071
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1812
2072
|
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
1813
|
-
def update_employee_with_http_info(xero_tenant_id, employee_id, options = {})
|
2073
|
+
def update_employee_with_http_info(xero_tenant_id, employee_id, employee, options = {})
|
1814
2074
|
opts = options.dup
|
1815
2075
|
if @api_client.config.debugging
|
1816
2076
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_employee ...'
|
@@ -1823,6 +2083,10 @@ module XeroRuby
|
|
1823
2083
|
if @api_client.config.client_side_validation && employee_id.nil?
|
1824
2084
|
fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.update_employee"
|
1825
2085
|
end
|
2086
|
+
# verify the required parameter 'employee' is set
|
2087
|
+
if @api_client.config.client_side_validation && employee.nil?
|
2088
|
+
fail ArgumentError, "Missing the required parameter 'employee' when calling PayrollAuApi.update_employee"
|
2089
|
+
end
|
1826
2090
|
# resource path
|
1827
2091
|
local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
1828
2092
|
|
@@ -1843,12 +2107,13 @@ module XeroRuby
|
|
1843
2107
|
# HTTP header 'Content-Type'
|
1844
2108
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1845
2109
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2110
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
1846
2111
|
|
1847
2112
|
# form parameters
|
1848
2113
|
form_params = opts[:form_params] || {}
|
1849
2114
|
|
1850
2115
|
# http body (model)
|
1851
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2116
|
+
post_body = opts[:body] || @api_client.object_to_http_body(employee)
|
1852
2117
|
|
1853
2118
|
# return_type
|
1854
2119
|
return_type = opts[:return_type] || 'Employees'
|
@@ -1877,6 +2142,7 @@ module XeroRuby
|
|
1877
2142
|
# @param leave_application_id [String] Leave Application id for single object
|
1878
2143
|
# @param leave_application [Array<LeaveApplication>]
|
1879
2144
|
# @param [Hash] opts the optional parameters
|
2145
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1880
2146
|
# @return [LeaveApplications]
|
1881
2147
|
def update_leave_application(xero_tenant_id, leave_application_id, leave_application, opts = {})
|
1882
2148
|
data, _status_code, _headers = update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, opts)
|
@@ -1888,6 +2154,7 @@ module XeroRuby
|
|
1888
2154
|
# @param leave_application_id [String] Leave Application id for single object
|
1889
2155
|
# @param leave_application [Array<LeaveApplication>]
|
1890
2156
|
# @param [Hash] opts the optional parameters
|
2157
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1891
2158
|
# @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
1892
2159
|
def update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, options = {})
|
1893
2160
|
opts = options.dup
|
@@ -1926,6 +2193,7 @@ module XeroRuby
|
|
1926
2193
|
# HTTP header 'Content-Type'
|
1927
2194
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1928
2195
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2196
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
1929
2197
|
|
1930
2198
|
# form parameters
|
1931
2199
|
form_params = opts[:form_params] || {}
|
@@ -1959,11 +2227,12 @@ module XeroRuby
|
|
1959
2227
|
# Update properties on a single PayRun
|
1960
2228
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1961
2229
|
# @param pay_run_id [String] PayRun id for single object
|
2230
|
+
# @param pay_run [Array<PayRun>]
|
1962
2231
|
# @param [Hash] opts the optional parameters
|
1963
|
-
# @option opts [
|
2232
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1964
2233
|
# @return [PayRuns]
|
1965
|
-
def update_pay_run(xero_tenant_id, pay_run_id, opts = {})
|
1966
|
-
data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
|
2234
|
+
def update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts = {})
|
2235
|
+
data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, opts)
|
1967
2236
|
data
|
1968
2237
|
end
|
1969
2238
|
|
@@ -1971,10 +2240,11 @@ module XeroRuby
|
|
1971
2240
|
# Update properties on a single PayRun
|
1972
2241
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1973
2242
|
# @param pay_run_id [String] PayRun id for single object
|
2243
|
+
# @param pay_run [Array<PayRun>]
|
1974
2244
|
# @param [Hash] opts the optional parameters
|
1975
|
-
# @option opts [
|
2245
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
1976
2246
|
# @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
|
1977
|
-
def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
|
2247
|
+
def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, options = {})
|
1978
2248
|
opts = options.dup
|
1979
2249
|
if @api_client.config.debugging
|
1980
2250
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_pay_run ...'
|
@@ -1987,6 +2257,10 @@ module XeroRuby
|
|
1987
2257
|
if @api_client.config.client_side_validation && pay_run_id.nil?
|
1988
2258
|
fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.update_pay_run"
|
1989
2259
|
end
|
2260
|
+
# verify the required parameter 'pay_run' is set
|
2261
|
+
if @api_client.config.client_side_validation && pay_run.nil?
|
2262
|
+
fail ArgumentError, "Missing the required parameter 'pay_run' when calling PayrollAuApi.update_pay_run"
|
2263
|
+
end
|
1990
2264
|
# resource path
|
1991
2265
|
local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
|
1992
2266
|
|
@@ -2007,12 +2281,13 @@ module XeroRuby
|
|
2007
2281
|
# HTTP header 'Content-Type'
|
2008
2282
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2009
2283
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2284
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2010
2285
|
|
2011
2286
|
# form parameters
|
2012
2287
|
form_params = opts[:form_params] || {}
|
2013
2288
|
|
2014
2289
|
# http body (model)
|
2015
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2290
|
+
post_body = opts[:body] || @api_client.object_to_http_body(pay_run)
|
2016
2291
|
|
2017
2292
|
# return_type
|
2018
2293
|
return_type = opts[:return_type] || 'PayRuns'
|
@@ -2040,11 +2315,12 @@ module XeroRuby
|
|
2040
2315
|
# Update lines on a single payslips
|
2041
2316
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2042
2317
|
# @param payslip_id [String] Payslip id for single object
|
2318
|
+
# @param payslip_lines [Array<PayslipLines>]
|
2043
2319
|
# @param [Hash] opts the optional parameters
|
2044
|
-
# @option opts [
|
2320
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2045
2321
|
# @return [Payslips]
|
2046
|
-
def update_payslip(xero_tenant_id, payslip_id, opts = {})
|
2047
|
-
data, _status_code, _headers = update_payslip_with_http_info(xero_tenant_id, payslip_id, opts)
|
2322
|
+
def update_payslip(xero_tenant_id, payslip_id, payslip_lines, opts = {})
|
2323
|
+
data, _status_code, _headers = update_payslip_with_http_info(xero_tenant_id, payslip_id, payslip_lines, opts)
|
2048
2324
|
data
|
2049
2325
|
end
|
2050
2326
|
|
@@ -2052,10 +2328,11 @@ module XeroRuby
|
|
2052
2328
|
# Update lines on a single payslips
|
2053
2329
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2054
2330
|
# @param payslip_id [String] Payslip id for single object
|
2331
|
+
# @param payslip_lines [Array<PayslipLines>]
|
2055
2332
|
# @param [Hash] opts the optional parameters
|
2056
|
-
# @option opts [
|
2333
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2057
2334
|
# @return [Array<(Payslips, Integer, Hash)>] Payslips data, response status code and response headers
|
2058
|
-
def update_payslip_with_http_info(xero_tenant_id, payslip_id, options = {})
|
2335
|
+
def update_payslip_with_http_info(xero_tenant_id, payslip_id, payslip_lines, options = {})
|
2059
2336
|
opts = options.dup
|
2060
2337
|
if @api_client.config.debugging
|
2061
2338
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_payslip ...'
|
@@ -2068,6 +2345,10 @@ module XeroRuby
|
|
2068
2345
|
if @api_client.config.client_side_validation && payslip_id.nil?
|
2069
2346
|
fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.update_payslip"
|
2070
2347
|
end
|
2348
|
+
# verify the required parameter 'payslip_lines' is set
|
2349
|
+
if @api_client.config.client_side_validation && payslip_lines.nil?
|
2350
|
+
fail ArgumentError, "Missing the required parameter 'payslip_lines' when calling PayrollAuApi.update_payslip"
|
2351
|
+
end
|
2071
2352
|
# resource path
|
2072
2353
|
local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)
|
2073
2354
|
|
@@ -2088,12 +2369,13 @@ module XeroRuby
|
|
2088
2369
|
# HTTP header 'Content-Type'
|
2089
2370
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2090
2371
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2372
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2091
2373
|
|
2092
2374
|
# form parameters
|
2093
2375
|
form_params = opts[:form_params] || {}
|
2094
2376
|
|
2095
2377
|
# http body (model)
|
2096
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2378
|
+
post_body = opts[:body] || @api_client.object_to_http_body(payslip_lines)
|
2097
2379
|
|
2098
2380
|
# return_type
|
2099
2381
|
return_type = opts[:return_type] || 'Payslips'
|
@@ -2121,11 +2403,12 @@ module XeroRuby
|
|
2121
2403
|
# Update properties on a single Superfund
|
2122
2404
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2123
2405
|
# @param super_fund_id [String] Superfund id for single object
|
2406
|
+
# @param super_fund [Array<SuperFund>]
|
2124
2407
|
# @param [Hash] opts the optional parameters
|
2125
|
-
# @option opts [
|
2408
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2126
2409
|
# @return [SuperFunds]
|
2127
|
-
def update_superfund(xero_tenant_id, super_fund_id, opts = {})
|
2128
|
-
data, _status_code, _headers = update_superfund_with_http_info(xero_tenant_id, super_fund_id, opts)
|
2410
|
+
def update_superfund(xero_tenant_id, super_fund_id, super_fund, opts = {})
|
2411
|
+
data, _status_code, _headers = update_superfund_with_http_info(xero_tenant_id, super_fund_id, super_fund, opts)
|
2129
2412
|
data
|
2130
2413
|
end
|
2131
2414
|
|
@@ -2133,10 +2416,11 @@ module XeroRuby
|
|
2133
2416
|
# Update properties on a single Superfund
|
2134
2417
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2135
2418
|
# @param super_fund_id [String] Superfund id for single object
|
2419
|
+
# @param super_fund [Array<SuperFund>]
|
2136
2420
|
# @param [Hash] opts the optional parameters
|
2137
|
-
# @option opts [
|
2421
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2138
2422
|
# @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
|
2139
|
-
def update_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {})
|
2423
|
+
def update_superfund_with_http_info(xero_tenant_id, super_fund_id, super_fund, options = {})
|
2140
2424
|
opts = options.dup
|
2141
2425
|
if @api_client.config.debugging
|
2142
2426
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_superfund ...'
|
@@ -2149,6 +2433,10 @@ module XeroRuby
|
|
2149
2433
|
if @api_client.config.client_side_validation && super_fund_id.nil?
|
2150
2434
|
fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.update_superfund"
|
2151
2435
|
end
|
2436
|
+
# verify the required parameter 'super_fund' is set
|
2437
|
+
if @api_client.config.client_side_validation && super_fund.nil?
|
2438
|
+
fail ArgumentError, "Missing the required parameter 'super_fund' when calling PayrollAuApi.update_superfund"
|
2439
|
+
end
|
2152
2440
|
# resource path
|
2153
2441
|
local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)
|
2154
2442
|
|
@@ -2169,12 +2457,13 @@ module XeroRuby
|
|
2169
2457
|
# HTTP header 'Content-Type'
|
2170
2458
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2171
2459
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2460
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2172
2461
|
|
2173
2462
|
# form parameters
|
2174
2463
|
form_params = opts[:form_params] || {}
|
2175
2464
|
|
2176
2465
|
# http body (model)
|
2177
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2466
|
+
post_body = opts[:body] || @api_client.object_to_http_body(super_fund)
|
2178
2467
|
|
2179
2468
|
# return_type
|
2180
2469
|
return_type = opts[:return_type] || 'SuperFunds'
|
@@ -2202,11 +2491,12 @@ module XeroRuby
|
|
2202
2491
|
# Update properties on a single timesheet
|
2203
2492
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2204
2493
|
# @param timesheet_id [String] Timesheet id for single object
|
2494
|
+
# @param timesheet [Array<Timesheet>]
|
2205
2495
|
# @param [Hash] opts the optional parameters
|
2206
|
-
# @option opts [
|
2496
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2207
2497
|
# @return [Timesheets]
|
2208
|
-
def update_timesheet(xero_tenant_id, timesheet_id, opts = {})
|
2209
|
-
data, _status_code, _headers = update_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
|
2498
|
+
def update_timesheet(xero_tenant_id, timesheet_id, timesheet, opts = {})
|
2499
|
+
data, _status_code, _headers = update_timesheet_with_http_info(xero_tenant_id, timesheet_id, timesheet, opts)
|
2210
2500
|
data
|
2211
2501
|
end
|
2212
2502
|
|
@@ -2214,10 +2504,11 @@ module XeroRuby
|
|
2214
2504
|
# Update properties on a single timesheet
|
2215
2505
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2216
2506
|
# @param timesheet_id [String] Timesheet id for single object
|
2507
|
+
# @param timesheet [Array<Timesheet>]
|
2217
2508
|
# @param [Hash] opts the optional parameters
|
2218
|
-
# @option opts [
|
2509
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2219
2510
|
# @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
|
2220
|
-
def update_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
|
2511
|
+
def update_timesheet_with_http_info(xero_tenant_id, timesheet_id, timesheet, options = {})
|
2221
2512
|
opts = options.dup
|
2222
2513
|
if @api_client.config.debugging
|
2223
2514
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_timesheet ...'
|
@@ -2230,6 +2521,10 @@ module XeroRuby
|
|
2230
2521
|
if @api_client.config.client_side_validation && timesheet_id.nil?
|
2231
2522
|
fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.update_timesheet"
|
2232
2523
|
end
|
2524
|
+
# verify the required parameter 'timesheet' is set
|
2525
|
+
if @api_client.config.client_side_validation && timesheet.nil?
|
2526
|
+
fail ArgumentError, "Missing the required parameter 'timesheet' when calling PayrollAuApi.update_timesheet"
|
2527
|
+
end
|
2233
2528
|
# resource path
|
2234
2529
|
local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)
|
2235
2530
|
|
@@ -2250,12 +2545,13 @@ module XeroRuby
|
|
2250
2545
|
# HTTP header 'Content-Type'
|
2251
2546
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2252
2547
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2548
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2253
2549
|
|
2254
2550
|
# form parameters
|
2255
2551
|
form_params = opts[:form_params] || {}
|
2256
2552
|
|
2257
2553
|
# http body (model)
|
2258
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2554
|
+
post_body = opts[:body] || @api_client.object_to_http_body(timesheet)
|
2259
2555
|
|
2260
2556
|
# return_type
|
2261
2557
|
return_type = opts[:return_type] || 'Timesheets'
|