Method: Codat::Models::Company.all
- Defined in:
- lib/codat/models/company.rb
.all(params = {}) ⇒ Object
Returns the list of companies in the Codat account.
18 19 20 21 22 23 24 |
# File 'lib/codat/models/company.rb', line 18 def self.all(params = {}) result = get(ENDPOINTS[:collection], params) return [] unless successful_response?(result) result.body[:results].map { |company| new(json: company) } end |