module DaashubAPI::REST::Company
Public Instance Methods
companies(params = {})
click to toggle source
# File lib/daashub_api/rest/company.rb, line 7 def companies(params = {}) options = prepare_companies_options(params) response = DaashubAPI::Request.perform_get('/v1/companies', access_token, options) DaashubAPI::Company.from_array(response) end
Protected Instance Methods
prepare_companies_options(params)
click to toggle source
# File lib/daashub_api/rest/company.rb, line 15 def prepare_companies_options(params) if params[:where] && params[:where].is_a?(Hash) where = params[:where].first params[:where] = "#{where[0]}==#{where[1]}" end { query: params } end