Class: Crunchbase::Model::Location

Inherits:
Entity
  • Object
show all
Defined in:
lib/crunchbase/model/location.rb

Direct Known Subclasses

ParentLocation, PrimaryLocation

Constant Summary collapse

RESOURCE_LIST =
'locations'

Instance Attribute Summary collapse

Attributes inherited from Entity

#type_name, #uuid

Instance Method Summary collapse

Methods inherited from Entity

array_from_list, #fetch, funding_rounds_lists, get, list, organization_lists, parsing_from_list, person_lists, total_items_from_list

Constructor Details

#initialize(json) ⇒ Location

Returns a new instance of Location.



14
15
16
17
18
19
20
# File 'lib/crunchbase/model/location.rb', line 14

def initialize(json)
  super

  unless (relationships = json['relationships']).nil?
    set_relationships_object(Crunchbase::Model::ParentLocation, 'parent_locations', relationships['parent_locations'])
  end
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



8
9
10
# File 'lib/crunchbase/model/location.rb', line 8

def created_at
  @created_at
end

#location_typeObject (readonly)

Returns the value of attribute location_type.



8
9
10
# File 'lib/crunchbase/model/location.rb', line 8

def location_type
  @location_type
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/crunchbase/model/location.rb', line 8

def name
  @name
end

#parent_location_uuidObject (readonly)

Returns the value of attribute parent_location_uuid.



8
9
10
# File 'lib/crunchbase/model/location.rb', line 8

def parent_location_uuid
  @parent_location_uuid
end

#parent_locationsObject (readonly)

Returns the value of attribute parent_locations.



10
11
12
# File 'lib/crunchbase/model/location.rb', line 10

def parent_locations
  @parent_locations
end

#parent_locations_total_itemsObject (readonly)

Returns the value of attribute parent_locations_total_items.



12
13
14
# File 'lib/crunchbase/model/location.rb', line 12

def parent_locations_total_items
  @parent_locations_total_items
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



8
9
10
# File 'lib/crunchbase/model/location.rb', line 8

def updated_at
  @updated_at
end

#web_pathObject (readonly)

Returns the value of attribute web_path.



8
9
10
# File 'lib/crunchbase/model/location.rb', line 8

def web_path
  @web_path
end

Instance Method Details

#property_keysObject



22
23
24
25
26
# File 'lib/crunchbase/model/location.rb', line 22

def property_keys
  %w[
    web_path name location_type parent_location_uuid created_at updated_at
  ]
end