lib/purecloud/api/routing_api.rb in purecloud-0.28.0 vs lib/purecloud/api/routing_api.rb in purecloud-0.29.1

- old
+ new

@@ -1539,22 +1539,22 @@ @api_client.config.logger.debug "API called: RoutingApi#delete_queues_queue_id_wrapupcodes_code_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get the list of skills. + # Get the list of routing skills. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [SkillEntityListing] def get_skills(opts = {}) data, status_code, headers = get_skills_with_http_info(opts) return data end - # Get the list of skills. + # Get the list of routing skills. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(SkillEntityListing, Fixnum, Hash)>] SkillEntityListing data, response status code and response headers @@ -1659,21 +1659,21 @@ @api_client.config.logger.debug "API called: RoutingApi#post_skills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get Skill + # Get Routing Skill # # @param skill_id Skill ID # @param [Hash] opts the optional parameters # @return [RoutingSkill] def get_skills_skill_id(skill_id, opts = {}) data, status_code, headers = get_skills_skill_id_with_http_info(skill_id, opts) return data end - # Get Skill + # Get Routing Skill # # @param skill_id Skill ID # @param [Hash] opts the optional parameters # @return [Array<(RoutingSkill, Fixnum, Hash)>] RoutingSkill data, response status code and response headers def get_skills_skill_id_with_http_info(skill_id, opts = {}) @@ -1720,22 +1720,22 @@ @api_client.config.logger.debug "API called: RoutingApi#get_skills_skill_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update Skill + # Update Routing Skill # # @param skill_id Skill ID # @param [Hash] opts the optional parameters # @option opts [RoutingSkill] :body Skill # @return [RoutingSkill] def put_skills_skill_id(skill_id, opts = {}) data, status_code, headers = put_skills_skill_id_with_http_info(skill_id, opts) return data end - # Update Skill + # Update Routing Skill # # @param skill_id Skill ID # @param [Hash] opts the optional parameters # @option opts [RoutingSkill] :body Skill # @return [Array<(RoutingSkill, Fixnum, Hash)>] RoutingSkill data, response status code and response headers @@ -1783,21 +1783,21 @@ @api_client.config.logger.debug "API called: RoutingApi#put_skills_skill_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete Skill + # Delete Routing Skill # # @param skill_id Skill ID # @param [Hash] opts the optional parameters # @return [String] def delete_skills_skill_id(skill_id, opts = {}) data, status_code, headers = delete_skills_skill_id_with_http_info(skill_id, opts) return data end - # Delete Skill + # Delete Routing Skill # # @param skill_id Skill ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_skills_skill_id_with_http_info(skill_id, opts = {}) @@ -2318,9 +2318,212 @@ :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#delete_wrapupcodes_code_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List routing skills for user + # + # @param user_id User ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :sort_order Ascending or descending sort order + # @return [UserSkillEntityListing] + def get_user_id_routingskills(user_id, opts = {}) + data, status_code, headers = get_user_id_routingskills_with_http_info(user_id, opts) + return data + end + + # List routing skills for user + # + # @param user_id User ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :sort_order Ascending or descending sort order + # @return [Array<(UserSkillEntityListing, Fixnum, Hash)>] UserSkillEntityListing data, response status code and response headers + def get_user_id_routingskills_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#get_user_id_routingskills ..." + end + + # verify the required parameter 'user_id' is set + fail "Missing the required parameter 'user_id' when calling get_user_id_routingskills" if user_id.nil? + + if opts[:'sort_order'] && !['[ascending', 'descending]'].include?(opts[:'sort_order']) + fail 'invalid value for "sort_order", must be one of [ascending, descending]' + end + + # resource path + path = "/api/v2/users/{userId}/routingskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) + + # query parameters + query_params = {} + query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] + query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] + query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] + + # 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 = nil + + + auth_names = ['PureCloud Auth'] + data, status_code, headers = @api_client.call_api(:GET, path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'UserSkillEntityListing') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RoutingApi#get_user_id_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Add routing skill to user + # + # @param user_id User ID + # @param [Hash] opts the optional parameters + # @option opts [UserRoutingSkill] :body Skill + # @return [UserRoutingSkill] + def post_user_id_routingskills(user_id, opts = {}) + data, status_code, headers = post_user_id_routingskills_with_http_info(user_id, opts) + return data + end + + # Add routing skill to user + # + # @param user_id User ID + # @param [Hash] opts the optional parameters + # @option opts [UserRoutingSkill] :body Skill + # @return [Array<(UserRoutingSkill, Fixnum, Hash)>] UserRoutingSkill data, response status code and response headers + def post_user_id_routingskills_with_http_info(user_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#post_user_id_routingskills ..." + end + + # verify the required parameter 'user_id' is set + fail "Missing the required parameter 'user_id' when calling post_user_id_routingskills" if user_id.nil? + + # resource path + path = "/api/v2/users/{userId}/routingskills".sub('{format}','json').sub('{' + 'userId' + '}', user_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(:POST, path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'UserRoutingSkill') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RoutingApi#post_user_id_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove routing skill from user + # + # @param user_id User ID + # @param skill_id + # @param [Hash] opts the optional parameters + # @return [String] + def delete_user_id_routingskills_skill_id(user_id, skill_id, opts = {}) + data, status_code, headers = delete_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, opts) + return data + end + + # Remove routing skill from user + # + # @param user_id User ID + # @param skill_id + # @param [Hash] opts the optional parameters + # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers + def delete_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#delete_user_id_routingskills_skill_id ..." + end + + # verify the required parameter 'user_id' is set + fail "Missing the required parameter 'user_id' when calling delete_user_id_routingskills_skill_id" if user_id.nil? + + # verify the required parameter 'skill_id' is set + fail "Missing the required parameter 'skill_id' when calling delete_user_id_routingskills_skill_id" if skill_id.nil? + + # resource path + path = "/api/v2/users/{userId}/routingskills/{skillId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'skillId' + '}', skill_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 = nil + + + auth_names = ['PureCloud Auth'] + data, status_code, headers = @api_client.call_api(:DELETE, path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'String') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RoutingApi#delete_user_id_routingskills_skill_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end