open_api_smart_recruiters_sdk 0.2.6 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/smart_recruiters/api/application_api.rb +3 -3
  4. data/lib/smart_recruiters/api/users_api.rb +777 -0
  5. data/lib/smart_recruiters/api_client.rb +1 -0
  6. data/lib/smart_recruiters/models/actions.rb +3 -3
  7. data/lib/smart_recruiters/models/all_of_candidate_details_primary_assignment.rb +3 -3
  8. data/lib/smart_recruiters/models/all_of_candidate_details_secondary_assignments_items.rb +3 -3
  9. data/lib/smart_recruiters/models/application_attachment_webhook_payload.rb +3 -3
  10. data/lib/smart_recruiters/models/applications.rb +3 -3
  11. data/lib/smart_recruiters/models/callback_requests.rb +3 -3
  12. data/lib/smart_recruiters/models/dependent_job_property_value.rb +3 -3
  13. data/lib/smart_recruiters/models/hiring_team_member.rb +3 -3
  14. data/lib/smart_recruiters/models/hiring_team_member_response.rb +3 -3
  15. data/lib/smart_recruiters/models/interview_types.rb +3 -3
  16. data/lib/smart_recruiters/models/interviewers.rb +3 -3
  17. data/lib/smart_recruiters/models/job.rb +2 -1
  18. data/lib/smart_recruiters/models/job_ads.rb +3 -3
  19. data/lib/smart_recruiters/models/job_details.rb +25 -25
  20. data/lib/smart_recruiters/models/job_property_input.rb +3 -3
  21. data/lib/smart_recruiters/models/job_summary.rb +3 -3
  22. data/lib/smart_recruiters/models/json_patch.rb +3 -3
  23. data/lib/smart_recruiters/models/label_translations.rb +3 -3
  24. data/lib/smart_recruiters/models/messages_view.rb +3 -3
  25. data/lib/smart_recruiters/models/subscriptions.rb +3 -3
  26. data/lib/smart_recruiters/models/timeslots.rb +3 -3
  27. data/lib/smart_recruiters/models/user.rb +311 -0
  28. data/lib/smart_recruiters/models/user_entity.rb +367 -0
  29. data/lib/smart_recruiters/models/user_entity_access_groups.rb +204 -0
  30. data/lib/smart_recruiters/models/user_ids.rb +201 -0
  31. data/lib/smart_recruiters/models/user_language.rb +200 -0
  32. data/lib/smart_recruiters/models/user_language_code.rb +50 -0
  33. data/lib/smart_recruiters/models/user_list_item.rb +367 -0
  34. data/lib/smart_recruiters/models/user_list_item_access_groups.rb +195 -0
  35. data/lib/smart_recruiters/models/users.rb +213 -0
  36. data/lib/smart_recruiters/version.rb +1 -1
  37. metadata +12 -2
@@ -0,0 +1,777 @@
1
+
2
+ module SmartRecruiters
3
+ class UsersApi
4
+ attr_accessor :api_client
5
+
6
+ def initialize(api_client = ApiClient.default)
7
+ @api_client = api_client
8
+ end
9
+ # List access groups configured in your company
10
+ # @param [Hash] opts the optional parameters
11
+ # @return [AccessGroups]
12
+ def access_groups_all(opts = {})
13
+ data, _status_code, _headers = access_groups_all_with_http_info(opts)
14
+ data
15
+ end
16
+
17
+ # List access groups configured in your company
18
+ # @param [Hash] opts the optional parameters
19
+ # @return [Array<(AccessGroups, Integer, Hash)>] AccessGroups data, response status code and response headers
20
+ def access_groups_all_with_http_info(opts = {})
21
+ if @api_client.config.debugging
22
+ @api_client.config.logger.debug 'Calling API: UsersApi.access_groups_all ...'
23
+ end
24
+ # resource path
25
+ local_var_path = '/access-groups'
26
+
27
+ # query parameters
28
+ query_params = opts[:query_params] || {}
29
+
30
+ # header parameters
31
+ header_params = opts[:header_params] || {}
32
+ # HTTP header 'Accept' (if needed)
33
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
34
+
35
+ # form parameters
36
+ form_params = opts[:form_params] || {}
37
+
38
+ # http body (model)
39
+ post_body = opts[:body]
40
+
41
+ return_type = opts[:return_type] || 'AccessGroups'
42
+
43
+ auth_names = opts[:auth_names] || ['key', 'oauth']
44
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
45
+ :header_params => header_params,
46
+ :query_params => query_params,
47
+ :form_params => form_params,
48
+ :body => post_body,
49
+ :auth_names => auth_names,
50
+ :return_type => return_type)
51
+
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug "API called: UsersApi#access_groups_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
54
+ end
55
+ return data, status_code, headers
56
+ end
57
+ # Assign users to access group
58
+ # @param access_group_id access group identifier
59
+ # @param [Hash] opts the optional parameters
60
+ # @option opts [Array<UserId>] :body
61
+ # @return [AccessGroups]
62
+ def access_groups_users_assign(access_group_id, opts = {})
63
+ data, _status_code, _headers = access_groups_users_assign_with_http_info(access_group_id, opts)
64
+ data
65
+ end
66
+
67
+ # Assign users to access group
68
+ # @param access_group_id access group identifier
69
+ # @param [Hash] opts the optional parameters
70
+ # @option opts [Array<UserId>] :body
71
+ # @return [Array<(AccessGroups, Integer, Hash)>] AccessGroups data, response status code and response headers
72
+ def access_groups_users_assign_with_http_info(access_group_id, opts = {})
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug 'Calling API: UsersApi.access_groups_users_assign ...'
75
+ end
76
+ # verify the required parameter 'access_group_id' is set
77
+ if @api_client.config.client_side_validation && access_group_id.nil?
78
+ fail ArgumentError, "Missing the required parameter 'access_group_id' when calling UsersApi.access_groups_users_assign"
79
+ end
80
+ # resource path
81
+ local_var_path = '/access-groups/{accessGroupId}/users'.sub('{' + 'accessGroupId' + '}', access_group_id.to_s)
82
+
83
+ # query parameters
84
+ query_params = opts[:query_params] || {}
85
+
86
+ # header parameters
87
+ header_params = opts[:header_params] || {}
88
+ # HTTP header 'Accept' (if needed)
89
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
90
+ # HTTP header 'Content-Type'
91
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
92
+
93
+ # form parameters
94
+ form_params = opts[:form_params] || {}
95
+
96
+ # http body (model)
97
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
98
+
99
+ return_type = opts[:return_type] || 'AccessGroups'
100
+
101
+ auth_names = opts[:auth_names] || ['key', 'oauth']
102
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
103
+ :header_params => header_params,
104
+ :query_params => query_params,
105
+ :form_params => form_params,
106
+ :body => post_body,
107
+ :auth_names => auth_names,
108
+ :return_type => return_type)
109
+
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "API called: UsersApi#access_groups_users_assign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
112
+ end
113
+ return data, status_code, headers
114
+ end
115
+ # Remove user from access group
116
+ # @param access_group_id access group identifier
117
+ # @param id user identifier
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [nil]
120
+ def access_groups_users_remove(access_group_id, id, opts = {})
121
+ access_groups_users_remove_with_http_info(access_group_id, id, opts)
122
+ nil
123
+ end
124
+
125
+ # Remove user from access group
126
+ # @param access_group_id access group identifier
127
+ # @param id user identifier
128
+ # @param [Hash] opts the optional parameters
129
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
130
+ def access_groups_users_remove_with_http_info(access_group_id, id, opts = {})
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug 'Calling API: UsersApi.access_groups_users_remove ...'
133
+ end
134
+ # verify the required parameter 'access_group_id' is set
135
+ if @api_client.config.client_side_validation && access_group_id.nil?
136
+ fail ArgumentError, "Missing the required parameter 'access_group_id' when calling UsersApi.access_groups_users_remove"
137
+ end
138
+ # verify the required parameter 'id' is set
139
+ if @api_client.config.client_side_validation && id.nil?
140
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.access_groups_users_remove"
141
+ end
142
+ # resource path
143
+ local_var_path = '/access-groups/{accessGroupId}/users/{id}'.sub('{' + 'accessGroupId' + '}', access_group_id.to_s).sub('{' + 'id' + '}', id.to_s)
144
+
145
+ # query parameters
146
+ query_params = opts[:query_params] || {}
147
+
148
+ # header parameters
149
+ header_params = opts[:header_params] || {}
150
+ # HTTP header 'Accept' (if needed)
151
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:body]
158
+
159
+ return_type = opts[:return_type]
160
+
161
+ auth_names = opts[:auth_names] || ['key', 'oauth']
162
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
163
+ :header_params => header_params,
164
+ :query_params => query_params,
165
+ :form_params => form_params,
166
+ :body => post_body,
167
+ :auth_names => auth_names,
168
+ :return_type => return_type)
169
+
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "API called: UsersApi#access_groups_users_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
+ end
173
+ return data, status_code, headers
174
+ end
175
+ # List system roles
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [SystemRoles]
178
+ def system_roles_all(opts = {})
179
+ data, _status_code, _headers = system_roles_all_with_http_info(opts)
180
+ data
181
+ end
182
+
183
+ # List system roles
184
+ # @param [Hash] opts the optional parameters
185
+ # @return [Array<(SystemRoles, Integer, Hash)>] SystemRoles data, response status code and response headers
186
+ def system_roles_all_with_http_info(opts = {})
187
+ if @api_client.config.debugging
188
+ @api_client.config.logger.debug 'Calling API: UsersApi.system_roles_all ...'
189
+ end
190
+ # resource path
191
+ local_var_path = '/system-roles'
192
+
193
+ # query parameters
194
+ query_params = opts[:query_params] || {}
195
+
196
+ # header parameters
197
+ header_params = opts[:header_params] || {}
198
+ # HTTP header 'Accept' (if needed)
199
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
200
+
201
+ # form parameters
202
+ form_params = opts[:form_params] || {}
203
+
204
+ # http body (model)
205
+ post_body = opts[:body]
206
+
207
+ return_type = opts[:return_type] || 'SystemRoles'
208
+
209
+ auth_names = opts[:auth_names] || ['key', 'oauth']
210
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type)
217
+
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: UsersApi#system_roles_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ end
221
+ return data, status_code, headers
222
+ end
223
+ # Activate a user
224
+ # 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.
225
+ # @param id user identifier
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [nil]
228
+ def users_activation_activate(id, opts = {})
229
+ users_activation_activate_with_http_info(id, opts)
230
+ nil
231
+ end
232
+
233
+ # Activate a user
234
+ # 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.
235
+ # @param id user identifier
236
+ # @param [Hash] opts the optional parameters
237
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
238
+ def users_activation_activate_with_http_info(id, opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_activation_activate ...'
241
+ end
242
+ # verify the required parameter 'id' is set
243
+ if @api_client.config.client_side_validation && id.nil?
244
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_activation_activate"
245
+ end
246
+ # resource path
247
+ local_var_path = '/users/{id}/activation'.sub('{' + 'id' + '}', id.to_s)
248
+
249
+ # query parameters
250
+ query_params = opts[:query_params] || {}
251
+
252
+ # header parameters
253
+ header_params = opts[:header_params] || {}
254
+ # HTTP header 'Accept' (if needed)
255
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:body]
262
+
263
+ return_type = opts[:return_type]
264
+
265
+ auth_names = opts[:auth_names] || ['key', 'oauth']
266
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
267
+ :header_params => header_params,
268
+ :query_params => query_params,
269
+ :form_params => form_params,
270
+ :body => post_body,
271
+ :auth_names => auth_names,
272
+ :return_type => return_type)
273
+
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug "API called: UsersApi#users_activation_activate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
276
+ end
277
+ return data, status_code, headers
278
+ end
279
+ # Deactivate a user
280
+ # @param id user identifier
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [nil]
283
+ def users_activation_deactivate(id, opts = {})
284
+ users_activation_deactivate_with_http_info(id, opts)
285
+ nil
286
+ end
287
+
288
+ # Deactivate a user
289
+ # @param id user identifier
290
+ # @param [Hash] opts the optional parameters
291
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
292
+ def users_activation_deactivate_with_http_info(id, opts = {})
293
+ if @api_client.config.debugging
294
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_activation_deactivate ...'
295
+ end
296
+ # verify the required parameter 'id' is set
297
+ if @api_client.config.client_side_validation && id.nil?
298
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_activation_deactivate"
299
+ end
300
+ # resource path
301
+ local_var_path = '/users/{id}/activation'.sub('{' + 'id' + '}', id.to_s)
302
+
303
+ # query parameters
304
+ query_params = opts[:query_params] || {}
305
+
306
+ # header parameters
307
+ header_params = opts[:header_params] || {}
308
+ # HTTP header 'Accept' (if needed)
309
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
310
+
311
+ # form parameters
312
+ form_params = opts[:form_params] || {}
313
+
314
+ # http body (model)
315
+ post_body = opts[:body]
316
+
317
+ return_type = opts[:return_type]
318
+
319
+ auth_names = opts[:auth_names] || ['key', 'oauth']
320
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => return_type)
327
+
328
+ if @api_client.config.debugging
329
+ @api_client.config.logger.debug "API called: UsersApi#users_activation_deactivate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ end
331
+ return data, status_code, headers
332
+ end
333
+ # Send an activation email to a user
334
+ # 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.
335
+ # @param id user identifier
336
+ # @param [Hash] opts the optional parameters
337
+ # @return [nil]
338
+ def users_activation_email_send(id, opts = {})
339
+ users_activation_email_send_with_http_info(id, opts)
340
+ nil
341
+ end
342
+
343
+ # Send an activation email to a user
344
+ # 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.
345
+ # @param id user identifier
346
+ # @param [Hash] opts the optional parameters
347
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
348
+ def users_activation_email_send_with_http_info(id, opts = {})
349
+ if @api_client.config.debugging
350
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_activation_email_send ...'
351
+ end
352
+ # verify the required parameter 'id' is set
353
+ if @api_client.config.client_side_validation && id.nil?
354
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_activation_email_send"
355
+ end
356
+ # resource path
357
+ local_var_path = '/users/{id}/activation-email'.sub('{' + 'id' + '}', id.to_s)
358
+
359
+ # query parameters
360
+ query_params = opts[:query_params] || {}
361
+
362
+ # header parameters
363
+ header_params = opts[:header_params] || {}
364
+ # HTTP header 'Accept' (if needed)
365
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
366
+
367
+ # form parameters
368
+ form_params = opts[:form_params] || {}
369
+
370
+ # http body (model)
371
+ post_body = opts[:body]
372
+
373
+ return_type = opts[:return_type]
374
+
375
+ auth_names = opts[:auth_names] || ['key', 'oauth']
376
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => return_type)
383
+
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug "API called: UsersApi#users_activation_email_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
386
+ end
387
+ return data, status_code, headers
388
+ end
389
+ # List users of your company
390
+ # @param [Hash] opts the optional parameters
391
+ # @option opts [String] :q full-text search query based on firstName, lastName, email, externalData
392
+ # @option opts [Integer] :limit number of elements to return. max value is 100 (default to 100)
393
+ # @option opts [String] :page_id Unique identifier for the next page of users
394
+ # @option opts [DateTime] :updated_after ISO8601-formatted time boundaries for the user update time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ
395
+ # @return [Users]
396
+ def users_all(opts = {})
397
+ data, _status_code, _headers = users_all_with_http_info(opts)
398
+ data
399
+ end
400
+
401
+ # List users of your company
402
+ # @param [Hash] opts the optional parameters
403
+ # @option opts [String] :q full-text search query based on firstName, lastName, email, externalData
404
+ # @option opts [Integer] :limit number of elements to return. max value is 100
405
+ # @option opts [String] :page_id Unique identifier for the next page of users
406
+ # @option opts [DateTime] :updated_after ISO8601-formatted time boundaries for the user update time, Format: yyyy-MM-ddTHH:mm:ss.SSSZZ
407
+ # @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
408
+ def users_all_with_http_info(opts = {})
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_all ...'
411
+ end
412
+ # resource path
413
+ local_var_path = '/users'
414
+
415
+ # query parameters
416
+ query_params = opts[:query_params] || {}
417
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
418
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
419
+ query_params[:'pageId'] = opts[:'page_id'] if !opts[:'page_id'].nil?
420
+ query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
421
+
422
+ # header parameters
423
+ header_params = opts[:header_params] || {}
424
+ # HTTP header 'Accept' (if needed)
425
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
426
+
427
+ # form parameters
428
+ form_params = opts[:form_params] || {}
429
+
430
+ # http body (model)
431
+ post_body = opts[:body]
432
+
433
+ return_type = opts[:return_type] || 'Users'
434
+
435
+ auth_names = opts[:auth_names] || ['key', 'oauth']
436
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
437
+ :header_params => header_params,
438
+ :query_params => query_params,
439
+ :form_params => form_params,
440
+ :body => post_body,
441
+ :auth_names => auth_names,
442
+ :return_type => return_type)
443
+
444
+ if @api_client.config.debugging
445
+ @api_client.config.logger.debug "API called: UsersApi#users_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
446
+ end
447
+ return data, status_code, headers
448
+ end
449
+ # Update user avatar
450
+ # @param id user identifier
451
+ # @param [Hash] opts the optional parameters
452
+ # @option opts [String] :file
453
+ # @return [nil]
454
+ def users_avatar_update(id, opts = {})
455
+ users_avatar_update_with_http_info(id, opts)
456
+ nil
457
+ end
458
+
459
+ # Update user avatar
460
+ # @param id user identifier
461
+ # @param [Hash] opts the optional parameters
462
+ # @option opts [String] :file
463
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
464
+ def users_avatar_update_with_http_info(id, opts = {})
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_avatar_update ...'
467
+ end
468
+ # verify the required parameter 'id' is set
469
+ if @api_client.config.client_side_validation && id.nil?
470
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_avatar_update"
471
+ end
472
+ # resource path
473
+ local_var_path = '/users/{id}/avatar'.sub('{' + 'id' + '}', id.to_s)
474
+
475
+ # query parameters
476
+ query_params = opts[:query_params] || {}
477
+
478
+ # header parameters
479
+ header_params = opts[:header_params] || {}
480
+ # HTTP header 'Accept' (if needed)
481
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
482
+ # HTTP header 'Content-Type'
483
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
484
+
485
+ # form parameters
486
+ form_params = opts[:form_params] || {}
487
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
488
+
489
+ # http body (model)
490
+ post_body = opts[:body]
491
+
492
+ return_type = opts[:return_type]
493
+
494
+ auth_names = opts[:auth_names] || ['key', 'oauth']
495
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
496
+ :header_params => header_params,
497
+ :query_params => query_params,
498
+ :form_params => form_params,
499
+ :body => post_body,
500
+ :auth_names => auth_names,
501
+ :return_type => return_type)
502
+
503
+ if @api_client.config.debugging
504
+ @api_client.config.logger.debug "API called: UsersApi#users_avatar_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
505
+ end
506
+ return data, status_code, headers
507
+ end
508
+ # Create a new user.
509
+ # @param [Hash] opts the optional parameters
510
+ # @option opts [NewUser] :body User object to be created
511
+ # @return [UserEntity]
512
+ def users_create(opts = {})
513
+ data, _status_code, _headers = users_create_with_http_info(opts)
514
+ data
515
+ end
516
+
517
+ # Create a new user.
518
+ # @param [Hash] opts the optional parameters
519
+ # @option opts [NewUser] :body User object to be created
520
+ # @return [Array<(UserEntity, Integer, Hash)>] UserEntity data, response status code and response headers
521
+ def users_create_with_http_info(opts = {})
522
+ if @api_client.config.debugging
523
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_create ...'
524
+ end
525
+ # resource path
526
+ local_var_path = '/users'
527
+
528
+ # query parameters
529
+ query_params = opts[:query_params] || {}
530
+
531
+ # header parameters
532
+ header_params = opts[:header_params] || {}
533
+ # HTTP header 'Accept' (if needed)
534
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
535
+ # HTTP header 'Content-Type'
536
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
537
+
538
+ # form parameters
539
+ form_params = opts[:form_params] || {}
540
+
541
+ # http body (model)
542
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
543
+
544
+ return_type = opts[:return_type] || 'UserEntity'
545
+
546
+ auth_names = opts[:auth_names] || ['key', 'oauth']
547
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
548
+ :header_params => header_params,
549
+ :query_params => query_params,
550
+ :form_params => form_params,
551
+ :body => post_body,
552
+ :auth_names => auth_names,
553
+ :return_type => return_type)
554
+
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug "API called: UsersApi#users_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
557
+ end
558
+ return data, status_code, headers
559
+ end
560
+ # Get details of a user with given id
561
+ # @param id user identifier
562
+ # @param [Hash] opts the optional parameters
563
+ # @return [UserEntity]
564
+ def users_get(id, opts = {})
565
+ data, _status_code, _headers = users_get_with_http_info(id, opts)
566
+ data
567
+ end
568
+
569
+ # Get details of a user with given id
570
+ # @param id user identifier
571
+ # @param [Hash] opts the optional parameters
572
+ # @return [Array<(UserEntity, Integer, Hash)>] UserEntity data, response status code and response headers
573
+ def users_get_with_http_info(id, opts = {})
574
+ if @api_client.config.debugging
575
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_get ...'
576
+ end
577
+ # verify the required parameter 'id' is set
578
+ if @api_client.config.client_side_validation && id.nil?
579
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_get"
580
+ end
581
+ # resource path
582
+ local_var_path = '/users/{id}'.sub('{' + 'id' + '}', id.to_s)
583
+
584
+ # query parameters
585
+ query_params = opts[:query_params] || {}
586
+
587
+ # header parameters
588
+ header_params = opts[:header_params] || {}
589
+ # HTTP header 'Accept' (if needed)
590
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
591
+
592
+ # form parameters
593
+ form_params = opts[:form_params] || {}
594
+
595
+ # http body (model)
596
+ post_body = opts[:body]
597
+
598
+ return_type = opts[:return_type] || 'UserEntity'
599
+
600
+ auth_names = opts[:auth_names] || ['key', 'oauth']
601
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
602
+ :header_params => header_params,
603
+ :query_params => query_params,
604
+ :form_params => form_params,
605
+ :body => post_body,
606
+ :auth_names => auth_names,
607
+ :return_type => return_type)
608
+
609
+ if @api_client.config.debugging
610
+ @api_client.config.logger.debug "API called: UsersApi#users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
611
+ end
612
+ return data, status_code, headers
613
+ end
614
+ # Get details of my user
615
+ # @param [Hash] opts the optional parameters
616
+ # @return [UserEntity]
617
+ def users_me(opts = {})
618
+ data, _status_code, _headers = users_me_with_http_info(opts)
619
+ data
620
+ end
621
+
622
+ # Get details of my user
623
+ # @param [Hash] opts the optional parameters
624
+ # @return [Array<(UserEntity, Integer, Hash)>] UserEntity data, response status code and response headers
625
+ def users_me_with_http_info(opts = {})
626
+ if @api_client.config.debugging
627
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_me ...'
628
+ end
629
+ # resource path
630
+ local_var_path = '/users/me'
631
+
632
+ # query parameters
633
+ query_params = opts[:query_params] || {}
634
+
635
+ # header parameters
636
+ header_params = opts[:header_params] || {}
637
+ # HTTP header 'Accept' (if needed)
638
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
639
+
640
+ # form parameters
641
+ form_params = opts[:form_params] || {}
642
+
643
+ # http body (model)
644
+ post_body = opts[:body]
645
+
646
+ return_type = opts[:return_type] || 'UserEntity'
647
+
648
+ auth_names = opts[:auth_names] || ['key', 'oauth']
649
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
650
+ :header_params => header_params,
651
+ :query_params => query_params,
652
+ :form_params => form_params,
653
+ :body => post_body,
654
+ :auth_names => auth_names,
655
+ :return_type => return_type)
656
+
657
+ if @api_client.config.debugging
658
+ @api_client.config.logger.debug "API called: UsersApi#users_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
659
+ end
660
+ return data, status_code, headers
661
+ end
662
+ # Send a password reset email to a user
663
+ # 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.
664
+ # @param id user identifier
665
+ # @param [Hash] opts the optional parameters
666
+ # @return [nil]
667
+ def users_password_reset(id, opts = {})
668
+ users_password_reset_with_http_info(id, opts)
669
+ nil
670
+ end
671
+
672
+ # Send a password reset email to a user
673
+ # 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.
674
+ # @param id user identifier
675
+ # @param [Hash] opts the optional parameters
676
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
677
+ def users_password_reset_with_http_info(id, opts = {})
678
+ if @api_client.config.debugging
679
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_password_reset ...'
680
+ end
681
+ # verify the required parameter 'id' is set
682
+ if @api_client.config.client_side_validation && id.nil?
683
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_password_reset"
684
+ end
685
+ # resource path
686
+ local_var_path = '/users/{id}/reset-password'.sub('{' + 'id' + '}', id.to_s)
687
+
688
+ # query parameters
689
+ query_params = opts[:query_params] || {}
690
+
691
+ # header parameters
692
+ header_params = opts[:header_params] || {}
693
+ # HTTP header 'Accept' (if needed)
694
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
695
+
696
+ # form parameters
697
+ form_params = opts[:form_params] || {}
698
+
699
+ # http body (model)
700
+ post_body = opts[:body]
701
+
702
+ return_type = opts[:return_type]
703
+
704
+ auth_names = opts[:auth_names] || ['key', 'oauth']
705
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
706
+ :header_params => header_params,
707
+ :query_params => query_params,
708
+ :form_params => form_params,
709
+ :body => post_body,
710
+ :auth_names => auth_names,
711
+ :return_type => return_type)
712
+
713
+ if @api_client.config.debugging
714
+ @api_client.config.logger.debug "API called: UsersApi#users_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
715
+ end
716
+ return data, status_code, headers
717
+ end
718
+ # Update a user
719
+ # @param id user identifier
720
+ # @param [Hash] opts the optional parameters
721
+ # @option opts [Array<null>] :body patch request (RFC 6902 - https://datatracker.ietf.org/doc/html/rfc6902)
722
+ # @return [UserEntity]
723
+ def users_update(id, opts = {})
724
+ data, _status_code, _headers = users_update_with_http_info(id, opts)
725
+ data
726
+ end
727
+
728
+ # Update a user
729
+ # @param id user identifier
730
+ # @param [Hash] opts the optional parameters
731
+ # @option opts [Array<null>] :body patch request (RFC 6902 - https://datatracker.ietf.org/doc/html/rfc6902)
732
+ # @return [Array<(UserEntity, Integer, Hash)>] UserEntity data, response status code and response headers
733
+ def users_update_with_http_info(id, opts = {})
734
+ if @api_client.config.debugging
735
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_update ...'
736
+ end
737
+ # verify the required parameter 'id' is set
738
+ if @api_client.config.client_side_validation && id.nil?
739
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_update"
740
+ end
741
+ # resource path
742
+ local_var_path = '/users/{id}'.sub('{' + 'id' + '}', id.to_s)
743
+
744
+ # query parameters
745
+ query_params = opts[:query_params] || {}
746
+
747
+ # header parameters
748
+ header_params = opts[:header_params] || {}
749
+ # HTTP header 'Accept' (if needed)
750
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
751
+ # HTTP header 'Content-Type'
752
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json'])
753
+
754
+ # form parameters
755
+ form_params = opts[:form_params] || {}
756
+
757
+ # http body (model)
758
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
759
+
760
+ return_type = opts[:return_type] || 'UserEntity'
761
+
762
+ auth_names = opts[:auth_names] || ['key', 'oauth']
763
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
764
+ :header_params => header_params,
765
+ :query_params => query_params,
766
+ :form_params => form_params,
767
+ :body => post_body,
768
+ :auth_names => auth_names,
769
+ :return_type => return_type)
770
+
771
+ if @api_client.config.debugging
772
+ @api_client.config.logger.debug "API called: UsersApi#users_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
773
+ end
774
+ return data, status_code, headers
775
+ end
776
+ end
777
+ end