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.



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

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

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:



39
40
41
42
# File 'lib/bf_ruby2/api/users_api.rb', line 39

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:



96
97
98
99
# File 'lib/bf_ruby2/api/users_api.rb', line 96

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:



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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/bf_ruby2/api/users_api.rb', line 106

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
  fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.create_user_login" if user.nil?
  # resource path
  local_var_path = "/users/create-user-login".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/bf_ruby2/api/users_api.rb', line 49

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
  fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.create_user" if user.nil?
  # resource path
  local_var_path = "/users".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



157
158
159
160
# File 'lib/bf_ruby2/api/users_api.rb', line 157

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



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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/bf_ruby2/api/users_api.rb', line 171

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 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".sub('{format}','json')

  # 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)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



225
226
227
228
# File 'lib/bf_ruby2/api/users_api.rb', line 225

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



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

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
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_by_id" if user_id.nil?
  # resource path
  local_var_path = "/users/{user-ID}".sub('{format}','json').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)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



285
286
287
288
# File 'lib/bf_ruby2/api/users_api.rb', line 285

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



296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/bf_ruby2/api/users_api.rb', line 296

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
  fail ArgumentError, "Missing the required parameter 'password_reset_code' when calling UsersApi.get_user_by_password_reset_code" if password_reset_code.nil?
  # resource path
  local_var_path = "/users/password-reset-code/{password-reset-code}".sub('{format}','json').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)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



345
346
347
348
# File 'lib/bf_ruby2/api/users_api.rb', line 345

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



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

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
  fail ArgumentError, "Missing the required parameter 'sms_password_reset_code' when calling UsersApi.get_user_by_sms_password_reset_code" if sms_password_reset_code.nil?
  # resource path
  local_var_path = "/users/sms-password-reset-code/{sms-password-reset-code}".sub('{format}','json').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)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



405
406
407
408
# File 'lib/bf_ruby2/api/users_api.rb', line 405

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



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
449
450
451
452
453
454
455
456
457
# File 'lib/bf_ruby2/api/users_api.rb', line 416

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
  fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.get_user_by_username" if username.nil?
  # resource path
  local_var_path = "/users/username/{username}".sub('{format}','json').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)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



464
465
466
467
# File 'lib/bf_ruby2/api/users_api.rb', line 464

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



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/bf_ruby2/api/users_api.rb', line 474

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
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.reset_user_password" if request.nil?
  # resource path
  local_var_path = "/users/password-reset".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



522
523
524
525
# File 'lib/bf_ruby2/api/users_api.rb', line 522

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



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

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
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.retire_user" if user_id.nil?
  # verify the required parameter 'organizations' is set
  fail ArgumentError, "Missing the required parameter 'organizations' when calling UsersApi.retire_user" if organizations.nil?
  # resource path
  local_var_path = "/users/{user-ID}".sub('{format}','json').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)
  local_header_accept = ['application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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:



583
584
585
586
# File 'lib/bf_ruby2/api/users_api.rb', line 583

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:



640
641
642
643
# File 'lib/bf_ruby2/api/users_api.rb', line 640

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



650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/bf_ruby2/api/users_api.rb', line 650

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
  fail ArgumentError, "Missing the required parameter 'password_reset' when calling UsersApi.update_user_password" if password_reset.nil?
  # resource path
  local_var_path = "/users/password-update".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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



593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/bf_ruby2/api/users_api.rb', line 593

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
  fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.update_user" if user.nil?
  # resource path
  local_var_path = "/users".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/xml', 'application/xml', 'application/json; charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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