Class: Crunchbase::Organization
- Defined in:
- lib/crunchbase/organization.rb
Constant Summary collapse
- RESOURCE_NAME =
'organization'
- RESOURCE_LIST =
'organizations'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#acquisitions ⇒ Object
readonly
Acquisition.
-
#acquisitions_total_items ⇒ Object
readonly
Returns the value of attribute acquisitions_total_items.
-
#board_members_and_advisors ⇒ Object
readonly
Returns the value of attribute board_members_and_advisors.
-
#board_members_and_advisors_total_items ⇒ Object
readonly
Returns the value of attribute board_members_and_advisors_total_items.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#categories_total_items ⇒ Object
readonly
Returns the value of attribute categories_total_items.
-
#closed_on ⇒ Object
readonly
Returns the value of attribute closed_on.
-
#closed_on_day ⇒ Object
readonly
Returns the value of attribute closed_on_day.
-
#closed_on_month ⇒ Object
readonly
Returns the value of attribute closed_on_month.
-
#closed_on_trust_code ⇒ Object
readonly
Returns the value of attribute closed_on_trust_code.
-
#closed_on_year ⇒ Object
readonly
Returns the value of attribute closed_on_year.
-
#competitors ⇒ Object
readonly
Organization.
-
#competitors_total_items ⇒ Object
readonly
Returns the value of attribute competitors_total_items.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#current_teams ⇒ Object
readonly
Returns the value of attribute current_teams.
-
#current_teams_total_items ⇒ Object
readonly
Returns the value of attribute current_teams_total_items.
-
#customers ⇒ Object
readonly
Organization.
-
#customers_total_items ⇒ Object
readonly
Returns the value of attribute customers_total_items.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#email_address ⇒ Object
readonly
Returns the value of attribute email_address.
-
#founded_on ⇒ Object
readonly
Returns the value of attribute founded_on.
-
#founded_on_day ⇒ Object
readonly
Returns the value of attribute founded_on_day.
-
#founded_on_month ⇒ Object
readonly
Returns the value of attribute founded_on_month.
-
#founded_on_trust_code ⇒ Object
readonly
Returns the value of attribute founded_on_trust_code.
-
#founded_on_year ⇒ Object
readonly
Returns the value of attribute founded_on_year.
-
#founders ⇒ Object
readonly
Person.
-
#founders_total_items ⇒ Object
readonly
Returns the value of attribute founders_total_items.
-
#funding_rounds ⇒ Object
readonly
FundingRound.
-
#funding_rounds_total_items ⇒ Object
readonly
Returns the value of attribute funding_rounds_total_items.
-
#headquarters ⇒ Object
readonly
Returns the value of attribute headquarters.
-
#headquarters_total_items ⇒ Object
readonly
Returns the value of attribute headquarters_total_items.
-
#homepage_url ⇒ Object
readonly
Returns the value of attribute homepage_url.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#images_total_items ⇒ Object
readonly
Returns the value of attribute images_total_items.
-
#investments ⇒ Object
readonly
Returns the value of attribute investments.
-
#investments_total_items ⇒ Object
readonly
Returns the value of attribute investments_total_items.
-
#ipos ⇒ Object
readonly
Ipo.
-
#ipos_total_items ⇒ Object
readonly
Returns the value of attribute ipos_total_items.
-
#is_closed ⇒ Object
readonly
Returns the value of attribute is_closed.
-
#logo_url ⇒ Object
readonly
Setting current company logo.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#new_items ⇒ Object
readonly
Returns the value of attribute new_items.
-
#new_items_total_items ⇒ Object
readonly
Returns the value of attribute new_items_total_items.
-
#number_of_employees ⇒ Object
readonly
Returns the value of attribute number_of_employees.
-
#number_of_investments ⇒ Object
readonly
Returns the value of attribute number_of_investments.
-
#offices ⇒ Object
readonly
Returns the value of attribute offices.
-
#offices_total_items ⇒ Object
readonly
Returns the value of attribute offices_total_items.
-
#past_teams ⇒ Object
readonly
Get organization other relationship objects.
-
#past_teams_total_items ⇒ Object
readonly
Get all relationship total_items_count.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#primary_images ⇒ Object
readonly
Returns the value of attribute primary_images.
-
#primary_images_total_items ⇒ Object
readonly
Returns the value of attribute primary_images_total_items.
-
#primary_role ⇒ Object
readonly
Returns the value of attribute primary_role.
-
#products ⇒ Object
readonly
Product.
-
#products_total_items ⇒ Object
readonly
Returns the value of attribute products_total_items.
-
#role_company ⇒ Object
readonly
Returns the value of attribute role_company.
-
#role_investor ⇒ Object
readonly
Returns the value of attribute role_investor.
-
#short_description ⇒ Object
readonly
Returns the value of attribute short_description.
-
#stock_exchange ⇒ Object
readonly
Returns the value of attribute stock_exchange.
-
#stock_symbol ⇒ Object
readonly
Returns the value of attribute stock_symbol.
-
#sub_organizations ⇒ Object
readonly
Organization.
-
#sub_organizations_total_items ⇒ Object
readonly
Returns the value of attribute sub_organizations_total_items.
-
#total_funding_usd ⇒ Object
readonly
Returns the value of attribute total_funding_usd.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
-
#websites ⇒ Object
readonly
Returns the value of attribute websites.
-
#websites_total_items ⇒ Object
readonly
Returns the value of attribute websites_total_items.
Instance Method Summary collapse
-
#initialize(json) ⇒ Organization
constructor
A new instance of Organization.
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
#acquisitions ⇒ Object (readonly)
Acquisition
118 119 120 |
# File 'lib/crunchbase/organization.rb', line 118 def acquisitions @acquisitions end |
#acquisitions_total_items ⇒ Object (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_advisors ⇒ Object (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_items ⇒ Object (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 |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
19 20 21 |
# File 'lib/crunchbase/organization.rb', line 19 def categories @categories end |
#categories_total_items ⇒ Object (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_on ⇒ Object (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_day ⇒ Object (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_month ⇒ Object (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_code ⇒ Object (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_year ⇒ Object (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 |
#competitors ⇒ Object (readonly)
Organization
93 94 95 |
# File 'lib/crunchbase/organization.rb', line 93 def competitors @competitors end |
#competitors_total_items ⇒ Object (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_at ⇒ Object (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_teams ⇒ Object (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_items ⇒ Object (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 |
#customers ⇒ Object (readonly)
Organization
98 99 100 |
# File 'lib/crunchbase/organization.rb', line 98 def customers @customers end |
#customers_total_items ⇒ Object (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 |
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/crunchbase/organization.rb', line 11 def description @description end |
#email_address ⇒ Object (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_on ⇒ Object (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_day ⇒ Object (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_month ⇒ Object (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_code ⇒ Object (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_year ⇒ Object (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 |
#founders ⇒ Object (readonly)
Person
103 104 105 |
# File 'lib/crunchbase/organization.rb', line 103 def founders @founders end |
#founders_total_items ⇒ Object (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_rounds ⇒ Object (readonly)
FundingRound
108 109 110 |
# File 'lib/crunchbase/organization.rb', line 108 def funding_rounds @funding_rounds end |
#funding_rounds_total_items ⇒ Object (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 |
#headquarters ⇒ Object (readonly)
Returns the value of attribute headquarters.
19 20 21 |
# File 'lib/crunchbase/organization.rb', line 19 def headquarters @headquarters end |
#headquarters_total_items ⇒ Object (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_url ⇒ Object (readonly)
Returns the value of attribute homepage_url.
11 12 13 |
# File 'lib/crunchbase/organization.rb', line 11 def homepage_url @homepage_url end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
19 20 21 |
# File 'lib/crunchbase/organization.rb', line 19 def images @images end |
#images_total_items ⇒ Object (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 |
#investments ⇒ Object (readonly)
Returns the value of attribute investments.
19 20 21 |
# File 'lib/crunchbase/organization.rb', line 19 def investments @investments end |
#investments_total_items ⇒ Object (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 |
#ipos ⇒ Object (readonly)
Ipo
113 114 115 |
# File 'lib/crunchbase/organization.rb', line 113 def ipos @ipos end |
#ipos_total_items ⇒ Object (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_closed ⇒ Object (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_url ⇒ Object (readonly)
Setting current company logo
162 163 164 |
# File 'lib/crunchbase/organization.rb', line 162 def logo_url @logo_url end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/crunchbase/organization.rb', line 11 def name @name end |
#new_items ⇒ Object (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_items ⇒ Object (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_employees ⇒ Object (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_investments ⇒ Object (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 |
#offices ⇒ Object (readonly)
Returns the value of attribute offices.
19 20 21 |
# File 'lib/crunchbase/organization.rb', line 19 def offices @offices end |
#offices_total_items ⇒ Object (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_teams ⇒ Object (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_items ⇒ Object (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 |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
11 12 13 |
# File 'lib/crunchbase/organization.rb', line 11 def permalink @permalink end |
#primary_images ⇒ Object (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_items ⇒ Object (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_role ⇒ Object (readonly)
Returns the value of attribute primary_role.
11 12 13 |
# File 'lib/crunchbase/organization.rb', line 11 def primary_role @primary_role end |
#products ⇒ Object (readonly)
Product
123 124 125 |
# File 'lib/crunchbase/organization.rb', line 123 def products @products end |
#products_total_items ⇒ Object (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_company ⇒ Object (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_investor ⇒ Object (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_description ⇒ Object (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_exchange ⇒ Object (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_symbol ⇒ Object (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_organizations ⇒ Object (readonly)
Organization
128 129 130 |
# File 'lib/crunchbase/organization.rb', line 128 def sub_organizations @sub_organizations end |
#sub_organizations_total_items ⇒ Object (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_usd ⇒ Object (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_name ⇒ Object (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_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
11 12 13 |
# File 'lib/crunchbase/organization.rb', line 11 def updated_at @updated_at end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
11 12 13 |
# File 'lib/crunchbase/organization.rb', line 11 def uuid @uuid end |
#websites ⇒ Object (readonly)
Returns the value of attribute websites.
19 20 21 |
# File 'lib/crunchbase/organization.rb', line 19 def websites @websites end |
#websites_total_items ⇒ Object (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 |