Module: Delighted::Operations::Retrieve::Pluralton::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#path(id = nil) ⇒ Object



20
21
22
# File 'lib/delighted/operations/retrieve.rb', line 20

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

#retrieve(id, opts = {}, client = Delighted.shared_client) ⇒ Object



14
15
16
17
18
# File 'lib/delighted/operations/retrieve.rb', line 14

def retrieve(id, opts = {}, client = Delighted.shared_client)
  opts = Utils.serialize_values(opts)
  json = client.get_json(path(id), opts)
  new(json)
end