Class: Crunchbase::Headquarter

Inherits:
CBEntity
  • Object
show all
Defined in:
lib/crunchbase/headquarter.rb

Constant Summary collapse

RESOURCE_LIST =
'headquarters'

Constants inherited from CBEntity

CBEntity::RELATIONSHIPS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CBEntity

array_from_list, category_lists_by_permalink, #fetch, get, list, lists_for_permalink, lists_for_person_permalink, parsing_from_list, search, total_items_from_list

Constructor Details

#initialize(json) ⇒ Headquarter

Returns a new instance of Headquarter.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/crunchbase/headquarter.rb', line 14

def initialize(json)
  @type_name      = json['type']
  @name           = json['name']
  @street_1       = json['street_1']
  @street_2       = json['street_2']
  @postal_code    = json['postal_code']
  @city           = json['city']
  @city_path      = json['city_path']
  @region         = json['region']
  @region_path    = json['region_path']
  @country        = json['country']
  @country_path   = json['country_path']
  @latitude       = json['latitude']
  @longitude      = json['longitude']
  @created_at     = Time.at(json['created_at']).utc
  @updated_at     = Time.at(json['updated_at']).utc
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



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

def city
  @city
end

#city_pathObject (readonly)

Returns the value of attribute city_path.



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

def city_path
  @city_path
end

#countryObject (readonly)

Returns the value of attribute country.



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

def country
  @country
end

#country_pathObject (readonly)

Returns the value of attribute country_path.



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

def country_path
  @country_path
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#latitudeObject (readonly)

Returns the value of attribute latitude.



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

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



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

def longitude
  @longitude
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



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

def postal_code
  @postal_code
end

#regionObject (readonly)

Returns the value of attribute region.



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

def region
  @region
end

#region_pathObject (readonly)

Returns the value of attribute region_path.



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

def region_path
  @region_path
end

#street_1Object (readonly)

Returns the value of attribute street_1.



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

def street_1
  @street_1
end

#street_2Object (readonly)

Returns the value of attribute street_2.



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

def street_2
  @street_2
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



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

def type_name
  @type_name
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end