Module: Onfleet::Actions::List::ClassMethods
- Defined in:
- lib/onfleet-ruby/actions/list.rb
Instance Method Summary collapse
Instance Method Details
#list(query_params = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/onfleet-ruby/actions/list.rb', line 5 def list query_params={} url = "#{self.url}" if !query_params.empty? url += "?" query_params.each do |key, value| url += "#{key}=#{value}&" end end response = Onfleet.request(url, :get) response.compact.map do |listObj| Util.constantize("#{self}").new(listObj) end end |