Sha256: a78b74fe4b690b7f1210ab5a50a8283b287bed853f7118fb9979457bf92c2450

Contents?: true

Size: 541 Bytes

Versions: 21

Compression:

Stored size: 541 Bytes

Contents

class Ey::Core::Client
  class Real
    def acknowledge_alert(params={})
      id = params.delete("id")

      request(
        method: :put,
        path: "legacy-alerts/#{id}/acknowledge"
      )
    end
  end

  class Mock
    def acknowledge_alert(params={})
      id = params.delete("id")

      if alert = self.data[:alerts][id]
        alert["acknowledged"] = true

        response(
          :body => {"legacy_alert" => alert},
          :status => 200
        )
      else
        response(status: 404)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
ey-core-3.6.0.autoscaling1 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.6.4 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.6.3 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.6.1 lib/ey-core/requests/acknowledge_alert.rb
groove-ey-core-3.6.3 lib/ey-core/requests/acknowledge_alert.rb
groove-ey-core-3.6.2 lib/ey-core/requests/acknowledge_alert.rb
groove-ey-core-3.6.1 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.5.0 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.4.4 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.4.2 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.4.1 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.4.0 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.3.1 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.3.0 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.2.6 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.2.5 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.2.4 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.2.3 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.2.2 lib/ey-core/requests/acknowledge_alert.rb
ey-core-3.2.1 lib/ey-core/requests/acknowledge_alert.rb