Class: MergeHRISClient::EmployeesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/merge_hris_client/api/employees_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EmployeesApi

Returns a new instance of EmployeesApi.



19
20
21
# File 'lib/merge_hris_client/api/employees_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/merge_hris_client/api/employees_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#employees_create(x_account_token, employee_endpoint_request, opts = {}) ⇒ EmployeeResponse

Creates an ‘Employee` object with the given values.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :is_debug_mode (Boolean)

    Whether to include debug fields (such as log file links) in the response.

  • :run_async (Boolean)

    Whether or not third-party updates should be run asynchronously.

Returns:



29
30
31
32
# File 'lib/merge_hris_client/api/employees_api.rb', line 29

def employees_create(, employee_endpoint_request, opts = {})
  data, _status_code, _headers = employees_create_with_http_info(, employee_endpoint_request, opts)
  data
end

#employees_create_with_http_info(x_account_token, employee_endpoint_request, opts = {}) ⇒ Array<(EmployeeResponse, Integer, Hash)>

Creates an &#x60;Employee&#x60; object with the given values.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :is_debug_mode (Boolean)

    Whether to include debug fields (such as log file links) in the response.

  • :run_async (Boolean)

    Whether or not third-party updates should be run asynchronously.

Returns:

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

    EmployeeResponse data, response status code and response headers



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
96
# File 'lib/merge_hris_client/api/employees_api.rb', line 41

def employees_create_with_http_info(, employee_endpoint_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmployeesApi.employees_create ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployeesApi.employees_create"
  end
  # verify the required parameter 'employee_endpoint_request' is set
  if @api_client.config.client_side_validation && employee_endpoint_request.nil?
    fail ArgumentError, "Missing the required parameter 'employee_endpoint_request' when calling EmployeesApi.employees_create"
  end
  # resource path
  local_var_path = '/employees'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'is_debug_mode'] = opts[:'is_debug_mode'] if !opts[:'is_debug_mode'].nil?
  query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EmployeeResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

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

#employees_ignore_create(x_account_token, model_id, ignore_common_model_request, opts = {}) ⇒ nil

Ignores a specific row based on the ‘model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

  • model_id (String)
  • ignore_common_model_request (IgnoreCommonModelRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


104
105
106
107
# File 'lib/merge_hris_client/api/employees_api.rb', line 104

def employees_ignore_create(, model_id, ignore_common_model_request, opts = {})
  employees_ignore_create_with_http_info(, model_id, ignore_common_model_request, opts)
  nil
end

#employees_ignore_create_with_http_info(x_account_token, model_id, ignore_common_model_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Ignores a specific row based on the &#x60;model_id&#x60; in the url. These records will have their properties set to null, and will not be updated in future syncs. The &quot;reason&quot; and &quot;message&quot; fields in the request body will be stored for audit purposes.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

  • model_id (String)
  • ignore_common_model_request (IgnoreCommonModelRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/merge_hris_client/api/employees_api.rb', line 115

def employees_ignore_create_with_http_info(, model_id, ignore_common_model_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmployeesApi.employees_ignore_create ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployeesApi.employees_ignore_create"
  end
  # verify the required parameter 'model_id' is set
  if @api_client.config.client_side_validation && model_id.nil?
    fail ArgumentError, "Missing the required parameter 'model_id' when calling EmployeesApi.employees_ignore_create"
  end
  # verify the required parameter 'ignore_common_model_request' is set
  if @api_client.config.client_side_validation && ignore_common_model_request.nil?
    fail ArgumentError, "Missing the required parameter 'ignore_common_model_request' when calling EmployeesApi.employees_ignore_create"
  end
  # resource path
  local_var_path = '/employees/ignore/{model_id}'.sub('{' + 'model_id' + '}', CGI.escape(model_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

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

#employees_list(x_account_token, opts = {}) ⇒ PaginatedEmployeeList

Returns a list of ‘Employee` objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :company_id (String)

    If provided, will only return employees for this company.

  • :created_after (Time)

    If provided, will only return objects created after this datetime.

  • :created_before (Time)

    If provided, will only return objects created before this datetime.

  • :cursor (String)

    The pagination cursor value.

  • :display_full_name (String)

    If provided, will only return employees with this display name.

  • :employment_status (String)

    If provided, will only return employees with this employment status. * &#x60;ACTIVE&#x60; - ACTIVE * &#x60;PENDING&#x60; - PENDING * &#x60;INACTIVE&#x60; - INACTIVE

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :first_name (String)

    If provided, will only return employees with this first name.

  • :groups (String)

    If provided, will only return employees matching the group ids; multiple groups can be separated by commas.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_sensitive_fields (Boolean)

    Whether to include sensitive fields (such as social security numbers) in the response.

  • :last_name (String)

    If provided, will only return employees with this last name.

  • :manager_id (String)

    If provided, will only return employees for this manager.

  • :modified_after (Time)

    If provided, only objects synced by Merge after this date time will be returned.

  • :modified_before (Time)

    If provided, only objects synced by Merge before this date time will be returned.

  • :page_size (Integer)

    Number of results to return per page.

  • :pay_group_id (String)

    If provided, will only return employees for this pay group

  • :personal_email (String)

    If provided, will only return Employees with this personal email

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :remote_id (String)

    The API provider&#39;s ID for the given object.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

  • :started_after (Time)

    If provided, will only return employees that started after this datetime.

  • :started_before (Time)

    If provided, will only return employees that started before this datetime.

  • :team_id (String)

    If provided, will only return employees for this team.

  • :terminated_after (Time)

    If provided, will only return employees that were terminated after this datetime.

  • :terminated_before (Time)

    If provided, will only return employees that were terminated before this datetime.

  • :work_email (String)

    If provided, will only return Employees with this work email

  • :work_location_id (String)

    If provided, will only return employees for this location.

Returns:



205
206
207
208
# File 'lib/merge_hris_client/api/employees_api.rb', line 205

def employees_list(, opts = {})
  data, _status_code, _headers = employees_list_with_http_info(, opts)
  data
end

#employees_list_with_http_info(x_account_token, opts = {}) ⇒ Array<(PaginatedEmployeeList, Integer, Hash)>

Returns a list of &#x60;Employee&#x60; objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :company_id (String)

    If provided, will only return employees for this company.

  • :created_after (Time)

    If provided, will only return objects created after this datetime.

  • :created_before (Time)

    If provided, will only return objects created before this datetime.

  • :cursor (String)

    The pagination cursor value.

  • :display_full_name (String)

    If provided, will only return employees with this display name.

  • :employment_status (String)

    If provided, will only return employees with this employment status. * &#x60;ACTIVE&#x60; - ACTIVE * &#x60;PENDING&#x60; - PENDING * &#x60;INACTIVE&#x60; - INACTIVE

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :first_name (String)

    If provided, will only return employees with this first name.

  • :groups (String)

    If provided, will only return employees matching the group ids; multiple groups can be separated by commas.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_sensitive_fields (Boolean)

    Whether to include sensitive fields (such as social security numbers) in the response.

  • :last_name (String)

    If provided, will only return employees with this last name.

  • :manager_id (String)

    If provided, will only return employees for this manager.

  • :modified_after (Time)

    If provided, only objects synced by Merge after this date time will be returned.

  • :modified_before (Time)

    If provided, only objects synced by Merge before this date time will be returned.

  • :page_size (Integer)

    Number of results to return per page.

  • :pay_group_id (String)

    If provided, will only return employees for this pay group

  • :personal_email (String)

    If provided, will only return Employees with this personal email

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :remote_id (String)

    The API provider&#39;s ID for the given object.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

  • :started_after (Time)

    If provided, will only return employees that started after this datetime.

  • :started_before (Time)

    If provided, will only return employees that started before this datetime.

  • :team_id (String)

    If provided, will only return employees for this team.

  • :terminated_after (Time)

    If provided, will only return employees that were terminated after this datetime.

  • :terminated_before (Time)

    If provided, will only return employees that were terminated before this datetime.

  • :work_email (String)

    If provided, will only return Employees with this work email

  • :work_location_id (String)

    If provided, will only return employees for this location.

Returns:

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

    PaginatedEmployeeList data, response status code and response headers



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/merge_hris_client/api/employees_api.rb', line 243

def employees_list_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmployeesApi.employees_list ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployeesApi.employees_list"
  end
  allowable_values = ["ACTIVE", "INACTIVE", "PENDING"]
  if @api_client.config.client_side_validation && opts[:'employment_status'] && !allowable_values.include?(opts[:'employment_status'])
    fail ArgumentError, "invalid value for \"employment_status\", must be one of #{allowable_values}"
  end
  allowable_values = ["company", "company,pay_group", "employments", "employments,company", "employments,company,pay_group", "employments,groups", "employments,groups,company", "employments,groups,company,pay_group", "employments,groups,home_location", "employments,groups,home_location,company", "employments,groups,home_location,company,pay_group", "employments,groups,home_location,manager", "employments,groups,home_location,manager,company", "employments,groups,home_location,manager,company,pay_group", "employments,groups,home_location,manager,pay_group", "employments,groups,home_location,manager,team", "employments,groups,home_location,manager,team,company", "employments,groups,home_location,manager,team,company,pay_group", "employments,groups,home_location,manager,team,pay_group", "employments,groups,home_location,pay_group", "employments,groups,home_location,team", "employments,groups,home_location,team,company", "employments,groups,home_location,team,company,pay_group", "employments,groups,home_location,team,pay_group", "employments,groups,home_location,work_location", "employments,groups,home_location,work_location,company", "employments,groups,home_location,work_location,company,pay_group", "employments,groups,home_location,work_location,manager", "employments,groups,home_location,work_location,manager,company", "employments,groups,home_location,work_location,manager,company,pay_group", "employments,groups,home_location,work_location,manager,pay_group", "employments,groups,home_location,work_location,manager,team", "employments,groups,home_location,work_location,manager,team,company", "employments,groups,home_location,work_location,manager,team,company,pay_group", "employments,groups,home_location,work_location,manager,team,pay_group", "employments,groups,home_location,work_location,pay_group", "employments,groups,home_location,work_location,team", "employments,groups,home_location,work_location,team,company", "employments,groups,home_location,work_location,team,company,pay_group", "employments,groups,home_location,work_location,team,pay_group", "employments,groups,manager", "employments,groups,manager,company", "employments,groups,manager,company,pay_group", "employments,groups,manager,pay_group", "employments,groups,manager,team", "employments,groups,manager,team,company", "employments,groups,manager,team,company,pay_group", "employments,groups,manager,team,pay_group", "employments,groups,pay_group", "employments,groups,team", "employments,groups,team,company", "employments,groups,team,company,pay_group", "employments,groups,team,pay_group", "employments,groups,work_location", "employments,groups,work_location,company", "employments,groups,work_location,company,pay_group", "employments,groups,work_location,manager", "employments,groups,work_location,manager,company", "employments,groups,work_location,manager,company,pay_group", "employments,groups,work_location,manager,pay_group", "employments,groups,work_location,manager,team", "employments,groups,work_location,manager,team,company", "employments,groups,work_location,manager,team,company,pay_group", "employments,groups,work_location,manager,team,pay_group", "employments,groups,work_location,pay_group", "employments,groups,work_location,team", "employments,groups,work_location,team,company", "employments,groups,work_location,team,company,pay_group", "employments,groups,work_location,team,pay_group", "employments,home_location", "employments,home_location,company", "employments,home_location,company,pay_group", "employments,home_location,manager", "employments,home_location,manager,company", "employments,home_location,manager,company,pay_group", "employments,home_location,manager,pay_group", "employments,home_location,manager,team", "employments,home_location,manager,team,company", "employments,home_location,manager,team,company,pay_group", "employments,home_location,manager,team,pay_group", "employments,home_location,pay_group", "employments,home_location,team", "employments,home_location,team,company", "employments,home_location,team,company,pay_group", "employments,home_location,team,pay_group", "employments,home_location,work_location", "employments,home_location,work_location,company", "employments,home_location,work_location,company,pay_group", "employments,home_location,work_location,manager", "employments,home_location,work_location,manager,company", "employments,home_location,work_location,manager,company,pay_group", "employments,home_location,work_location,manager,pay_group", "employments,home_location,work_location,manager,team", "employments,home_location,work_location,manager,team,company", "employments,home_location,work_location,manager,team,company,pay_group", "employments,home_location,work_location,manager,team,pay_group", "employments,home_location,work_location,pay_group", "employments,home_location,work_location,team", "employments,home_location,work_location,team,company", "employments,home_location,work_location,team,company,pay_group", "employments,home_location,work_location,team,pay_group", "employments,manager", "employments,manager,company", "employments,manager,company,pay_group", "employments,manager,pay_group", "employments,manager,team", "employments,manager,team,company", "employments,manager,team,company,pay_group", "employments,manager,team,pay_group", "employments,pay_group", "employments,team", "employments,team,company", "employments,team,company,pay_group", "employments,team,pay_group", "employments,work_location", "employments,work_location,company", "employments,work_location,company,pay_group", "employments,work_location,manager", "employments,work_location,manager,company", "employments,work_location,manager,company,pay_group", "employments,work_location,manager,pay_group", "employments,work_location,manager,team", "employments,work_location,manager,team,company", "employments,work_location,manager,team,company,pay_group", "employments,work_location,manager,team,pay_group", "employments,work_location,pay_group", "employments,work_location,team", "employments,work_location,team,company", "employments,work_location,team,company,pay_group", "employments,work_location,team,pay_group", "groups", "groups,company", "groups,company,pay_group", "groups,home_location", "groups,home_location,company", "groups,home_location,company,pay_group", "groups,home_location,manager", "groups,home_location,manager,company", "groups,home_location,manager,company,pay_group", "groups,home_location,manager,pay_group", "groups,home_location,manager,team", "groups,home_location,manager,team,company", "groups,home_location,manager,team,company,pay_group", "groups,home_location,manager,team,pay_group", "groups,home_location,pay_group", "groups,home_location,team", "groups,home_location,team,company", "groups,home_location,team,company,pay_group", "groups,home_location,team,pay_group", "groups,home_location,work_location", "groups,home_location,work_location,company", "groups,home_location,work_location,company,pay_group", "groups,home_location,work_location,manager", "groups,home_location,work_location,manager,company", "groups,home_location,work_location,manager,company,pay_group", "groups,home_location,work_location,manager,pay_group", "groups,home_location,work_location,manager,team", "groups,home_location,work_location,manager,team,company", "groups,home_location,work_location,manager,team,company,pay_group", "groups,home_location,work_location,manager,team,pay_group", "groups,home_location,work_location,pay_group", "groups,home_location,work_location,team", "groups,home_location,work_location,team,company", "groups,home_location,work_location,team,company,pay_group", "groups,home_location,work_location,team,pay_group", "groups,manager", "groups,manager,company", "groups,manager,company,pay_group", "groups,manager,pay_group", "groups,manager,team", "groups,manager,team,company", "groups,manager,team,company,pay_group", "groups,manager,team,pay_group", "groups,pay_group", "groups,team", "groups,team,company", "groups,team,company,pay_group", "groups,team,pay_group", "groups,work_location", "groups,work_location,company", "groups,work_location,company,pay_group", "groups,work_location,manager", "groups,work_location,manager,company", "groups,work_location,manager,company,pay_group", "groups,work_location,manager,pay_group", "groups,work_location,manager,team", "groups,work_location,manager,team,company", "groups,work_location,manager,team,company,pay_group", "groups,work_location,manager,team,pay_group", "groups,work_location,pay_group", "groups,work_location,team", "groups,work_location,team,company", "groups,work_location,team,company,pay_group", "groups,work_location,team,pay_group", "home_location", "home_location,company", "home_location,company,pay_group", "home_location,manager", "home_location,manager,company", "home_location,manager,company,pay_group", "home_location,manager,pay_group", "home_location,manager,team", "home_location,manager,team,company", "home_location,manager,team,company,pay_group", "home_location,manager,team,pay_group", "home_location,pay_group", "home_location,team", "home_location,team,company", "home_location,team,company,pay_group", "home_location,team,pay_group", "home_location,work_location", "home_location,work_location,company", "home_location,work_location,company,pay_group", "home_location,work_location,manager", "home_location,work_location,manager,company", "home_location,work_location,manager,company,pay_group", "home_location,work_location,manager,pay_group", "home_location,work_location,manager,team", "home_location,work_location,manager,team,company", "home_location,work_location,manager,team,company,pay_group", "home_location,work_location,manager,team,pay_group", "home_location,work_location,pay_group", "home_location,work_location,team", "home_location,work_location,team,company", "home_location,work_location,team,company,pay_group", "home_location,work_location,team,pay_group", "manager", "manager,company", "manager,company,pay_group", "manager,pay_group", "manager,team", "manager,team,company", "manager,team,company,pay_group", "manager,team,pay_group", "pay_group", "team", "team,company", "team,company,pay_group", "team,pay_group", "work_location", "work_location,company", "work_location,company,pay_group", "work_location,manager", "work_location,manager,company", "work_location,manager,company,pay_group", "work_location,manager,pay_group", "work_location,manager,team", "work_location,manager,team,company", "work_location,manager,team,company,pay_group", "work_location,manager,team,pay_group", "work_location,pay_group", "work_location,team", "work_location,team,company", "work_location,team,company,pay_group", "work_location,team,pay_group"]
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
    fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
  end
  allowable_values = ["employment_status", "employment_status,ethnicity", "employment_status,ethnicity,gender", "employment_status,ethnicity,gender,marital_status", "employment_status,ethnicity,marital_status", "employment_status,gender", "employment_status,gender,marital_status", "employment_status,marital_status", "ethnicity", "ethnicity,gender", "ethnicity,gender,marital_status", "ethnicity,marital_status", "gender", "gender,marital_status", "marital_status"]
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
    fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
  end
  allowable_values = ["employment_status", "employment_status,ethnicity", "employment_status,ethnicity,gender", "employment_status,ethnicity,gender,marital_status", "employment_status,ethnicity,marital_status", "employment_status,gender", "employment_status,gender,marital_status", "employment_status,marital_status", "ethnicity", "ethnicity,gender", "ethnicity,gender,marital_status", "ethnicity,marital_status", "gender", "gender,marital_status", "marital_status"]
  if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
    fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/employees'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
  query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'display_full_name'] = opts[:'display_full_name'] if !opts[:'display_full_name'].nil?
  query_params[:'employment_status'] = opts[:'employment_status'] if !opts[:'employment_status'].nil?
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
  query_params[:'first_name'] = opts[:'first_name'] if !opts[:'first_name'].nil?
  query_params[:'groups'] = opts[:'groups'] if !opts[:'groups'].nil?
  query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
  query_params[:'include_sensitive_fields'] = opts[:'include_sensitive_fields'] if !opts[:'include_sensitive_fields'].nil?
  query_params[:'last_name'] = opts[:'last_name'] if !opts[:'last_name'].nil?
  query_params[:'manager_id'] = opts[:'manager_id'] if !opts[:'manager_id'].nil?
  query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
  query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'pay_group_id'] = opts[:'pay_group_id'] if !opts[:'pay_group_id'].nil?
  query_params[:'personal_email'] = opts[:'personal_email'] if !opts[:'personal_email'].nil?
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
  query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
  query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
  query_params[:'started_after'] = opts[:'started_after'] if !opts[:'started_after'].nil?
  query_params[:'started_before'] = opts[:'started_before'] if !opts[:'started_before'].nil?
  query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].nil?
  query_params[:'terminated_after'] = opts[:'terminated_after'] if !opts[:'terminated_after'].nil?
  query_params[:'terminated_before'] = opts[:'terminated_before'] if !opts[:'terminated_before'].nil?
  query_params[:'work_email'] = opts[:'work_email'] if !opts[:'work_email'].nil?
  query_params[:'work_location_id'] = opts[:'work_location_id'] if !opts[:'work_location_id'].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[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'PaginatedEmployeeList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"EmployeesApi.employees_list",
    :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: EmployeesApi#employees_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#employees_meta_post_retrieve(x_account_token, opts = {}) ⇒ MetaResponse

Returns metadata for ‘Employee` POSTs.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Returns:



341
342
343
344
# File 'lib/merge_hris_client/api/employees_api.rb', line 341

def employees_meta_post_retrieve(, opts = {})
  data, _status_code, _headers = employees_meta_post_retrieve_with_http_info(, opts)
  data
end

#employees_meta_post_retrieve_with_http_info(x_account_token, opts = {}) ⇒ Array<(MetaResponse, Integer, Hash)>

Returns metadata for &#x60;Employee&#x60; POSTs.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Returns:

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

    MetaResponse data, response status code and response headers



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/merge_hris_client/api/employees_api.rb', line 350

def employees_meta_post_retrieve_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmployeesApi.employees_meta_post_retrieve ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployeesApi.employees_meta_post_retrieve"
  end
  # resource path
  local_var_path = '/employees/meta/post'

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MetaResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"EmployeesApi.employees_meta_post_retrieve",
    :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: EmployeesApi#employees_meta_post_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#employees_retrieve(x_account_token, id, opts = {}) ⇒ Employee

Returns an ‘Employee` object with the given `id`.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_sensitive_fields (Boolean)

    Whether to include sensitive fields (such as social security numbers) in the response.

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

Returns:



409
410
411
412
# File 'lib/merge_hris_client/api/employees_api.rb', line 409

def employees_retrieve(, id, opts = {})
  data, _status_code, _headers = employees_retrieve_with_http_info(, id, opts)
  data
end

#employees_retrieve_with_http_info(x_account_token, id, opts = {}) ⇒ Array<(Employee, Integer, Hash)>

Returns an &#x60;Employee&#x60; object with the given &#x60;id&#x60;.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_sensitive_fields (Boolean)

    Whether to include sensitive fields (such as social security numbers) in the response.

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

Returns:

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

    Employee data, response status code and response headers



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/merge_hris_client/api/employees_api.rb', line 424

def employees_retrieve_with_http_info(, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmployeesApi.employees_retrieve ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployeesApi.employees_retrieve"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling EmployeesApi.employees_retrieve"
  end
  allowable_values = ["company", "company,pay_group", "employments", "employments,company", "employments,company,pay_group", "employments,groups", "employments,groups,company", "employments,groups,company,pay_group", "employments,groups,home_location", "employments,groups,home_location,company", "employments,groups,home_location,company,pay_group", "employments,groups,home_location,manager", "employments,groups,home_location,manager,company", "employments,groups,home_location,manager,company,pay_group", "employments,groups,home_location,manager,pay_group", "employments,groups,home_location,manager,team", "employments,groups,home_location,manager,team,company", "employments,groups,home_location,manager,team,company,pay_group", "employments,groups,home_location,manager,team,pay_group", "employments,groups,home_location,pay_group", "employments,groups,home_location,team", "employments,groups,home_location,team,company", "employments,groups,home_location,team,company,pay_group", "employments,groups,home_location,team,pay_group", "employments,groups,home_location,work_location", "employments,groups,home_location,work_location,company", "employments,groups,home_location,work_location,company,pay_group", "employments,groups,home_location,work_location,manager", "employments,groups,home_location,work_location,manager,company", "employments,groups,home_location,work_location,manager,company,pay_group", "employments,groups,home_location,work_location,manager,pay_group", "employments,groups,home_location,work_location,manager,team", "employments,groups,home_location,work_location,manager,team,company", "employments,groups,home_location,work_location,manager,team,company,pay_group", "employments,groups,home_location,work_location,manager,team,pay_group", "employments,groups,home_location,work_location,pay_group", "employments,groups,home_location,work_location,team", "employments,groups,home_location,work_location,team,company", "employments,groups,home_location,work_location,team,company,pay_group", "employments,groups,home_location,work_location,team,pay_group", "employments,groups,manager", "employments,groups,manager,company", "employments,groups,manager,company,pay_group", "employments,groups,manager,pay_group", "employments,groups,manager,team", "employments,groups,manager,team,company", "employments,groups,manager,team,company,pay_group", "employments,groups,manager,team,pay_group", "employments,groups,pay_group", "employments,groups,team", "employments,groups,team,company", "employments,groups,team,company,pay_group", "employments,groups,team,pay_group", "employments,groups,work_location", "employments,groups,work_location,company", "employments,groups,work_location,company,pay_group", "employments,groups,work_location,manager", "employments,groups,work_location,manager,company", "employments,groups,work_location,manager,company,pay_group", "employments,groups,work_location,manager,pay_group", "employments,groups,work_location,manager,team", "employments,groups,work_location,manager,team,company", "employments,groups,work_location,manager,team,company,pay_group", "employments,groups,work_location,manager,team,pay_group", "employments,groups,work_location,pay_group", "employments,groups,work_location,team", "employments,groups,work_location,team,company", "employments,groups,work_location,team,company,pay_group", "employments,groups,work_location,team,pay_group", "employments,home_location", "employments,home_location,company", "employments,home_location,company,pay_group", "employments,home_location,manager", "employments,home_location,manager,company", "employments,home_location,manager,company,pay_group", "employments,home_location,manager,pay_group", "employments,home_location,manager,team", "employments,home_location,manager,team,company", "employments,home_location,manager,team,company,pay_group", "employments,home_location,manager,team,pay_group", "employments,home_location,pay_group", "employments,home_location,team", "employments,home_location,team,company", "employments,home_location,team,company,pay_group", "employments,home_location,team,pay_group", "employments,home_location,work_location", "employments,home_location,work_location,company", "employments,home_location,work_location,company,pay_group", "employments,home_location,work_location,manager", "employments,home_location,work_location,manager,company", "employments,home_location,work_location,manager,company,pay_group", "employments,home_location,work_location,manager,pay_group", "employments,home_location,work_location,manager,team", "employments,home_location,work_location,manager,team,company", "employments,home_location,work_location,manager,team,company,pay_group", "employments,home_location,work_location,manager,team,pay_group", "employments,home_location,work_location,pay_group", "employments,home_location,work_location,team", "employments,home_location,work_location,team,company", "employments,home_location,work_location,team,company,pay_group", "employments,home_location,work_location,team,pay_group", "employments,manager", "employments,manager,company", "employments,manager,company,pay_group", "employments,manager,pay_group", "employments,manager,team", "employments,manager,team,company", "employments,manager,team,company,pay_group", "employments,manager,team,pay_group", "employments,pay_group", "employments,team", "employments,team,company", "employments,team,company,pay_group", "employments,team,pay_group", "employments,work_location", "employments,work_location,company", "employments,work_location,company,pay_group", "employments,work_location,manager", "employments,work_location,manager,company", "employments,work_location,manager,company,pay_group", "employments,work_location,manager,pay_group", "employments,work_location,manager,team", "employments,work_location,manager,team,company", "employments,work_location,manager,team,company,pay_group", "employments,work_location,manager,team,pay_group", "employments,work_location,pay_group", "employments,work_location,team", "employments,work_location,team,company", "employments,work_location,team,company,pay_group", "employments,work_location,team,pay_group", "groups", "groups,company", "groups,company,pay_group", "groups,home_location", "groups,home_location,company", "groups,home_location,company,pay_group", "groups,home_location,manager", "groups,home_location,manager,company", "groups,home_location,manager,company,pay_group", "groups,home_location,manager,pay_group", "groups,home_location,manager,team", "groups,home_location,manager,team,company", "groups,home_location,manager,team,company,pay_group", "groups,home_location,manager,team,pay_group", "groups,home_location,pay_group", "groups,home_location,team", "groups,home_location,team,company", "groups,home_location,team,company,pay_group", "groups,home_location,team,pay_group", "groups,home_location,work_location", "groups,home_location,work_location,company", "groups,home_location,work_location,company,pay_group", "groups,home_location,work_location,manager", "groups,home_location,work_location,manager,company", "groups,home_location,work_location,manager,company,pay_group", "groups,home_location,work_location,manager,pay_group", "groups,home_location,work_location,manager,team", "groups,home_location,work_location,manager,team,company", "groups,home_location,work_location,manager,team,company,pay_group", "groups,home_location,work_location,manager,team,pay_group", "groups,home_location,work_location,pay_group", "groups,home_location,work_location,team", "groups,home_location,work_location,team,company", "groups,home_location,work_location,team,company,pay_group", "groups,home_location,work_location,team,pay_group", "groups,manager", "groups,manager,company", "groups,manager,company,pay_group", "groups,manager,pay_group", "groups,manager,team", "groups,manager,team,company", "groups,manager,team,company,pay_group", "groups,manager,team,pay_group", "groups,pay_group", "groups,team", "groups,team,company", "groups,team,company,pay_group", "groups,team,pay_group", "groups,work_location", "groups,work_location,company", "groups,work_location,company,pay_group", "groups,work_location,manager", "groups,work_location,manager,company", "groups,work_location,manager,company,pay_group", "groups,work_location,manager,pay_group", "groups,work_location,manager,team", "groups,work_location,manager,team,company", "groups,work_location,manager,team,company,pay_group", "groups,work_location,manager,team,pay_group", "groups,work_location,pay_group", "groups,work_location,team", "groups,work_location,team,company", "groups,work_location,team,company,pay_group", "groups,work_location,team,pay_group", "home_location", "home_location,company", "home_location,company,pay_group", "home_location,manager", "home_location,manager,company", "home_location,manager,company,pay_group", "home_location,manager,pay_group", "home_location,manager,team", "home_location,manager,team,company", "home_location,manager,team,company,pay_group", "home_location,manager,team,pay_group", "home_location,pay_group", "home_location,team", "home_location,team,company", "home_location,team,company,pay_group", "home_location,team,pay_group", "home_location,work_location", "home_location,work_location,company", "home_location,work_location,company,pay_group", "home_location,work_location,manager", "home_location,work_location,manager,company", "home_location,work_location,manager,company,pay_group", "home_location,work_location,manager,pay_group", "home_location,work_location,manager,team", "home_location,work_location,manager,team,company", "home_location,work_location,manager,team,company,pay_group", "home_location,work_location,manager,team,pay_group", "home_location,work_location,pay_group", "home_location,work_location,team", "home_location,work_location,team,company", "home_location,work_location,team,company,pay_group", "home_location,work_location,team,pay_group", "manager", "manager,company", "manager,company,pay_group", "manager,pay_group", "manager,team", "manager,team,company", "manager,team,company,pay_group", "manager,team,pay_group", "pay_group", "team", "team,company", "team,company,pay_group", "team,pay_group", "work_location", "work_location,company", "work_location,company,pay_group", "work_location,manager", "work_location,manager,company", "work_location,manager,company,pay_group", "work_location,manager,pay_group", "work_location,manager,team", "work_location,manager,team,company", "work_location,manager,team,company,pay_group", "work_location,manager,team,pay_group", "work_location,pay_group", "work_location,team", "work_location,team,company", "work_location,team,company,pay_group", "work_location,team,pay_group"]
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
    fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
  end
  allowable_values = ["employment_status", "employment_status,ethnicity", "employment_status,ethnicity,gender", "employment_status,ethnicity,gender,marital_status", "employment_status,ethnicity,marital_status", "employment_status,gender", "employment_status,gender,marital_status", "employment_status,marital_status", "ethnicity", "ethnicity,gender", "ethnicity,gender,marital_status", "ethnicity,marital_status", "gender", "gender,marital_status", "marital_status"]
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
    fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
  end
  allowable_values = ["employment_status", "employment_status,ethnicity", "employment_status,ethnicity,gender", "employment_status,ethnicity,gender,marital_status", "employment_status,ethnicity,marital_status", "employment_status,gender", "employment_status,gender,marital_status", "employment_status,marital_status", "ethnicity", "ethnicity,gender", "ethnicity,gender,marital_status", "ethnicity,marital_status", "gender", "gender,marital_status", "marital_status"]
  if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
    fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/employees/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
  query_params[:'include_sensitive_fields'] = opts[:'include_sensitive_fields'] if !opts[:'include_sensitive_fields'].nil?
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
  query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].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[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Employee'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"EmployeesApi.employees_retrieve",
    :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: EmployeesApi#employees_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end