Method: Codat::Models::Company.create

Defined in:
lib/codat/models/company.rb

.create(params = {}) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/codat/models/company.rb', line 36

def self.create(params = {})
  result = post(ENDPOINTS[:collection], params)

  return { error: 'An error occured.' } unless successful_response?(result)

  new(json: result.body)
end