Class: Bfwd::UsersApi
- Inherits:
-
Object
- Object
- Bfwd::UsersApi
- Defined in:
- lib/bf_ruby2/api/users_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_user(user, opts = {}) ⇒ UserPagedMetadata
Create a user.
-
#create_user_login(user, opts = {}) ⇒ UserCreationResponsePagedMetadata
Create a user.
-
#create_user_login_with_http_info(user, opts = {}) ⇒ Array<(UserCreationResponsePagedMetadata, Fixnum, Hash)>
Create a user.
-
#create_user_with_http_info(user, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>
Create a user.
-
#get_all_users(opts = {}) ⇒ UserPagedMetadata
Returns a collection of Users.
-
#get_all_users_with_http_info(opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>
Returns a collection of Users.
-
#get_user_by_id(user_id, opts = {}) ⇒ UserPagedMetadata
Returns a single User, specified by the ID parameter.
-
#get_user_by_id_with_http_info(user_id, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>
Returns a single User, specified by the ID parameter.
-
#get_user_by_password_reset_code(password_reset_code, opts = {}) ⇒ UserPagedMetadata
Returns a single User, specified by the password-reset-code parameter.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ UsersApi
constructor
A new instance of UsersApi.
-
#reset_user_password(request, opts = {}) ⇒ UserPagedMetadata
Create a password reset request.
-
#reset_user_password_with_http_info(request, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>
Create a password reset request.
-
#retire_user(user_id, organizations, opts = {}) ⇒ UserPagedMetadata
Retires the user with the specified user-ID.
-
#retire_user_with_http_info(user_id, organizations, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>
Retires the user with the specified user-ID.
-
#update_user(user, opts = {}) ⇒ UserPagedMetadata
Update a user.
-
#update_user_password(password_reset, opts = {}) ⇒ UserPagedMetadata
Update a user’s password.
-
#update_user_password_with_http_info(password_reset, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>
Update a user's password.
-
#update_user_with_http_info(user, opts = {}) ⇒ Array<(UserPagedMetadata, Fixnum, Hash)>
Update a user.
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_client ⇒ Object
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"
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"
96 97 98 99 |
# File 'lib/bf_ruby2/api/users_api.rb', line 96 def create_user_login(user, opts = {}) data, _status_code, _headers = create_user_login_with_http_info(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","request":"createUserWithLoginRequest.html","response":"createUserWithLoginResponse.html"
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 create_user_login_with_http_info(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","request":"createUserRequest.html","response":"createUserResponse.html"
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"}
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. { "nickname" : "Get all users","response" : "getUserAll.html"}
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"}
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. { "nickname" : "Retrieve an existing user","response" : "getUserByID.html"}
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"}
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. { "nickname" : "Retrieve by reset code","response" : "getUserByPasswordResetCode.html"}
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"}
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. { "nickname" : "Retrieve by sms reset code","response" : "getUserBySMSPasswordResetCode.html"}
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"}
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. { "nickname" : "Retrieve by username","response" : "getUserByUsername.html"}
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"
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","request":"PasswordResetRequest.html","response":"PasswordResetResponse.html"
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"}
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. { "nickname" : "Delete a user","response" : "deleteUser.html"}
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" }
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" }
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's password. { "nickname" : "Update password using reset code", "request" : "updateUserPassword.html" ,"response" : "updateUserPasswordResponse.html" }
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. { "nickname" : "Update a user", "request" : "updateUserRequest.html" ,"response" : "updateUserResponse.html" }
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 |