lib/purecloudplatformclientv2/api/authorization_api.rb in purecloudplatformclientv2-78.1.0 vs lib/purecloudplatformclientv2/api/authorization_api.rb in purecloudplatformclientv2-79.0.0
- old
+ new
@@ -627,23 +627,23 @@
@api_client.config.logger.debug "API called: AuthorizationApi#get_authorization_divisions_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Returns whether or not current user can perform the specified action(s).
- #
+ # Returns which divisions the current user has the given permission in.
+ # This route is deprecated, use authorization/divisionspermitted/paged/me instead.
# @param permission The permission string, including the object to access, e.g. routing:queue:view
# @param [Hash] opts the optional parameters
# @option opts [String] :name Search term to filter by division name
# @return [Array<AuthzDivision>]
def get_authorization_divisionspermitted_me(permission, opts = {})
data, _status_code, _headers = get_authorization_divisionspermitted_me_with_http_info(permission, opts)
return data
end
- # Returns whether or not current user can perform the specified action(s).
- #
+ # Returns which divisions the current user has the given permission in.
+ # This route is deprecated, use authorization/divisionspermitted/paged/me instead.
# @param permission The permission string, including the object to access, e.g. routing:queue:view
# @param [Hash] opts the optional parameters
# @option opts [String] :name Search term to filter by division name
# @return [Array<(Array<AuthzDivision>, Fixnum, Hash)>] Array<AuthzDivision> data, response status code and response headers
def get_authorization_divisionspermitted_me_with_http_info(permission, opts = {})
@@ -702,23 +702,201 @@
@api_client.config.logger.debug "API called: AuthorizationApi#get_authorization_divisionspermitted_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Returns whether or not specified user can perform the specified action(s).
+ # Returns which divisions the current user has the given permission in.
#
+ # @param permission The permission string, including the object to access, e.g. routing:queue:view
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page_number Page number (default to 1)
+ # @option opts [Integer] :page_size Page size (default to 25)
+ # @return [DivsPermittedEntityListing]
+ def get_authorization_divisionspermitted_paged_me(permission, opts = {})
+ data, _status_code, _headers = get_authorization_divisionspermitted_paged_me_with_http_info(permission, opts)
+ return data
+ end
+
+ # Returns which divisions the current user has the given permission in.
+ #
+ # @param permission The permission string, including the object to access, e.g. routing:queue:view
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page_number Page number
+ # @option opts [Integer] :page_size Page size
+ # @return [Array<(DivsPermittedEntityListing, Fixnum, Hash)>] DivsPermittedEntityListing data, response status code and response headers
+ def get_authorization_divisionspermitted_paged_me_with_http_info(permission, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AuthorizationApi.get_authorization_divisionspermitted_paged_me ..."
+ end
+
+
+ # verify the required parameter 'permission' is set
+ fail ArgumentError, "Missing the required parameter 'permission' when calling AuthorizationApi.get_authorization_divisionspermitted_paged_me" if permission.nil?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # resource path
+ local_var_path = "/api/v2/authorization/divisionspermitted/paged/me".sub('{format}','json')
+
+ # query parameters
+ query_params = {}
+ query_params[:'permission'] = permission
+ query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
+ query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ local_header_accept = ['application/json']
+ 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']
+ 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 = ['PureCloud OAuth']
+ 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 => 'DivsPermittedEntityListing')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AuthorizationApi#get_authorization_divisionspermitted_paged_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Returns which divisions the specified user has the given permission in.
+ #
# @param subject_id Subject ID (user or group)
# @param permission The permission string, including the object to access, e.g. routing:queue:view
# @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page_number Page number (default to 1)
+ # @option opts [Integer] :page_size Page size (default to 25)
+ # @return [DivsPermittedEntityListing]
+ def get_authorization_divisionspermitted_paged_subject_id(subject_id, permission, opts = {})
+ data, _status_code, _headers = get_authorization_divisionspermitted_paged_subject_id_with_http_info(subject_id, permission, opts)
+ return data
+ end
+
+ # Returns which divisions the specified user has the given permission in.
+ #
+ # @param subject_id Subject ID (user or group)
+ # @param permission The permission string, including the object to access, e.g. routing:queue:view
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page_number Page number
+ # @option opts [Integer] :page_size Page size
+ # @return [Array<(DivsPermittedEntityListing, Fixnum, Hash)>] DivsPermittedEntityListing data, response status code and response headers
+ def get_authorization_divisionspermitted_paged_subject_id_with_http_info(subject_id, permission, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AuthorizationApi.get_authorization_divisionspermitted_paged_subject_id ..."
+ end
+
+
+ # verify the required parameter 'subject_id' is set
+ fail ArgumentError, "Missing the required parameter 'subject_id' when calling AuthorizationApi.get_authorization_divisionspermitted_paged_subject_id" if subject_id.nil?
+
+
+
+
+
+
+ # verify the required parameter 'permission' is set
+ fail ArgumentError, "Missing the required parameter 'permission' when calling AuthorizationApi.get_authorization_divisionspermitted_paged_subject_id" if permission.nil?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # resource path
+ local_var_path = "/api/v2/authorization/divisionspermitted/paged/{subjectId}".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s)
+
+ # query parameters
+ query_params = {}
+ query_params[:'permission'] = permission
+ query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
+ query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ local_header_accept = ['application/json']
+ 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']
+ 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 = ['PureCloud OAuth']
+ 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 => 'DivsPermittedEntityListing')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AuthorizationApi#get_authorization_divisionspermitted_paged_subject_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Returns which divisions the specified user has the given permission in.
+ # This route is deprecated, use authorization/divisionspermitted/paged/{subjectId} instead.
+ # @param subject_id Subject ID (user or group)
+ # @param permission The permission string, including the object to access, e.g. routing:queue:view
+ # @param [Hash] opts the optional parameters
# @option opts [String] :name Search term to filter by division name
# @return [Array<AuthzDivision>]
def get_authorization_divisionspermitted_subject_id(subject_id, permission, opts = {})
data, _status_code, _headers = get_authorization_divisionspermitted_subject_id_with_http_info(subject_id, permission, opts)
return data
end
- # Returns whether or not specified user can perform the specified action(s).
- #
+ # Returns which divisions the specified user has the given permission in.
+ # This route is deprecated, use authorization/divisionspermitted/paged/{subjectId} instead.
# @param subject_id Subject ID (user or group)
# @param permission The permission string, including the object to access, e.g. routing:queue:view
# @param [Hash] opts the optional parameters
# @option opts [String] :name Search term to filter by division name
# @return [Array<(Array<AuthzDivision>, Fixnum, Hash)>] Array<AuthzDivision> data, response status code and response headers