Class: Crunchbase::Organization

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

Constant Summary collapse

RESOURCE_NAME =
'organization'
RESOURCE_LIST =
'organizations'

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) ⇒ Organization

Returns a new instance of Organization.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/crunchbase/organization.rb', line 35

def initialize(json)
  @uuid                   = json['uuid']
  @type_name              = json['type']
  properties              = json['properties']
  relationships           = json['relationships']

  @role_company           = properties['role_company']
  @name                   = properties['name']
  @permalink              = properties['permalink']
  @description            = properties['description']
  @short_description      = properties['short_description']
  @homepage_url           = properties['homepage_url']
  @email_address          = properties['email_address']
  @phone_number           = properties['phone_number']
  @founded_on_day         = properties['founded_on_day']
  @founded_on_month       = properties['founded_on_month']
  @founded_on_year        = properties['founded_on_year']
  @founded_on             = properties['founded_on'] && DateTime.parse(properties['founded_on'])
  @founded_on_trust_code  = properties['founded_on_trust_code']
  @is_closed              = properties['is_closed']
  @closed_on_day          = properties['closed_on_day']
  @closed_on_month        = properties['closed_on_month']
  @closed_on_year         = properties['closed_on_year']
  @closed_on              = properties['closed_on'] && DateTime.parse(properties['closed_on'])
  @closed_on_trust_code   = properties['closed_on_trust_code']
  @role_investor          = properties['role_investor']
  @primary_role           = properties['primary_role']
  @total_funding_usd      = properties['total_funding_usd']
  @number_of_investments  = properties['number_of_investments']
  @number_of_employees    = properties['number_of_employees']
  @stock_symbol           = properties['stock_symbol']
  @stock_exchange         = properties['stock_exchange']
  @num_employees_max      = properties['num_employees_max']
  @num_employees_min      = properties['num_employees_min']
  @investors_list         = properties['investors']
  @created_at             = Time.at(properties['created_at']).utc
  @updated_at             = Time.at(properties['updated_at']).utc
  
  @secondary_role_for_profit = properties['secondary_role_for_profit']

  @past_teams_list        = relationships['past_team']
  @sub_organizations_list = relationships['sub_organizations']
  @current_teams_list     = relationships['current_team']
  @acquisitions_list      = relationships['acquisitions']
  @competitors_list       = relationships['competitors']
  @offices_list           = relationships['offices']
  @headquarters_list      = relationships['headquarters']
  @funding_rounds_list    = relationships['funding_rounds']
  @categories_list        = relationships['categories']
  @customers_list         = relationships['customers']
  @investments_list       = relationships['investments']
  @founders_list          = relationships['founders']
  @ipos_list              = relationships['ipo']
  @products_list          = relationships['products']
  @primary_images_list    = relationships['primary_image']
  @images_list            = relationships['images']
  @websites_list          = relationships['websites']
  @new_items_list         = relationships['news']
  @board_members_and_advisors_list  = relationships['board_members_and_advisors']
  @acquired_bies_list     = relationships['acquired_by']
end

Instance Attribute Details

#acquired_biesObject (readonly)

Returns the value of attribute acquired_bies.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def acquired_bies
  @acquired_bies
end

#acquired_bies_total_itemsObject (readonly)

Returns the value of attribute acquired_bies_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def acquired_bies_total_items
  @acquired_bies_total_items
end

#acquisitionsObject (readonly)

Acquisition



127
128
129
# File 'lib/crunchbase/organization.rb', line 127

def acquisitions
  @acquisitions
end

#acquisitions_total_itemsObject (readonly)

Returns the value of attribute acquisitions_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def acquisitions_total_items
  @acquisitions_total_items
end

#board_members_and_advisorsObject (readonly)

Returns the value of attribute board_members_and_advisors.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def board_members_and_advisors
  @board_members_and_advisors
end

#board_members_and_advisors_total_itemsObject (readonly)

Returns the value of attribute board_members_and_advisors_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def board_members_and_advisors_total_items
  @board_members_and_advisors_total_items
end

#categoriesObject (readonly)

Returns the value of attribute categories.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def categories
  @categories
end

#categories_total_itemsObject (readonly)

Returns the value of attribute categories_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def categories_total_items
  @categories_total_items
end

#closed_onObject (readonly)

Returns the value of attribute closed_on.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def closed_on
  @closed_on
end

#closed_on_dayObject (readonly)

Returns the value of attribute closed_on_day.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def closed_on_day
  @closed_on_day
end

#closed_on_monthObject (readonly)

Returns the value of attribute closed_on_month.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def closed_on_month
  @closed_on_month
end

#closed_on_trust_codeObject (readonly)

Returns the value of attribute closed_on_trust_code.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def closed_on_trust_code
  @closed_on_trust_code
end

#closed_on_yearObject (readonly)

Returns the value of attribute closed_on_year.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def closed_on_year
  @closed_on_year
end

#competitorsObject (readonly)

Organization



102
103
104
# File 'lib/crunchbase/organization.rb', line 102

def competitors
  @competitors
end

#competitors_total_itemsObject (readonly)

Returns the value of attribute competitors_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def competitors_total_items
  @competitors_total_items
end

#created_atObject (readonly)

Returns the value of attribute created_at.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def created_at
  @created_at
end

#current_teamsObject (readonly)

Returns the value of attribute current_teams.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def current_teams
  @current_teams
end

#current_teams_total_itemsObject (readonly)

Returns the value of attribute current_teams_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def current_teams_total_items
  @current_teams_total_items
end

#customersObject (readonly)

Organization



107
108
109
# File 'lib/crunchbase/organization.rb', line 107

def customers
  @customers
end

#customers_total_itemsObject (readonly)

Returns the value of attribute customers_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def customers_total_items
  @customers_total_items
end

#descriptionObject (readonly)

Returns the value of attribute description.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def description
  @description
end

#email_addressObject (readonly)

Returns the value of attribute email_address.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def email_address
  @email_address
end

#founded_onObject (readonly)

Returns the value of attribute founded_on.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def founded_on
  @founded_on
end

#founded_on_dayObject (readonly)

Returns the value of attribute founded_on_day.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def founded_on_day
  @founded_on_day
end

#founded_on_monthObject (readonly)

Returns the value of attribute founded_on_month.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def founded_on_month
  @founded_on_month
end

#founded_on_trust_codeObject (readonly)

Returns the value of attribute founded_on_trust_code.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def founded_on_trust_code
  @founded_on_trust_code
end

#founded_on_yearObject (readonly)

Returns the value of attribute founded_on_year.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def founded_on_year
  @founded_on_year
end

#foundersObject (readonly)

Person



112
113
114
# File 'lib/crunchbase/organization.rb', line 112

def founders
  @founders
end

#founders_total_itemsObject (readonly)

Returns the value of attribute founders_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def founders_total_items
  @founders_total_items
end

#funding_roundsObject (readonly)

FundingRound



117
118
119
# File 'lib/crunchbase/organization.rb', line 117

def funding_rounds
  @funding_rounds
end

#funding_rounds_total_itemsObject (readonly)

Returns the value of attribute funding_rounds_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def funding_rounds_total_items
  @funding_rounds_total_items
end

#headquartersObject (readonly)

Returns the value of attribute headquarters.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def headquarters
  @headquarters
end

#headquarters_total_itemsObject (readonly)

Returns the value of attribute headquarters_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def headquarters_total_items
  @headquarters_total_items
end

#homepage_urlObject (readonly)

Returns the value of attribute homepage_url.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def homepage_url
  @homepage_url
end

#imagesObject (readonly)

Returns the value of attribute images.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def images
  @images
end

#images_total_itemsObject (readonly)

Returns the value of attribute images_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def images_total_items
  @images_total_items
end

#investmentsObject (readonly)

Returns the value of attribute investments.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def investments
  @investments
end

#investments_total_itemsObject (readonly)

Returns the value of attribute investments_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def investments_total_items
  @investments_total_items
end

#investorsObject (readonly)

Returns the value of attribute investors.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def investors
  @investors
end

#investors_total_itemsObject (readonly)

Returns the value of attribute investors_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def investors_total_items
  @investors_total_items
end

#iposObject (readonly)

Ipo



122
123
124
# File 'lib/crunchbase/organization.rb', line 122

def ipos
  @ipos
end

#ipos_total_itemsObject (readonly)

Returns the value of attribute ipos_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def ipos_total_items
  @ipos_total_items
end

#is_closedObject (readonly)

Returns the value of attribute is_closed.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def is_closed
  @is_closed
end

#logo_urlObject (readonly)

Setting current company logo



171
172
173
# File 'lib/crunchbase/organization.rb', line 171

def logo_url
  @logo_url
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def name
  @name
end

#new_itemsObject (readonly)

Returns the value of attribute new_items.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def new_items
  @new_items
end

#new_items_total_itemsObject (readonly)

Returns the value of attribute new_items_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def new_items_total_items
  @new_items_total_items
end

#num_employees_maxObject (readonly)

Returns the value of attribute num_employees_max.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def num_employees_max
  @num_employees_max
end

#num_employees_minObject (readonly)

Returns the value of attribute num_employees_min.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def num_employees_min
  @num_employees_min
end

#number_of_employeesObject (readonly)

Returns the value of attribute number_of_employees.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def number_of_employees
  @number_of_employees
end

#number_of_investmentsObject (readonly)

Returns the value of attribute number_of_investments.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def number_of_investments
  @number_of_investments
end

#officesObject (readonly)

Returns the value of attribute offices.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def offices
  @offices
end

#offices_total_itemsObject (readonly)

Returns the value of attribute offices_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def offices_total_items
  @offices_total_items
end

#past_teamsObject (readonly)

Get organization other relationship objects



142
143
144
# File 'lib/crunchbase/organization.rb', line 142

def past_teams
  @past_teams
end

#past_teams_total_itemsObject (readonly)

Get all relationship total_items_count



200
201
202
# File 'lib/crunchbase/organization.rb', line 200

def past_teams_total_items
  @past_teams_total_items
end

Returns the value of attribute permalink.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def permalink
  @permalink
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def phone_number
  @phone_number
end

#primary_imagesObject (readonly)

Returns the value of attribute primary_images.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def primary_images
  @primary_images
end

#primary_images_total_itemsObject (readonly)

Returns the value of attribute primary_images_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def primary_images_total_items
  @primary_images_total_items
end

#primary_roleObject (readonly)

Returns the value of attribute primary_role.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def primary_role
  @primary_role
end

#productsObject (readonly)

Product



132
133
134
# File 'lib/crunchbase/organization.rb', line 132

def products
  @products
end

#products_total_itemsObject (readonly)

Returns the value of attribute products_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def products_total_items
  @products_total_items
end

#role_companyObject (readonly)

Returns the value of attribute role_company.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def role_company
  @role_company
end

#role_investorObject (readonly)

Returns the value of attribute role_investor.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def role_investor
  @role_investor
end

#secondary_role_for_profitObject (readonly)

Returns the value of attribute secondary_role_for_profit.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def secondary_role_for_profit
  @secondary_role_for_profit
end

#short_descriptionObject (readonly)

Returns the value of attribute short_description.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def short_description
  @short_description
end

#stock_exchangeObject (readonly)

Returns the value of attribute stock_exchange.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def stock_exchange
  @stock_exchange
end

#stock_symbolObject (readonly)

Returns the value of attribute stock_symbol.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def stock_symbol
  @stock_symbol
end

#sub_organizationsObject (readonly)

Organization



137
138
139
# File 'lib/crunchbase/organization.rb', line 137

def sub_organizations
  @sub_organizations
end

#sub_organizations_total_itemsObject (readonly)

Returns the value of attribute sub_organizations_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def sub_organizations_total_items
  @sub_organizations_total_items
end

#total_funding_usdObject (readonly)

Returns the value of attribute total_funding_usd.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def total_funding_usd
  @total_funding_usd
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def type_name
  @type_name
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def updated_at
  @updated_at
end

#uuidObject (readonly)

Returns the value of attribute uuid.



11
12
13
# File 'lib/crunchbase/organization.rb', line 11

def uuid
  @uuid
end

#websitesObject (readonly)

Returns the value of attribute websites.



20
21
22
# File 'lib/crunchbase/organization.rb', line 20

def websites
  @websites
end

#websites_total_itemsObject (readonly)

Returns the value of attribute websites_total_items.



25
26
27
# File 'lib/crunchbase/organization.rb', line 25

def websites_total_items
  @websites_total_items
end