Class: Bfwd::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/bf_ruby2/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.



19
20
21
# File 'lib/bf_ruby2/api/users_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/bf_ruby2/api/users_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_user(user, opts = {}) ⇒ UserPagedMetadata

Create a user. a new user","request":"createUserRequest.html","response":"createUserResponse.html"

Parameters:

  • user

    The user object to be created.

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/bf_ruby2/api/users_api.rb', line 28

def create_user(user, opts = {})
  data, _status_code, _headers = create_user_with_http_info(user, opts)
  return data
end

#create_user_login(user, opts = {}) ⇒ UserCreationResponsePagedMetadata

Create a user. a new user with login","request":"createUserWithLoginRequest.html","response":"createUserWithLoginResponse.html"

Parameters:

  • user

    The user object to be created.

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

    the optional parameters

Returns:



83
84
85
86
# File 'lib/bf_ruby2/api/users_api.rb', line 83

def (user, opts = {})
  data, _status_code, _headers = (user, opts)
  return data
end

#create_user_login_with_http_info(user, opts = {}) ⇒ Array<(UserCreationResponsePagedMetadata, Fixnum, Hash)>

Create a user. a new user with login&quot;,&quot;request&quot;:&quot;createUserWithLoginRequest.html&quot;,&quot;response&quot;:&quot;createUserWithLoginResponse.html&quot;

Parameters:

  • user

    The user object to be created.

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

    the optional parameters

Returns:



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/bf_ruby2/api/users_api.rb', line 93

def (user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.create_user_login ..."
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.create_user_login"
  end
  # resource path
  local_var_path = "/users/create-user-login"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user)
  auth_names = []
  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 => 'UserCreationResponsePagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#create_user_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_user_with_http_info(user, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Create a user. a new user&quot;,&quot;request&quot;:&quot;createUserRequest.html&quot;,&quot;response&quot;:&quot;createUserResponse.html&quot;

Parameters:

  • user

    The user object to be created.

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

    the optional parameters

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



38
39
40
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
# File 'lib/bf_ruby2/api/users_api.rb', line 38

def create_user_with_http_info(user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.create_user ..."
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.create_user"
  end
  # resource path
  local_var_path = "/users"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user)
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_users(opts = {}) ⇒ UserPagedMetadata

Returns a collection of Users. By default 10 values are returned. Records are returned in natural order. { "nickname" : "Get all users","response" : "getUserAll.html"}

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first user to return. (default to 0)

  • :records (Integer)

    The maximum number of users to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

Returns:



142
143
144
145
# File 'lib/bf_ruby2/api/users_api.rb', line 142

def get_all_users(opts = {})
  data, _status_code, _headers = get_all_users_with_http_info(opts)
  return data
end

#get_all_users_with_http_info(opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Returns a collection of Users. By default 10 values are returned. Records are returned in natural order. { &quot;nickname&quot; : &quot;Get all users&quot;,&quot;response&quot; : &quot;getUserAll.html&quot;}

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first user to return.

  • :records (Integer)

    The maximum number of users to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/bf_ruby2/api/users_api.rb', line 156

def get_all_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_all_users ..."
  end
  if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
    fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
  end
  # resource path
  local_var_path = "/users"

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_all_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_by_id(user_id, opts = {}) ⇒ UserPagedMetadata

Returns a single User, specified by the ID parameter. { "nickname" : "Retrieve an existing user","response" : "getUserByID.html"}

Parameters:

  • user_id

    ID of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization -IDs used to restrict the scope of API calls.

Returns:



204
205
206
207
# File 'lib/bf_ruby2/api/users_api.rb', line 204

def get_user_by_id(user_id, opts = {})
  data, _status_code, _headers = get_user_by_id_with_http_info(user_id, opts)
  return data
end

#get_user_by_id_with_http_info(user_id, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Returns a single User, specified by the ID parameter. { &quot;nickname&quot; : &quot;Retrieve an existing user&quot;,&quot;response&quot; : &quot;getUserByID.html&quot;}

Parameters:

  • user_id

    ID of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization -IDs used to restrict the scope of API calls.

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/bf_ruby2/api/users_api.rb', line 215

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

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_by_password_reset_code(password_reset_code, opts = {}) ⇒ UserPagedMetadata

Returns a single User, specified by the password-reset-code parameter. { "nickname" : "Retrieve by reset code","response" : "getUserByPasswordResetCode.html"}

Parameters:

  • password_reset_code

    The unique password reset code of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



262
263
264
265
# File 'lib/bf_ruby2/api/users_api.rb', line 262

def get_user_by_password_reset_code(password_reset_code, opts = {})
  data, _status_code, _headers = get_user_by_password_reset_code_with_http_info(password_reset_code, opts)
  return data
end

#get_user_by_password_reset_code_with_http_info(password_reset_code, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Returns a single User, specified by the password-reset-code parameter. { &quot;nickname&quot; : &quot;Retrieve by reset code&quot;,&quot;response&quot; : &quot;getUserByPasswordResetCode.html&quot;}

Parameters:

  • password_reset_code

    The unique password reset code of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



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

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

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_by_password_reset_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_by_sms_password_reset_code(sms_password_reset_code, opts = {}) ⇒ UserPagedMetadata

Returns a single User, specified by the sms-password-reset-code parameter. { "nickname" : "Retrieve by sms reset code","response" : "getUserBySMSPasswordResetCode.html"}

Parameters:

  • sms_password_reset_code

    The unique SMS password reset code of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



320
321
322
323
# File 'lib/bf_ruby2/api/users_api.rb', line 320

def get_user_by_sms_password_reset_code(sms_password_reset_code, opts = {})
  data, _status_code, _headers = get_user_by_sms_password_reset_code_with_http_info(sms_password_reset_code, opts)
  return data
end

#get_user_by_sms_password_reset_code_with_http_info(sms_password_reset_code, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Returns a single User, specified by the sms-password-reset-code parameter. { &quot;nickname&quot; : &quot;Retrieve by sms reset code&quot;,&quot;response&quot; : &quot;getUserBySMSPasswordResetCode.html&quot;}

Parameters:

  • sms_password_reset_code

    The unique SMS password reset code of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# File 'lib/bf_ruby2/api/users_api.rb', line 331

def get_user_by_sms_password_reset_code_with_http_info(sms_password_reset_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_by_sms_password_reset_code ..."
  end
  # verify the required parameter 'sms_password_reset_code' is set
  if @api_client.config.client_side_validation && sms_password_reset_code.nil?
    fail ArgumentError, "Missing the required parameter 'sms_password_reset_code' when calling UsersApi.get_user_by_sms_password_reset_code"
  end
  # resource path
  local_var_path = "/users/sms-password-reset-code/{sms-password-reset-code}".sub('{' + 'sms-password-reset-code' + '}', sms_password_reset_code.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_by_sms_password_reset_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_by_username(username, opts = {}) ⇒ UserPagedMetadata

Returns a single User, specified by the username parameter, this is by default the e-mail address of the user. { "nickname" : "Retrieve by username","response" : "getUserByUsername.html"}

Parameters:

  • username

    The unique username of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



378
379
380
381
# File 'lib/bf_ruby2/api/users_api.rb', line 378

def get_user_by_username(username, opts = {})
  data, _status_code, _headers = get_user_by_username_with_http_info(username, opts)
  return data
end

#get_user_by_username_with_http_info(username, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Returns a single User, specified by the username parameter, this is by default the e-mail address of the user. { &quot;nickname&quot; : &quot;Retrieve by username&quot;,&quot;response&quot; : &quot;getUserByUsername.html&quot;}

Parameters:

  • username

    The unique username of the User.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/bf_ruby2/api/users_api.rb', line 389

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

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_by_username\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reset_user_password(request, opts = {}) ⇒ UserPagedMetadata

Create a password reset request. a password reset request","request":"PasswordResetRequest.html","response":"PasswordResetResponse.html"

Parameters:

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

    the optional parameters

Returns:



435
436
437
438
# File 'lib/bf_ruby2/api/users_api.rb', line 435

def reset_user_password(request, opts = {})
  data, _status_code, _headers = reset_user_password_with_http_info(request, opts)
  return data
end

#reset_user_password_with_http_info(request, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Create a password reset request. a password reset request&quot;,&quot;request&quot;:&quot;PasswordResetRequest.html&quot;,&quot;response&quot;:&quot;PasswordResetResponse.html&quot;

Parameters:

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

    the optional parameters

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



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

def reset_user_password_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.reset_user_password ..."
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.reset_user_password"
  end
  # resource path
  local_var_path = "/users/password-reset"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#reset_user_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retire_user(user_id, organizations, opts = {}) ⇒ UserPagedMetadata

Retires the user with the specified user-ID. { "nickname" : "Delete a user","response" : "deleteUser.html"}

Parameters:

  • user_id

    ID of the User.

  • organizations

    A list of organization-IDs used to restrict the scope of API calls.

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

    the optional parameters

Returns:



491
492
493
494
# File 'lib/bf_ruby2/api/users_api.rb', line 491

def retire_user(user_id, organizations, opts = {})
  data, _status_code, _headers = retire_user_with_http_info(user_id, organizations, opts)
  return data
end

#retire_user_with_http_info(user_id, organizations, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Retires the user with the specified user-ID. { &quot;nickname&quot; : &quot;Delete a user&quot;,&quot;response&quot; : &quot;deleteUser.html&quot;}

Parameters:

  • user_id

    ID of the User.

  • organizations

    A list of organization-IDs used to restrict the scope of API calls.

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

    the optional parameters

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
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
# File 'lib/bf_ruby2/api/users_api.rb', line 502

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

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(organizations, :multi)

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#retire_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user(user, opts = {}) ⇒ UserPagedMetadata

Update a user. { "nickname" : "Update a user", "request" : "updateUserRequest.html" ,"response" : "updateUserResponse.html" }

Parameters:

  • user

    The user object to be updated.

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

    the optional parameters

Returns:



552
553
554
555
# File 'lib/bf_ruby2/api/users_api.rb', line 552

def update_user(user, opts = {})
  data, _status_code, _headers = update_user_with_http_info(user, opts)
  return data
end

#update_user_password(password_reset, opts = {}) ⇒ UserPagedMetadata

Update a user’s password. { "nickname" : "Update password using reset code", "request" : "updateUserPassword.html" ,"response" : "updateUserPasswordResponse.html" }

Parameters:

  • password_reset

    The password reset object.

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

    the optional parameters

Returns:



607
608
609
610
# File 'lib/bf_ruby2/api/users_api.rb', line 607

def update_user_password(password_reset, opts = {})
  data, _status_code, _headers = update_user_password_with_http_info(password_reset, opts)
  return data
end

#update_user_password_with_http_info(password_reset, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Update a user&#39;s password. { &quot;nickname&quot; : &quot;Update password using reset code&quot;, &quot;request&quot; : &quot;updateUserPassword.html&quot; ,&quot;response&quot; : &quot;updateUserPasswordResponse.html&quot; }

Parameters:

  • password_reset

    The password reset object.

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

    the optional parameters

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



617
618
619
620
621
622
623
624
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
# File 'lib/bf_ruby2/api/users_api.rb', line 617

def update_user_password_with_http_info(password_reset, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.update_user_password ..."
  end
  # verify the required parameter 'password_reset' is set
  if @api_client.config.client_side_validation && password_reset.nil?
    fail ArgumentError, "Missing the required parameter 'password_reset' when calling UsersApi.update_user_password"
  end
  # resource path
  local_var_path = "/users/password-update"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(password_reset)
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#update_user_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user_with_http_info(user, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>

Update a user. { &quot;nickname&quot; : &quot;Update a user&quot;, &quot;request&quot; : &quot;updateUserRequest.html&quot; ,&quot;response&quot; : &quot;updateUserResponse.html&quot; }

Parameters:

  • user

    The user object to be updated.

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

    the optional parameters

Returns:

  • (Array<(UserPagedMetadata, Fixnum, Hash)>)

    UserPagedMetadata data, response status code and response headers



562
563
564
565
566
567
568
569
570
571
572
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
# File 'lib/bf_ruby2/api/users_api.rb', line 562

def update_user_with_http_info(user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.update_user ..."
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.update_user"
  end
  # resource path
  local_var_path = "/users"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user)
  auth_names = []
  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 => 'UserPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end