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

- old
+ new

@@ -6,10 +6,68 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end + # Query for queue observations + # + # @param [Hash] opts the optional parameters + # @option opts [ObservationQuery] :body query + # @return [ObservationQueryResponse] + def post_queues_observations_query(opts = {}) + data, status_code, headers = post_queues_observations_query_with_http_info(opts) + return data + end + + # Query for queue observations + # + # @param [Hash] opts the optional parameters + # @option opts [ObservationQuery] :body query + # @return [Array<(ObservationQueryResponse, Fixnum, Hash)>] ObservationQueryResponse data, response status code and response headers + def post_queues_observations_query_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#post_queues_observations_query ..." + end + + # resource path + path = "/api/v2/analytics/queues/observations/query".sub('{format}','json') + + # 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 => 'ObservationQueryResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RoutingApi#post_queues_observations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get domains # # @param [Hash] opts the optional parameters # @return [InboundDomainEntityListing] def get_email_domains(opts = {}) @@ -25,11 +83,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_email_domains ..." end # resource path - path = "/api/v1/routing/email/domains".sub('{format}','json') + path = "/api/v2/routing/email/domains".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -83,11 +141,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#post_email_domains ..." end # resource path - path = "/api/v1/routing/email/domains".sub('{format}','json') + path = "/api/v2/routing/email/domains".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -144,11 +202,11 @@ # verify the required parameter 'domain' is set fail "Missing the required parameter 'domain' when calling get_email_domains_domain_routes" if domain.nil? # resource path - path = "/api/v1/routing/email/domains/{domain}/routes".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s) + path = "/api/v2/routing/email/domains/{domain}/routes".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s) # query parameters query_params = {} # header parameters @@ -207,11 +265,11 @@ # verify the required parameter 'domain' is set fail "Missing the required parameter 'domain' when calling post_email_domains_domain_routes" if domain.nil? # resource path - path = "/api/v1/routing/email/domains/{domain}/routes".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s) + path = "/api/v2/routing/email/domains/{domain}/routes".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s) # query parameters query_params = {} # header parameters @@ -273,11 +331,11 @@ # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling get_email_domains_domain_routes_id" if id.nil? # resource path - path = "/api/v1/routing/email/domains/{domain}/routes/{id}".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s).sub('{' + 'id' + '}', id.to_s) + path = "/api/v2/routing/email/domains/{domain}/routes/{id}".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters @@ -341,11 +399,11 @@ # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling put_email_domains_domain_routes_id" if id.nil? # resource path - path = "/api/v1/routing/email/domains/{domain}/routes/{id}".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s).sub('{' + 'id' + '}', id.to_s) + path = "/api/v2/routing/email/domains/{domain}/routes/{id}".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters @@ -407,11 +465,11 @@ # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling delete_email_domains_domain_routes_id" if id.nil? # resource path - path = "/api/v1/routing/email/domains/{domain}/routes/{id}".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s).sub('{' + 'id' + '}', id.to_s) + path = "/api/v2/routing/email/domains/{domain}/routes/{id}".sub('{format}','json').sub('{' + 'domain' + '}', domain.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters @@ -468,11 +526,11 @@ # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling delete_email_domains_id" if id.nil? # resource path - path = "/api/v1/routing/email/domains/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s) + path = "/api/v2/routing/email/domains/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters @@ -524,11 +582,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_email_setup ..." end # resource path - path = "/api/v1/routing/email/setup".sub('{format}','json') + path = "/api/v2/routing/email/setup".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -590,11 +648,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_queues ..." end # resource path - path = "/api/v1/routing/queues".sub('{format}','json') + path = "/api/v2/routing/queues".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] @@ -653,11 +711,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#post_queues ..." end # resource path - path = "/api/v1/routing/queues".sub('{format}','json') + path = "/api/v2/routing/queues".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -714,11 +772,11 @@ # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queues_queue_id" if queue_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) + path = "/api/v2/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) # query parameters query_params = {} # header parameters @@ -777,11 +835,11 @@ # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling put_queues_queue_id" if queue_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) + path = "/api/v2/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) # query parameters query_params = {} # header parameters @@ -840,11 +898,11 @@ # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling delete_queues_queue_id" if queue_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) + path = "/api/v2/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) # query parameters query_params = {} query_params[:'forceDelete'] = opts[:'force_delete'] if opts[:'force_delete'] @@ -904,11 +962,11 @@ # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queues_queue_id_estimatedwaittime" if queue_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/estimatedwaittime".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) + path = "/api/v2/routing/queues/{queueId}/estimatedwaittime".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) # query parameters query_params = {} query_params[:'conversationId'] = opts[:'conversation_id'] if opts[:'conversation_id'] @@ -942,161 +1000,10 @@ @api_client.config.logger.debug "API called: RoutingApi#get_queues_queue_id_estimatedwaittime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get members in a queue - # Get the list of members of a queue - # @param queue_id - # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :user_id UserID - # @option opts [String] :status_id Status ID - # @option opts [BOOLEAN] :joined Joined - # @option opts [String] :expand expand - # @return [QueueMemberEntityListing] - def get_queues_queue_id_members(queue_id, opts = {}) - data, status_code, headers = get_queues_queue_id_members_with_http_info(queue_id, opts) - return data - end - - # Get members in a queue - # Get the list of members of a queue - # @param queue_id - # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :user_id UserID - # @option opts [String] :status_id Status ID - # @option opts [BOOLEAN] :joined Joined - # @option opts [String] :expand expand - # @return [Array<(QueueMemberEntityListing, Fixnum, Hash)>] QueueMemberEntityListing data, response status code and response headers - def get_queues_queue_id_members_with_http_info(queue_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: RoutingApi#get_queues_queue_id_members ..." - end - - # verify the required parameter 'queue_id' is set - fail "Missing the required parameter 'queue_id' when calling get_queues_queue_id_members" if queue_id.nil? - - if opts[:'expand'] && !['routingStatus'].include?(opts[:'expand']) - fail 'invalid value for "expand", must be one of routingStatus' - end - - # resource path - path = "/api/v1/routing/queues/{queueId}/members".sub('{format}','json').sub('{' + 'queueId' + '}', queue_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[:'userId'] = opts[:'user_id'] if opts[:'user_id'] - query_params[:'statusId'] = opts[:'status_id'] if opts[:'status_id'] - query_params[:'joined'] = opts[:'joined'] if opts[:'joined'] - query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] - - # 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 => 'QueueMemberEntityListing') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: RoutingApi#get_queues_queue_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Join or unjoin a user to the queue. - # - # @param queue_id Queue ID - # @param member_id Member/User ID - # @param [Hash] opts the optional parameters - # @option opts [QueueMember] :body To join queue ~ \&quot;joined\&quot;:true - # @return [QueueMember] - def put_queues_queue_id_members_member_id(queue_id, member_id, opts = {}) - data, status_code, headers = put_queues_queue_id_members_member_id_with_http_info(queue_id, member_id, opts) - return data - end - - # Join or unjoin a user to the queue. - # - # @param queue_id Queue ID - # @param member_id Member/User ID - # @param [Hash] opts the optional parameters - # @option opts [QueueMember] :body To join queue ~ \&quot;joined\&quot;:true - # @return [Array<(QueueMember, Fixnum, Hash)>] QueueMember data, response status code and response headers - def put_queues_queue_id_members_member_id_with_http_info(queue_id, member_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: RoutingApi#put_queues_queue_id_members_member_id ..." - end - - # verify the required parameter 'queue_id' is set - fail "Missing the required parameter 'queue_id' when calling put_queues_queue_id_members_member_id" if queue_id.nil? - - # verify the required parameter 'member_id' is set - fail "Missing the required parameter 'member_id' when calling put_queues_queue_id_members_member_id" if member_id.nil? - - # resource path - path = "/api/v1/routing/queues/{queueId}/members/{memberId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'memberId' + '}', member_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, path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'QueueMember') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: RoutingApi#put_queues_queue_id_members_member_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get the members of this queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size @@ -1127,11 +1034,11 @@ # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queues_queue_id_users" if queue_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) + path = "/api/v2/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_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'] @@ -1197,11 +1104,11 @@ # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling post_queues_queue_id_users" if queue_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) + path = "/api/v2/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) # query parameters query_params = {} query_params[:'delete'] = opts[:'delete'] if opts[:'delete'] @@ -1261,11 +1168,11 @@ # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling patch_queues_queue_id_users" if queue_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) + path = "/api/v2/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s) # query parameters query_params = {} # header parameters @@ -1327,11 +1234,11 @@ # verify the required parameter 'member_id' is set fail "Missing the required parameter 'member_id' when calling delete_queues_queue_id_users_member_id" if member_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/users/{memberId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) + path = "/api/v2/routing/queues/{queueId}/users/{memberId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} # header parameters @@ -1395,11 +1302,11 @@ # verify the required parameter 'member_id' is set fail "Missing the required parameter 'member_id' when calling patch_queues_queue_id_users_member_id" if member_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/users/{memberId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) + path = "/api/v2/routing/queues/{queueId}/users/{memberId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} # header parameters @@ -1461,11 +1368,11 @@ # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling get_queues_queue_id_wrapupcodes" if code_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/wrapupcodes".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'codeId' + '}', code_id.to_s) + path = "/api/v2/routing/queues/{queueId}/wrapupcodes".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'codeId' + '}', code_id.to_s) # query parameters query_params = {} # header parameters @@ -1529,11 +1436,11 @@ # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling post_queues_queue_id_wrapupcodes" if code_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/wrapupcodes".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'codeId' + '}', code_id.to_s) + path = "/api/v2/routing/queues/{queueId}/wrapupcodes".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'codeId' + '}', code_id.to_s) # query parameters query_params = {} # header parameters @@ -1595,11 +1502,11 @@ # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling delete_queues_queue_id_wrapupcodes_code_id" if code_id.nil? # resource path - path = "/api/v1/routing/queues/{queueId}/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'codeId' + '}', code_id.to_s) + path = "/api/v2/routing/queues/{queueId}/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'codeId' + '}', code_id.to_s) # query parameters query_params = {} # header parameters @@ -1637,12 +1544,10 @@ # Get the list of skills. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number - # @option opts [String] :sort_by Sort by - # @option opts [String] :name Name # @return [SkillEntityListing] def get_skills(opts = {}) data, status_code, headers = get_skills_with_http_info(opts) return data end @@ -1650,27 +1555,23 @@ # Get the list of skills. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number - # @option opts [String] :sort_by Sort by - # @option opts [String] :name Name # @return [Array<(SkillEntityListing, Fixnum, Hash)>] SkillEntityListing data, response status code and response headers def get_skills_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_skills ..." end # resource path - path = "/api/v1/routing/skills".sub('{format}','json') + path = "/api/v2/routing/skills".sub('{format}','json') # 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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] - query_params[:'name'] = opts[:'name'] if opts[:'name'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -1700,10 +1601,253 @@ @api_client.config.logger.debug "API called: RoutingApi#get_skills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Create Skill + # + # @param [Hash] opts the optional parameters + # @option opts [RoutingSkill] :body Skill + # @return [RoutingSkill] + def post_skills(opts = {}) + data, status_code, headers = post_skills_with_http_info(opts) + return data + end + + # Create Skill + # + # @param [Hash] opts the optional parameters + # @option opts [RoutingSkill] :body Skill + # @return [Array<(RoutingSkill, Fixnum, Hash)>] RoutingSkill data, response status code and response headers + def post_skills_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#post_skills ..." + end + + # resource path + path = "/api/v2/routing/skills".sub('{format}','json') + + # 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 => 'RoutingSkill') + if @api_client.config.debugging + @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 + # + # @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 + # + # @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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#get_skills_skill_id ..." + end + + # verify the required parameter 'skill_id' is set + fail "Missing the required parameter 'skill_id' when calling get_skills_skill_id" if skill_id.nil? + + # resource path + path = "/api/v2/routing/skills/{skillId}".sub('{format}','json').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(:GET, path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'RoutingSkill') + if @api_client.config.debugging + @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 + # + # @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 + # + # @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 + def put_skills_skill_id_with_http_info(skill_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#put_skills_skill_id ..." + end + + # verify the required parameter 'skill_id' is set + fail "Missing the required parameter 'skill_id' when calling put_skills_skill_id" if skill_id.nil? + + # resource path + path = "/api/v2/routing/skills/{skillId}".sub('{format}','json').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 = @api_client.object_to_http_body(opts[:'body']) + + + auth_names = ['PureCloud Auth'] + data, status_code, headers = @api_client.call_api(:PUT, path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'RoutingSkill') + if @api_client.config.debugging + @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 + # + # @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 + # + # @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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: RoutingApi#delete_skills_skill_id ..." + end + + # verify the required parameter 'skill_id' is set + fail "Missing the required parameter 'skill_id' when calling delete_skills_skill_id" if skill_id.nil? + + # resource path + path = "/api/v2/routing/skills/{skillId}".sub('{format}','json').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_skills_skill_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get the utilization settings. # # @param [Hash] opts the optional parameters # @return [Utilization] def get_utilization(opts = {}) @@ -1719,11 +1863,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_utilization ..." end # resource path - path = "/api/v1/routing/utilization".sub('{format}','json') + path = "/api/v2/routing/utilization".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1777,11 +1921,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#put_utilization ..." end # resource path - path = "/api/v1/routing/utilization".sub('{format}','json') + path = "/api/v2/routing/utilization".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1833,11 +1977,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#delete_utilization ..." end # resource path - path = "/api/v1/routing/utilization".sub('{format}','json') + path = "/api/v2/routing/utilization".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1895,11 +2039,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_wrapupcodes ..." end # resource path - path = "/api/v1/routing/wrapupcodes".sub('{format}','json') + path = "/api/v2/routing/wrapupcodes".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] @@ -1956,11 +2100,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#post_wrapupcodes ..." end # resource path - path = "/api/v1/routing/wrapupcodes".sub('{format}','json') + path = "/api/v2/routing/wrapupcodes".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -2017,11 +2161,11 @@ # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling get_wrapupcodes_code_id" if code_id.nil? # resource path - path = "/api/v1/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_id.to_s) + path = "/api/v2/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_id.to_s) # query parameters query_params = {} # header parameters @@ -2080,11 +2224,11 @@ # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling put_wrapupcodes_code_id" if code_id.nil? # resource path - path = "/api/v1/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_id.to_s) + path = "/api/v2/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_id.to_s) # query parameters query_params = {} # header parameters @@ -2141,10 +2285,10 @@ # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling delete_wrapupcodes_code_id" if code_id.nil? # resource path - path = "/api/v1/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_id.to_s) + path = "/api/v2/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_id.to_s) # query parameters query_params = {} # header parameters