lib/elasticsearch/api/actions/watcher/deactivate_watch.rb in elasticsearch-api-8.0.1 vs lib/elasticsearch/api/actions/watcher/deactivate_watch.rb in elasticsearch-api-8.1.0
- old
+ new
@@ -22,18 +22,19 @@
# Deactivates a currently active watch.
#
# @option arguments [String] :watch_id Watch ID
# @option arguments [Hash] :headers Custom HTTP headers
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.1/watcher-api-deactivate-watch.html
#
def deactivate_watch(arguments = {})
raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id]
- arguments = arguments.clone
headers = arguments.delete(:headers) || {}
body = nil
+
+ arguments = arguments.clone
_watch_id = arguments.delete(:watch_id)
method = Elasticsearch::API::HTTP_PUT
path = "_watcher/watch/#{Utils.__listify(_watch_id)}/_deactivate"