module Hawkei::APIOperation::Delete

Delete a resource for the API

Public Class Methods

included(base) click to toggle source
# File lib/hawkei/api_operation/delete.rb, line 32
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

destroy(options = {}) click to toggle source

Delete an API Resources

@param [Hash] Additional options for the request

@return [Hawkei::Object] response from the API

# File lib/hawkei/api_operation/delete.rb, line 27
def destroy(options = {})
  response = request(:delete, "#{resource_path}/#{id}", {}, options)
  update_from(response)
end