Module: Besepa::ApiCalls::List::ClassMethods

Defined in:
lib/besepa/api_calls/list.rb

Instance Method Summary collapse

Instance Method Details

#all(filters = {}) ⇒ Object



5
6
7
8
9
# File 'lib/besepa/api_calls/list.rb', line 5

def all(filters={})
  path = api_path(filters)
  response = get(path, query_params(filters))
  Besepa::Collection.new(response, self)
end

#find(id, filters = {}) ⇒ Object



11
12
13
14
15
# File 'lib/besepa/api_calls/list.rb', line 11

def find(id, filters={})
  response = get "#{api_path(filters)}/#{id}"
  c = self.new(response['response'])
  c
end