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

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

Approve a requested 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (LeaveApplications)


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

def approve_leave_application(xero_tenant_id, leave_application_id, opts = {})
  data, _status_code, _headers = approve_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
  data
end

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

Approve a requested 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



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
95
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 36

def approve_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.approve_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.approve_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.approve_leave_application"
  end
  # resource path
  local_var_path = '/LeaveApplications/{LeaveApplicationID}/approve'.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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].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(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#approve_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (Employees)


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

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



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
172
173
174
175
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 114

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (LeaveApplications)


183
184
185
186
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 183

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



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
249
250
251
252
253
254
255
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 194

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (PayItems)


263
264
265
266
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 263

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



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
326
327
328
329
330
331
332
333
334
335
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 274

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (PayRuns)


343
344
345
346
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 343

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



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
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 354

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (PayrollCalendars)


423
424
425
426
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 423

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



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
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 434

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (SuperFunds)


503
504
505
506
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 503

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



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
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 514

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (Timesheets)


583
584
585
586
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 583

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



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
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 594

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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)


662
663
664
665
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 662

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



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
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 672

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 (DateTime)

    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)


740
741
742
743
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 740

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



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
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 753

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)


818
819
820
821
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 818

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



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
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 828

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 (DateTime)

    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)


896
897
898
899
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 896

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_v2(xero_tenant_id, opts = {}) ⇒ LeaveApplications

Retrieves leave applications including leave requests

Parameters:

  • xero_tenant_id (String)

    Xero identifier for Tenant

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

    the optional parameters

Options Hash (opts):

  • :if_modified_since (DateTime)

    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)


977
978
979
980
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 977

def get_leave_applications_v2(xero_tenant_id, opts = {})
  data, _status_code, _headers = get_leave_applications_v2_with_http_info(xero_tenant_id, opts)
  data
end

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

Retrieves leave applications including leave requests

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



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
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 990

def get_leave_applications_v2_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_v2 ...'
  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_v2"
  end
  # resource path
  local_var_path = '/LeaveApplications/v2'

  # 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_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
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



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
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 909

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 (DateTime)

    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)


1058
1059
1060
1061
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1058

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



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
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1071

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)


1136
1137
1138
1139
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1136

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



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
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1146

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 (DateTime)

    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)


1214
1215
1216
1217
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1214

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



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
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1227

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)


1292
1293
1294
1295
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1292

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



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
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1302

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 (DateTime)

    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)


1370
1371
1372
1373
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1370

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



1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1383

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)


1448
1449
1450
1451
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1448

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



1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1458

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)


1522
1523
1524
1525
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1522

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



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
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1531

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)


1592
1593
1594
1595
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1592

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)


1668
1669
1670
1671
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1668

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



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
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1679

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



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
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1602

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 (DateTime)

    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)


1745
1746
1747
1748
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1745

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



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
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1758

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)


1823
1824
1825
1826
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1823

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



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
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1833

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 (DateTime)

    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)


1901
1902
1903
1904
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1901

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



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
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1914

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

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

Reject 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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (LeaveApplications)


1980
1981
1982
1983
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1980

def reject_leave_application(xero_tenant_id, leave_application_id, opts = {})
  data, _status_code, _headers = reject_leave_application_with_http_info(xero_tenant_id, leave_application_id, opts)
  data
end

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

Reject 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



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
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 1991

def reject_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.reject_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.reject_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.reject_leave_application"
  end
  # resource path
  local_var_path = '/LeaveApplications/{LeaveApplicationID}/reject'.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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].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(:POST, local_var_path, "PayrollAuApi", new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayrollAuApi#reject_leave_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_employee(xero_tenant_id, employee_id, employee, 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

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (Employees)


2060
2061
2062
2063
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2060

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

#update_employee_with_http_info(xero_tenant_id, employee_id, employee, 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

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

    the optional parameters

Returns:

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

    Employees data, response status code and response headers



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
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2073

def update_employee_with_http_info(xero_tenant_id, employee_id, employee, 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
  # 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.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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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#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

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (LeaveApplications)


2147
2148
2149
2150
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2147

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



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
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2159

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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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, pay_run, 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

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (PayRuns)


2234
2235
2236
2237
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2234

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

#update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, 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

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

    the optional parameters

Returns:

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

    PayRuns data, response status code and response headers



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
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2247

def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, 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
  # 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.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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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#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, payslip_lines, 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

  • payslip_lines (Array<PayslipLines>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (Payslips)


2322
2323
2324
2325
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2322

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

#update_payslip_with_http_info(xero_tenant_id, payslip_id, payslip_lines, 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

  • payslip_lines (Array<PayslipLines>)
  • opts (Hash)

    the optional parameters

Returns:

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

    Payslips data, response status code and response headers



2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2335

def update_payslip_with_http_info(xero_tenant_id, payslip_id, payslip_lines, 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
  # verify the required parameter 'payslip_lines' is set
  if @api_client.config.client_side_validation && payslip_lines.nil?
    fail ArgumentError, "Missing the required parameter 'payslip_lines' 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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(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, super_fund, 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

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (SuperFunds)


2410
2411
2412
2413
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2410

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

#update_superfund_with_http_info(xero_tenant_id, super_fund_id, super_fund, 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

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

    the optional parameters

Returns:

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

    SuperFunds data, response status code and response headers



2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2423

def update_superfund_with_http_info(xero_tenant_id, super_fund_id, super_fund, 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
  # 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.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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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#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, timesheet, 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

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Returns:

  • (Timesheets)


2498
2499
2500
2501
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2498

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

#update_timesheet_with_http_info(xero_tenant_id, timesheet_id, timesheet, 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

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

    the optional parameters

Returns:

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

    Timesheets data, response status code and response headers



2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
# File 'lib/xero-ruby/api/payroll_au_api.rb', line 2511

def update_timesheet_with_http_info(xero_tenant_id, timesheet_id, timesheet, 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
  # 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.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
  header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

  # 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#update_timesheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end