Method: PureCloud::AuthorizationApi#put_roles_role_id_users_remove_with_http_info

Defined in:
lib/purecloud/api/authorization_api.rb

#put_roles_role_id_users_remove_with_http_info(role_id, opts = {}) ⇒ Array<(Array<String>, Fixnum, Hash)>

Removes the users from the role

Parameters:

  • role_id

    Role ID

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

    the optional parameters

Options Hash (opts):

  • :body (Array<String>)

Returns:

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

    Array<String> data, response status code and response headers



1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
# File 'lib/purecloud/api/authorization_api.rb', line 1027

def put_roles_role_id_users_remove_with_http_info(role_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuthorizationApi#put_roles_role_id_users_remove ..."
  end
  
  # verify the required parameter 'role_id' is set
  fail "Missing the required parameter 'role_id' when calling put_roles_role_id_users_remove" if role_id.nil?
  
  # resource path
  local_var_path = "/api/v2/authorization/roles/{roleId}/users/remove".sub('{format}','json').sub('{' + 'roleId' + '}', role_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

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