class PureCloud::ResponseManagementApi
Attributes
Public Class Methods
# File lib/purecloud/api/response_management_api.rb, line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete an existing response library. This will remove any responses associated with the library. @param library_id Library
ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloud/api/response_management_api.rb, line 32 def delete_libraries_library_id(library_id, opts = {}) delete_libraries_library_id_with_http_info(library_id, opts) return nil end
Delete an existing response library. This will remove any responses associated with the library. @param library_id Library
ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 42 def delete_libraries_library_id_with_http_info(library_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#delete_libraries_library_id ..." end # verify the required parameter 'library_id' is set fail "Missing the required parameter 'library_id' when calling delete_libraries_library_id" if library_id.nil? # resource path local_var_path = "/api/v2/responsemanagement/libraries/{libraryId}".sub('{format}','json').sub('{' + 'libraryId' + '}', library_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, local_var_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: ResponseManagementApi#delete_libraries_library_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete an existing response. This will remove the response from any libraries associated with it. @param response_id Response
ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloud/api/response_management_api.rb, line 91 def delete_responses_response_id(response_id, opts = {}) delete_responses_response_id_with_http_info(response_id, opts) return nil end
Delete an existing response. This will remove the response from any libraries associated with it. @param response_id Response
ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 101 def delete_responses_response_id_with_http_info(response_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#delete_responses_response_id ..." end # verify the required parameter 'response_id' is set fail "Missing the required parameter 'response_id' when calling delete_responses_response_id" if response_id.nil? # resource path local_var_path = "/api/v2/responsemanagement/responses/{responseId}".sub('{format}','json').sub('{' + 'responseId' + '}', response_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, local_var_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: ResponseManagementApi#delete_responses_response_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets a list of existing response libraries.
@param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number (default to 1) @option opts [Integer] :page_size Page
size (default to 25) @return [LibraryEntityListing]
# File lib/purecloud/api/response_management_api.rb, line 151 def get_libraries(opts = {}) data, status_code, headers = get_libraries_with_http_info(opts) return data end
Get details about an existing response library.
@param library_id Library
ID @param [Hash] opts the optional parameters @return [Library]
# File lib/purecloud/api/response_management_api.rb, line 211 def get_libraries_library_id(library_id, opts = {}) data, status_code, headers = get_libraries_library_id_with_http_info(library_id, opts) return data end
Get details about an existing response library.
@param library_id Library
ID @param [Hash] opts the optional parameters @return [Array<(Library
, Fixnum, Hash)>] Library
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 221 def get_libraries_library_id_with_http_info(library_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#get_libraries_library_id ..." end # verify the required parameter 'library_id' is set fail "Missing the required parameter 'library_id' when calling get_libraries_library_id" if library_id.nil? # resource path local_var_path = "/api/v2/responsemanagement/libraries/{libraryId}".sub('{format}','json').sub('{' + 'libraryId' + '}', library_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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Library') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#get_libraries_library_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets a list of existing response libraries.
@param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number @option opts [Integer] :page_size Page
size @return [Array<(LibraryEntityListing
, Fixnum, Hash)>] LibraryEntityListing
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 162 def get_libraries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#get_libraries ..." end # resource path local_var_path = "/api/v2/responsemanagement/libraries".sub('{format}','json') # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LibraryEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#get_libraries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets a list of existing responses.
@param library_id Library
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number (default to 1) @option opts [Integer] :page_size Page
size (default to 25) @return [ResponseEntityListing]
# File lib/purecloud/api/response_management_api.rb, line 273 def get_responses(library_id, opts = {}) data, status_code, headers = get_responses_with_http_info(library_id, opts) return data end
Get details about an existing response.
@param response_id Response
ID @param [Hash] opts the optional parameters @return [Response]
# File lib/purecloud/api/response_management_api.rb, line 338 def get_responses_response_id(response_id, opts = {}) data, status_code, headers = get_responses_response_id_with_http_info(response_id, opts) return data end
Get details about an existing response.
@param response_id Response
ID @param [Hash] opts the optional parameters @return [Array<(Response
, Fixnum, Hash)>] Response
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 348 def get_responses_response_id_with_http_info(response_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#get_responses_response_id ..." end # verify the required parameter 'response_id' is set fail "Missing the required parameter 'response_id' when calling get_responses_response_id" if response_id.nil? # resource path local_var_path = "/api/v2/responsemanagement/responses/{responseId}".sub('{format}','json').sub('{' + 'responseId' + '}', response_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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#get_responses_response_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets a list of existing responses.
@param library_id Library
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number @option opts [Integer] :page_size Page
size @return [Array<(ResponseEntityListing
, Fixnum, Hash)>] ResponseEntityListing
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 285 def get_responses_with_http_info(library_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#get_responses ..." end # verify the required parameter 'library_id' is set fail "Missing the required parameter 'library_id' when calling get_responses" if library_id.nil? # resource path local_var_path = "/api/v2/responsemanagement/responses".sub('{format}','json') # query parameters query_params = {} query_params[:'libraryId'] = library_id query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _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, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#get_responses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a response library.
@param body Library
@param [Hash] opts the optional parameters @return [Library]
# File lib/purecloud/api/response_management_api.rb, line 398 def post_libraries(body, opts = {}) data, status_code, headers = post_libraries_with_http_info(body, opts) return data end
Create a response library.
@param body Library
@param [Hash] opts the optional parameters @return [Array<(Library
, Fixnum, Hash)>] Library
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 408 def post_libraries_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#post_libraries ..." end # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling post_libraries" if body.nil? # resource path local_var_path = "/api/v2/responsemanagement/libraries".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(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Library') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#post_libraries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a response.
@param body Response
@param [Hash] opts the optional parameters @return [Response]
# File lib/purecloud/api/response_management_api.rb, line 458 def post_responses(body, opts = {}) data, status_code, headers = post_responses_with_http_info(body, opts) return data end
Query responses
@param body Response
@param [Hash] opts the optional parameters @return [ResponseQueryResults]
# File lib/purecloud/api/response_management_api.rb, line 518 def post_responses_query(body, opts = {}) data, status_code, headers = post_responses_query_with_http_info(body, opts) return data end
Query responses
@param body Response
@param [Hash] opts the optional parameters @return [Array<(ResponseQueryResults
, Fixnum, Hash)>] ResponseQueryResults
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 528 def post_responses_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#post_responses_query ..." end # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling post_responses_query" if body.nil? # resource path local_var_path = "/api/v2/responsemanagement/responses/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseQueryResults') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#post_responses_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a response.
@param body Response
@param [Hash] opts the optional parameters @return [Array<(Response
, Fixnum, Hash)>] Response
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 468 def post_responses_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#post_responses ..." end # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling post_responses" if body.nil? # resource path local_var_path = "/api/v2/responsemanagement/responses".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(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#post_responses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an existing response library. Fields that can be updated: name. The most recent version is required for updates. @param library_id Library
ID @param body Library
@param [Hash] opts the optional parameters @return [Library]
# File lib/purecloud/api/response_management_api.rb, line 579 def put_libraries_library_id(library_id, body, opts = {}) data, status_code, headers = put_libraries_library_id_with_http_info(library_id, body, opts) return data end
Update an existing response library. Fields that can be updated: name. The most recent version is required for updates. @param library_id Library
ID @param body Library
@param [Hash] opts the optional parameters @return [Array<(Library
, Fixnum, Hash)>] Library
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 590 def put_libraries_library_id_with_http_info(library_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#put_libraries_library_id ..." end # verify the required parameter 'library_id' is set fail "Missing the required parameter 'library_id' when calling put_libraries_library_id" if library_id.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling put_libraries_library_id" if body.nil? # resource path local_var_path = "/api/v2/responsemanagement/libraries/{libraryId}".sub('{format}','json').sub('{' + 'libraryId' + '}', library_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(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Library') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#put_libraries_library_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an existing response. Fields that can be updated: name, libraries, and texts. The most recent version is required for updates. @param response_id Response
ID @param body Response
@param [Hash] opts the optional parameters @return [Response]
# File lib/purecloud/api/response_management_api.rb, line 644 def put_responses_response_id(response_id, body, opts = {}) data, status_code, headers = put_responses_response_id_with_http_info(response_id, body, opts) return data end
Update an existing response. Fields that can be updated: name, libraries, and texts. The most recent version is required for updates. @param response_id Response
ID @param body Response
@param [Hash] opts the optional parameters @return [Array<(Response
, Fixnum, Hash)>] Response
data, response status code and response headers
# File lib/purecloud/api/response_management_api.rb, line 655 def put_responses_response_id_with_http_info(response_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResponseManagementApi#put_responses_response_id ..." end # verify the required parameter 'response_id' is set fail "Missing the required parameter 'response_id' when calling put_responses_response_id" if response_id.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling put_responses_response_id" if body.nil? # resource path local_var_path = "/api/v2/responsemanagement/responses/{responseId}".sub('{format}','json').sub('{' + 'responseId' + '}', response_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(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Response') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResponseManagementApi#put_responses_response_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end