Method: OpenapiClient::XHRVerticallyIntegratedApi#xhr_time_off_entries20230301_with_http_info

Defined in:
lib/openapi_client/api/xhr_vertically_integrated_api.rb

#xhr_time_off_entries20230301_with_http_info(start_date, end_date, opts = {}) ⇒ Array<(Array<TimeOffEntryResponse>, Integer, Hash)>

Time off entries Retrieve time off / absence entries

Parameters:

  • start_date (Date)

    The start date of the search period

  • end_date (Date)

    The end date of the search period

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

    the optional parameters

Returns:

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

    Array<TimeOffEntryResponse> data, response status code and response headers



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
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/openapi_client/api/xhr_vertically_integrated_api.rb', line 461

def xhr_time_off_entries20230301_with_http_info(start_date, end_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XHRVerticallyIntegratedApi.xhr_time_off_entries20230301 ...'
  end
  # verify the required parameter 'start_date' is set
  if @api_client.config.client_side_validation && start_date.nil?
    fail ArgumentError, "Missing the required parameter 'start_date' when calling XHRVerticallyIntegratedApi.xhr_time_off_entries20230301"
  end
  # verify the required parameter 'end_date' is set
  if @api_client.config.client_side_validation && end_date.nil?
    fail ArgumentError, "Missing the required parameter 'end_date' when calling XHRVerticallyIntegratedApi.xhr_time_off_entries20230301"
  end
  # resource path
  local_var_path = '/2023-03-01/xhr/time-off-entries'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start_date'] = start_date
  query_params[:'end_date'] = end_date

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<TimeOffEntryResponse>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['access-token']

  new_options = opts.merge(
    :operation => :"XHRVerticallyIntegratedApi.xhr_time_off_entries20230301",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XHRVerticallyIntegratedApi#xhr_time_off_entries20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end