lib/purecloud/api/alerting_api.rb in purecloud-0.35.1 vs lib/purecloud/api/alerting_api.rb in purecloud-0.36.1
- old
+ new
@@ -1,35 +1,56 @@
+=begin
+PureCloud API
+
+PureCloud API
+
+OpenAPI spec version: v1
+Contact: chuck.pulfer@inin.com
+Generated by: https://github.com/swagger-api/swagger-codegen.git
+
+License: ININ
+http://www.inin.com
+
+Terms of Service: http://www.inin.com
+
+=end
+
require "uri"
module PureCloud
class AlertingApi
attr_accessor :api_client
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
- # Get interaction stats alert list.
+ # Delete an interaction stats alert
#
+ # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @return [InteractionStatsAlertContainer]
- def get_interactionstats_alerts(opts = {})
- data, status_code, headers = get_interactionstats_alerts_with_http_info(opts)
- return data
+ # @return [nil]
+ def delete_interactionstats_alerts_alert_id(alert_id, opts = {})
+ delete_interactionstats_alerts_alert_id_with_http_info(alert_id, opts)
+ return nil
end
- # Get interaction stats alert list.
+ # Delete an interaction stats alert
#
+ # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @return [Array<(InteractionStatsAlertContainer, Fixnum, Hash)>] InteractionStatsAlertContainer data, response status code and response headers
- def get_interactionstats_alerts_with_http_info(opts = {})
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
+ def delete_interactionstats_alerts_alert_id_with_http_info(alert_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_alerts ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#delete_interactionstats_alerts_alert_id ..."
end
+ # verify the required parameter 'alert_id' is set
+ fail "Missing the required parameter 'alert_id' when calling delete_interactionstats_alerts_alert_id" if alert_id.nil?
+
# resource path
- path = "/api/v2/alerting/interactionstats/alerts".sub('{format}','json')
+ local_var_path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -47,45 +68,48 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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,
- :return_type => 'InteractionStatsAlertContainer')
+ :auth_names => auth_names)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#delete_interactionstats_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Gets user unread count of interaction stats alerts.
+ # Delete an interaction stats rule.
#
+ # @param rule_id Rule ID
# @param [Hash] opts the optional parameters
- # @return [UnreadMetric]
- def get_interactionstats_alerts_unread(opts = {})
- data, status_code, headers = get_interactionstats_alerts_unread_with_http_info(opts)
- return data
+ # @return [nil]
+ def delete_interactionstats_rules_rule_id(rule_id, opts = {})
+ delete_interactionstats_rules_rule_id_with_http_info(rule_id, opts)
+ return nil
end
- # Gets user unread count of interaction stats alerts.
+ # Delete an interaction stats rule.
#
+ # @param rule_id Rule ID
# @param [Hash] opts the optional parameters
- # @return [Array<(UnreadMetric, Fixnum, Hash)>] UnreadMetric data, response status code and response headers
- def get_interactionstats_alerts_unread_with_http_info(opts = {})
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
+ def delete_interactionstats_rules_rule_id_with_http_info(rule_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_alerts_unread ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#delete_interactionstats_rules_rule_id ..."
end
+ # verify the required parameter 'rule_id' is set
+ fail "Missing the required parameter 'rule_id' when calling delete_interactionstats_rules_rule_id" if rule_id.nil?
+
# resource path
- path = "/api/v2/alerting/interactionstats/alerts/unread".sub('{format}','json')
+ local_var_path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -103,50 +127,43 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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,
- :return_type => 'UnreadMetric')
+ :auth_names => auth_names)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_alerts_unread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#delete_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get an interaction stats alert
+ # Get interaction stats alert list.
#
- # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @return [InteractionStatsAlert]
- def get_interactionstats_alerts_alert_id(alert_id, opts = {})
- data, status_code, headers = get_interactionstats_alerts_alert_id_with_http_info(alert_id, opts)
+ # @return [InteractionStatsAlertContainer]
+ def get_interactionstats_alerts(opts = {})
+ data, status_code, headers = get_interactionstats_alerts_with_http_info(opts)
return data
end
- # Get an interaction stats alert
+ # Get interaction stats alert list.
#
- # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @return [Array<(InteractionStatsAlert, Fixnum, Hash)>] InteractionStatsAlert data, response status code and response headers
- def get_interactionstats_alerts_alert_id_with_http_info(alert_id, opts = {})
+ # @return [Array<(InteractionStatsAlertContainer, Fixnum, Hash)>] InteractionStatsAlertContainer data, response status code and response headers
+ def get_interactionstats_alerts_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_alerts_alert_id ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_alerts ..."
end
- # verify the required parameter 'alert_id' is set
- fail "Missing the required parameter 'alert_id' when calling get_interactionstats_alerts_alert_id" if alert_id.nil?
-
# resource path
- path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
+ local_var_path = "/api/v2/alerting/interactionstats/alerts".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -164,52 +181,49 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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 => 'InteractionStatsAlert')
+ :return_type => 'InteractionStatsAlertContainer')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update an interaction stats alert read status
+ # Get an interaction stats alert
#
# @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @option opts [UnreadStatus] :body InteractionStatsAlert
- # @return [UnreadStatus]
- def put_interactionstats_alerts_alert_id(alert_id, opts = {})
- data, status_code, headers = put_interactionstats_alerts_alert_id_with_http_info(alert_id, opts)
+ # @return [InteractionStatsAlert]
+ def get_interactionstats_alerts_alert_id(alert_id, opts = {})
+ data, status_code, headers = get_interactionstats_alerts_alert_id_with_http_info(alert_id, opts)
return data
end
- # Update an interaction stats alert read status
+ # Get an interaction stats alert
#
# @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @option opts [UnreadStatus] :body InteractionStatsAlert
- # @return [Array<(UnreadStatus, Fixnum, Hash)>] UnreadStatus data, response status code and response headers
- def put_interactionstats_alerts_alert_id_with_http_info(alert_id, opts = {})
+ # @return [Array<(InteractionStatsAlert, Fixnum, Hash)>] InteractionStatsAlert data, response status code and response headers
+ def get_interactionstats_alerts_alert_id_with_http_info(alert_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#put_interactionstats_alerts_alert_id ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_alerts_alert_id ..."
end
# verify the required parameter 'alert_id' is set
- fail "Missing the required parameter 'alert_id' when calling put_interactionstats_alerts_alert_id" if alert_id.nil?
+ fail "Missing the required parameter 'alert_id' when calling get_interactionstats_alerts_alert_id" if alert_id.nil?
# resource path
- path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
+ local_var_path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -225,52 +239,46 @@
# form parameters
form_params = {}
# http body (model)
- post_body = @api_client.object_to_http_body(opts[:'body'])
+ post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:PUT, path,
+ 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 => 'UnreadStatus')
+ :return_type => 'InteractionStatsAlert')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#put_interactionstats_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete an interaction stats alert
+ # Gets user unread count of interaction stats alerts.
#
- # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_interactionstats_alerts_alert_id(alert_id, opts = {})
- delete_interactionstats_alerts_alert_id_with_http_info(alert_id, opts)
- return nil
+ # @return [UnreadMetric]
+ def get_interactionstats_alerts_unread(opts = {})
+ data, status_code, headers = get_interactionstats_alerts_unread_with_http_info(opts)
+ return data
end
- # Delete an interaction stats alert
+ # Gets user unread count of interaction stats alerts.
#
- # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
- def delete_interactionstats_alerts_alert_id_with_http_info(alert_id, opts = {})
+ # @return [Array<(UnreadMetric, Fixnum, Hash)>] UnreadMetric data, response status code and response headers
+ def get_interactionstats_alerts_unread_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#delete_interactionstats_alerts_alert_id ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_alerts_unread ..."
end
- # verify the required parameter 'alert_id' is set
- fail "Missing the required parameter 'alert_id' when calling delete_interactionstats_alerts_alert_id" if alert_id.nil?
-
# resource path
- path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
+ local_var_path = "/api/v2/alerting/interactionstats/alerts/unread".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -288,20 +296,20 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:DELETE, path,
+ 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)
+ :auth_names => auth_names,
+ :return_type => 'UnreadMetric')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#delete_interactionstats_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_alerts_unread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get an interaction stats rule list.
@@ -321,11 +329,11 @@
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_rules ..."
end
# resource path
- path = "/api/v2/alerting/interactionstats/rules".sub('{format}','json')
+ local_var_path = "/api/v2/alerting/interactionstats/rules".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -343,13 +351,12 @@
form_params = {}
# http body (model)
post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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,
@@ -358,32 +365,35 @@
@api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Create an interaction stats rule.
+ # Get an interaction stats rule.
#
+ # @param rule_id Rule ID
# @param [Hash] opts the optional parameters
- # @option opts [InteractionStatsRule] :body AlertingRule
# @return [InteractionStatsRule]
- def post_interactionstats_rules(opts = {})
- data, status_code, headers = post_interactionstats_rules_with_http_info(opts)
+ def get_interactionstats_rules_rule_id(rule_id, opts = {})
+ data, status_code, headers = get_interactionstats_rules_rule_id_with_http_info(rule_id, opts)
return data
end
- # Create an interaction stats rule.
+ # Get an interaction stats rule.
#
+ # @param rule_id Rule ID
# @param [Hash] opts the optional parameters
- # @option opts [InteractionStatsRule] :body AlertingRule
# @return [Array<(InteractionStatsRule, Fixnum, Hash)>] InteractionStatsRule data, response status code and response headers
- def post_interactionstats_rules_with_http_info(opts = {})
+ def get_interactionstats_rules_rule_id_with_http_info(rule_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#post_interactionstats_rules ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_rules_rule_id ..."
end
+ # verify the required parameter 'rule_id' is set
+ fail "Missing the required parameter 'rule_id' when calling get_interactionstats_rules_rule_id" if rule_id.nil?
+
# resource path
- path = "/api/v2/alerting/interactionstats/rules".sub('{format}','json')
+ local_var_path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -399,52 +409,48 @@
# form parameters
form_params = {}
# http body (model)
- post_body = @api_client.object_to_http_body(opts[:'body'])
+ post_body = nil
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:POST, path,
+ 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 => 'InteractionStatsRule')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#post_interactionstats_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get an interaction stats rule.
+ # Create an interaction stats rule.
#
- # @param rule_id Rule ID
# @param [Hash] opts the optional parameters
+ # @option opts [InteractionStatsRule] :body AlertingRule
# @return [InteractionStatsRule]
- def get_interactionstats_rules_rule_id(rule_id, opts = {})
- data, status_code, headers = get_interactionstats_rules_rule_id_with_http_info(rule_id, opts)
+ def post_interactionstats_rules(opts = {})
+ data, status_code, headers = post_interactionstats_rules_with_http_info(opts)
return data
end
- # Get an interaction stats rule.
+ # Create an interaction stats rule.
#
- # @param rule_id Rule ID
# @param [Hash] opts the optional parameters
+ # @option opts [InteractionStatsRule] :body AlertingRule
# @return [Array<(InteractionStatsRule, Fixnum, Hash)>] InteractionStatsRule data, response status code and response headers
- def get_interactionstats_rules_rule_id_with_http_info(rule_id, opts = {})
+ def post_interactionstats_rules_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#get_interactionstats_rules_rule_id ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#post_interactionstats_rules ..."
end
- # verify the required parameter 'rule_id' is set
- fail "Missing the required parameter 'rule_id' when calling get_interactionstats_rules_rule_id" if rule_id.nil?
-
# resource path
- path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
+ local_var_path = "/api/v2/alerting/interactionstats/rules".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
@@ -460,54 +466,53 @@
# form parameters
form_params = {}
# http body (model)
- post_body = nil
+ post_body = @api_client.object_to_http_body(opts[:'body'])
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:GET, path,
+ 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 => 'InteractionStatsRule')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#post_interactionstats_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update an interaction stats rule
+ # Update an interaction stats alert read status
#
- # @param rule_id Rule ID
+ # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @option opts [InteractionStatsRule] :body AlertingRule
- # @return [InteractionStatsRule]
- def put_interactionstats_rules_rule_id(rule_id, opts = {})
- data, status_code, headers = put_interactionstats_rules_rule_id_with_http_info(rule_id, opts)
+ # @option opts [UnreadStatus] :body InteractionStatsAlert
+ # @return [UnreadStatus]
+ def put_interactionstats_alerts_alert_id(alert_id, opts = {})
+ data, status_code, headers = put_interactionstats_alerts_alert_id_with_http_info(alert_id, opts)
return data
end
- # Update an interaction stats rule
+ # Update an interaction stats alert read status
#
- # @param rule_id Rule ID
+ # @param alert_id Alert ID
# @param [Hash] opts the optional parameters
- # @option opts [InteractionStatsRule] :body AlertingRule
- # @return [Array<(InteractionStatsRule, Fixnum, Hash)>] InteractionStatsRule data, response status code and response headers
- def put_interactionstats_rules_rule_id_with_http_info(rule_id, opts = {})
+ # @option opts [UnreadStatus] :body InteractionStatsAlert
+ # @return [Array<(UnreadStatus, Fixnum, Hash)>] UnreadStatus data, response status code and response headers
+ def put_interactionstats_alerts_alert_id_with_http_info(alert_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#put_interactionstats_rules_rule_id ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#put_interactionstats_alerts_alert_id ..."
end
- # verify the required parameter 'rule_id' is set
- fail "Missing the required parameter 'rule_id' when calling put_interactionstats_rules_rule_id" if rule_id.nil?
+ # verify the required parameter 'alert_id' is set
+ fail "Missing the required parameter 'alert_id' when calling put_interactionstats_alerts_alert_id" if alert_id.nil?
# resource path
- path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
+ local_var_path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -525,50 +530,51 @@
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,
+ 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 => 'InteractionStatsRule')
+ :return_type => 'UnreadStatus')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#put_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#put_interactionstats_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete an interaction stats rule.
+ # Update an interaction stats rule
#
# @param rule_id Rule ID
# @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_interactionstats_rules_rule_id(rule_id, opts = {})
- delete_interactionstats_rules_rule_id_with_http_info(rule_id, opts)
- return nil
+ # @option opts [InteractionStatsRule] :body AlertingRule
+ # @return [InteractionStatsRule]
+ def put_interactionstats_rules_rule_id(rule_id, opts = {})
+ data, status_code, headers = put_interactionstats_rules_rule_id_with_http_info(rule_id, opts)
+ return data
end
- # Delete an interaction stats rule.
+ # Update an interaction stats rule
#
# @param rule_id Rule ID
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
- def delete_interactionstats_rules_rule_id_with_http_info(rule_id, opts = {})
+ # @option opts [InteractionStatsRule] :body AlertingRule
+ # @return [Array<(InteractionStatsRule, Fixnum, Hash)>] InteractionStatsRule data, response status code and response headers
+ def put_interactionstats_rules_rule_id_with_http_info(rule_id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: AlertingApi#delete_interactionstats_rules_rule_id ..."
+ @api_client.config.logger.debug "Calling API: AlertingApi#put_interactionstats_rules_rule_id ..."
end
# verify the required parameter 'rule_id' is set
- fail "Missing the required parameter 'rule_id' when calling delete_interactionstats_rules_rule_id" if rule_id.nil?
+ fail "Missing the required parameter 'rule_id' when calling put_interactionstats_rules_rule_id" if rule_id.nil?
# resource path
- path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
+ local_var_path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
# query parameters
query_params = {}
# header parameters
@@ -584,26 +590,22 @@
# form parameters
form_params = {}
# http body (model)
- post_body = nil
+ post_body = @api_client.object_to_http_body(opts[:'body'])
-
auth_names = ['PureCloud Auth']
- data, status_code, headers = @api_client.call_api(:DELETE, path,
+ 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)
+ :auth_names => auth_names,
+ :return_type => 'InteractionStatsRule')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: AlertingApi#delete_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: AlertingApi#put_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end
-
-
-
-