xero-ruby 4.3.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xero-ruby/api/accounting_api.rb +540 -0
- 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 +76 -18
- data/lib/xero-ruby/api/payroll_au_api.rb +95 -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 +21 -0
- 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/contact.rb +1 -11
- data/lib/xero-ruby/models/accounting/currency_code.rb +0 -1
- data/lib/xero-ruby/models/accounting/tax_rate.rb +3 -2
- data/lib/xero-ruby/models/accounting/tax_type.rb +24 -0
- data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +75 -4
- data/lib/xero-ruby/models/finance/problem_type.rb +1 -0
- data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +0 -1
- 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_nz/employee.rb +14 -4
- data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
- data/lib/xero-ruby/version.rb +2 -2
- metadata +9 -9
@@ -20,6 +20,7 @@ module XeroRuby
|
|
20
20
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
21
21
|
# @param leave_application_id [String] Leave Application id for single object
|
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 [LeaveApplications]
|
24
25
|
def approve_leave_application(xero_tenant_id, leave_application_id, opts = {})
|
25
26
|
data, _status_code, _headers = approve_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
|
@@ -30,6 +31,7 @@ module XeroRuby
|
|
30
31
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
31
32
|
# @param leave_application_id [String] Leave Application id for single object
|
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<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
34
36
|
def approve_leave_application_with_http_info(xero_tenant_id, leave_application_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 employee [Array<Employee>]
|
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 [Employees]
|
99
103
|
def create_employee(xero_tenant_id, employee, opts = {})
|
100
104
|
data, _status_code, _headers = create_employee_with_http_info(xero_tenant_id, employee, opts)
|
@@ -105,6 +109,7 @@ module XeroRuby
|
|
105
109
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
106
110
|
# @param employee [Array<Employee>]
|
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<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
109
114
|
def create_employee_with_http_info(xero_tenant_id, employee, 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 leave_application [Array<LeaveApplication>]
|
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 [LeaveApplications]
|
176
183
|
def create_leave_application(xero_tenant_id, leave_application, opts = {})
|
177
184
|
data, _status_code, _headers = create_leave_application_with_http_info(xero_tenant_id, leave_application, opts)
|
@@ -182,6 +189,7 @@ module XeroRuby
|
|
182
189
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
183
190
|
# @param leave_application [Array<LeaveApplication>]
|
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<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
186
194
|
def create_leave_application_with_http_info(xero_tenant_id, leave_application, 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 pay_item [PayItem]
|
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 [PayItems]
|
253
263
|
def create_pay_item(xero_tenant_id, pay_item, opts = {})
|
254
264
|
data, _status_code, _headers = create_pay_item_with_http_info(xero_tenant_id, pay_item, opts)
|
@@ -259,6 +269,7 @@ module XeroRuby
|
|
259
269
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
260
270
|
# @param pay_item [PayItem]
|
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<(PayItems, Integer, Hash)>] PayItems data, response status code and response headers
|
263
274
|
def create_pay_item_with_http_info(xero_tenant_id, pay_item, 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] || {}
|
@@ -326,6 +338,7 @@ module XeroRuby
|
|
326
338
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
327
339
|
# @param pay_run [Array<PayRun>]
|
328
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.
|
329
342
|
# @return [PayRuns]
|
330
343
|
def create_pay_run(xero_tenant_id, pay_run, opts = {})
|
331
344
|
data, _status_code, _headers = create_pay_run_with_http_info(xero_tenant_id, pay_run, opts)
|
@@ -336,6 +349,7 @@ module XeroRuby
|
|
336
349
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
337
350
|
# @param pay_run [Array<PayRun>]
|
338
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.
|
339
353
|
# @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
|
340
354
|
def create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {})
|
341
355
|
opts = options.dup
|
@@ -370,6 +384,7 @@ module XeroRuby
|
|
370
384
|
# HTTP header 'Content-Type'
|
371
385
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
372
386
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
387
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
373
388
|
|
374
389
|
# form parameters
|
375
390
|
form_params = opts[:form_params] || {}
|
@@ -403,6 +418,7 @@ module XeroRuby
|
|
403
418
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
404
419
|
# @param payroll_calendar [Array<PayrollCalendar>]
|
405
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.
|
406
422
|
# @return [PayrollCalendars]
|
407
423
|
def create_payroll_calendar(xero_tenant_id, payroll_calendar, opts = {})
|
408
424
|
data, _status_code, _headers = create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, opts)
|
@@ -413,6 +429,7 @@ module XeroRuby
|
|
413
429
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
414
430
|
# @param payroll_calendar [Array<PayrollCalendar>]
|
415
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.
|
416
433
|
# @return [Array<(PayrollCalendars, Integer, Hash)>] PayrollCalendars data, response status code and response headers
|
417
434
|
def create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, options = {})
|
418
435
|
opts = options.dup
|
@@ -447,6 +464,7 @@ module XeroRuby
|
|
447
464
|
# HTTP header 'Content-Type'
|
448
465
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
449
466
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
467
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
450
468
|
|
451
469
|
# form parameters
|
452
470
|
form_params = opts[:form_params] || {}
|
@@ -480,6 +498,7 @@ module XeroRuby
|
|
480
498
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
481
499
|
# @param super_fund [Array<SuperFund>]
|
482
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.
|
483
502
|
# @return [SuperFunds]
|
484
503
|
def create_superfund(xero_tenant_id, super_fund, opts = {})
|
485
504
|
data, _status_code, _headers = create_superfund_with_http_info(xero_tenant_id, super_fund, opts)
|
@@ -490,6 +509,7 @@ module XeroRuby
|
|
490
509
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
491
510
|
# @param super_fund [Array<SuperFund>]
|
492
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.
|
493
513
|
# @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
|
494
514
|
def create_superfund_with_http_info(xero_tenant_id, super_fund, options = {})
|
495
515
|
opts = options.dup
|
@@ -524,6 +544,7 @@ module XeroRuby
|
|
524
544
|
# HTTP header 'Content-Type'
|
525
545
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
526
546
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
547
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
527
548
|
|
528
549
|
# form parameters
|
529
550
|
form_params = opts[:form_params] || {}
|
@@ -557,6 +578,7 @@ module XeroRuby
|
|
557
578
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
558
579
|
# @param timesheet [Array<Timesheet>]
|
559
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.
|
560
582
|
# @return [Timesheets]
|
561
583
|
def create_timesheet(xero_tenant_id, timesheet, opts = {})
|
562
584
|
data, _status_code, _headers = create_timesheet_with_http_info(xero_tenant_id, timesheet, opts)
|
@@ -567,6 +589,7 @@ module XeroRuby
|
|
567
589
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
568
590
|
# @param timesheet [Array<Timesheet>]
|
569
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.
|
570
593
|
# @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
|
571
594
|
def create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {})
|
572
595
|
opts = options.dup
|
@@ -601,6 +624,7 @@ module XeroRuby
|
|
601
624
|
# HTTP header 'Content-Type'
|
602
625
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
603
626
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
627
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
604
628
|
|
605
629
|
# form parameters
|
606
630
|
form_params = opts[:form_params] || {}
|
@@ -1951,6 +1975,7 @@ module XeroRuby
|
|
1951
1975
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1952
1976
|
# @param leave_application_id [String] Leave Application id for single object
|
1953
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.
|
1954
1979
|
# @return [LeaveApplications]
|
1955
1980
|
def reject_leave_application(xero_tenant_id, leave_application_id, opts = {})
|
1956
1981
|
data, _status_code, _headers = reject_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
|
@@ -1961,6 +1986,7 @@ module XeroRuby
|
|
1961
1986
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1962
1987
|
# @param leave_application_id [String] Leave Application id for single object
|
1963
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.
|
1964
1990
|
# @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
1965
1991
|
def reject_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
|
1966
1992
|
opts = options.dup
|
@@ -1993,6 +2019,7 @@ module XeroRuby
|
|
1993
2019
|
# HTTP header 'Accept' (if needed)
|
1994
2020
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1995
2021
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2022
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
1996
2023
|
|
1997
2024
|
# form parameters
|
1998
2025
|
form_params = opts[:form_params] || {}
|
@@ -2026,11 +2053,12 @@ module XeroRuby
|
|
2026
2053
|
# Update properties on a single employee
|
2027
2054
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2028
2055
|
# @param employee_id [String] Employee id for single object
|
2056
|
+
# @param employee [Array<Employee>]
|
2029
2057
|
# @param [Hash] opts the optional parameters
|
2030
|
-
# @option opts [
|
2058
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2031
2059
|
# @return [Employees]
|
2032
|
-
def update_employee(xero_tenant_id, employee_id, opts = {})
|
2033
|
-
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)
|
2034
2062
|
data
|
2035
2063
|
end
|
2036
2064
|
|
@@ -2038,10 +2066,11 @@ module XeroRuby
|
|
2038
2066
|
# Update properties on a single employee
|
2039
2067
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2040
2068
|
# @param employee_id [String] Employee id for single object
|
2069
|
+
# @param employee [Array<Employee>]
|
2041
2070
|
# @param [Hash] opts the optional parameters
|
2042
|
-
# @option opts [
|
2071
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2043
2072
|
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
2044
|
-
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 = {})
|
2045
2074
|
opts = options.dup
|
2046
2075
|
if @api_client.config.debugging
|
2047
2076
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_employee ...'
|
@@ -2054,6 +2083,10 @@ module XeroRuby
|
|
2054
2083
|
if @api_client.config.client_side_validation && employee_id.nil?
|
2055
2084
|
fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.update_employee"
|
2056
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
|
2057
2090
|
# resource path
|
2058
2091
|
local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)
|
2059
2092
|
|
@@ -2074,12 +2107,13 @@ module XeroRuby
|
|
2074
2107
|
# HTTP header 'Content-Type'
|
2075
2108
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2076
2109
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2110
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2077
2111
|
|
2078
2112
|
# form parameters
|
2079
2113
|
form_params = opts[:form_params] || {}
|
2080
2114
|
|
2081
2115
|
# http body (model)
|
2082
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2116
|
+
post_body = opts[:body] || @api_client.object_to_http_body(employee)
|
2083
2117
|
|
2084
2118
|
# return_type
|
2085
2119
|
return_type = opts[:return_type] || 'Employees'
|
@@ -2108,6 +2142,7 @@ module XeroRuby
|
|
2108
2142
|
# @param leave_application_id [String] Leave Application id for single object
|
2109
2143
|
# @param leave_application [Array<LeaveApplication>]
|
2110
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.
|
2111
2146
|
# @return [LeaveApplications]
|
2112
2147
|
def update_leave_application(xero_tenant_id, leave_application_id, leave_application, opts = {})
|
2113
2148
|
data, _status_code, _headers = update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, opts)
|
@@ -2119,6 +2154,7 @@ module XeroRuby
|
|
2119
2154
|
# @param leave_application_id [String] Leave Application id for single object
|
2120
2155
|
# @param leave_application [Array<LeaveApplication>]
|
2121
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.
|
2122
2158
|
# @return [Array<(LeaveApplications, Integer, Hash)>] LeaveApplications data, response status code and response headers
|
2123
2159
|
def update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, options = {})
|
2124
2160
|
opts = options.dup
|
@@ -2157,6 +2193,7 @@ module XeroRuby
|
|
2157
2193
|
# HTTP header 'Content-Type'
|
2158
2194
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2159
2195
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2196
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2160
2197
|
|
2161
2198
|
# form parameters
|
2162
2199
|
form_params = opts[:form_params] || {}
|
@@ -2190,11 +2227,12 @@ module XeroRuby
|
|
2190
2227
|
# Update properties on a single PayRun
|
2191
2228
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2192
2229
|
# @param pay_run_id [String] PayRun id for single object
|
2230
|
+
# @param pay_run [Array<PayRun>]
|
2193
2231
|
# @param [Hash] opts the optional parameters
|
2194
|
-
# @option opts [
|
2232
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2195
2233
|
# @return [PayRuns]
|
2196
|
-
def update_pay_run(xero_tenant_id, pay_run_id, opts = {})
|
2197
|
-
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)
|
2198
2236
|
data
|
2199
2237
|
end
|
2200
2238
|
|
@@ -2202,10 +2240,11 @@ module XeroRuby
|
|
2202
2240
|
# Update properties on a single PayRun
|
2203
2241
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2204
2242
|
# @param pay_run_id [String] PayRun id for single object
|
2243
|
+
# @param pay_run [Array<PayRun>]
|
2205
2244
|
# @param [Hash] opts the optional parameters
|
2206
|
-
# @option opts [
|
2245
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2207
2246
|
# @return [Array<(PayRuns, Integer, Hash)>] PayRuns data, response status code and response headers
|
2208
|
-
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 = {})
|
2209
2248
|
opts = options.dup
|
2210
2249
|
if @api_client.config.debugging
|
2211
2250
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_pay_run ...'
|
@@ -2218,6 +2257,10 @@ module XeroRuby
|
|
2218
2257
|
if @api_client.config.client_side_validation && pay_run_id.nil?
|
2219
2258
|
fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.update_pay_run"
|
2220
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
|
2221
2264
|
# resource path
|
2222
2265
|
local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
|
2223
2266
|
|
@@ -2238,12 +2281,13 @@ module XeroRuby
|
|
2238
2281
|
# HTTP header 'Content-Type'
|
2239
2282
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2240
2283
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2284
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2241
2285
|
|
2242
2286
|
# form parameters
|
2243
2287
|
form_params = opts[:form_params] || {}
|
2244
2288
|
|
2245
2289
|
# http body (model)
|
2246
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2290
|
+
post_body = opts[:body] || @api_client.object_to_http_body(pay_run)
|
2247
2291
|
|
2248
2292
|
# return_type
|
2249
2293
|
return_type = opts[:return_type] || 'PayRuns'
|
@@ -2271,11 +2315,12 @@ module XeroRuby
|
|
2271
2315
|
# Update lines on a single payslips
|
2272
2316
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2273
2317
|
# @param payslip_id [String] Payslip id for single object
|
2318
|
+
# @param payslip_lines [Array<PayslipLines>]
|
2274
2319
|
# @param [Hash] opts the optional parameters
|
2275
|
-
# @option opts [
|
2320
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2276
2321
|
# @return [Payslips]
|
2277
|
-
def update_payslip(xero_tenant_id, payslip_id, opts = {})
|
2278
|
-
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)
|
2279
2324
|
data
|
2280
2325
|
end
|
2281
2326
|
|
@@ -2283,10 +2328,11 @@ module XeroRuby
|
|
2283
2328
|
# Update lines on a single payslips
|
2284
2329
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2285
2330
|
# @param payslip_id [String] Payslip id for single object
|
2331
|
+
# @param payslip_lines [Array<PayslipLines>]
|
2286
2332
|
# @param [Hash] opts the optional parameters
|
2287
|
-
# @option opts [
|
2333
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2288
2334
|
# @return [Array<(Payslips, Integer, Hash)>] Payslips data, response status code and response headers
|
2289
|
-
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 = {})
|
2290
2336
|
opts = options.dup
|
2291
2337
|
if @api_client.config.debugging
|
2292
2338
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_payslip ...'
|
@@ -2299,6 +2345,10 @@ module XeroRuby
|
|
2299
2345
|
if @api_client.config.client_side_validation && payslip_id.nil?
|
2300
2346
|
fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.update_payslip"
|
2301
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
|
2302
2352
|
# resource path
|
2303
2353
|
local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)
|
2304
2354
|
|
@@ -2319,12 +2369,13 @@ module XeroRuby
|
|
2319
2369
|
# HTTP header 'Content-Type'
|
2320
2370
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2321
2371
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2372
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2322
2373
|
|
2323
2374
|
# form parameters
|
2324
2375
|
form_params = opts[:form_params] || {}
|
2325
2376
|
|
2326
2377
|
# http body (model)
|
2327
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2378
|
+
post_body = opts[:body] || @api_client.object_to_http_body(payslip_lines)
|
2328
2379
|
|
2329
2380
|
# return_type
|
2330
2381
|
return_type = opts[:return_type] || 'Payslips'
|
@@ -2352,11 +2403,12 @@ module XeroRuby
|
|
2352
2403
|
# Update properties on a single Superfund
|
2353
2404
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2354
2405
|
# @param super_fund_id [String] Superfund id for single object
|
2406
|
+
# @param super_fund [Array<SuperFund>]
|
2355
2407
|
# @param [Hash] opts the optional parameters
|
2356
|
-
# @option opts [
|
2408
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2357
2409
|
# @return [SuperFunds]
|
2358
|
-
def update_superfund(xero_tenant_id, super_fund_id, opts = {})
|
2359
|
-
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)
|
2360
2412
|
data
|
2361
2413
|
end
|
2362
2414
|
|
@@ -2364,10 +2416,11 @@ module XeroRuby
|
|
2364
2416
|
# Update properties on a single Superfund
|
2365
2417
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2366
2418
|
# @param super_fund_id [String] Superfund id for single object
|
2419
|
+
# @param super_fund [Array<SuperFund>]
|
2367
2420
|
# @param [Hash] opts the optional parameters
|
2368
|
-
# @option opts [
|
2421
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2369
2422
|
# @return [Array<(SuperFunds, Integer, Hash)>] SuperFunds data, response status code and response headers
|
2370
|
-
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 = {})
|
2371
2424
|
opts = options.dup
|
2372
2425
|
if @api_client.config.debugging
|
2373
2426
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_superfund ...'
|
@@ -2380,6 +2433,10 @@ module XeroRuby
|
|
2380
2433
|
if @api_client.config.client_side_validation && super_fund_id.nil?
|
2381
2434
|
fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.update_superfund"
|
2382
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
|
2383
2440
|
# resource path
|
2384
2441
|
local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)
|
2385
2442
|
|
@@ -2400,12 +2457,13 @@ module XeroRuby
|
|
2400
2457
|
# HTTP header 'Content-Type'
|
2401
2458
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2402
2459
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2460
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2403
2461
|
|
2404
2462
|
# form parameters
|
2405
2463
|
form_params = opts[:form_params] || {}
|
2406
2464
|
|
2407
2465
|
# http body (model)
|
2408
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2466
|
+
post_body = opts[:body] || @api_client.object_to_http_body(super_fund)
|
2409
2467
|
|
2410
2468
|
# return_type
|
2411
2469
|
return_type = opts[:return_type] || 'SuperFunds'
|
@@ -2433,11 +2491,12 @@ module XeroRuby
|
|
2433
2491
|
# Update properties on a single timesheet
|
2434
2492
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2435
2493
|
# @param timesheet_id [String] Timesheet id for single object
|
2494
|
+
# @param timesheet [Array<Timesheet>]
|
2436
2495
|
# @param [Hash] opts the optional parameters
|
2437
|
-
# @option opts [
|
2496
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2438
2497
|
# @return [Timesheets]
|
2439
|
-
def update_timesheet(xero_tenant_id, timesheet_id, opts = {})
|
2440
|
-
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)
|
2441
2500
|
data
|
2442
2501
|
end
|
2443
2502
|
|
@@ -2445,10 +2504,11 @@ module XeroRuby
|
|
2445
2504
|
# Update properties on a single timesheet
|
2446
2505
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
2447
2506
|
# @param timesheet_id [String] Timesheet id for single object
|
2507
|
+
# @param timesheet [Array<Timesheet>]
|
2448
2508
|
# @param [Hash] opts the optional parameters
|
2449
|
-
# @option opts [
|
2509
|
+
# @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
2450
2510
|
# @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
|
2451
|
-
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 = {})
|
2452
2512
|
opts = options.dup
|
2453
2513
|
if @api_client.config.debugging
|
2454
2514
|
@api_client.config.logger.debug 'Calling API: PayrollAuApi.update_timesheet ...'
|
@@ -2461,6 +2521,10 @@ module XeroRuby
|
|
2461
2521
|
if @api_client.config.client_side_validation && timesheet_id.nil?
|
2462
2522
|
fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.update_timesheet"
|
2463
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
|
2464
2528
|
# resource path
|
2465
2529
|
local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)
|
2466
2530
|
|
@@ -2481,12 +2545,13 @@ module XeroRuby
|
|
2481
2545
|
# HTTP header 'Content-Type'
|
2482
2546
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2483
2547
|
header_params[:'Xero-Tenant-Id'] = xero_tenant_id
|
2548
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
2484
2549
|
|
2485
2550
|
# form parameters
|
2486
2551
|
form_params = opts[:form_params] || {}
|
2487
2552
|
|
2488
2553
|
# http body (model)
|
2489
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
2554
|
+
post_body = opts[:body] || @api_client.object_to_http_body(timesheet)
|
2490
2555
|
|
2491
2556
|
# return_type
|
2492
2557
|
return_type = opts[:return_type] || 'Timesheets'
|