require "uri" module PureCloud class OutboundApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Retrieves audits for dialer. # # @param [Hash] opts the optional parameters # @option opts [DialerAuditRequest] :body AuditSearch # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @option opts [BOOLEAN] :facets_only Facets only # @return [AuditSearchResult] def create_audits(opts = {}) data, status_code, headers = create_audits_with_http_info(opts) return data end # Retrieves audits for dialer. # # @param [Hash] opts the optional parameters # @option opts [DialerAuditRequest] :body AuditSearch # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @option opts [BOOLEAN] :facets_only Facets only # @return [Array<(AuditSearchResult, Fixnum, Hash)>] AuditSearchResult data, response status code and response headers def create_audits_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_audits ..." end # resource path path = "/api/v1/outbound/audits".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[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'facetsOnly'] = opts[:'facets_only'] if opts[:'facets_only'] # 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 => 'AuditSearchResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_audits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query callable time set list # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [CallableTimeSetEntityListing] def get_callabletimesets(opts = {}) data, status_code, headers = get_callabletimesets_with_http_info(opts) return data end # Query callable time set list # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(CallableTimeSetEntityListing, Fixnum, Hash)>] CallableTimeSetEntityListing data, response status code and response headers def get_callabletimesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_callabletimesets ..." end if opts[:'filter_type'] && !['EQUALS', 'REGEX', 'CONTAINS', 'PREFIX', 'LESSTHAN', 'LESSTHANEQUALTO', 'GREATERTHAN', 'GREATERTHANEQUALTO', 'BEGINSWITH', 'ENDSWITH'].include?(opts[:'filter_type']) fail 'invalid value for "filter_type", must be one of EQUALS, REGEX, CONTAINS, PREFIX, LESSTHAN, LESSTHANEQUALTO, GREATERTHAN, GREATERTHANEQUALTO, BEGINSWITH, ENDSWITH' end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path path = "/api/v1/outbound/callabletimesets".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[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallableTimeSetEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_callabletimesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create callable time set # # @param [Hash] opts the optional parameters # @option opts [CallableTimeSet] :body DialerCallableTimeSet # @return [CallableTimeSet] def create_callabletimesets(opts = {}) data, status_code, headers = create_callabletimesets_with_http_info(opts) return data end # Create callable time set # # @param [Hash] opts the optional parameters # @option opts [CallableTimeSet] :body DialerCallableTimeSet # @return [Array<(CallableTimeSet, Fixnum, Hash)>] CallableTimeSet data, response status code and response headers def create_callabletimesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_callabletimesets ..." end # resource path path = "/api/v1/outbound/callabletimesets".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: OutboundApi#create_callabletimesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get callable time set # # @param callable_time_set_id Callable Time Set ID # @param [Hash] opts the optional parameters # @return [CallableTimeSet] def get_callable_time_set(callable_time_set_id, opts = {}) data, status_code, headers = get_callable_time_set_with_http_info(callable_time_set_id, opts) return data end # Get callable time set # # @param callable_time_set_id Callable Time Set ID # @param [Hash] opts the optional parameters # @return [Array<(CallableTimeSet, Fixnum, Hash)>] CallableTimeSet data, response status code and response headers def get_callable_time_set_with_http_info(callable_time_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_callable_time_set ..." end # verify the required parameter 'callable_time_set_id' is set fail "Missing the required parameter 'callable_time_set_id' when calling get_callable_time_set" if callable_time_set_id.nil? # resource path path = "/api/v1/outbound/callabletimesets/{callableTimeSetId}".sub('{format}','json').sub('{' + 'callableTimeSetId' + '}', callable_time_set_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 => 'CallableTimeSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_callable_time_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update callable time set # # @param callable_time_set_id Callable Time Set ID # @param [Hash] opts the optional parameters # @option opts [CallableTimeSet] :body DialerCallableTimeSet # @return [CallableTimeSet] def update_callable_time_set(callable_time_set_id, opts = {}) data, status_code, headers = update_callable_time_set_with_http_info(callable_time_set_id, opts) return data end # Update callable time set # # @param callable_time_set_id Callable Time Set ID # @param [Hash] opts the optional parameters # @option opts [CallableTimeSet] :body DialerCallableTimeSet # @return [Array<(CallableTimeSet, Fixnum, Hash)>] CallableTimeSet data, response status code and response headers def update_callable_time_set_with_http_info(callable_time_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_callable_time_set ..." end # verify the required parameter 'callable_time_set_id' is set fail "Missing the required parameter 'callable_time_set_id' when calling update_callable_time_set" if callable_time_set_id.nil? # resource path path = "/api/v1/outbound/callabletimesets/{callableTimeSetId}".sub('{format}','json').sub('{' + 'callableTimeSetId' + '}', callable_time_set_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 => 'CallableTimeSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_callable_time_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete callable time set # # @param callable_time_set_id Callable Time Set ID # @param [Hash] opts the optional parameters # @return [String] def delete_callable_time_set(callable_time_set_id, opts = {}) data, status_code, headers = delete_callable_time_set_with_http_info(callable_time_set_id, opts) return data end # Delete callable time set # # @param callable_time_set_id Callable Time Set ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_callable_time_set_with_http_info(callable_time_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_callable_time_set ..." end # verify the required parameter 'callable_time_set_id' is set fail "Missing the required parameter 'callable_time_set_id' when calling delete_callable_time_set" if callable_time_set_id.nil? # resource path path = "/api/v1/outbound/callabletimesets/{callableTimeSetId}".sub('{format}','json').sub('{' + 'callableTimeSetId' + '}', callable_time_set_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: OutboundApi#delete_callable_time_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query a list of dialer call analysis response sets. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [ResponseSetEntityListing] def get_callanalysisresponsesets(opts = {}) data, status_code, headers = get_callanalysisresponsesets_with_http_info(opts) return data end # Query a list of dialer call analysis response sets. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(ResponseSetEntityListing, Fixnum, Hash)>] ResponseSetEntityListing data, response status code and response headers def get_callanalysisresponsesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_callanalysisresponsesets ..." end if opts[:'filter_type'] && !['EQUALS', 'REGEX', 'CONTAINS', 'PREFIX', 'LESSTHAN', 'LESSTHANEQUALTO', 'GREATERTHAN', 'GREATERTHANEQUALTO', 'BEGINSWITH', 'ENDSWITH'].include?(opts[:'filter_type']) fail 'invalid value for "filter_type", must be one of EQUALS, REGEX, CONTAINS, PREFIX, LESSTHAN, LESSTHANEQUALTO, GREATERTHAN, GREATERTHANEQUALTO, BEGINSWITH, ENDSWITH' end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path path = "/api/v1/outbound/callanalysisresponsesets".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[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseSetEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_callanalysisresponsesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a dialer call analysis response set. # # @param [Hash] opts the optional parameters # @option opts [ResponseSet] :body ResponseSet # @return [ResponseSet] def create_callanalysisresponsesets(opts = {}) data, status_code, headers = create_callanalysisresponsesets_with_http_info(opts) return data end # Create a dialer call analysis response set. # # @param [Hash] opts the optional parameters # @option opts [ResponseSet] :body ResponseSet # @return [Array<(ResponseSet, Fixnum, Hash)>] ResponseSet data, response status code and response headers def create_callanalysisresponsesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_callanalysisresponsesets ..." end # resource path path = "/api/v1/outbound/callanalysisresponsesets".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 => 'ResponseSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_callanalysisresponsesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a dialer call analysis response set. # # @param call_analysis_set_id Call Analysis Response Set ID # @param [Hash] opts the optional parameters # @return [ResponseSet] def get_callanalysisresponsesets_call_analysis_set(call_analysis_set_id, opts = {}) data, status_code, headers = get_callanalysisresponsesets_call_analysis_set_with_http_info(call_analysis_set_id, opts) return data end # Get a dialer call analysis response set. # # @param call_analysis_set_id Call Analysis Response Set ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseSet, Fixnum, Hash)>] ResponseSet data, response status code and response headers def get_callanalysisresponsesets_call_analysis_set_with_http_info(call_analysis_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_callanalysisresponsesets_call_analysis_set ..." end # verify the required parameter 'call_analysis_set_id' is set fail "Missing the required parameter 'call_analysis_set_id' when calling get_callanalysisresponsesets_call_analysis_set" if call_analysis_set_id.nil? # resource path path = "/api/v1/outbound/callanalysisresponsesets/{callAnalysisSetId}".sub('{format}','json').sub('{' + 'callAnalysisSetId' + '}', call_analysis_set_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 => 'ResponseSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_callanalysisresponsesets_call_analysis_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a dialer call analysis response set. # # @param call_analysis_set_id Call Analysis Response Set ID # @param [Hash] opts the optional parameters # @option opts [ResponseSet] :body ResponseSet # @return [ResponseSet] def update_callanalysisresponsesets_call_analysis_set(call_analysis_set_id, opts = {}) data, status_code, headers = update_callanalysisresponsesets_call_analysis_set_with_http_info(call_analysis_set_id, opts) return data end # Update a dialer call analysis response set. # # @param call_analysis_set_id Call Analysis Response Set ID # @param [Hash] opts the optional parameters # @option opts [ResponseSet] :body ResponseSet # @return [Array<(ResponseSet, Fixnum, Hash)>] ResponseSet data, response status code and response headers def update_callanalysisresponsesets_call_analysis_set_with_http_info(call_analysis_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_callanalysisresponsesets_call_analysis_set ..." end # verify the required parameter 'call_analysis_set_id' is set fail "Missing the required parameter 'call_analysis_set_id' when calling update_callanalysisresponsesets_call_analysis_set" if call_analysis_set_id.nil? # resource path path = "/api/v1/outbound/callanalysisresponsesets/{callAnalysisSetId}".sub('{format}','json').sub('{' + 'callAnalysisSetId' + '}', call_analysis_set_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 => 'ResponseSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_callanalysisresponsesets_call_analysis_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a dialer call analysis response set. # # @param call_analysis_set_id Call Analysis Response Set ID # @param [Hash] opts the optional parameters # @return [String] def delete_callanalysisresponsesets_call_analysis_set(call_analysis_set_id, opts = {}) data, status_code, headers = delete_callanalysisresponsesets_call_analysis_set_with_http_info(call_analysis_set_id, opts) return data end # Delete a dialer call analysis response set. # # @param call_analysis_set_id Call Analysis Response Set ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_callanalysisresponsesets_call_analysis_set_with_http_info(call_analysis_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_callanalysisresponsesets_call_analysis_set ..." end # verify the required parameter 'call_analysis_set_id' is set fail "Missing the required parameter 'call_analysis_set_id' when calling delete_callanalysisresponsesets_call_analysis_set" if call_analysis_set_id.nil? # resource path path = "/api/v1/outbound/callanalysisresponsesets/{callAnalysisSetId}".sub('{format}','json').sub('{' + 'callAnalysisSetId' + '}', call_analysis_set_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: OutboundApi#delete_callanalysisresponsesets_call_analysis_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query a list of dialer campaigns. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :contact_list_id Contact List ID # @option opts [String] :dnc_list_id DNC list ID # @option opts [String] :distribution_queue_id Distribution queue ID # @option opts [String] :edge_group_id Edge group ID # @option opts [String] :call_analysis_response_set_id Call analysis response set ID # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [CampaignEntityListing] def get_campaigns(opts = {}) data, status_code, headers = get_campaigns_with_http_info(opts) return data end # Query a list of dialer campaigns. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :contact_list_id Contact List ID # @option opts [String] :dnc_list_id DNC list ID # @option opts [String] :distribution_queue_id Distribution queue ID # @option opts [String] :edge_group_id Edge group ID # @option opts [String] :call_analysis_response_set_id Call analysis response set ID # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(CampaignEntityListing, Fixnum, Hash)>] CampaignEntityListing data, response status code and response headers def get_campaigns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_campaigns ..." end if opts[:'filter_type'] && !['EQUALS', 'REGEX', 'CONTAINS', 'PREFIX', 'LESSTHAN', 'LESSTHANEQUALTO', 'GREATERTHAN', 'GREATERTHANEQUALTO', 'BEGINSWITH', 'ENDSWITH'].include?(opts[:'filter_type']) fail 'invalid value for "filter_type", must be one of EQUALS, REGEX, CONTAINS, PREFIX, LESSTHAN, LESSTHANEQUALTO, GREATERTHAN, GREATERTHANEQUALTO, BEGINSWITH, ENDSWITH' end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path path = "/api/v1/outbound/campaigns".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[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'contactListId'] = opts[:'contact_list_id'] if opts[:'contact_list_id'] query_params[:'dncListId'] = opts[:'dnc_list_id'] if opts[:'dnc_list_id'] query_params[:'distributionQueueId'] = opts[:'distribution_queue_id'] if opts[:'distribution_queue_id'] query_params[:'edgeGroupId'] = opts[:'edge_group_id'] if opts[:'edge_group_id'] query_params[:'callAnalysisResponseSetId'] = opts[:'call_analysis_response_set_id'] if opts[:'call_analysis_response_set_id'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CampaignEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a campaign. # # @param [Hash] opts the optional parameters # @option opts [Campaign] :body Campaign # @return [Campaign] def create_campaigns(opts = {}) data, status_code, headers = create_campaigns_with_http_info(opts) return data end # Create a campaign. # # @param [Hash] opts the optional parameters # @option opts [Campaign] :body Campaign # @return [Array<(Campaign, Fixnum, Hash)>] Campaign data, response status code and response headers def create_campaigns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_campaigns ..." end # resource path path = "/api/v1/outbound/campaigns".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 => 'Campaign') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer campaign. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Campaign] def get_campaign(campaign_id, opts = {}) data, status_code, headers = get_campaign_with_http_info(campaign_id, opts) return data end # Get dialer campaign. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Array<(Campaign, Fixnum, Hash)>] Campaign data, response status code and response headers def get_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_campaign ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling get_campaign" if campaign_id.nil? # resource path path = "/api/v1/outbound/campaigns/{campaignId}".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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 => 'Campaign') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a campaign. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @option opts [Campaign] :body Campaign # @return [Campaign] def update_campaign(campaign_id, opts = {}) data, status_code, headers = update_campaign_with_http_info(campaign_id, opts) return data end # Update a campaign. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @option opts [Campaign] :body Campaign # @return [Array<(Campaign, Fixnum, Hash)>] Campaign data, response status code and response headers def update_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_campaign ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling update_campaign" if campaign_id.nil? # resource path path = "/api/v1/outbound/campaigns/{campaignId}".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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 => 'Campaign') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a campaign. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [String] def delete_campaign(campaign_id, opts = {}) data, status_code, headers = delete_campaign_with_http_info(campaign_id, opts) return data end # Delete a campaign. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_campaign ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling delete_campaign" if campaign_id.nil? # resource path path = "/api/v1/outbound/campaigns/{campaignId}".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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: OutboundApi#delete_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Send notification that an agent's state changed # New agent state. # @param campaign_id Campaign ID # @param user_id Agent's user ID # @param [Hash] opts the optional parameters # @option opts [Agent] :body agent # @return [String] def update_campaign_agents_by_user_id(campaign_id, user_id, opts = {}) data, status_code, headers = update_campaign_agents_by_user_id_with_http_info(campaign_id, user_id, opts) return data end # Send notification that an agent's state changed # New agent state. # @param campaign_id Campaign ID # @param user_id Agent's user ID # @param [Hash] opts the optional parameters # @option opts [Agent] :body agent # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def update_campaign_agents_by_user_id_with_http_info(campaign_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_campaign_agents_by_user_id ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling update_campaign_agents_by_user_id" if campaign_id.nil? # verify the required parameter 'user_id' is set fail "Missing the required parameter 'user_id' when calling update_campaign_agents_by_user_id" if user_id.nil? # resource path path = "/api/v1/outbound/campaigns/{campaignId}/agents/{userId}".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, 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: OutboundApi#update_campaign_agents_by_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Schedule a Callback for a Dialer Campaign # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @option opts [ContactCallbackRequest] :body ContactCallbackRequest # @return [ContactCallbackRequest] def create_campaign_callback_schedule(campaign_id, opts = {}) data, status_code, headers = create_campaign_callback_schedule_with_http_info(campaign_id, opts) return data end # Schedule a Callback for a Dialer Campaign # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @option opts [ContactCallbackRequest] :body ContactCallbackRequest # @return [Array<(ContactCallbackRequest, Fixnum, Hash)>] ContactCallbackRequest data, response status code and response headers def create_campaign_callback_schedule_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_campaign_callback_schedule ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling create_campaign_callback_schedule" if campaign_id.nil? # resource path path = "/api/v1/outbound/campaigns/{campaignId}/callback/schedule".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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 => 'ContactCallbackRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_campaign_callback_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get campaign diagnostics # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [CampaignDiagnostics] def get_campaign_diagnostics(campaign_id, opts = {}) data, status_code, headers = get_campaign_diagnostics_with_http_info(campaign_id, opts) return data end # Get campaign diagnostics # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Array<(CampaignDiagnostics, Fixnum, Hash)>] CampaignDiagnostics data, response status code and response headers def get_campaign_diagnostics_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_campaign_diagnostics ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling get_campaign_diagnostics" if campaign_id.nil? # resource path path = "/api/v1/outbound/campaigns/{campaignId}/diagnostics".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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 => 'CampaignDiagnostics') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_campaign_diagnostics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get statistics about a Dialer Campaign # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [CampaignStats] def get_campaign_stats(campaign_id, opts = {}) data, status_code, headers = get_campaign_stats_with_http_info(campaign_id, opts) return data end # Get statistics about a Dialer Campaign # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Array<(CampaignStats, Fixnum, Hash)>] CampaignStats data, response status code and response headers def get_campaign_stats_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_campaign_stats ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling get_campaign_stats" if campaign_id.nil? # resource path path = "/api/v1/outbound/campaigns/{campaignId}/stats".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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 => 'CampaignStats') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_campaign_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query a list of contact lists. # # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Include import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [ContactListEntityListing] def get_contactlists(opts = {}) data, status_code, headers = get_contactlists_with_http_info(opts) return data end # Query a list of contact lists. # # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Include import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(ContactListEntityListing, Fixnum, Hash)>] ContactListEntityListing data, response status code and response headers def get_contactlists_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_contactlists ..." end if opts[:'filter_type'] && !['EQUALS', 'REGEX', 'CONTAINS', 'PREFIX', 'LESSTHAN', 'LESSTHANEQUALTO', 'GREATERTHAN', 'GREATERTHANEQUALTO', 'BEGINSWITH', 'ENDSWITH'].include?(opts[:'filter_type']) fail 'invalid value for "filter_type", must be one of EQUALS, REGEX, CONTAINS, PREFIX, LESSTHAN, LESSTHANEQUALTO, GREATERTHAN, GREATERTHANEQUALTO, BEGINSWITH, ENDSWITH' end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path path = "/api/v1/outbound/contactlists".sub('{format}','json') # query parameters query_params = {} query_params[:'includeImportStatus'] = opts[:'include_import_status'] if opts[:'include_import_status'] query_params[:'importStatus'] = opts[:'import_status'] if opts[:'import_status'] query_params[:'includeSize'] = opts[:'include_size'] if opts[:'include_size'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ContactListEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_contactlists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a contact List. # # @param [Hash] opts the optional parameters # @option opts [ContactList] :body ContactList # @return [ContactList] def create_contactlists(opts = {}) data, status_code, headers = create_contactlists_with_http_info(opts) return data end # Create a contact List. # # @param [Hash] opts the optional parameters # @option opts [ContactList] :body ContactList # @return [Array<(ContactList, Fixnum, Hash)>] ContactList data, response status code and response headers def create_contactlists_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_contactlists ..." end # resource path path = "/api/v1/outbound/contactlists".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 => 'ContactList') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_contactlists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get penetration rates for a list of penetration rate identifiers (contact list id and qualifier id) # # @param [Hash] opts the optional parameters # @option opts [Array] :body PenetrationRateIdentifierList # @return [Array] def create_contactlists_penetrationrates(opts = {}) data, status_code, headers = create_contactlists_penetrationrates_with_http_info(opts) return data end # Get penetration rates for a list of penetration rate identifiers (contact list id and qualifier id) # # @param [Hash] opts the optional parameters # @option opts [Array] :body PenetrationRateIdentifierList # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def create_contactlists_penetrationrates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_contactlists_penetrationrates ..." end # resource path path = "/api/v1/outbound/contactlists/penetrationrates".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 => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_contactlists_penetrationrates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer contactList. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @return [ContactList] def get_contact_list(contact_list_id, opts = {}) data, status_code, headers = get_contact_list_with_http_info(contact_list_id, opts) return data end # Get dialer contactList. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @return [Array<(ContactList, Fixnum, Hash)>] ContactList data, response status code and response headers def get_contact_list_with_http_info(contact_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_contact_list ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling get_contact_list" if contact_list_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_id.to_s) # query parameters query_params = {} query_params[:'includeImportStatus'] = opts[:'include_import_status'] if opts[:'include_import_status'] query_params[:'importStatus'] = opts[:'import_status'] if opts[:'import_status'] query_params[:'includeSize'] = opts[:'include_size'] if opts[:'include_size'] # 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 => 'ContactList') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_contact_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a contact list. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @option opts [ContactList] :body ContactList # @return [ContactList] def update_contact_list(contact_list_id, opts = {}) data, status_code, headers = update_contact_list_with_http_info(contact_list_id, opts) return data end # Update a contact list. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @option opts [ContactList] :body ContactList # @return [Array<(ContactList, Fixnum, Hash)>] ContactList data, response status code and response headers def update_contact_list_with_http_info(contact_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_contact_list ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling update_contact_list" if contact_list_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_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 => 'ContactList') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_contact_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a contact list. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @return [String] def delete_contact_list(contact_list_id, opts = {}) data, status_code, headers = delete_contact_list_with_http_info(contact_list_id, opts) return data end # Delete a contact list. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_contact_list_with_http_info(contact_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_contact_list ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling delete_contact_list" if contact_list_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_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: OutboundApi#delete_contact_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add contacts to a contact list. # # @param contact_list_id Contact List ID # @param [Hash] opts the optional parameters # @option opts [Array] :body Contact # @option opts [BOOLEAN] :priority # @return [Contact] def create_contact_list_contacts(contact_list_id, opts = {}) data, status_code, headers = create_contact_list_contacts_with_http_info(contact_list_id, opts) return data end # Add contacts to a contact list. # # @param contact_list_id Contact List ID # @param [Hash] opts the optional parameters # @option opts [Array] :body Contact # @option opts [BOOLEAN] :priority # @return [Array<(Contact, Fixnum, Hash)>] Contact data, response status code and response headers def create_contact_list_contacts_with_http_info(contact_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_contact_list_contacts ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling create_contact_list_contacts" if contact_list_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}/contacts".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_id.to_s) # query parameters query_params = {} query_params[:'priority'] = opts[:'priority'] if opts[:'priority'] # 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 => 'Contact') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_contact_list_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer contactList. # # @param contact_list_id Contact List ID # @param contact_id Contact ID # @param [Hash] opts the optional parameters # @return [Contact] def get_contact_list_contacts_by_contact_id(contact_list_id, contact_id, opts = {}) data, status_code, headers = get_contact_list_contacts_by_contact_id_with_http_info(contact_list_id, contact_id, opts) return data end # Get dialer contactList. # # @param contact_list_id Contact List ID # @param contact_id Contact ID # @param [Hash] opts the optional parameters # @return [Array<(Contact, Fixnum, Hash)>] Contact data, response status code and response headers def get_contact_list_contacts_by_contact_id_with_http_info(contact_list_id, contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_contact_list_contacts_by_contact_id ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling get_contact_list_contacts_by_contact_id" if contact_list_id.nil? # verify the required parameter 'contact_id' is set fail "Missing the required parameter 'contact_id' when calling get_contact_list_contacts_by_contact_id" if contact_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_id.to_s).sub('{' + 'contactId' + '}', contact_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 => 'Contact') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_contact_list_contacts_by_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a contact. # # @param contact_list_id Contact List ID # @param contact_id Contact ID # @param [Hash] opts the optional parameters # @option opts [Contact] :body Contact # @return [Contact] def update_contact_list_contacts_by_contact_id(contact_list_id, contact_id, opts = {}) data, status_code, headers = update_contact_list_contacts_by_contact_id_with_http_info(contact_list_id, contact_id, opts) return data end # Update a contact. # # @param contact_list_id Contact List ID # @param contact_id Contact ID # @param [Hash] opts the optional parameters # @option opts [Contact] :body Contact # @return [Array<(Contact, Fixnum, Hash)>] Contact data, response status code and response headers def update_contact_list_contacts_by_contact_id_with_http_info(contact_list_id, contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_contact_list_contacts_by_contact_id ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling update_contact_list_contacts_by_contact_id" if contact_list_id.nil? # verify the required parameter 'contact_id' is set fail "Missing the required parameter 'contact_id' when calling update_contact_list_contacts_by_contact_id" if contact_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_id.to_s).sub('{' + 'contactId' + '}', contact_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 => 'Contact') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_contact_list_contacts_by_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a contact. # # @param contact_list_id Contact List ID # @param contact_id Contact ID # @param [Hash] opts the optional parameters # @return [String] def delete_contact_list_contacts_by_contact_id(contact_list_id, contact_id, opts = {}) data, status_code, headers = delete_contact_list_contacts_by_contact_id_with_http_info(contact_list_id, contact_id, opts) return data end # Delete a contact. # # @param contact_list_id Contact List ID # @param contact_id Contact ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_contact_list_contacts_by_contact_id_with_http_info(contact_list_id, contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_contact_list_contacts_by_contact_id ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling delete_contact_list_contacts_by_contact_id" if contact_list_id.nil? # verify the required parameter 'contact_id' is set fail "Missing the required parameter 'contact_id' when calling delete_contact_list_contacts_by_contact_id" if contact_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_id.to_s).sub('{' + 'contactId' + '}', contact_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: OutboundApi#delete_contact_list_contacts_by_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Initiate the export of a contact list. # Returns 200 if received OK. # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @return [String] def create_contact_list_export(contact_list_id, opts = {}) data, status_code, headers = create_contact_list_export_with_http_info(contact_list_id, opts) return data end # Initiate the export of a contact list. # Returns 200 if received OK. # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def create_contact_list_export_with_http_info(contact_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_contact_list_export ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling create_contact_list_export" if contact_list_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}/export".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_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(:POST, 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: OutboundApi#create_contact_list_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer contactList import status. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @return [ImportStatus] def get_contact_list_importstatus(contact_list_id, opts = {}) data, status_code, headers = get_contact_list_importstatus_with_http_info(contact_list_id, opts) return data end # Get dialer contactList import status. # # @param contact_list_id ContactList ID # @param [Hash] opts the optional parameters # @return [Array<(ImportStatus, Fixnum, Hash)>] ImportStatus data, response status code and response headers def get_contact_list_importstatus_with_http_info(contact_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_contact_list_importstatus ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling get_contact_list_importstatus" if contact_list_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}/importstatus".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_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 => 'ImportStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_contact_list_importstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Dialer campaign's penetration rate # Get dialer campaign's penetration rate. # @param contact_list_id ContactList ID # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [PenetrationRate] def get_contact_list_by_campaign_id_penetrationrate(contact_list_id, campaign_id, opts = {}) data, status_code, headers = get_contact_list_by_campaign_id_penetrationrate_with_http_info(contact_list_id, campaign_id, opts) return data end # Get Dialer campaign's penetration rate # Get dialer campaign's penetration rate. # @param contact_list_id ContactList ID # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Array<(PenetrationRate, Fixnum, Hash)>] PenetrationRate data, response status code and response headers def get_contact_list_by_campaign_id_penetrationrate_with_http_info(contact_list_id, campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_contact_list_by_campaign_id_penetrationrate ..." end # verify the required parameter 'contact_list_id' is set fail "Missing the required parameter 'contact_list_id' when calling get_contact_list_by_campaign_id_penetrationrate" if contact_list_id.nil? # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling get_contact_list_by_campaign_id_penetrationrate" if campaign_id.nil? # resource path path = "/api/v1/outbound/contactlists/{contactListId}/{campaignId}/penetrationrate".sub('{format}','json').sub('{' + 'contactListId' + '}', contact_list_id.to_s).sub('{' + 'campaignId' + '}', campaign_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 => 'PenetrationRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_contact_list_by_campaign_id_penetrationrate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add phone numbers to a Dialer DNC list. # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @return [nil] def create_conversation_dnc(conversation_id, opts = {}) create_conversation_dnc_with_http_info(conversation_id, opts) return nil end # Add phone numbers to a Dialer DNC list. # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def create_conversation_dnc_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_conversation_dnc ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling create_conversation_dnc" if conversation_id.nil? # resource path path = "/api/v1/outbound/conversations/{conversationId}/dnc".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_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(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_conversation_dnc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query dialer DNC lists # # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [DncListEntityListing] def get_dnclists(opts = {}) data, status_code, headers = get_dnclists_with_http_info(opts) return data end # Query dialer DNC lists # # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(DncListEntityListing, Fixnum, Hash)>] DncListEntityListing data, response status code and response headers def get_dnclists_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_dnclists ..." end if opts[:'filter_type'] && !['EQUALS', 'REGEX', 'CONTAINS', 'PREFIX', 'LESSTHAN', 'LESSTHANEQUALTO', 'GREATERTHAN', 'GREATERTHANEQUALTO', 'BEGINSWITH', 'ENDSWITH'].include?(opts[:'filter_type']) fail 'invalid value for "filter_type", must be one of EQUALS, REGEX, CONTAINS, PREFIX, LESSTHAN, LESSTHANEQUALTO, GREATERTHAN, GREATERTHANEQUALTO, BEGINSWITH, ENDSWITH' end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path path = "/api/v1/outbound/dnclists".sub('{format}','json') # query parameters query_params = {} query_params[:'includeImportStatus'] = opts[:'include_import_status'] if opts[:'include_import_status'] query_params[:'importStatus'] = opts[:'import_status'] if opts[:'import_status'] query_params[:'includeSize'] = opts[:'include_size'] if opts[:'include_size'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DncListEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_dnclists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create dialer DNC list # # @param [Hash] opts the optional parameters # @option opts [DncList] :body DncList # @return [DncList] def create_dnclists(opts = {}) data, status_code, headers = create_dnclists_with_http_info(opts) return data end # Create dialer DNC list # # @param [Hash] opts the optional parameters # @option opts [DncList] :body DncList # @return [Array<(DncList, Fixnum, Hash)>] DncList data, response status code and response headers def create_dnclists_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_dnclists ..." end # resource path path = "/api/v1/outbound/dnclists".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 => 'DncList') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_dnclists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer DNC list # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @return [DncList] def get_dnc_list(dnc_list_id, opts = {}) data, status_code, headers = get_dnc_list_with_http_info(dnc_list_id, opts) return data end # Get dialer DNC list # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_import_status Import status # @option opts [BOOLEAN] :import_status Import status # @option opts [BOOLEAN] :include_size Include size # @return [Array<(DncList, Fixnum, Hash)>] DncList data, response status code and response headers def get_dnc_list_with_http_info(dnc_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_dnc_list ..." end # verify the required parameter 'dnc_list_id' is set fail "Missing the required parameter 'dnc_list_id' when calling get_dnc_list" if dnc_list_id.nil? # resource path path = "/api/v1/outbound/dnclists/{dncListId}".sub('{format}','json').sub('{' + 'dncListId' + '}', dnc_list_id.to_s) # query parameters query_params = {} query_params[:'includeImportStatus'] = opts[:'include_import_status'] if opts[:'include_import_status'] query_params[:'importStatus'] = opts[:'import_status'] if opts[:'import_status'] query_params[:'includeSize'] = opts[:'include_size'] if opts[:'include_size'] # 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 => 'DncList') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_dnc_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update dialer DNC list # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @option opts [DncList] :body DncList # @return [DncList] def update_dnc_list(dnc_list_id, opts = {}) data, status_code, headers = update_dnc_list_with_http_info(dnc_list_id, opts) return data end # Update dialer DNC list # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @option opts [DncList] :body DncList # @return [Array<(DncList, Fixnum, Hash)>] DncList data, response status code and response headers def update_dnc_list_with_http_info(dnc_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_dnc_list ..." end # verify the required parameter 'dnc_list_id' is set fail "Missing the required parameter 'dnc_list_id' when calling update_dnc_list" if dnc_list_id.nil? # resource path path = "/api/v1/outbound/dnclists/{dncListId}".sub('{format}','json').sub('{' + 'dncListId' + '}', dnc_list_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 => 'DncList') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_dnc_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete dialer DNC list # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @return [String] def delete_dnc_list(dnc_list_id, opts = {}) data, status_code, headers = delete_dnc_list_with_http_info(dnc_list_id, opts) return data end # Delete dialer DNC list # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_dnc_list_with_http_info(dnc_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_dnc_list ..." end # verify the required parameter 'dnc_list_id' is set fail "Missing the required parameter 'dnc_list_id' when calling delete_dnc_list" if dnc_list_id.nil? # resource path path = "/api/v1/outbound/dnclists/{dncListId}".sub('{format}','json').sub('{' + 'dncListId' + '}', dnc_list_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: OutboundApi#delete_dnc_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Initiate the export of a dnc list. # Returns 200 if received OK. # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @return [String] def create_dnc_list_export(dnc_list_id, opts = {}) data, status_code, headers = create_dnc_list_export_with_http_info(dnc_list_id, opts) return data end # Initiate the export of a dnc list. # Returns 200 if received OK. # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def create_dnc_list_export_with_http_info(dnc_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_dnc_list_export ..." end # verify the required parameter 'dnc_list_id' is set fail "Missing the required parameter 'dnc_list_id' when calling create_dnc_list_export" if dnc_list_id.nil? # resource path path = "/api/v1/outbound/dnclists/{dncListId}/export".sub('{format}','json').sub('{' + 'dncListId' + '}', dnc_list_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(:POST, 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: OutboundApi#create_dnc_list_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer dncList import status. # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @return [ImportStatus] def get_dnc_list_importstatus(dnc_list_id, opts = {}) data, status_code, headers = get_dnc_list_importstatus_with_http_info(dnc_list_id, opts) return data end # Get dialer dncList import status. # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @return [Array<(ImportStatus, Fixnum, Hash)>] ImportStatus data, response status code and response headers def get_dnc_list_importstatus_with_http_info(dnc_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_dnc_list_importstatus ..." end # verify the required parameter 'dnc_list_id' is set fail "Missing the required parameter 'dnc_list_id' when calling get_dnc_list_importstatus" if dnc_list_id.nil? # resource path path = "/api/v1/outbound/dnclists/{dncListId}/importstatus".sub('{format}','json').sub('{' + 'dncListId' + '}', dnc_list_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 => 'ImportStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_dnc_list_importstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add phone numbers to a Dialer DNC list. # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @option opts [Array] :body DNC Phone Numbers # @return [nil] def create_dnc_list_phonenumbers(dnc_list_id, opts = {}) create_dnc_list_phonenumbers_with_http_info(dnc_list_id, opts) return nil end # Add phone numbers to a Dialer DNC list. # # @param dnc_list_id DncList ID # @param [Hash] opts the optional parameters # @option opts [Array] :body DNC Phone Numbers # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def create_dnc_list_phonenumbers_with_http_info(dnc_list_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_dnc_list_phonenumbers ..." end # verify the required parameter 'dnc_list_id' is set fail "Missing the required parameter 'dnc_list_id' when calling create_dnc_list_phonenumbers" if dnc_list_id.nil? # resource path path = "/api/v1/outbound/dnclists/{dncListId}/phonenumbers".sub('{format}','json').sub('{' + 'dncListId' + '}', dnc_list_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) if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_dnc_list_phonenumbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer preview for user # # @param [Hash] opts the optional parameters # @return [Array] def get_previews(opts = {}) data, status_code, headers = get_previews_with_http_info(opts) return data end # Get dialer preview for user # # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_previews_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_previews ..." end # resource path path = "/api/v1/outbound/previews".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 => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_previews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get dialer preview # # @param preview_id preview ID # @param [Hash] opts the optional parameters # @return [Preview] def get_preview(preview_id, opts = {}) data, status_code, headers = get_preview_with_http_info(preview_id, opts) return data end # Get dialer preview # # @param preview_id preview ID # @param [Hash] opts the optional parameters # @return [Array<(Preview, Fixnum, Hash)>] Preview data, response status code and response headers def get_preview_with_http_info(preview_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_preview ..." end # verify the required parameter 'preview_id' is set fail "Missing the required parameter 'preview_id' when calling get_preview" if preview_id.nil? # resource path path = "/api/v1/outbound/previews/{previewId}".sub('{format}','json').sub('{' + 'previewId' + '}', preview_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 => 'Preview') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Disposition preview call # # @param preview_id preview ID # @param [Hash] opts the optional parameters # @option opts [DialerDispositionCallCommand] :body # @return [String] def create_preview_dispositioncall(preview_id, opts = {}) data, status_code, headers = create_preview_dispositioncall_with_http_info(preview_id, opts) return data end # Disposition preview call # # @param preview_id preview ID # @param [Hash] opts the optional parameters # @option opts [DialerDispositionCallCommand] :body # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def create_preview_dispositioncall_with_http_info(preview_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_preview_dispositioncall ..." end # verify the required parameter 'preview_id' is set fail "Missing the required parameter 'preview_id' when calling create_preview_dispositioncall" if preview_id.nil? # resource path path = "/api/v1/outbound/previews/{previewId}/dispositioncall".sub('{format}','json').sub('{' + 'previewId' + '}', preview_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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_preview_dispositioncall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # place preview call # # @param preview_id preview ID # @param [Hash] opts the optional parameters # @option opts [DialerPlaceCallCommand] :body # @return [DialerCall] def create_preview_placecall(preview_id, opts = {}) data, status_code, headers = create_preview_placecall_with_http_info(preview_id, opts) return data end # place preview call # # @param preview_id preview ID # @param [Hash] opts the optional parameters # @option opts [DialerPlaceCallCommand] :body # @return [Array<(DialerCall, Fixnum, Hash)>] DialerCall data, response status code and response headers def create_preview_placecall_with_http_info(preview_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_preview_placecall ..." end # verify the required parameter 'preview_id' is set fail "Missing the required parameter 'preview_id' when calling create_preview_placecall" if preview_id.nil? # resource path path = "/api/v1/outbound/previews/{previewId}/placecall".sub('{format}','json').sub('{' + 'previewId' + '}', preview_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 => 'DialerCall') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_preview_placecall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query a list of Rule Sets. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [RuleSetEntityListing] def get_rulesets(opts = {}) data, status_code, headers = get_rulesets_with_http_info(opts) return data end # Query a list of Rule Sets. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(RuleSetEntityListing, Fixnum, Hash)>] RuleSetEntityListing data, response status code and response headers def get_rulesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_rulesets ..." end if opts[:'filter_type'] && !['EQUALS', 'REGEX', 'CONTAINS', 'PREFIX', 'LESSTHAN', 'LESSTHANEQUALTO', 'GREATERTHAN', 'GREATERTHANEQUALTO', 'BEGINSWITH', 'ENDSWITH'].include?(opts[:'filter_type']) fail 'invalid value for "filter_type", must be one of EQUALS, REGEX, CONTAINS, PREFIX, LESSTHAN, LESSTHANEQUALTO, GREATERTHAN, GREATERTHANEQUALTO, BEGINSWITH, ENDSWITH' end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path path = "/api/v1/outbound/rulesets".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[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RuleSetEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a Dialer Call Analysis Response Set. # # @param [Hash] opts the optional parameters # @option opts [RuleSet] :body RuleSet # @return [RuleSet] def create_rulesets(opts = {}) data, status_code, headers = create_rulesets_with_http_info(opts) return data end # Create a Dialer Call Analysis Response Set. # # @param [Hash] opts the optional parameters # @option opts [RuleSet] :body RuleSet # @return [Array<(RuleSet, Fixnum, Hash)>] RuleSet data, response status code and response headers def create_rulesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_rulesets ..." end # resource path path = "/api/v1/outbound/rulesets".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 => 'RuleSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a Rule Set by ID. # # @param rule_set_id Rule Set ID # @param [Hash] opts the optional parameters # @return [RuleSet] def get_rule_set(rule_set_id, opts = {}) data, status_code, headers = get_rule_set_with_http_info(rule_set_id, opts) return data end # Get a Rule Set by ID. # # @param rule_set_id Rule Set ID # @param [Hash] opts the optional parameters # @return [Array<(RuleSet, Fixnum, Hash)>] RuleSet data, response status code and response headers def get_rule_set_with_http_info(rule_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_rule_set ..." end # verify the required parameter 'rule_set_id' is set fail "Missing the required parameter 'rule_set_id' when calling get_rule_set" if rule_set_id.nil? # resource path path = "/api/v1/outbound/rulesets/{ruleSetId}".sub('{format}','json').sub('{' + 'ruleSetId' + '}', rule_set_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 => 'RuleSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_rule_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a RuleSet. # # @param rule_set_id Rule Set ID # @param [Hash] opts the optional parameters # @option opts [RuleSet] :body RuleSet # @return [RuleSet] def update_rule_set(rule_set_id, opts = {}) data, status_code, headers = update_rule_set_with_http_info(rule_set_id, opts) return data end # Update a RuleSet. # # @param rule_set_id Rule Set ID # @param [Hash] opts the optional parameters # @option opts [RuleSet] :body RuleSet # @return [Array<(RuleSet, Fixnum, Hash)>] RuleSet data, response status code and response headers def update_rule_set_with_http_info(rule_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_rule_set ..." end # verify the required parameter 'rule_set_id' is set fail "Missing the required parameter 'rule_set_id' when calling update_rule_set" if rule_set_id.nil? # resource path path = "/api/v1/outbound/rulesets/{ruleSetId}".sub('{format}','json').sub('{' + 'ruleSetId' + '}', rule_set_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 => 'RuleSet') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_rule_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a Rule set. # # @param rule_set_id Rule Set ID # @param [Hash] opts the optional parameters # @return [String] def delete_rule_set(rule_set_id, opts = {}) data, status_code, headers = delete_rule_set_with_http_info(rule_set_id, opts) return data end # Delete a Rule set. # # @param rule_set_id Rule Set ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_rule_set_with_http_info(rule_set_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_rule_set ..." end # verify the required parameter 'rule_set_id' is set fail "Missing the required parameter 'rule_set_id' when calling delete_rule_set" if rule_set_id.nil? # resource path path = "/api/v1/outbound/rulesets/{ruleSetId}".sub('{format}','json').sub('{' + 'ruleSetId' + '}', rule_set_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: OutboundApi#delete_rule_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for a list of dialer campaign schedules. # # @param [Hash] opts the optional parameters # @return [Array] def get_schedules_campaigns(opts = {}) data, status_code, headers = get_schedules_campaigns_with_http_info(opts) return data end # Query for a list of dialer campaign schedules. # # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_schedules_campaigns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_schedules_campaigns ..." end # resource path path = "/api/v1/outbound/schedules/campaigns".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 => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_schedules_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a dialer campaign schedule. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [CampaignSchedule] def get_schedules_campaign(campaign_id, opts = {}) data, status_code, headers = get_schedules_campaign_with_http_info(campaign_id, opts) return data end # Get a dialer campaign schedule. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Array<(CampaignSchedule, Fixnum, Hash)>] CampaignSchedule data, response status code and response headers def get_schedules_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_schedules_campaign ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling get_schedules_campaign" if campaign_id.nil? # resource path path = "/api/v1/outbound/schedules/campaigns/{campaignId}".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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 => 'CampaignSchedule') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_schedules_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a new campaign schedule. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @option opts [CampaignSchedule] :body CampaignSchedule # @return [CampaignSchedule] def update_schedules_campaign(campaign_id, opts = {}) data, status_code, headers = update_schedules_campaign_with_http_info(campaign_id, opts) return data end # Update a new campaign schedule. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @option opts [CampaignSchedule] :body CampaignSchedule # @return [Array<(CampaignSchedule, Fixnum, Hash)>] CampaignSchedule data, response status code and response headers def update_schedules_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_schedules_campaign ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling update_schedules_campaign" if campaign_id.nil? # resource path path = "/api/v1/outbound/schedules/campaigns/{campaignId}".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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 => 'CampaignSchedule') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_schedules_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a dialer campaign schedule. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [String] def delete_schedules_campaign(campaign_id, opts = {}) data, status_code, headers = delete_schedules_campaign_with_http_info(campaign_id, opts) return data end # Delete a dialer campaign schedule. # # @param campaign_id Campaign ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_schedules_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_schedules_campaign ..." end # verify the required parameter 'campaign_id' is set fail "Missing the required parameter 'campaign_id' when calling delete_schedules_campaign" if campaign_id.nil? # resource path path = "/api/v1/outbound/schedules/campaigns/{campaignId}".sub('{format}','json').sub('{' + 'campaignId' + '}', campaign_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: OutboundApi#delete_schedules_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for a list of dialer sequence schedules. # # @param [Hash] opts the optional parameters # @return [Array] def get_schedules_sequences(opts = {}) data, status_code, headers = get_schedules_sequences_with_http_info(opts) return data end # Query for a list of dialer sequence schedules. # # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_schedules_sequences_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_schedules_sequences ..." end # resource path path = "/api/v1/outbound/schedules/sequences".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 => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_schedules_sequences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a dialer sequence schedule. # # @param sequence_id Sequence ID # @param [Hash] opts the optional parameters # @return [SequenceSchedule] def get_schedules_sequence(sequence_id, opts = {}) data, status_code, headers = get_schedules_sequence_with_http_info(sequence_id, opts) return data end # Get a dialer sequence schedule. # # @param sequence_id Sequence ID # @param [Hash] opts the optional parameters # @return [Array<(SequenceSchedule, Fixnum, Hash)>] SequenceSchedule data, response status code and response headers def get_schedules_sequence_with_http_info(sequence_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_schedules_sequence ..." end # verify the required parameter 'sequence_id' is set fail "Missing the required parameter 'sequence_id' when calling get_schedules_sequence" if sequence_id.nil? # resource path path = "/api/v1/outbound/schedules/sequences/{sequenceId}".sub('{format}','json').sub('{' + 'sequenceId' + '}', sequence_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 => 'SequenceSchedule') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_schedules_sequence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a new sequence schedule. # # @param sequence_id Sequence ID # @param [Hash] opts the optional parameters # @option opts [SequenceSchedule] :body SequenceSchedule # @return [SequenceSchedule] def update_schedules_sequence(sequence_id, opts = {}) data, status_code, headers = update_schedules_sequence_with_http_info(sequence_id, opts) return data end # Update a new sequence schedule. # # @param sequence_id Sequence ID # @param [Hash] opts the optional parameters # @option opts [SequenceSchedule] :body SequenceSchedule # @return [Array<(SequenceSchedule, Fixnum, Hash)>] SequenceSchedule data, response status code and response headers def update_schedules_sequence_with_http_info(sequence_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_schedules_sequence ..." end # verify the required parameter 'sequence_id' is set fail "Missing the required parameter 'sequence_id' when calling update_schedules_sequence" if sequence_id.nil? # resource path path = "/api/v1/outbound/schedules/sequences/{sequenceId}".sub('{format}','json').sub('{' + 'sequenceId' + '}', sequence_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 => 'SequenceSchedule') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_schedules_sequence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a dialer sequence schedule. # # @param sequence_id Sequence ID # @param [Hash] opts the optional parameters # @return [String] def delete_schedules_sequence(sequence_id, opts = {}) data, status_code, headers = delete_schedules_sequence_with_http_info(sequence_id, opts) return data end # Delete a dialer sequence schedule. # # @param sequence_id Sequence ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_schedules_sequence_with_http_info(sequence_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_schedules_sequence ..." end # verify the required parameter 'sequence_id' is set fail "Missing the required parameter 'sequence_id' when calling delete_schedules_sequence" if sequence_id.nil? # resource path path = "/api/v1/outbound/schedules/sequences/{sequenceId}".sub('{format}','json').sub('{' + 'sequenceId' + '}', sequence_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: OutboundApi#delete_schedules_sequence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query a list of dialer campaign sequences. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [CampaignSequenceEntityListing] def get_sequences(opts = {}) data, status_code, headers = get_sequences_with_http_info(opts) return data end # Query a list of dialer campaign sequences. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :filter_type Filter type # @option opts [String] :name Name # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(CampaignSequenceEntityListing, Fixnum, Hash)>] CampaignSequenceEntityListing data, response status code and response headers def get_sequences_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_sequences ..." end if opts[:'filter_type'] && !['EQUALS', 'REGEX', 'CONTAINS', 'PREFIX', 'LESSTHAN', 'LESSTHANEQUALTO', 'GREATERTHAN', 'GREATERTHANEQUALTO', 'BEGINSWITH', 'ENDSWITH'].include?(opts[:'filter_type']) fail 'invalid value for "filter_type", must be one of EQUALS, REGEX, CONTAINS, PREFIX, LESSTHAN, LESSTHANEQUALTO, GREATERTHAN, GREATERTHANEQUALTO, BEGINSWITH, ENDSWITH' end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail 'invalid value for "sort_order", must be one of ascending, descending' end # resource path path = "/api/v1/outbound/sequences".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[:'filterType'] = opts[:'filter_type'] if opts[:'filter_type'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CampaignSequenceEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_sequences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new campaign sequence. # # @param [Hash] opts the optional parameters # @option opts [CampaignSequence] :body Organization # @return [CampaignSequence] def create_sequences(opts = {}) data, status_code, headers = create_sequences_with_http_info(opts) return data end # Create a new campaign sequence. # # @param [Hash] opts the optional parameters # @option opts [CampaignSequence] :body Organization # @return [Array<(CampaignSequence, Fixnum, Hash)>] CampaignSequence data, response status code and response headers def create_sequences_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#create_sequences ..." end # resource path path = "/api/v1/outbound/sequences".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 => 'CampaignSequence') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#create_sequences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a dialer campaign sequence. # # @param sequence_id Campaign Sequence ID # @param [Hash] opts the optional parameters # @return [CampaignSequence] def get_sequence(sequence_id, opts = {}) data, status_code, headers = get_sequence_with_http_info(sequence_id, opts) return data end # Get a dialer campaign sequence. # # @param sequence_id Campaign Sequence ID # @param [Hash] opts the optional parameters # @return [Array<(CampaignSequence, Fixnum, Hash)>] CampaignSequence data, response status code and response headers def get_sequence_with_http_info(sequence_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_sequence ..." end # verify the required parameter 'sequence_id' is set fail "Missing the required parameter 'sequence_id' when calling get_sequence" if sequence_id.nil? # resource path path = "/api/v1/outbound/sequences/{sequenceId}".sub('{format}','json').sub('{' + 'sequenceId' + '}', sequence_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 => 'CampaignSequence') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_sequence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a new campaign sequence. # # @param sequence_id Campaign Sequence ID # @param [Hash] opts the optional parameters # @option opts [CampaignSequence] :body Organization # @return [CampaignSequence] def update_sequence(sequence_id, opts = {}) data, status_code, headers = update_sequence_with_http_info(sequence_id, opts) return data end # Update a new campaign sequence. # # @param sequence_id Campaign Sequence ID # @param [Hash] opts the optional parameters # @option opts [CampaignSequence] :body Organization # @return [Array<(CampaignSequence, Fixnum, Hash)>] CampaignSequence data, response status code and response headers def update_sequence_with_http_info(sequence_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_sequence ..." end # verify the required parameter 'sequence_id' is set fail "Missing the required parameter 'sequence_id' when calling update_sequence" if sequence_id.nil? # resource path path = "/api/v1/outbound/sequences/{sequenceId}".sub('{format}','json').sub('{' + 'sequenceId' + '}', sequence_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 => 'CampaignSequence') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_sequence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a dialer campaign sequence. # # @param sequence_id Campaign Sequence ID # @param [Hash] opts the optional parameters # @return [String] def delete_sequence(sequence_id, opts = {}) data, status_code, headers = delete_sequence_with_http_info(sequence_id, opts) return data end # Delete a dialer campaign sequence. # # @param sequence_id Campaign Sequence ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_sequence_with_http_info(sequence_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#delete_sequence ..." end # verify the required parameter 'sequence_id' is set fail "Missing the required parameter 'sequence_id' when calling delete_sequence" if sequence_id.nil? # resource path path = "/api/v1/outbound/sequences/{sequenceId}".sub('{format}','json').sub('{' + 'sequenceId' + '}', sequence_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: OutboundApi#delete_sequence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the Dialer wrap up code mapping. # # @param [Hash] opts the optional parameters # @return [WrapUpCodeMapping] def get_wrapupcodemappings(opts = {}) data, status_code, headers = get_wrapupcodemappings_with_http_info(opts) return data end # Get the Dialer wrap up code mapping. # # @param [Hash] opts the optional parameters # @return [Array<(WrapUpCodeMapping, Fixnum, Hash)>] WrapUpCodeMapping data, response status code and response headers def get_wrapupcodemappings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#get_wrapupcodemappings ..." end # resource path path = "/api/v1/outbound/wrapupcodemappings".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 => 'WrapUpCodeMapping') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#get_wrapupcodemappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update the Dialer wrap up code mapping. # # @param [Hash] opts the optional parameters # @option opts [WrapUpCodeMapping] :body wrapUpCodeMapping # @return [WrapUpCodeMapping] def update_wrapupcodemappings(opts = {}) data, status_code, headers = update_wrapupcodemappings_with_http_info(opts) return data end # Update the Dialer wrap up code mapping. # # @param [Hash] opts the optional parameters # @option opts [WrapUpCodeMapping] :body wrapUpCodeMapping # @return [Array<(WrapUpCodeMapping, Fixnum, Hash)>] WrapUpCodeMapping data, response status code and response headers def update_wrapupcodemappings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OutboundApi#update_wrapupcodemappings ..." end # resource path path = "/api/v1/outbound/wrapupcodemappings".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 => 'WrapUpCodeMapping') if @api_client.config.debugging @api_client.config.logger.debug "API called: OutboundApi#update_wrapupcodemappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end