Method: PureCloud::ResponseManagementApi#delete_responses_response_id_with_http_info

Defined in:
lib/purecloud/api/response_management_api.rb

#delete_responses_response_id_with_http_info(response_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an existing response. This will remove the response from any libraries associated with it.

Parameters:

  • response_id

    Response ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# 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