Class: SmartRecruiters::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_recruiters/api/users_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UsersApi

Returns a new instance of UsersApi.



6
7
8
# File 'lib/smart_recruiters/api/users_api.rb', line 6

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



4
5
6
# File 'lib/smart_recruiters/api/users_api.rb', line 4

def api_client
  @api_client
end

Instance Method Details

#access_groups_all(opts = {}) ⇒ AccessGroups

List access groups configured in your company

Parameters:

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

    the optional parameters

Returns:

  • (AccessGroups)


12
13
14
15
# File 'lib/smart_recruiters/api/users_api.rb', line 12

def access_groups_all(opts = {})
  data, _status_code, _headers = access_groups_all_with_http_info(opts)
  data
end

#access_groups_all_with_http_info(opts = {}) ⇒ Array<(AccessGroups, Integer, Hash)>

List access groups configured in your company

Parameters:

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

    the optional parameters

Returns:

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

    AccessGroups data, response status code and response headers



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/smart_recruiters/api/users_api.rb', line 20

def access_groups_all_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.access_groups_all ...'
  end
  # resource path
  local_var_path = '/access-groups'

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

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

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

  return_type = opts[:return_type] || 'AccessGroups' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#access_groups_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#access_groups_users_assign(access_group_id, opts = {}) ⇒ AccessGroups

Assign users to access group

Parameters:

  • access_group_id

    access group identifier

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

    the optional parameters

Options Hash (opts):

Returns:

  • (AccessGroups)


62
63
64
65
# File 'lib/smart_recruiters/api/users_api.rb', line 62

def access_groups_users_assign(access_group_id, opts = {})
  data, _status_code, _headers = access_groups_users_assign_with_http_info(access_group_id, opts)
  data
end

#access_groups_users_assign_with_http_info(access_group_id, opts = {}) ⇒ Array<(AccessGroups, Integer, Hash)>

Assign users to access group

Parameters:

  • access_group_id

    access group identifier

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

    the optional parameters

Options Hash (opts):

Returns:

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

    AccessGroups data, response status code and response headers



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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/smart_recruiters/api/users_api.rb', line 72

def access_groups_users_assign_with_http_info(access_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.access_groups_users_assign ...'
  end
  # verify the required parameter 'access_group_id' is set
  if @api_client.config.client_side_validation && access_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'access_group_id' when calling UsersApi.access_groups_users_assign"
  end
  # resource path
  local_var_path = '/access-groups/{accessGroupId}/users'.sub('{' + 'accessGroupId' + '}', access_group_id.to_s)

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  return_type = opts[:return_type] || 'AccessGroups' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#access_groups_users_assign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#access_groups_users_remove(access_group_id, id, opts = {}) ⇒ nil

Remove user from access group

Parameters:

  • access_group_id

    access group identifier

  • id

    user identifier

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

    the optional parameters

Returns:

  • (nil)


120
121
122
123
# File 'lib/smart_recruiters/api/users_api.rb', line 120

def access_groups_users_remove(access_group_id, id, opts = {})
  access_groups_users_remove_with_http_info(access_group_id, id, opts)
  nil
end

#access_groups_users_remove_with_http_info(access_group_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove user from access group

Parameters:

  • access_group_id

    access group identifier

  • id

    user identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/smart_recruiters/api/users_api.rb', line 130

def access_groups_users_remove_with_http_info(access_group_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.access_groups_users_remove ...'
  end
  # verify the required parameter 'access_group_id' is set
  if @api_client.config.client_side_validation && access_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'access_group_id' when calling UsersApi.access_groups_users_remove"
  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 UsersApi.access_groups_users_remove"
  end
  # resource path
  local_var_path = '/access-groups/{accessGroupId}/users/{id}'.sub('{' + 'accessGroupId' + '}', access_group_id.to_s).sub('{' + 'id' + '}', id.to_s)

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

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

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

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#access_groups_users_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#system_roles_all(opts = {}) ⇒ SystemRoles

List system roles

Parameters:

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

    the optional parameters

Returns:

  • (SystemRoles)


178
179
180
181
# File 'lib/smart_recruiters/api/users_api.rb', line 178

def system_roles_all(opts = {})
  data, _status_code, _headers = system_roles_all_with_http_info(opts)
  data
end

#system_roles_all_with_http_info(opts = {}) ⇒ Array<(SystemRoles, Integer, Hash)>

List system roles

Parameters:

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

    the optional parameters

Returns:

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

    SystemRoles data, response status code and response headers



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/smart_recruiters/api/users_api.rb', line 186

def system_roles_all_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.system_roles_all ...'
  end
  # resource path
  local_var_path = '/system-roles'

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

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

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

  return_type = opts[:return_type] || 'SystemRoles' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#system_roles_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_activation_activate(id, opts = {}) ⇒ nil

Activate a user Activate a user with given id. Users created via an API are not active. This method allows activating a user so he/she can sign in straight away.

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

  • (nil)


228
229
230
231
# File 'lib/smart_recruiters/api/users_api.rb', line 228

def users_activation_activate(id, opts = {})
  users_activation_activate_with_http_info(id, opts)
  nil
end

#users_activation_activate_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Activate a user Activate a user with given id. Users created via an API are not active. This method allows activating a user so he/she can sign in straight away.

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



238
239
240
241
242
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
# File 'lib/smart_recruiters/api/users_api.rb', line 238

def users_activation_activate_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_activation_activate ...'
  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 UsersApi.users_activation_activate"
  end
  # resource path
  local_var_path = '/users/{id}/activation'.sub('{' + 'id' + '}', id.to_s)

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

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

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

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_activation_activate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_activation_deactivate(id, opts = {}) ⇒ nil

Deactivate a user

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

  • (nil)


283
284
285
286
# File 'lib/smart_recruiters/api/users_api.rb', line 283

def users_activation_deactivate(id, opts = {})
  users_activation_deactivate_with_http_info(id, opts)
  nil
end

#users_activation_deactivate_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deactivate a user

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/smart_recruiters/api/users_api.rb', line 292

def users_activation_deactivate_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_activation_deactivate ...'
  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 UsersApi.users_activation_deactivate"
  end
  # resource path
  local_var_path = '/users/{id}/activation'.sub('{' + 'id' + '}', id.to_s)

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

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

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

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_activation_deactivate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_activation_email_send(id, opts = {}) ⇒ nil

Send an activation email to a user Send an activation email to a user with given id. Users created via an API are not active. This method is an alternative to activating a user directly and allows sending an activation email in which a user will have to open a link and follow instructions on a screen to activate his/her account.

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

  • (nil)


338
339
340
341
# File 'lib/smart_recruiters/api/users_api.rb', line 338

def users_activation_email_send(id, opts = {})
  users_activation_email_send_with_http_info(id, opts)
  nil
end

#users_activation_email_send_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Send an activation email to a user Send an activation email to a user with given id. Users created via an API are not active. This method is an alternative to activating a user directly and allows sending an activation email in which a user will have to open a link and follow instructions on a screen to activate his/her account.

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/smart_recruiters/api/users_api.rb', line 348

def users_activation_email_send_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_activation_email_send ...'
  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 UsersApi.users_activation_email_send"
  end
  # resource path
  local_var_path = '/users/{id}/activation-email'.sub('{' + 'id' + '}', id.to_s)

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

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

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

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_activation_email_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_all(opts = {}) ⇒ Users

List users of your company

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :q (String)

    full-text search query based on firstName, lastName, email, externalData

  • :limit (Integer)

    number of elements to return. max value is 100 (default to 100)

  • :page_id (String)

    Unique identifier for the next page of users

  • :updated_after (DateTime)

    ISO8601-formatted time boundaries for the user update time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ

Returns:



396
397
398
399
# File 'lib/smart_recruiters/api/users_api.rb', line 396

def users_all(opts = {})
  data, _status_code, _headers = users_all_with_http_info(opts)
  data
end

#users_all_with_http_info(opts = {}) ⇒ Array<(Users, Integer, Hash)>

List users of your company

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :q (String)

    full-text search query based on firstName, lastName, email, externalData

  • :limit (Integer)

    number of elements to return. max value is 100

  • :page_id (String)

    Unique identifier for the next page of users

  • :updated_after (DateTime)

    ISO8601-formatted time boundaries for the user update time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ

Returns:

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

    Users data, response status code and response headers



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/smart_recruiters/api/users_api.rb', line 408

def users_all_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_all ...'
  end
  # resource path
  local_var_path = '/users'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'pageId'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?

  # 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[:body] 

  return_type = opts[:return_type] || 'Users' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_avatar_update(id, opts = {}) ⇒ nil

Update user avatar

Parameters:

  • id

    user identifier

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

    the optional parameters

Options Hash (opts):

  • :file (String)

Returns:

  • (nil)


454
455
456
457
# File 'lib/smart_recruiters/api/users_api.rb', line 454

def users_avatar_update(id, opts = {})
  users_avatar_update_with_http_info(id, opts)
  nil
end

#users_avatar_update_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update user avatar

Parameters:

  • id

    user identifier

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

    the optional parameters

Options Hash (opts):

  • :file (String)

Returns:

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

    nil, response status code and response headers



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
# File 'lib/smart_recruiters/api/users_api.rb', line 464

def users_avatar_update_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_avatar_update ...'
  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 UsersApi.users_avatar_update"
  end
  # resource path
  local_var_path = '/users/{id}/avatar'.sub('{' + 'id' + '}', id.to_s)

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

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

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_avatar_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_create(opts = {}) ⇒ UserEntity

Create a new user.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (NewUser)

    User object to be created

Returns:



512
513
514
515
# File 'lib/smart_recruiters/api/users_api.rb', line 512

def users_create(opts = {})
  data, _status_code, _headers = users_create_with_http_info(opts)
  data
end

#users_create_with_http_info(opts = {}) ⇒ Array<(UserEntity, Integer, Hash)>

Create a new user.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (NewUser)

    User object to be created

Returns:

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

    UserEntity data, response status code and response headers



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
# File 'lib/smart_recruiters/api/users_api.rb', line 521

def users_create_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_create ...'
  end
  # resource path
  local_var_path = '/users'

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  return_type = opts[:return_type] || 'UserEntity' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_get(id, opts = {}) ⇒ UserEntity

Get details of a user with given id

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:



564
565
566
567
# File 'lib/smart_recruiters/api/users_api.rb', line 564

def users_get(id, opts = {})
  data, _status_code, _headers = users_get_with_http_info(id, opts)
  data
end

#users_get_with_http_info(id, opts = {}) ⇒ Array<(UserEntity, Integer, Hash)>

Get details of a user with given id

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

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

    UserEntity data, response status code and response headers



573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/smart_recruiters/api/users_api.rb', line 573

def users_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_get ...'
  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 UsersApi.users_get"
  end
  # resource path
  local_var_path = '/users/{id}'.sub('{' + 'id' + '}', id.to_s)

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

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

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

  return_type = opts[:return_type] || 'UserEntity' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_me(opts = {}) ⇒ UserEntity

Get details of my user

Parameters:

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

    the optional parameters

Returns:



617
618
619
620
# File 'lib/smart_recruiters/api/users_api.rb', line 617

def users_me(opts = {})
  data, _status_code, _headers = users_me_with_http_info(opts)
  data
end

#users_me_with_http_info(opts = {}) ⇒ Array<(UserEntity, Integer, Hash)>

Get details of my user

Parameters:

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

    the optional parameters

Returns:

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

    UserEntity data, response status code and response headers



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
656
657
658
659
660
661
# File 'lib/smart_recruiters/api/users_api.rb', line 625

def users_me_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_me ...'
  end
  # resource path
  local_var_path = '/users/me'

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

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

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

  return_type = opts[:return_type] || 'UserEntity' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_password_reset(id, opts = {}) ⇒ nil

Send a password reset email to a user Send password recovery instruction to the email address associated with a user with a given id. The password will not be reset until the user with a given id creates a new password.

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

  • (nil)


667
668
669
670
# File 'lib/smart_recruiters/api/users_api.rb', line 667

def users_password_reset(id, opts = {})
  users_password_reset_with_http_info(id, opts)
  nil
end

#users_password_reset_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Send a password reset email to a user Send password recovery instruction to the email address associated with a user with a given id. The password will not be reset until the user with a given id creates a new password.

Parameters:

  • id

    user identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/smart_recruiters/api/users_api.rb', line 677

def users_password_reset_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_password_reset ...'
  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 UsersApi.users_password_reset"
  end
  # resource path
  local_var_path = '/users/{id}/reset-password'.sub('{' + 'id' + '}', id.to_s)

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

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

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

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_update(id, opts = {}) ⇒ UserEntity

Update a user

Parameters:

  • id

    user identifier

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

    the optional parameters

Options Hash (opts):

Returns:



723
724
725
726
# File 'lib/smart_recruiters/api/users_api.rb', line 723

def users_update(id, opts = {})
  data, _status_code, _headers = users_update_with_http_info(id, opts)
  data
end

#users_update_with_http_info(id, opts = {}) ⇒ Array<(UserEntity, Integer, Hash)>

Update a user

Parameters:

  • id

    user identifier

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

    the optional parameters

Options Hash (opts):

Returns:

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

    UserEntity data, response status code and response headers



733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
# File 'lib/smart_recruiters/api/users_api.rb', line 733

def users_update_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_update ...'
  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 UsersApi.users_update"
  end
  # resource path
  local_var_path = '/users/{id}'.sub('{' + 'id' + '}', id.to_s)

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json'])

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

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

  return_type = opts[:return_type] || 'UserEntity' 

  auth_names = opts[:auth_names] || ['key', 'oauth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end