lib/purecloud/api/response_management_api.rb in purecloud-0.44.1 vs lib/purecloud/api/response_management_api.rb in purecloud-0.45.1

- old
+ new

@@ -390,28 +390,31 @@ return data, status_code, headers end # Create a response library. # + # @param body Library # @param [Hash] opts the optional parameters - # @option opts [Library] :body Library # @return [Library] - def post_libraries(opts = {}) - data, status_code, headers = post_libraries_with_http_info(opts) + 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 - # @option opts [Library] :body Library # @return [Array<(Library, Fixnum, Hash)>] Library data, response status code and response headers - def post_libraries_with_http_info(opts = {}) + 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 = {} @@ -429,11 +432,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + 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, @@ -447,28 +450,31 @@ return data, status_code, headers end # Create a response. # + # @param body Response # @param [Hash] opts the optional parameters - # @option opts [Response] :body Response # @return [Response] - def post_responses(opts = {}) - data, status_code, headers = post_responses_with_http_info(opts) + def post_responses(body, opts = {}) + data, status_code, headers = post_responses_with_http_info(body, opts) return data end # Create a response. # + # @param body Response # @param [Hash] opts the optional parameters - # @option opts [Response] :body Response # @return [Array<(Response, Fixnum, Hash)>] Response data, response status code and response headers - def post_responses_with_http_info(opts = {}) + 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 = {} @@ -486,11 +492,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + 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, @@ -504,28 +510,31 @@ return data, status_code, headers end # Query responses # + # @param body Response # @param [Hash] opts the optional parameters - # @option opts [ResponseQueryRequest] :body Response # @return [ResponseQueryResults] - def post_responses_query(opts = {}) - data, status_code, headers = post_responses_query_with_http_info(opts) + 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 - # @option opts [ResponseQueryRequest] :body Response # @return [Array<(ResponseQueryResults, Fixnum, Hash)>] ResponseQueryResults data, response status code and response headers - def post_responses_query_with_http_info(opts = {}) + 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 = {} @@ -543,11 +552,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + 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, @@ -562,32 +571,35 @@ 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 - # @option opts [Library] :body Library # @return [Library] - def put_libraries_library_id(library_id, opts = {}) - data, status_code, headers = put_libraries_library_id_with_http_info(library_id, opts) + 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 - # @option opts [Library] :body Library # @return [Array<(Library, Fixnum, Hash)>] Library data, response status code and response headers - def put_libraries_library_id_with_http_info(library_id, opts = {}) + 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 = {} @@ -605,11 +617,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + 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, @@ -624,32 +636,35 @@ 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 - # @option opts [Response] :body Response # @return [Response] - def put_responses_response_id(response_id, opts = {}) - data, status_code, headers = put_responses_response_id_with_http_info(response_id, opts) + 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 - # @option opts [Response] :body Response # @return [Array<(Response, Fixnum, Hash)>] Response data, response status code and response headers - def put_responses_response_id_with_http_info(response_id, opts = {}) + 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 = {} @@ -667,10 +682,10 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + 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,