Class: WalleeRubySdk::HumanUsersRolesService
- Inherits:
-
Object
- Object
- WalleeRubySdk::HumanUsersRolesService
- Defined in:
- lib/wallee-ruby-sdk/service/human_users_roles_service.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_human_users_user_id_account_roles(user_id, role_id, account, opts = {}) ⇒ nil
Unassign a role from a human user for an account.
-
#delete_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
-
#delete_human_users_user_id_space_roles(user_id, role_id, space, opts = {}) ⇒ nil
Unassign a role from a human user for a space.
-
#delete_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
-
#get_human_users_user_id_account_roles(user_id, account, opts = {}) ⇒ UserAccountRoleListResponse
List all roles of a human user for an account.
-
#get_human_users_user_id_account_roles_with_http_info(user_id, account, opts = {}) ⇒ Array<(UserAccountRoleListResponse, Integer, Hash)>
UserAccountRoleListResponse data, response status code and response headers.
-
#get_human_users_user_id_space_roles(user_id, space, opts = {}) ⇒ UserSpaceRoleListResponse
List all roles of a human user for a space.
-
#get_human_users_user_id_space_roles_with_http_info(user_id, space, opts = {}) ⇒ Array<(UserSpaceRoleListResponse, Integer, Hash)>
UserSpaceRoleListResponse data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ HumanUsersRolesService
constructor
A new instance of HumanUsersRolesService.
-
#post_human_users_user_id_account_roles(user_id, role_id, account, opts = {}) ⇒ UserAccountRole
Assign a role to a human user for an account.
-
#post_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts = {}) ⇒ Array<(UserAccountRole, Integer, Hash)>
UserAccountRole data, response status code and response headers.
-
#post_human_users_user_id_space_roles(user_id, role_id, space, opts = {}) ⇒ UserSpaceRole
Assign a role to a human user for a space.
-
#post_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts = {}) ⇒ Array<(UserSpaceRole, Integer, Hash)>
UserSpaceRole data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ HumanUsersRolesService
Returns a new instance of HumanUsersRolesService.
28 29 30 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 28 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
25 26 27 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 25 def api_client @api_client end |
Instance Method Details
#delete_human_users_user_id_account_roles(user_id, role_id, account, opts = {}) ⇒ nil
Unassign a role from a human user for an account
37 38 39 40 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 37 def delete_human_users_user_id_account_roles(user_id, role_id, account, opts = {}) delete_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts) nil end |
#delete_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, 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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 49 def delete_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HumanUsersRolesService.delete_human_users_user_id_account_roles ...' 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 HumanUsersRolesService.delete_human_users_user_id_account_roles" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling HumanUsersRolesService.delete_human_users_user_id_account_roles" end # verify the required parameter 'account' is set if @api_client.config.client_side_validation && account.nil? fail ArgumentError, "Missing the required parameter 'account' when calling HumanUsersRolesService.delete_human_users_user_id_account_roles" end # resource path local_var_path = '/human-users/{userId}/account-roles'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'roleId'] = role_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Account'] = account # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] = opts.merge( :operation => :"HumanUsersRolesService.delete_human_users_user_id_account_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: HumanUsersRolesService#delete_human_users_user_id_account_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#delete_human_users_user_id_space_roles(user_id, role_id, space, opts = {}) ⇒ nil
Unassign a role from a human user for a space
113 114 115 116 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 113 def delete_human_users_user_id_space_roles(user_id, role_id, space, opts = {}) delete_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts) nil end |
#delete_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 125 def delete_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HumanUsersRolesService.delete_human_users_user_id_space_roles ...' 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 HumanUsersRolesService.delete_human_users_user_id_space_roles" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling HumanUsersRolesService.delete_human_users_user_id_space_roles" end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling HumanUsersRolesService.delete_human_users_user_id_space_roles" end # resource path local_var_path = '/human-users/{userId}/space-roles'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'roleId'] = role_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] = opts.merge( :operation => :"HumanUsersRolesService.delete_human_users_user_id_space_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: HumanUsersRolesService#delete_human_users_user_id_space_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#get_human_users_user_id_account_roles(user_id, account, opts = {}) ⇒ UserAccountRoleListResponse
List all roles of a human user for an account
188 189 190 191 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 188 def get_human_users_user_id_account_roles(user_id, account, opts = {}) data, _status_code, _headers = get_human_users_user_id_account_roles_with_http_info(user_id, account, opts) data end |
#get_human_users_user_id_account_roles_with_http_info(user_id, account, opts = {}) ⇒ Array<(UserAccountRoleListResponse, Integer, Hash)>
Returns UserAccountRoleListResponse data, response status code and response headers.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 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 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 199 def get_human_users_user_id_account_roles_with_http_info(user_id, account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HumanUsersRolesService.get_human_users_user_id_account_roles ...' 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 HumanUsersRolesService.get_human_users_user_id_account_roles" end # verify the required parameter 'account' is set if @api_client.config.client_side_validation && account.nil? fail ArgumentError, "Missing the required parameter 'account' when calling HumanUsersRolesService.get_human_users_user_id_account_roles" end # resource path local_var_path = '/human-users/{userId}/account-roles'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Account'] = account # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UserAccountRoleListResponse' = opts.merge( :operation => :"HumanUsersRolesService.get_human_users_user_id_account_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: HumanUsersRolesService#get_human_users_user_id_account_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#get_human_users_user_id_space_roles(user_id, space, opts = {}) ⇒ UserSpaceRoleListResponse
List all roles of a human user for a space
257 258 259 260 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 257 def get_human_users_user_id_space_roles(user_id, space, opts = {}) data, _status_code, _headers = get_human_users_user_id_space_roles_with_http_info(user_id, space, opts) data end |
#get_human_users_user_id_space_roles_with_http_info(user_id, space, opts = {}) ⇒ Array<(UserSpaceRoleListResponse, Integer, Hash)>
Returns UserSpaceRoleListResponse data, response status code and response headers.
268 269 270 271 272 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 313 314 315 316 317 318 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 268 def get_human_users_user_id_space_roles_with_http_info(user_id, space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HumanUsersRolesService.get_human_users_user_id_space_roles ...' 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 HumanUsersRolesService.get_human_users_user_id_space_roles" end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling HumanUsersRolesService.get_human_users_user_id_space_roles" end # resource path local_var_path = '/human-users/{userId}/space-roles'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UserSpaceRoleListResponse' = opts.merge( :operation => :"HumanUsersRolesService.get_human_users_user_id_space_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: HumanUsersRolesService#get_human_users_user_id_space_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#post_human_users_user_id_account_roles(user_id, role_id, account, opts = {}) ⇒ UserAccountRole
Assign a role to a human user for an account
328 329 330 331 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 328 def post_human_users_user_id_account_roles(user_id, role_id, account, opts = {}) data, _status_code, _headers = post_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts) data end |
#post_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts = {}) ⇒ Array<(UserAccountRole, Integer, Hash)>
Returns UserAccountRole data, response status code and response headers.
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 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/wallee-ruby-sdk/service/human_users_roles_service.rb', line 341 def post_human_users_user_id_account_roles_with_http_info(user_id, role_id, account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HumanUsersRolesService.post_human_users_user_id_account_roles ...' 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 HumanUsersRolesService.post_human_users_user_id_account_roles" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling HumanUsersRolesService.post_human_users_user_id_account_roles" end # verify the required parameter 'account' is set if @api_client.config.client_side_validation && account.nil? fail ArgumentError, "Missing the required parameter 'account' when calling HumanUsersRolesService.post_human_users_user_id_account_roles" end # resource path local_var_path = '/human-users/{userId}/account-roles'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'roleId'] = role_id query_params[:'appliesOnSubAccount'] = opts[:'applies_on_sub_account'] unless opts[:'applies_on_sub_account'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Account'] = account # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UserAccountRole' = opts.merge( :operation => :"HumanUsersRolesService.post_human_users_user_id_account_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: HumanUsersRolesService#post_human_users_user_id_account_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#post_human_users_user_id_space_roles(user_id, role_id, space, opts = {}) ⇒ UserSpaceRole
Assign a role to a human user for a space
406 407 408 409 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 406 def post_human_users_user_id_space_roles(user_id, role_id, space, opts = {}) data, _status_code, _headers = post_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts) data end |
#post_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts = {}) ⇒ Array<(UserSpaceRole, Integer, Hash)>
Returns UserSpaceRole data, response status code and response headers.
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 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/wallee-ruby-sdk/service/human_users_roles_service.rb', line 418 def post_human_users_user_id_space_roles_with_http_info(user_id, role_id, space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HumanUsersRolesService.post_human_users_user_id_space_roles ...' 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 HumanUsersRolesService.post_human_users_user_id_space_roles" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling HumanUsersRolesService.post_human_users_user_id_space_roles" end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling HumanUsersRolesService.post_human_users_user_id_space_roles" end # resource path local_var_path = '/human-users/{userId}/space-roles'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'roleId'] = role_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UserSpaceRole' = opts.merge( :operation => :"HumanUsersRolesService.post_human_users_user_id_space_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: HumanUsersRolesService#post_human_users_user_id_space_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |