require "uri" module PureCloud class RoutingApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Get domains # # @param [Hash] opts the optional parameters # @return [InboundDomainEntityListing] def get_email_domains(opts = {}) data, status_code, headers = get_email_domains_with_http_info(opts) return data end # Get domains # # @param [Hash] opts the optional parameters # @return [Array<(InboundDomainEntityListing, Fixnum, Hash)>] InboundDomainEntityListing data, response status code and response headers def get_email_domains_with_http_info(opts = {}) 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') # 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 => 'InboundDomainEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_email_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a domain # # @param [Hash] opts the optional parameters # @option opts [InboundDomain] :body Domain # @return [InboundDomain] def create_email_domains(opts = {}) data, status_code, headers = create_email_domains_with_http_info(opts) return data end # Create a domain # # @param [Hash] opts the optional parameters # @option opts [InboundDomain] :body Domain # @return [Array<(InboundDomain, Fixnum, Hash)>] InboundDomain data, response status code and response headers def create_email_domains_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#create_email_domains ..." end # resource path path = "/api/v1/routing/email/domains".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 => 'InboundDomain') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#create_email_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get routes # # @param domain email domain # @param [Hash] opts the optional parameters # @return [InboundRouteEntityListing] def get_email_domain_routes(domain, opts = {}) data, status_code, headers = get_email_domain_routes_with_http_info(domain, opts) return data end # Get routes # # @param domain email domain # @param [Hash] opts the optional parameters # @return [Array<(InboundRouteEntityListing, Fixnum, Hash)>] InboundRouteEntityListing data, response status code and response headers def get_email_domain_routes_with_http_info(domain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_email_domain_routes ..." end # verify the required parameter 'domain' is set fail "Missing the required parameter 'domain' when calling get_email_domain_routes" if domain.nil? # resource path path = "/api/v1/routing/email/domains/{domain}/routes".sub('{format}','json').sub('{' + 'domain' + '}', domain.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 => 'InboundRouteEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_email_domain_routes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a route # # @param domain email domain # @param [Hash] opts the optional parameters # @option opts [InboundRoute] :body Route # @return [InboundRoute] def create_email_domain_routes(domain, opts = {}) data, status_code, headers = create_email_domain_routes_with_http_info(domain, opts) return data end # Create a route # # @param domain email domain # @param [Hash] opts the optional parameters # @option opts [InboundRoute] :body Route # @return [Array<(InboundRoute, Fixnum, Hash)>] InboundRoute data, response status code and response headers def create_email_domain_routes_with_http_info(domain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#create_email_domain_routes ..." end # verify the required parameter 'domain' is set fail "Missing the required parameter 'domain' when calling create_email_domain_routes" if domain.nil? # resource path path = "/api/v1/routing/email/domains/{domain}/routes".sub('{format}','json').sub('{' + 'domain' + '}', domain.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 => 'InboundRoute') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#create_email_domain_routes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a route # # @param domain email domain # @param id route ID # @param [Hash] opts the optional parameters # @return [InboundRoute] def get_email_domain_routes_by_id(domain, id, opts = {}) data, status_code, headers = get_email_domain_routes_by_id_with_http_info(domain, id, opts) return data end # Get a route # # @param domain email domain # @param id route ID # @param [Hash] opts the optional parameters # @return [Array<(InboundRoute, Fixnum, Hash)>] InboundRoute data, response status code and response headers def get_email_domain_routes_by_id_with_http_info(domain, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_email_domain_routes_by_id ..." end # verify the required parameter 'domain' is set fail "Missing the required parameter 'domain' when calling get_email_domain_routes_by_id" if domain.nil? # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling get_email_domain_routes_by_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) # 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 => 'InboundRoute') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_email_domain_routes_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a route # # @param domain email domain # @param id route ID # @param [Hash] opts the optional parameters # @option opts [InboundRoute] :body Route # @return [InboundRoute] def update_email_domain_routes_by_id(domain, id, opts = {}) data, status_code, headers = update_email_domain_routes_by_id_with_http_info(domain, id, opts) return data end # Update a route # # @param domain email domain # @param id route ID # @param [Hash] opts the optional parameters # @option opts [InboundRoute] :body Route # @return [Array<(InboundRoute, Fixnum, Hash)>] InboundRoute data, response status code and response headers def update_email_domain_routes_by_id_with_http_info(domain, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#update_email_domain_routes_by_id ..." end # verify the required parameter 'domain' is set fail "Missing the required parameter 'domain' when calling update_email_domain_routes_by_id" if domain.nil? # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling update_email_domain_routes_by_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) # 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 => 'InboundRoute') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#update_email_domain_routes_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a route # # @param domain email domain # @param id route ID # @param [Hash] opts the optional parameters # @return [String] def delete_email_domain_routes_by_id(domain, id, opts = {}) data, status_code, headers = delete_email_domain_routes_by_id_with_http_info(domain, id, opts) return data end # Delete a route # # @param domain email domain # @param id route ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_email_domain_routes_by_id_with_http_info(domain, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#delete_email_domain_routes_by_id ..." end # verify the required parameter 'domain' is set fail "Missing the required parameter 'domain' when calling delete_email_domain_routes_by_id" if domain.nil? # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling delete_email_domain_routes_by_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) # 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_email_domain_routes_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a domain # # @param id domain ID # @param [Hash] opts the optional parameters # @return [String] def delete_email_domains_id(id, opts = {}) data, status_code, headers = delete_email_domains_id_with_http_info(id, opts) return data end # Delete a domain # # @param id domain ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_email_domains_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#delete_email_domains_id ..." end # 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) # 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_email_domains_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get email setup # # @param [Hash] opts the optional parameters # @return [EmailSetup] def get_email_setup(opts = {}) data, status_code, headers = get_email_setup_with_http_info(opts) return data end # Get email setup # # @param [Hash] opts the optional parameters # @return [Array<(EmailSetup, Fixnum, Hash)>] EmailSetup data, response status code and response headers def get_email_setup_with_http_info(opts = {}) 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') # 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 => 'EmailSetup') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_email_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get list of queues. # # @param queue_id 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] :sort_by Sort by # @option opts [String] :name Name # @option opts [BOOLEAN] :active Active # @return [QueueEntityListing] def get_queues(queue_id, opts = {}) data, status_code, headers = get_queues_with_http_info(queue_id, opts) return data end # Get list of queues. # # @param queue_id 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] :sort_by Sort by # @option opts [String] :name Name # @option opts [BOOLEAN] :active Active # @return [Array<(QueueEntityListing, Fixnum, Hash)>] QueueEntityListing data, response status code and response headers def get_queues_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_queues ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queues" if queue_id.nil? # resource path path = "/api/v1/routing/queues".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'active'] = opts[:'active'] if opts[:'active'] # 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 => 'QueueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Queue] :body Queue # @return [Queue] def create_queues(queue_id, opts = {}) data, status_code, headers = create_queues_with_http_info(queue_id, opts) return data end # Create queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Queue] :body Queue # @return [Array<(Queue, Fixnum, Hash)>] Queue data, response status code and response headers def create_queues_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#create_queues ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling create_queues" if queue_id.nil? # resource path path = "/api/v1/routing/queues".sub('{format}','json').sub('{' + 'QueueId' + '}', queue_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 => 'Queue') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#create_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get details about this queue. # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @return [Queue] def get_queue(queue_id, opts = {}) data, status_code, headers = get_queue_with_http_info(queue_id, opts) return data end # Get details about this queue. # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @return [Array<(Queue, Fixnum, Hash)>] Queue data, response status code and response headers def get_queue_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_queue ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queue" if queue_id.nil? # resource path path = "/api/v1/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_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 => 'Queue') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Queue] :body Queue # @return [Queue] def update_queue(queue_id, opts = {}) data, status_code, headers = update_queue_with_http_info(queue_id, opts) return data end # Update a queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Queue] :body Queue # @return [Array<(Queue, Fixnum, Hash)>] Queue data, response status code and response headers def update_queue_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#update_queue ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling update_queue" if queue_id.nil? # resource path path = "/api/v1/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_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 => 'Queue') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#update_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :force_delete # @return [String] def delete_queue(queue_id, opts = {}) data, status_code, headers = delete_queue_with_http_info(queue_id, opts) return data end # Delete a queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :force_delete # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_queue_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#delete_queue ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling delete_queue" if queue_id.nil? # resource path path = "/api/v1/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'] # 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_queue\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_queue_members(queue_id, opts = {}) data, status_code, headers = get_queue_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_queue_members_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_queue_members ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queue_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_queue_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 ~ \"joined\":true # @return [QueueMember] def update_queue_members_by_member_id(queue_id, member_id, opts = {}) data, status_code, headers = update_queue_members_by_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 ~ \"joined\":true # @return [Array<(QueueMember, Fixnum, Hash)>] QueueMember data, response status code and response headers def update_queue_members_by_member_id_with_http_info(queue_id, member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#update_queue_members_by_member_id ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling update_queue_members_by_member_id" if queue_id.nil? # verify the required parameter 'member_id' is set fail "Missing the required parameter 'member_id' when calling update_queue_members_by_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#update_queue_members_by_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 # @option opts [Integer] :page_number Page number # @option opts [String] :sort_by Sort by # @option opts [String] :expand expand # @option opts [BOOLEAN] :direct_members Only get users that are direct members of the queue # @return [QueueMember] def get_queue_users(queue_id, opts = {}) data, status_code, headers = get_queue_users_with_http_info(queue_id, opts) return data 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 # @option opts [Integer] :page_number Page number # @option opts [String] :sort_by Sort by # @option opts [String] :expand expand # @option opts [BOOLEAN] :direct_members Only get users that are direct members of the queue # @return [Array<(QueueMember, Fixnum, Hash)>] QueueMember data, response status code and response headers def get_queue_users_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_queue_users ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queue_users" if queue_id.nil? # resource path path = "/api/v1/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'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] query_params[:'directMembers'] = opts[:'direct_members'] if opts[:'direct_members'] # 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 => 'QueueMember') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_queue_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Bulk add or delete up to 100 queue members # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Array] :body Queue Members # @option opts [BOOLEAN] :delete True to delete queue members # @return [QueueMember] def create_queue_users(queue_id, opts = {}) data, status_code, headers = create_queue_users_with_http_info(queue_id, opts) return data end # Bulk add or delete up to 100 queue members # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Array] :body Queue Members # @option opts [BOOLEAN] :delete True to delete queue members # @return [Array<(QueueMember, Fixnum, Hash)>] QueueMember data, response status code and response headers def create_queue_users_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#create_queue_users ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling create_queue_users" if queue_id.nil? # resource path path = "/api/v1/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'] # 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 => 'QueueMember') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#create_queue_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Join or unjoin a set of users for a queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Array] :body Queue Members # @return [QueueMember] def patch_queue_users(queue_id, opts = {}) data, status_code, headers = patch_queue_users_with_http_info(queue_id, opts) return data end # Join or unjoin a set of users for a queue # # @param queue_id Queue ID # @param [Hash] opts the optional parameters # @option opts [Array] :body Queue Members # @return [Array<(QueueMember, Fixnum, Hash)>] QueueMember data, response status code and response headers def patch_queue_users_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#patch_queue_users ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling patch_queue_users" if queue_id.nil? # resource path path = "/api/v1/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_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(:PATCH, 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#patch_queue_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete queue member # # @param queue_id Queue ID # @param member_id Member ID # @param [Hash] opts the optional parameters # @return [String] def delete_queue_users_by_member_id(queue_id, member_id, opts = {}) data, status_code, headers = delete_queue_users_by_member_id_with_http_info(queue_id, member_id, opts) return data end # Delete queue member # # @param queue_id Queue ID # @param member_id Member ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_queue_users_by_member_id_with_http_info(queue_id, member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#delete_queue_users_by_member_id ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling delete_queue_users_by_member_id" if queue_id.nil? # verify the required parameter 'member_id' is set fail "Missing the required parameter 'member_id' when calling delete_queue_users_by_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) # 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_queue_users_by_member_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update the ring number of joined status for a User in a Queue # # @param queue_id Queue ID # @param member_id Member ID # @param [Hash] opts the optional parameters # @option opts [QueueMember] :body Queue Member # @return [QueueMember] def patch_queue_users_by_member_id(queue_id, member_id, opts = {}) data, status_code, headers = patch_queue_users_by_member_id_with_http_info(queue_id, member_id, opts) return data end # Update the ring number of joined status for a User in a Queue # # @param queue_id Queue ID # @param member_id Member ID # @param [Hash] opts the optional parameters # @option opts [QueueMember] :body Queue Member # @return [Array<(QueueMember, Fixnum, Hash)>] QueueMember data, response status code and response headers def patch_queue_users_by_member_id_with_http_info(queue_id, member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#patch_queue_users_by_member_id ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling patch_queue_users_by_member_id" if queue_id.nil? # verify the required parameter 'member_id' is set fail "Missing the required parameter 'member_id' when calling patch_queue_users_by_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) # 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(:PATCH, 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#patch_queue_users_by_member_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the wrap-up codes for a queue # # @param queue_id Queue ID # @param code_id Code ID # @param [Hash] opts the optional parameters # @return [WrapupCode] def get_queue_wrapupcodes(queue_id, code_id, opts = {}) data, status_code, headers = get_queue_wrapupcodes_with_http_info(queue_id, code_id, opts) return data end # Get the wrap-up codes for a queue # # @param queue_id Queue ID # @param code_id Code ID # @param [Hash] opts the optional parameters # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers def get_queue_wrapupcodes_with_http_info(queue_id, code_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_queue_wrapupcodes ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling get_queue_wrapupcodes" if queue_id.nil? # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling get_queue_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) # 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 => 'WrapupCode') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_queue_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add up to 100 wrap-up codes to a queue # # @param queue_id Queue ID # @param code_id Code ID # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [WrapupCode] def create_queue_wrapupcodes(queue_id, code_id, opts = {}) data, status_code, headers = create_queue_wrapupcodes_with_http_info(queue_id, code_id, opts) return data end # Add up to 100 wrap-up codes to a queue # # @param queue_id Queue ID # @param code_id Code ID # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers def create_queue_wrapupcodes_with_http_info(queue_id, code_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#create_queue_wrapupcodes ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling create_queue_wrapupcodes" if queue_id.nil? # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling create_queue_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) # 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 => 'WrapupCode') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#create_queue_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a wrap-up code from a queue # # @param queue_id Queue ID # @param code_id Code ID # @param [Hash] opts the optional parameters # @return [String] def delete_queue_wrapupcodes_by_code_id(queue_id, code_id, opts = {}) data, status_code, headers = delete_queue_wrapupcodes_by_code_id_with_http_info(queue_id, code_id, opts) return data end # Delete a wrap-up code from a queue # # @param queue_id Queue ID # @param code_id Code ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_queue_wrapupcodes_by_code_id_with_http_info(queue_id, code_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#delete_queue_wrapupcodes_by_code_id ..." end # verify the required parameter 'queue_id' is set fail "Missing the required parameter 'queue_id' when calling delete_queue_wrapupcodes_by_code_id" if queue_id.nil? # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling delete_queue_wrapupcodes_by_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) # 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_queue_wrapupcodes_by_code_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # 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 # 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') # 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) _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 => 'SkillEntityListing') if @api_client.config.debugging @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 # Get the utilization settings. # # @param [Hash] opts the optional parameters # @return [Utilization] def get_utilization(opts = {}) data, status_code, headers = get_utilization_with_http_info(opts) return data end # Get the utilization settings. # # @param [Hash] opts the optional parameters # @return [Array<(Utilization, Fixnum, Hash)>] Utilization data, response status code and response headers def get_utilization_with_http_info(opts = {}) 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') # 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 => 'Utilization') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update the utilization settings. # # @param [Hash] opts the optional parameters # @option opts [Utilization] :body utilization # @return [Utilization] def update_utilization(opts = {}) data, status_code, headers = update_utilization_with_http_info(opts) return data end # Update the utilization settings. # # @param [Hash] opts the optional parameters # @option opts [Utilization] :body utilization # @return [Array<(Utilization, Fixnum, Hash)>] Utilization data, response status code and response headers def update_utilization_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#update_utilization ..." end # resource path path = "/api/v1/routing/utilization".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(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Utilization') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#update_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete utilization settings and revert to system defaults. # # @param [Hash] opts the optional parameters # @return [String] def delete_utilization(opts = {}) data, status_code, headers = delete_utilization_with_http_info(opts) return data end # Delete utilization settings and revert to system defaults. # # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_utilization_with_http_info(opts = {}) 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') # 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_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get list of wrapup codes. # # @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 # @return [WrapupCodeEntityListing] def get_wrapupcodes(opts = {}) data, status_code, headers = get_wrapupcodes_with_http_info(opts) return data end # Get list of wrapup codes. # # @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 # @return [Array<(WrapupCodeEntityListing, Fixnum, Hash)>] WrapupCodeEntityListing data, response status code and response headers def get_wrapupcodes_with_http_info(opts = {}) 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') # 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'] # 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 => 'WrapupCodeEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a wrap-up code # # @param [Hash] opts the optional parameters # @option opts [WrapupCode] :body WrapupCode # @return [CallableTimeSet] def create_wrapupcodes(opts = {}) data, status_code, headers = create_wrapupcodes_with_http_info(opts) return data end # Create a wrap-up code # # @param [Hash] opts the optional parameters # @option opts [WrapupCode] :body WrapupCode # @return [Array<(CallableTimeSet, Fixnum, Hash)>] CallableTimeSet data, response status code and response headers def create_wrapupcodes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#create_wrapupcodes ..." end # resource path path = "/api/v1/routing/wrapupcodes".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 => 'CallableTimeSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#create_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get details about this wrap-up code. # # @param code_id Wrapup Code ID # @param [Hash] opts the optional parameters # @return [WrapupCode] def get_wrapupcodes_code(code_id, opts = {}) data, status_code, headers = get_wrapupcodes_code_with_http_info(code_id, opts) return data end # Get details about this wrap-up code. # # @param code_id Wrapup Code ID # @param [Hash] opts the optional parameters # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers def get_wrapupcodes_code_with_http_info(code_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#get_wrapupcodes_code ..." end # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling get_wrapupcodes_code" if code_id.nil? # resource path path = "/api/v1/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_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 => 'WrapupCode') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#get_wrapupcodes_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update wrap-up code # # @param code_id Wrapup Code ID # @param [Hash] opts the optional parameters # @option opts [WrapupCode] :body WrapupCode # @return [WrapupCode] def update_wrapupcodes_code(code_id, opts = {}) data, status_code, headers = update_wrapupcodes_code_with_http_info(code_id, opts) return data end # Update wrap-up code # # @param code_id Wrapup Code ID # @param [Hash] opts the optional parameters # @option opts [WrapupCode] :body WrapupCode # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers def update_wrapupcodes_code_with_http_info(code_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#update_wrapupcodes_code ..." end # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling update_wrapupcodes_code" if code_id.nil? # resource path path = "/api/v1/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_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 => 'WrapupCode') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutingApi#update_wrapupcodes_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete wrap-up code # # @param code_id Wrapup Code ID # @param [Hash] opts the optional parameters # @return [String] def delete_wrapupcodes_code(code_id, opts = {}) data, status_code, headers = delete_wrapupcodes_code_with_http_info(code_id, opts) return data end # Delete wrap-up code # # @param code_id Wrapup Code ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_wrapupcodes_code_with_http_info(code_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutingApi#delete_wrapupcodes_code ..." end # verify the required parameter 'code_id' is set fail "Missing the required parameter 'code_id' when calling delete_wrapupcodes_code" if code_id.nil? # resource path path = "/api/v1/routing/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'codeId' + '}', code_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_wrapupcodes_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end