Class: Exa::Services::Websets::Monitors::Delete
- Inherits:
-
Object
- Object
- Exa::Services::Websets::Monitors::Delete
- Defined in:
- lib/exa/services/websets/monitors/delete.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(connection, id:) ⇒ Delete
constructor
A new instance of Delete.
Constructor Details
#initialize(connection, id:) ⇒ Delete
8 9 10 11 |
# File 'lib/exa/services/websets/monitors/delete.rb', line 8 def initialize(connection, id:) @connection = connection @id = id end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/exa/services/websets/monitors/delete.rb', line 13 def call response = @connection.delete("/websets/v0/monitors/#{@id}") body = response.body Resources::Monitor.new( id: body["id"], object: body["object"], status: body["status"], webset_id: body["websetId"], cadence: body["cadence"], behavior: body["behavior"], created_at: body["createdAt"], updated_at: body["updatedAt"] ) end |