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, #fetch, get, list, lists_for_permalink, search, total_items_from_list

Constructor Details

#initialize(json) ⇒ Headquarter

Returns a new instance of Headquarter.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/crunchbase/headquarter.rb', line 12

def initialize(json)
  @type_name      = json['type']
  @name           = json['name']
  @street_1       = json['street_1']
  @street_2       = json['street_2']
  @city           = json['city']
  @city_uuid      = json['city_uuid']
  @city_path      = json['city_path']
  @region         = json['region']
  @country_code   = json['country_code']
  @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.



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

def city
  @city
end

#city_pathObject (readonly)

Returns the value of attribute city_path.



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

def city_path
  @city_path
end

#city_uuidObject (readonly)

Returns the value of attribute city_uuid.



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

def city_uuid
  @city_uuid
end

#country_codeObject (readonly)

Returns the value of attribute country_code.



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

def country_code
  @country_code
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#regionObject (readonly)

Returns the value of attribute region.



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

def region
  @region
end

#street_1Object (readonly)

Returns the value of attribute street_1.



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

def street_1
  @street_1
end

#street_2Object (readonly)

Returns the value of attribute street_2.



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

def street_2
  @street_2
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



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

def type_name
  @type_name
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end