Module: Delighted::Operations::Delete::ClassMethods

Defined in:
lib/delighted/operations/delete.rb

Instance Method Summary collapse

Instance Method Details

#delete(id_hash, client = Delighted.shared_client) ⇒ Object



13
14
15
16
# File 'lib/delighted/operations/delete.rb', line 13

def delete(id_hash, client = Delighted.shared_client)
  id = identifier_string(id_hash)
  client.delete_json(path(id))
end

#path(id = nil) ⇒ Object



9
10
11
# File 'lib/delighted/operations/delete.rb', line 9

def path(id = nil)
  id ? "#{@path}/#{CGI.escape(id)}" : @path
end