Method: ColumnApi::EntityResource.from_response

Defined in:
lib/column_api/resources/entity_resource.rb

.from_response(response) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/column_api/resources/entity_resource.rb', line 5

def self.from_response(response)
  if response["type"] == "PERSON"
    PersonEntity.new(response)
  else
    BusinessEntity.new(response)
  end
end