Class: Nordlet::Hr::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/nordlet/hr/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ void

Parameters:



9
10
11
# File 'lib/nordlet/hr/client.rb', line 9

def initialize(client:)
  @client = client
end

Instance Method Details

#post_v1hr_contracts_create(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrContractsCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/nordlet/hr/client.rb', line 246

def post_v1hr_contracts_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/contracts/create",
    body: Nordlet::Hr::Types::PostV1HrContractsCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrContractsCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_contracts_end(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrContractsEndResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/nordlet/hr/client.rb', line 278

def post_v1hr_contracts_end(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/contracts/end",
    body: Nordlet::Hr::Types::PostV1HrContractsEndRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrContractsEndResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_contracts_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrContractsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/nordlet/hr/client.rb', line 310

def post_v1hr_contracts_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/contracts/list",
    body: Nordlet::Hr::Types::PostV1HrContractsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrContractsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_attachments_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesAttachmentsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/nordlet/hr/client.rb', line 598

def post_v1hr_employees_attachments_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/attachments/list",
    body: Nordlet::Hr::Types::PostV1HrEmployeesAttachmentsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesAttachmentsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_create(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/nordlet/hr/client.rb', line 118

def post_v1hr_employees_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/create",
    body: Nordlet::Hr::Types::PostV1HrEmployeesCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_get(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesGetResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/nordlet/hr/client.rb', line 182

def post_v1hr_employees_get(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/get",
    body: Nordlet::Hr::Types::PostV1HrEmployeesGetRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesGetResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/nordlet/hr/client.rb', line 214

def post_v1hr_employees_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/list",
    body: Nordlet::Hr::Types::PostV1HrEmployeesListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_records_create(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesRecordsCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/nordlet/hr/client.rb', line 470

def post_v1hr_employees_records_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/records/create",
    body: Nordlet::Hr::Types::PostV1HrEmployeesRecordsCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesRecordsCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_records_delete(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesRecordsDeleteResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
# File 'lib/nordlet/hr/client.rb', line 534

def post_v1hr_employees_records_delete(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/records/delete",
    body: Nordlet::Hr::Types::PostV1HrEmployeesRecordsDeleteRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesRecordsDeleteResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_records_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesRecordsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/nordlet/hr/client.rb', line 566

def post_v1hr_employees_records_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/records/list",
    body: Nordlet::Hr::Types::PostV1HrEmployeesRecordsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesRecordsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_records_update(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesRecordsUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/nordlet/hr/client.rb', line 502

def post_v1hr_employees_records_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/records/update",
    body: Nordlet::Hr::Types::PostV1HrEmployeesRecordsUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesRecordsUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_employees_update(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrEmployeesUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/nordlet/hr/client.rb', line 150

def post_v1hr_employees_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/employees/update",
    body: Nordlet::Hr::Types::PostV1HrEmployeesUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrEmployeesUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_incapacity_certificates_create(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrIncapacityCertificatesCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/nordlet/hr/client.rb', line 406

def post_v1hr_incapacity_certificates_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/incapacity-certificates/create",
    body: Nordlet::Hr::Types::PostV1HrIncapacityCertificatesCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrIncapacityCertificatesCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_incapacity_certificates_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrIncapacityCertificatesListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/nordlet/hr/client.rb', line 438

def post_v1hr_incapacity_certificates_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/incapacity-certificates/list",
    body: Nordlet::Hr::Types::PostV1HrIncapacityCertificatesListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrIncapacityCertificatesListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_leave_balances_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrLeaveBalancesListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/nordlet/hr/client.rb', line 374

def post_v1hr_leave_balances_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/leave-balances/list",
    body: Nordlet::Hr::Types::PostV1HrLeaveBalancesListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrLeaveBalancesListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_leave_balances_set(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrLeaveBalancesSetResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/nordlet/hr/client.rb', line 342

def post_v1hr_leave_balances_set(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/leave-balances/set",
    body: Nordlet::Hr::Types::PostV1HrLeaveBalancesSetRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrLeaveBalancesSetResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_positions_create(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrPositionsCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/nordlet/hr/client.rb', line 22

def post_v1hr_positions_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/positions/create",
    body: Nordlet::Hr::Types::PostV1HrPositionsCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrPositionsCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_positions_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrPositionsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/nordlet/hr/client.rb', line 86

def post_v1hr_positions_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/positions/list",
    body: Nordlet::Hr::Types::PostV1HrPositionsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrPositionsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_positions_update(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrPositionsUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/nordlet/hr/client.rb', line 54

def post_v1hr_positions_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/positions/update",
    body: Nordlet::Hr::Types::PostV1HrPositionsUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrPositionsUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_timesheets_delete(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrTimesheetsDeleteResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/nordlet/hr/client.rb', line 758

def post_v1hr_timesheets_delete(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/timesheets/delete",
    body: Nordlet::Hr::Types::PostV1HrTimesheetsDeleteRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrTimesheetsDeleteResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_timesheets_generate(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrTimesheetsGenerateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/nordlet/hr/client.rb', line 630

def post_v1hr_timesheets_generate(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/timesheets/generate",
    body: Nordlet::Hr::Types::PostV1HrTimesheetsGenerateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrTimesheetsGenerateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_timesheets_get(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrTimesheetsGetResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
# File 'lib/nordlet/hr/client.rb', line 694

def post_v1hr_timesheets_get(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/timesheets/get",
    body: Nordlet::Hr::Types::PostV1HrTimesheetsGetRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrTimesheetsGetResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_timesheets_list(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrTimesheetsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/nordlet/hr/client.rb', line 726

def post_v1hr_timesheets_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/timesheets/list",
    body: Nordlet::Hr::Types::PostV1HrTimesheetsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrTimesheetsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1hr_timesheets_upsert(request_options: {}, **params) ⇒ Nordlet::Hr::Types::PostV1HrTimesheetsUpsertResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/nordlet/hr/client.rb', line 662

def post_v1hr_timesheets_upsert(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/hr/timesheets/upsert",
    body: Nordlet::Hr::Types::PostV1HrTimesheetsUpsertRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Hr::Types::PostV1HrTimesheetsUpsertResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end