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

Constructor Details

#initialize(json) ⇒ Organization



33
34
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
# File 'lib/crunchbase/organization.rb', line 33

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']
  @closed_on_day          = properties['founded_on_day']
  @closed_on_month        = properties['founded_on_month']
  @closed_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_trust_code   = properties['closed_on_trust_code']
  @email_address          = properties['email_address']
  @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'])
  @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']
  @created_at             = Time.at(properties['created_at']).utc
  @updated_at             = Time.at(properties['updated_at']).utc

  @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']
end

Instance Attribute Details

#acquisitionsObject (readonly)

Acquisition



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

def acquisitions
  @acquisitions
end

#acquisitions_total_itemsObject (readonly)

Returns the value of attribute acquisitions_total_items.



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

def acquisitions_total_items
  @acquisitions_total_items
end

#board_members_and_advisorsObject (readonly)

Returns the value of attribute board_members_and_advisors.



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

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.



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

def board_members_and_advisors_total_items
  @board_members_and_advisors_total_items
end

#categoriesObject (readonly)

Returns the value of attribute categories.



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

def categories
  @categories
end

#categories_total_itemsObject (readonly)

Returns the value of attribute categories_total_items.



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

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



93
94
95
# File 'lib/crunchbase/organization.rb', line 93

def competitors
  @competitors
end

#competitors_total_itemsObject (readonly)

Returns the value of attribute competitors_total_items.



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

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.



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

def current_teams
  @current_teams
end

#current_teams_total_itemsObject (readonly)

Returns the value of attribute current_teams_total_items.



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

def current_teams_total_items
  @current_teams_total_items
end

#customersObject (readonly)

Organization



98
99
100
# File 'lib/crunchbase/organization.rb', line 98

def customers
  @customers
end

#customers_total_itemsObject (readonly)

Returns the value of attribute customers_total_items.



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

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



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

def founders
  @founders
end

#founders_total_itemsObject (readonly)

Returns the value of attribute founders_total_items.



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

def founders_total_items
  @founders_total_items
end

#funding_roundsObject (readonly)

FundingRound



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

def funding_rounds
  @funding_rounds
end

#funding_rounds_total_itemsObject (readonly)

Returns the value of attribute funding_rounds_total_items.



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

def funding_rounds_total_items
  @funding_rounds_total_items
end

#headquartersObject (readonly)

Returns the value of attribute headquarters.



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

def headquarters
  @headquarters
end

#headquarters_total_itemsObject (readonly)

Returns the value of attribute headquarters_total_items.



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

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.



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

def images
  @images
end

#images_total_itemsObject (readonly)

Returns the value of attribute images_total_items.



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

def images_total_items
  @images_total_items
end

#investmentsObject (readonly)

Returns the value of attribute investments.



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

def investments
  @investments
end

#investments_total_itemsObject (readonly)

Returns the value of attribute investments_total_items.



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

def investments_total_items
  @investments_total_items
end

#iposObject (readonly)

Ipo



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

def ipos
  @ipos
end

#ipos_total_itemsObject (readonly)

Returns the value of attribute ipos_total_items.



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

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



162
163
164
# File 'lib/crunchbase/organization.rb', line 162

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.



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

def new_items
  @new_items
end

#new_items_total_itemsObject (readonly)

Returns the value of attribute new_items_total_items.



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

def new_items_total_items
  @new_items_total_items
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.



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

def offices
  @offices
end

#offices_total_itemsObject (readonly)

Returns the value of attribute offices_total_items.



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

def offices_total_items
  @offices_total_items
end

#past_teamsObject (readonly)

Get organization other relationship objects



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

def past_teams
  @past_teams
end

#past_teams_total_itemsObject (readonly)

Get all relationship total_items_count



183
184
185
# File 'lib/crunchbase/organization.rb', line 183

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

#primary_imagesObject (readonly)

Returns the value of attribute primary_images.



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

def primary_images
  @primary_images
end

#primary_images_total_itemsObject (readonly)

Returns the value of attribute primary_images_total_items.



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

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



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

def products
  @products
end

#products_total_itemsObject (readonly)

Returns the value of attribute products_total_items.



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

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

#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



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

def sub_organizations
  @sub_organizations
end

#sub_organizations_total_itemsObject (readonly)

Returns the value of attribute sub_organizations_total_items.



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

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.



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

def websites
  @websites
end

#websites_total_itemsObject (readonly)

Returns the value of attribute websites_total_items.



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

def websites_total_items
  @websites_total_items
end