Module: Layer::Operations::Destroy::ClassMethods

Included in:
Message
Defined in:
lib/layer/operations/destroy.rb

Instance Method Summary collapse

Instance Method Details

#destroy(id, client = self.client) ⇒ Object

Destroys the resource with the given id

Parameters:

  • id (String)

    the resource’s id

  • client (Layer::Client) (defaults to: self.client)

    the client to use to make this request

Raises:



11
12
13
14
# File 'lib/layer/operations/destroy.rb', line 11

def destroy(id, client = self.client)
  id = Layer::Client.normalize_id(id)
  client.delete("#{url}/#{id}", {}, { params: { destroy: true } })
end