Class: XeroRuby::PayrollAuApi

Inherits:
Object
  • Object
show all
Defined in:
lib/xero-ruby/api/payroll_au_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.new) ⇒ PayrollAuApi

Returns a new instance of PayrollAuApi.


16
17
18
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 16

def initialize(api_client = ApiClient.new)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client


14
15
16
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#create_employee(xero_tenant_id, employee, opts = {}) ⇒ Employees

Creates a payroll employee

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • employee (Array<Employee>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Employees)

24
25
26
27
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 24

def create_employee(xero_tenant_id, employee, opts = {})
  data, _status_code, _headers = create_employee_with_http_info(xero_tenant_id, employee, opts)
  data
end

#create_employee_with_http_info(xero_tenant_id, employee, options = {}) ⇒ Array<(Employees, Integer, Hash)>

Creates a payroll employee

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • employee (Array<Employee>)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Employees, Integer, Hash)>)

    Employees data, response status code and response headers


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 34

def create_employee_with_http_info(xero_tenant_id, employee, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_employee ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_employee"
  end
  # verify the required parameter 'employee' is set
  if @api_client.config.client_side_validation && employee.nil?
    fail ArgumentError, "Missing the required parameter 'employee' when calling PayrollAuApi.create_employee"
  end
  # resource path
  local_var_path = '/Employees'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(employee) 

  # return_type
  return_type = opts[:return_type] || 'Employees' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#create_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_leave_application(xero_tenant_id, leave_application, opts = {}) ⇒ LeaveApplications

Creates a leave application

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • leave_application (Array<LeaveApplication>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (LeaveApplications)

101
102
103
104
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 101

def create_leave_application(xero_tenant_id, leave_application, opts = {})
  data, _status_code, _headers = create_leave_application_with_http_info(xero_tenant_id, leave_application, opts)
  data
end

#create_leave_application_with_http_info(xero_tenant_id, leave_application, options = {}) ⇒ Array<(LeaveApplications, Integer, Hash)>

Creates a leave application

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • leave_application (Array<LeaveApplication>)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(LeaveApplications, Integer, Hash)>)

    LeaveApplications data, response status code and response headers


111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 111

def create_leave_application_with_http_info(xero_tenant_id, leave_application, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_leave_application ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_leave_application"
  end
  # verify the required parameter 'leave_application' is set
  if @api_client.config.client_side_validation && leave_application.nil?
    fail ArgumentError, "Missing the required parameter 'leave_application' when calling PayrollAuApi.create_leave_application"
  end
  # resource path
  local_var_path = '/LeaveApplications'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(leave_application) 

  # return_type
  return_type = opts[:return_type] || 'LeaveApplications' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#create_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_pay_item(xero_tenant_id, pay_item, opts = {}) ⇒ PayItems

Creates a pay item

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_item (PayItem)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (PayItems)

178
179
180
181
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 178

def create_pay_item(xero_tenant_id, pay_item, opts = {})
  data, _status_code, _headers = create_pay_item_with_http_info(xero_tenant_id, pay_item, opts)
  data
end

#create_pay_item_with_http_info(xero_tenant_id, pay_item, options = {}) ⇒ Array<(PayItems, Integer, Hash)>

Creates a pay item

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_item (PayItem)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayItems, Integer, Hash)>)

    PayItems data, response status code and response headers


188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 188

def create_pay_item_with_http_info(xero_tenant_id, pay_item, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_pay_item ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_pay_item"
  end
  # verify the required parameter 'pay_item' is set
  if @api_client.config.client_side_validation && pay_item.nil?
    fail ArgumentError, "Missing the required parameter 'pay_item' when calling PayrollAuApi.create_pay_item"
  end
  # resource path
  local_var_path = '/PayItems'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(pay_item) 

  # return_type
  return_type = opts[:return_type] || 'PayItems' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#create_pay_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_pay_run(xero_tenant_id, pay_run, opts = {}) ⇒ PayRuns

Creates a pay run

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_run (Array<PayRun>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (PayRuns)

255
256
257
258
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 255

def create_pay_run(xero_tenant_id, pay_run, opts = {})
  data, _status_code, _headers = create_pay_run_with_http_info(xero_tenant_id, pay_run, opts)
  data
end

#create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {}) ⇒ Array<(PayRuns, Integer, Hash)>

Creates a pay run

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_run (Array<PayRun>)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayRuns, Integer, Hash)>)

    PayRuns data, response status code and response headers


265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 265

def create_pay_run_with_http_info(xero_tenant_id, pay_run, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_pay_run ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_pay_run"
  end
  # verify the required parameter 'pay_run' is set
  if @api_client.config.client_side_validation && pay_run.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run' when calling PayrollAuApi.create_pay_run"
  end
  # resource path
  local_var_path = '/PayRuns'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(pay_run) 

  # return_type
  return_type = opts[:return_type] || 'PayRuns' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#create_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_payroll_calendar(xero_tenant_id, payroll_calendar, opts = {}) ⇒ PayrollCalendars

Creates a Payroll Calendar

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payroll_calendar (Array<PayrollCalendar>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (PayrollCalendars)

332
333
334
335
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 332

def create_payroll_calendar(xero_tenant_id, payroll_calendar, opts = {})
  data, _status_code, _headers = create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, opts)
  data
end

#create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, options = {}) ⇒ Array<(PayrollCalendars, Integer, Hash)>

Creates a Payroll Calendar

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payroll_calendar (Array<PayrollCalendar>)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayrollCalendars, Integer, Hash)>)

    PayrollCalendars data, response status code and response headers


342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 342

def create_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_payroll_calendar ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_payroll_calendar"
  end
  # verify the required parameter 'payroll_calendar' is set
  if @api_client.config.client_side_validation && payroll_calendar.nil?
    fail ArgumentError, "Missing the required parameter 'payroll_calendar' when calling PayrollAuApi.create_payroll_calendar"
  end
  # resource path
  local_var_path = '/PayrollCalendars'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(payroll_calendar) 

  # return_type
  return_type = opts[:return_type] || 'PayrollCalendars' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#create_payroll_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_superfund(xero_tenant_id, super_fund, opts = {}) ⇒ SuperFunds

Creates a superfund

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • super_fund (Array<SuperFund>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (SuperFunds)

409
410
411
412
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 409

def create_superfund(xero_tenant_id, super_fund, opts = {})
  data, _status_code, _headers = create_superfund_with_http_info(xero_tenant_id, super_fund, opts)
  data
end

#create_superfund_with_http_info(xero_tenant_id, super_fund, options = {}) ⇒ Array<(SuperFunds, Integer, Hash)>

Creates a superfund

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • super_fund (Array<SuperFund>)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(SuperFunds, Integer, Hash)>)

    SuperFunds data, response status code and response headers


419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 419

def create_superfund_with_http_info(xero_tenant_id, super_fund, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_superfund ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_superfund"
  end
  # verify the required parameter 'super_fund' is set
  if @api_client.config.client_side_validation && super_fund.nil?
    fail ArgumentError, "Missing the required parameter 'super_fund' when calling PayrollAuApi.create_superfund"
  end
  # resource path
  local_var_path = '/Superfunds'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(super_fund) 

  # return_type
  return_type = opts[:return_type] || 'SuperFunds' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#create_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_timesheet(xero_tenant_id, timesheet, opts = {}) ⇒ Timesheets

Creates a timesheet

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • timesheet (Array<Timesheet>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Timesheets)

486
487
488
489
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 486

def create_timesheet(xero_tenant_id, timesheet, opts = {})
  data, _status_code, _headers = create_timesheet_with_http_info(xero_tenant_id, timesheet, opts)
  data
end

#create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {}) ⇒ Array<(Timesheets, Integer, Hash)>

Creates a timesheet

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • timesheet (Array<Timesheet>)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Timesheets, Integer, Hash)>)

    Timesheets data, response status code and response headers


496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 496

def create_timesheet_with_http_info(xero_tenant_id, timesheet, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.create_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.create_timesheet"
  end
  # verify the required parameter 'timesheet' is set
  if @api_client.config.client_side_validation && timesheet.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet' when calling PayrollAuApi.create_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(timesheet) 

  # return_type
  return_type = opts[:return_type] || 'Timesheets' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#create_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_employee(xero_tenant_id, employee_id, opts = {}) ⇒ Employees

Retrieves an employee's detail by unique employee id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • employee_id (String)

    Employee id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Employees)

563
564
565
566
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 563

def get_employee(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = get_employee_with_http_info(xero_tenant_id, employee_id, opts)
  data
end

#get_employee_with_http_info(xero_tenant_id, employee_id, options = {}) ⇒ Array<(Employees, Integer, Hash)>

Retrieves an employee&#39;s detail by unique employee id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • employee_id (String)

    Employee id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Employees, Integer, Hash)>)

    Employees data, response status code and response headers


573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 573

def get_employee_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_employee ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_employee"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.get_employee"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Employees' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_employees(xero_tenant_id, opts = {}) ⇒ Employees

Searches payroll employees

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :if_modified_since (String)

    Only records created or modified since this timestamp will be returned

  • :where (String)

    Filter by an any element

  • :order (String)

    Order by an any element

  • :page (Integer)

    e.g. page&#x3D;1 – Up to 100 employees will be returned in a single API call

Returns:

  • (Employees)

641
642
643
644
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 641

def get_employees(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_employees_with_http_info(xero_tenant_id, opts)
  data
end

#get_employees_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(Employees, Integer, Hash)>

Searches payroll employees

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Employees, Integer, Hash)>)

    Employees data, response status code and response headers


654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 654

def get_employees_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_employees ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_employees"
  end
  # resource path
  local_var_path = '/Employees'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Employees' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_leave_application(xero_tenant_id, leave_application_id, opts = {}) ⇒ LeaveApplications

Retrieves a leave application by a unique leave application id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • leave_application_id (String)

    Leave Application id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (LeaveApplications)

719
720
721
722
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 719

def get_leave_application(xero_tenant_id, leave_application_id, opts = {})
  data, _status_code, _headers = get_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
  data
end

#get_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {}) ⇒ Array<(LeaveApplications, Integer, Hash)>

Retrieves a leave application by a unique leave application id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • leave_application_id (String)

    Leave Application id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(LeaveApplications, Integer, Hash)>)

    LeaveApplications data, response status code and response headers


729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 729

def get_leave_application_with_http_info(xero_tenant_id, leave_application_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_application ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_application"
  end
  # verify the required parameter 'leave_application_id' is set
  if @api_client.config.client_side_validation && leave_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.get_leave_application"
  end
  # resource path
  local_var_path = '/LeaveApplications/{LeaveApplicationID}'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'LeaveApplications' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_leave_applications(xero_tenant_id, opts = {}) ⇒ LeaveApplications

Retrieves leave applications

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :if_modified_since (String)

    Only records created or modified since this timestamp will be returned

  • :where (String)

    Filter by an any element

  • :order (String)

    Order by an any element

  • :page (Integer)

    e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call

Returns:

  • (LeaveApplications)

797
798
799
800
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 797

def get_leave_applications(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_leave_applications_with_http_info(xero_tenant_id, opts)
  data
end

#get_leave_applications_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(LeaveApplications, Integer, Hash)>

Retrieves leave applications

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(LeaveApplications, Integer, Hash)>)

    LeaveApplications data, response status code and response headers


810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 810

def get_leave_applications_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_leave_applications ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_leave_applications"
  end
  # resource path
  local_var_path = '/LeaveApplications'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'LeaveApplications' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_leave_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_pay_items(xero_tenant_id, opts = {}) ⇒ PayItems

Retrieves pay items

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :if_modified_since (String)

    Only records created or modified since this timestamp will be returned

  • :where (String)

    Filter by an any element

  • :order (String)

    Order by an any element

  • :page (Integer)

    e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call

Returns:

  • (PayItems)

878
879
880
881
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 878

def get_pay_items(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_pay_items_with_http_info(xero_tenant_id, opts)
  data
end

#get_pay_items_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(PayItems, Integer, Hash)>

Retrieves pay items

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayItems, Integer, Hash)>)

    PayItems data, response status code and response headers


891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 891

def get_pay_items_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_items ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_items"
  end
  # resource path
  local_var_path = '/PayItems'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayItems' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_pay_run(xero_tenant_id, pay_run_id, opts = {}) ⇒ PayRuns

Retrieves a pay run by using a unique pay run id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_run_id (String)

    PayRun id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (PayRuns)

956
957
958
959
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 956

def get_pay_run(xero_tenant_id, pay_run_id, opts = {})
  data, _status_code, _headers = get_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
  data
end

#get_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {}) ⇒ Array<(PayRuns, Integer, Hash)>

Retrieves a pay run by using a unique pay run id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_run_id (String)

    PayRun id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayRuns, Integer, Hash)>)

    PayRuns data, response status code and response headers


966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 966

def get_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_run ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_run"
  end
  # verify the required parameter 'pay_run_id' is set
  if @api_client.config.client_side_validation && pay_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.get_pay_run"
  end
  # resource path
  local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayRuns' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_pay_runs(xero_tenant_id, opts = {}) ⇒ PayRuns

Retrieves pay runs

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :if_modified_since (String)

    Only records created or modified since this timestamp will be returned

  • :where (String)

    Filter by an any element

  • :order (String)

    Order by an any element

  • :page (Integer)

    e.g. page&#x3D;1 – Up to 100 PayRuns will be returned in a single API call

Returns:

  • (PayRuns)

1034
1035
1036
1037
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1034

def get_pay_runs(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_pay_runs_with_http_info(xero_tenant_id, opts)
  data
end

#get_pay_runs_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(PayRuns, Integer, Hash)>

Retrieves pay runs

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayRuns, Integer, Hash)>)

    PayRuns data, response status code and response headers


1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1047

def get_pay_runs_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_pay_runs ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_pay_runs"
  end
  # resource path
  local_var_path = '/PayRuns'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayRuns' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_pay_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_payroll_calendar(xero_tenant_id, payroll_calendar_id, opts = {}) ⇒ PayrollCalendars

Retrieves payroll calendar by using a unique payroll calendar ID

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payroll_calendar_id (String)

    Payroll Calendar id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (PayrollCalendars)

1112
1113
1114
1115
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1112

def get_payroll_calendar(xero_tenant_id, payroll_calendar_id, opts = {})
  data, _status_code, _headers = get_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, opts)
  data
end

#get_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, options = {}) ⇒ Array<(PayrollCalendars, Integer, Hash)>

Retrieves payroll calendar by using a unique payroll calendar ID

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payroll_calendar_id (String)

    Payroll Calendar id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayrollCalendars, Integer, Hash)>)

    PayrollCalendars data, response status code and response headers


1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1122

def get_payroll_calendar_with_http_info(xero_tenant_id, payroll_calendar_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payroll_calendar ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payroll_calendar"
  end
  # verify the required parameter 'payroll_calendar_id' is set
  if @api_client.config.client_side_validation && payroll_calendar_id.nil?
    fail ArgumentError, "Missing the required parameter 'payroll_calendar_id' when calling PayrollAuApi.get_payroll_calendar"
  end
  # resource path
  local_var_path = '/PayrollCalendars/{PayrollCalendarID}'.sub('{' + 'PayrollCalendarID' + '}', payroll_calendar_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayrollCalendars' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_payroll_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_payroll_calendars(xero_tenant_id, opts = {}) ⇒ PayrollCalendars

Retrieves payroll calendars

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :if_modified_since (String)

    Only records created or modified since this timestamp will be returned

  • :where (String)

    Filter by an any element

  • :order (String)

    Order by an any element

  • :page (Integer)

    e.g. page&#x3D;1 – Up to 100 objects will be returned in a single API call

Returns:

  • (PayrollCalendars)

1190
1191
1192
1193
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1190

def get_payroll_calendars(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_payroll_calendars_with_http_info(xero_tenant_id, opts)
  data
end

#get_payroll_calendars_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(PayrollCalendars, Integer, Hash)>

Retrieves payroll calendars

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayrollCalendars, Integer, Hash)>)

    PayrollCalendars data, response status code and response headers


1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1203

def get_payroll_calendars_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payroll_calendars ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payroll_calendars"
  end
  # resource path
  local_var_path = '/PayrollCalendars'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayrollCalendars' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_payroll_calendars\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_payslip(xero_tenant_id, payslip_id, opts = {}) ⇒ PayslipObject

Retrieves for a payslip by a unique payslip id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payslip_id (String)

    Payslip id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (PayslipObject)

1268
1269
1270
1271
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1268

def get_payslip(xero_tenant_id, payslip_id, opts = {})
  data, _status_code, _headers = get_payslip_with_http_info(xero_tenant_id, payslip_id, opts)
  data
end

#get_payslip_with_http_info(xero_tenant_id, payslip_id, options = {}) ⇒ Array<(PayslipObject, Integer, Hash)>

Retrieves for a payslip by a unique payslip id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payslip_id (String)

    Payslip id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayslipObject, Integer, Hash)>)

    PayslipObject data, response status code and response headers


1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1278

def get_payslip_with_http_info(xero_tenant_id, payslip_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_payslip ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_payslip"
  end
  # verify the required parameter 'payslip_id' is set
  if @api_client.config.client_side_validation && payslip_id.nil?
    fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.get_payslip"
  end
  # resource path
  local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayslipObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_payslip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_settings(xero_tenant_id, opts = {}) ⇒ SettingsObject

Retrieves payroll settings

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (SettingsObject)

1342
1343
1344
1345
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1342

def get_settings(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_settings_with_http_info(xero_tenant_id, opts)
  data
end

#get_settings_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(SettingsObject, Integer, Hash)>

Retrieves payroll settings

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(SettingsObject, Integer, Hash)>)

    SettingsObject data, response status code and response headers


1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1351

def get_settings_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_settings ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_settings"
  end
  # resource path
  local_var_path = '/Settings'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SettingsObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_superfund(xero_tenant_id, super_fund_id, opts = {}) ⇒ SuperFunds

Retrieves a superfund by using a unique superfund ID

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • super_fund_id (String)

    Superfund id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (SuperFunds)

1412
1413
1414
1415
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1412

def get_superfund(xero_tenant_id, super_fund_id, opts = {})
  data, _status_code, _headers = get_superfund_with_http_info(xero_tenant_id, super_fund_id, opts)
  data
end

#get_superfund_products(xero_tenant_id, opts = {}) ⇒ SuperFundProducts

Retrieves superfund products

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :abn (String)

    The ABN of the Regulated SuperFund

  • :usi (String)

    The USI of the Regulated SuperFund

Returns:

  • (SuperFundProducts)

1488
1489
1490
1491
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1488

def get_superfund_products(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_superfund_products_with_http_info(xero_tenant_id, opts)
  data
end

#get_superfund_products_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(SuperFundProducts, Integer, Hash)>

Retrieves superfund products

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(SuperFundProducts, Integer, Hash)>)

    SuperFundProducts data, response status code and response headers


1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1499

def get_superfund_products_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfund_products ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfund_products"
  end
  # resource path
  local_var_path = '/SuperfundProducts'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ABN'] = opts[:'abn'] if !opts[:'abn'].nil?
  query_params[:'USI'] = opts[:'usi'] if !opts[:'usi'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SuperFundProducts' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_superfund_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {}) ⇒ Array<(SuperFunds, Integer, Hash)>

Retrieves a superfund by using a unique superfund ID

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • super_fund_id (String)

    Superfund id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(SuperFunds, Integer, Hash)>)

    SuperFunds data, response status code and response headers


1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1422

def get_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfund ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfund"
  end
  # verify the required parameter 'super_fund_id' is set
  if @api_client.config.client_side_validation && super_fund_id.nil?
    fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.get_superfund"
  end
  # resource path
  local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SuperFunds' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_superfunds(xero_tenant_id, opts = {}) ⇒ SuperFunds

Retrieves superfunds

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :if_modified_since (String)

    Only records created or modified since this timestamp will be returned

  • :where (String)

    Filter by an any element

  • :order (String)

    Order by an any element

  • :page (Integer)

    e.g. page&#x3D;1 – Up to 100 SuperFunds will be returned in a single API call

Returns:

  • (SuperFunds)

1565
1566
1567
1568
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1565

def get_superfunds(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_superfunds_with_http_info(xero_tenant_id, opts)
  data
end

#get_superfunds_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(SuperFunds, Integer, Hash)>

Retrieves superfunds

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(SuperFunds, Integer, Hash)>)

    SuperFunds data, response status code and response headers


1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1578

def get_superfunds_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_superfunds ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_superfunds"
  end
  # resource path
  local_var_path = '/Superfunds'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SuperFunds' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_superfunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_timesheet(xero_tenant_id, timesheet_id, opts = {}) ⇒ TimesheetObject

Retrieves a timesheet by using a unique timesheet id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • timesheet_id (String)

    Timesheet id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (TimesheetObject)

1643
1644
1645
1646
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1643

def get_timesheet(xero_tenant_id, timesheet_id, opts = {})
  data, _status_code, _headers = get_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
  data
end

#get_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {}) ⇒ Array<(TimesheetObject, Integer, Hash)>

Retrieves a timesheet by using a unique timesheet id

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • timesheet_id (String)

    Timesheet id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(TimesheetObject, Integer, Hash)>)

    TimesheetObject data, response status code and response headers


1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1653

def get_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_timesheet"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.get_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TimesheetObject' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_timesheets(xero_tenant_id, opts = {}) ⇒ Timesheets

Retrieves timesheets

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :if_modified_since (String)

    Only records created or modified since this timestamp will be returned

  • :where (String)

    Filter by an any element

  • :order (String)

    Order by an any element

  • :page (Integer)

    e.g. page&#x3D;1 – Up to 100 timesheets will be returned in a single API call

Returns:

  • (Timesheets)

1721
1722
1723
1724
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1721

def get_timesheets(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
  data
end

#get_timesheets_with_http_info(xero_tenant_id, options = {}) ⇒ Array<(Timesheets, Integer, Hash)>

Retrieves timesheets

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Timesheets, Integer, Hash)>)

    Timesheets data, response status code and response headers


1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1734

def get_timesheets_with_http_info(xero_tenant_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.get_timesheets ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.get_timesheets"
  end
  # resource path
  local_var_path = '/Timesheets'

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Timesheets' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#get_timesheets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_employee(xero_tenant_id, employee_id, opts = {}) ⇒ Employees

Updates an employee's detail Update properties on a single employee

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • employee_id (String)

    Employee id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :employee (Array<Employee>)

Returns:

  • (Employees)

1801
1802
1803
1804
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1801

def update_employee(xero_tenant_id, employee_id, opts = {})
  data, _status_code, _headers = update_employee_with_http_info(xero_tenant_id, employee_id, opts)
  data
end

#update_employee_with_http_info(xero_tenant_id, employee_id, options = {}) ⇒ Array<(Employees, Integer, Hash)>

Updates an employee&#39;s detail Update properties on a single employee

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • employee_id (String)

    Employee id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Employees, Integer, Hash)>)

    Employees data, response status code and response headers


1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1813

def update_employee_with_http_info(xero_tenant_id, employee_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_employee ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_employee"
  end
  # verify the required parameter 'employee_id' is set
  if @api_client.config.client_side_validation && employee_id.nil?
    fail ArgumentError, "Missing the required parameter 'employee_id' when calling PayrollAuApi.update_employee"
  end
  # resource path
  local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(opts[:'employee']) 

  # return_type
  return_type = opts[:return_type] || 'Employees' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#update_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_leave_application(xero_tenant_id, leave_application_id, leave_application, opts = {}) ⇒ LeaveApplications

Updates a specific leave application

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • leave_application_id (String)

    Leave Application id for single object

  • leave_application (Array<LeaveApplication>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (LeaveApplications)

1881
1882
1883
1884
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1881

def update_leave_application(xero_tenant_id, leave_application_id, leave_application, opts = {})
  data, _status_code, _headers = update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, opts)
  data
end

#update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, options = {}) ⇒ Array<(LeaveApplications, Integer, Hash)>

Updates a specific leave application

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • leave_application_id (String)

    Leave Application id for single object

  • leave_application (Array<LeaveApplication>)
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(LeaveApplications, Integer, Hash)>)

    LeaveApplications data, response status code and response headers


1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1892

def update_leave_application_with_http_info(xero_tenant_id, leave_application_id, leave_application, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_leave_application ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_leave_application"
  end
  # verify the required parameter 'leave_application_id' is set
  if @api_client.config.client_side_validation && leave_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'leave_application_id' when calling PayrollAuApi.update_leave_application"
  end
  # verify the required parameter 'leave_application' is set
  if @api_client.config.client_side_validation && leave_application.nil?
    fail ArgumentError, "Missing the required parameter 'leave_application' when calling PayrollAuApi.update_leave_application"
  end
  # resource path
  local_var_path = '/LeaveApplications/{LeaveApplicationID}'.sub('{' + 'LeaveApplicationID' + '}', leave_application_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(leave_application) 

  # return_type
  return_type = opts[:return_type] || 'LeaveApplications' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#update_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_pay_run(xero_tenant_id, pay_run_id, opts = {}) ⇒ PayRuns

Updates a pay run Update properties on a single PayRun

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_run_id (String)

    PayRun id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :pay_run (Array<PayRun>)

Returns:

  • (PayRuns)

1965
1966
1967
1968
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1965

def update_pay_run(xero_tenant_id, pay_run_id, opts = {})
  data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, opts)
  data
end

#update_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {}) ⇒ Array<(PayRuns, Integer, Hash)>

Updates a pay run Update properties on a single PayRun

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • pay_run_id (String)

    PayRun id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(PayRuns, Integer, Hash)>)

    PayRuns data, response status code and response headers


1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1977

def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_pay_run ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_pay_run"
  end
  # verify the required parameter 'pay_run_id' is set
  if @api_client.config.client_side_validation && pay_run_id.nil?
    fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollAuApi.update_pay_run"
  end
  # resource path
  local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(opts[:'pay_run']) 

  # return_type
  return_type = opts[:return_type] || 'PayRuns' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#update_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_payslip(xero_tenant_id, payslip_id, opts = {}) ⇒ Payslips

Updates a payslip Update lines on a single payslips

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payslip_id (String)

    Payslip id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :payslip_lines (Array<PayslipLines>)

Returns:

  • (Payslips)

2046
2047
2048
2049
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2046

def update_payslip(xero_tenant_id, payslip_id, opts = {})
  data, _status_code, _headers = update_payslip_with_http_info(xero_tenant_id, payslip_id, opts)
  data
end

#update_payslip_with_http_info(xero_tenant_id, payslip_id, options = {}) ⇒ Array<(Payslips, Integer, Hash)>

Updates a payslip Update lines on a single payslips

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • payslip_id (String)

    Payslip id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Payslips, Integer, Hash)>)

    Payslips data, response status code and response headers


2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2058

def update_payslip_with_http_info(xero_tenant_id, payslip_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_payslip ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_payslip"
  end
  # verify the required parameter 'payslip_id' is set
  if @api_client.config.client_side_validation && payslip_id.nil?
    fail ArgumentError, "Missing the required parameter 'payslip_id' when calling PayrollAuApi.update_payslip"
  end
  # resource path
  local_var_path = '/Payslip/{PayslipID}'.sub('{' + 'PayslipID' + '}', payslip_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(opts[:'payslip_lines']) 

  # return_type
  return_type = opts[:return_type] || 'Payslips' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#update_payslip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_superfund(xero_tenant_id, super_fund_id, opts = {}) ⇒ SuperFunds

Updates a superfund Update properties on a single Superfund

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • super_fund_id (String)

    Superfund id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :super_fund (Array<SuperFund>)

Returns:

  • (SuperFunds)

2127
2128
2129
2130
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2127

def update_superfund(xero_tenant_id, super_fund_id, opts = {})
  data, _status_code, _headers = update_superfund_with_http_info(xero_tenant_id, super_fund_id, opts)
  data
end

#update_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {}) ⇒ Array<(SuperFunds, Integer, Hash)>

Updates a superfund Update properties on a single Superfund

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • super_fund_id (String)

    Superfund id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(SuperFunds, Integer, Hash)>)

    SuperFunds data, response status code and response headers


2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2139

def update_superfund_with_http_info(xero_tenant_id, super_fund_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_superfund ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_superfund"
  end
  # verify the required parameter 'super_fund_id' is set
  if @api_client.config.client_side_validation && super_fund_id.nil?
    fail ArgumentError, "Missing the required parameter 'super_fund_id' when calling PayrollAuApi.update_superfund"
  end
  # resource path
  local_var_path = '/Superfunds/{SuperFundID}'.sub('{' + 'SuperFundID' + '}', super_fund_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(opts[:'super_fund']) 

  # return_type
  return_type = opts[:return_type] || 'SuperFunds' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#update_superfund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_timesheet(xero_tenant_id, timesheet_id, opts = {}) ⇒ Timesheets

Updates a timesheet Update properties on a single timesheet

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • timesheet_id (String)

    Timesheet id for single object

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :timesheet (Array<Timesheet>)

Returns:

  • (Timesheets)

2208
2209
2210
2211
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2208

def update_timesheet(xero_tenant_id, timesheet_id, opts = {})
  data, _status_code, _headers = update_timesheet_with_http_info(xero_tenant_id, timesheet_id, opts)
  data
end

#update_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {}) ⇒ Array<(Timesheets, Integer, Hash)>

Updates a timesheet Update properties on a single timesheet

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

  • timesheet_id (String)

    Timesheet id for single object

  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Timesheets, Integer, Hash)>)

    Timesheets data, response status code and response headers


2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2220

def update_timesheet_with_http_info(xero_tenant_id, timesheet_id, options = {})
  opts = options.dup
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayrollAuApi.update_timesheet ...'
  end
  # verify the required parameter 'xero_tenant_id' is set
  if @api_client.config.client_side_validation && xero_tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollAuApi.update_timesheet"
  end
  # verify the required parameter 'timesheet_id' is set
  if @api_client.config.client_side_validation && timesheet_id.nil?
    fail ArgumentError, "Missing the required parameter 'timesheet_id' when calling PayrollAuApi.update_timesheet"
  end
  # resource path
  local_var_path = '/Timesheets/{TimesheetID}'.sub('{' + 'TimesheetID' + '}', timesheet_id.to_s)

  # camelize keys of incoming `where` opts
  opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?

  # query parameters
  query_params = opts[:query_params] || {}
  
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
  query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Xero-Tenant-Id'] = xero_tenant_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(opts[:'timesheet']) 

  # return_type
  return_type = opts[:return_type] || 'Timesheets' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#update_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end