Module: LiveQA::APIOperation::Delete

Included in:
Watcher
Defined in:
lib/liveqa/api_operation/delete.rb

Overview

Delete a resource for the API

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



32
33
34
# File 'lib/liveqa/api_operation/delete.rb', line 32

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#destroy(options = {}) ⇒ LiveQA::Object

Delete an API Resources

Parameters:

  • Additional (Hash)

    options for the request

Returns:

  • (LiveQA::Object)

    response from the API



27
28
29
30
# File 'lib/liveqa/api_operation/delete.rb', line 27

def destroy(options = {})
  response = request(:delete, "#{resource_path}/#{id}", {}, options)
  update_from(response)
end