Class: Crunchbase::Model::Organization

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

Constant Summary collapse

RESOURCE_LIST =
RESOURCE_NAME = 'organizations'

Instance Attribute Summary collapse

Attributes inherited from Entity

#type_name, #uuid

Instance Method Summary collapse

Methods inherited from Entity

array_from_list, #fetch, funding_rounds_lists, get, list, organization_lists, parsing_from_list, person_lists, total_items_from_list

Constructor Details

#initialize(json) ⇒ Organization

Returns a new instance of Organization.



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

def initialize(json)
  super

  unless (relationships = json['relationships']).nil?

    set_relationships_object(Crunchbase::Model::PrimaryImage, 'primary_image', relationships['primary_image'])
    set_relationships_object(Crunchbase::Model::Founder, 'founders', relationships['founders'])
    set_relationships_object(Crunchbase::Model::CurrentTeam, 'current_team', relationships['current_team'])
    set_relationships_object(Crunchbase::Model::Investor, 'investors', relationships['investors'])
    set_relationships_object(Crunchbase::Model::OwnedBy, 'owned_by', relationships['owned_by'])
    set_relationships_object(Crunchbase::Model::SubOrganization, 'sub_organizations', relationships['sub_organizations'])
    set_relationships_object(Crunchbase::Model::Headquarter, 'headquarters', relationships['headquarters'])
    set_relationships_object(Crunchbase::Model::Office, 'offices', relationships['offices'])
    set_relationships_object(Crunchbase::Model::Product, 'products', relationships['products'])
    set_relationships_object(Crunchbase::Model::Category, 'categories', relationships['categories'])
    set_relationships_object(Crunchbase::Model::Customer, 'customers', relationships['customers'])
    set_relationships_object(Crunchbase::Model::Competitor, 'competitors', relationships['competitors'])
    # set_relationships_object(PrimaryImage, 'members', relationships['members'])
    set_relationships_object(Crunchbase::Model::Membership, 'memberships', relationships['memberships'])
    set_relationships_object(Crunchbase::Model::FundingRound, 'funding_rounds', relationships['funding_rounds'])
    set_relationships_object(Crunchbase::Model::Investment, 'investments', relationships['investments'])
    set_relationships_object(Crunchbase::Model::Acquisition, 'acquisitions', relationships['acquisitions'])
    set_relationships_object(Crunchbase::Model::AcquiredBy, 'acquired_by', relationships['acquired_by'])
    set_relationships_object(Crunchbase::Model::Ipo, 'ipo', relationships['ipo'])
    set_relationships_object(Crunchbase::Model::Fund, 'funds', relationships['funds'])
    set_relationships_object(Crunchbase::Model::Website, 'websites', relationships['websites'])
    set_relationships_object(Crunchbase::Model::Image, 'images', relationships['images'])
    set_relationships_object(Crunchbase::Model::Video, 'videos', relationships['videos'])
    set_relationships_object(Crunchbase::Model::New, 'news', relationships['news'])
  end
end

Instance Attribute Details

#acquired_byObject (readonly)

Returns the value of attribute acquired_by.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def acquired_by
  @acquired_by
end

#acquired_by_total_itemsObject (readonly)

Returns the value of attribute acquired_by_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def acquired_by_total_items
  @acquired_by_total_items
end

#acquisitionsObject (readonly)

Returns the value of attribute acquisitions.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def acquisitions
  @acquisitions
end

#acquisitions_total_itemsObject (readonly)

Returns the value of attribute acquisitions_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def acquisitions_total_items
  @acquisitions_total_items
end

#also_known_asObject (readonly)

Returns the value of attribute also_known_as.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def also_known_as
  @also_known_as
end

#api_pathObject (readonly)

Returns the value of attribute api_path.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def api_path
  @api_path
end

#board_members_and_advisorsObject (readonly)

Returns the value of attribute board_members_and_advisors.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

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.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def board_members_and_advisors_total_items
  @board_members_and_advisors_total_items
end

#categoriesObject (readonly)

Returns the value of attribute categories.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def categories
  @categories
end

#categories_total_itemsObject (readonly)

Returns the value of attribute categories_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def categories_total_items
  @categories_total_items
end

#closed_onObject (readonly)

Returns the value of attribute closed_on.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def closed_on
  @closed_on
end

#closed_on_trust_codeObject (readonly)

Returns the value of attribute closed_on_trust_code.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def closed_on_trust_code
  @closed_on_trust_code
end

#competitorsObject (readonly)

Returns the value of attribute competitors.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def competitors
  @competitors
end

#competitors_total_itemsObject (readonly)

Returns the value of attribute competitors_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def competitors_total_items
  @competitors_total_items
end

#created_atObject (readonly)

Returns the value of attribute created_at.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def created_at
  @created_at
end

#current_teamObject (readonly)

Returns the value of attribute current_team.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def current_team
  @current_team
end

#current_team_total_itemsObject (readonly)

Returns the value of attribute current_team_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def current_team_total_items
  @current_team_total_items
end

#customersObject (readonly)

Returns the value of attribute customers.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def customers
  @customers
end

#customers_total_itemsObject (readonly)

Returns the value of attribute customers_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def customers_total_items
  @customers_total_items
end

#descriptionObject (readonly)

Returns the value of attribute description.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def description
  @description
end

#founded_onObject (readonly)

Returns the value of attribute founded_on.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def founded_on
  @founded_on
end

#founded_on_trust_codeObject (readonly)

Returns the value of attribute founded_on_trust_code.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def founded_on_trust_code
  @founded_on_trust_code
end

#foundersObject (readonly)

Returns the value of attribute founders.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def founders
  @founders
end

#founders_total_itemsObject (readonly)

Returns the value of attribute founders_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def founders_total_items
  @founders_total_items
end

#funding_roundsObject (readonly)

Returns the value of attribute funding_rounds.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def funding_rounds
  @funding_rounds
end

#funding_rounds_total_itemsObject (readonly)

Returns the value of attribute funding_rounds_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def funding_rounds_total_items
  @funding_rounds_total_items
end

#fundsObject (readonly)

Returns the value of attribute funds.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def funds
  @funds
end

#funds_total_itemsObject (readonly)

Returns the value of attribute funds_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def funds_total_items
  @funds_total_items
end

#headquartersObject (readonly)

Returns the value of attribute headquarters.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def headquarters
  @headquarters
end

#headquarters_total_itemsObject (readonly)

Returns the value of attribute headquarters_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def headquarters_total_items
  @headquarters_total_items
end

#homepage_urlObject (readonly)

Returns the value of attribute homepage_url.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def homepage_url
  @homepage_url
end

#imagesObject (readonly)

Returns the value of attribute images.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def images
  @images
end

#images_total_itemsObject (readonly)

Returns the value of attribute images_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def images_total_items
  @images_total_items
end

#investmentsObject (readonly)

Returns the value of attribute investments.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def investments
  @investments
end

#investments_total_itemsObject (readonly)

Returns the value of attribute investments_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def investments_total_items
  @investments_total_items
end

#investorsObject (readonly)

Returns the value of attribute investors.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def investors
  @investors
end

#investors_total_itemsObject (readonly)

Returns the value of attribute investors_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def investors_total_items
  @investors_total_items
end

#ipoObject (readonly)

Returns the value of attribute ipo.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def ipo
  @ipo
end

#ipo_total_itemsObject (readonly)

Returns the value of attribute ipo_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def ipo_total_items
  @ipo_total_items
end

#is_closedObject (readonly)

Returns the value of attribute is_closed.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def is_closed
  @is_closed
end

#membersObject (readonly)

Returns the value of attribute members.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def members
  @members
end

#members_total_itemsObject (readonly)

Returns the value of attribute members_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def members_total_items
  @members_total_items
end

#membershipsObject (readonly)

Returns the value of attribute memberships.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def memberships
  @memberships
end

#memberships_total_itemsObject (readonly)

Returns the value of attribute memberships_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def memberships_total_items
  @memberships_total_items
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def name
  @name
end

#newsObject (readonly)

Returns the value of attribute news.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def news
  @news
end

#news_total_itemsObject (readonly)

Returns the value of attribute news_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def news_total_items
  @news_total_items
end

#num_employees_maxObject (readonly)

Returns the value of attribute num_employees_max.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def num_employees_max
  @num_employees_max
end

#num_employees_minObject (readonly)

Returns the value of attribute num_employees_min.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def num_employees_min
  @num_employees_min
end

#number_of_investmentsObject (readonly)

Returns the value of attribute number_of_investments.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def number_of_investments
  @number_of_investments
end

#officesObject (readonly)

Returns the value of attribute offices.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def offices
  @offices
end

#offices_total_itemsObject (readonly)

Returns the value of attribute offices_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def offices_total_items
  @offices_total_items
end

#owned_byObject (readonly)

Returns the value of attribute owned_by.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def owned_by
  @owned_by
end

#owned_by_total_itemsObject (readonly)

Returns the value of attribute owned_by_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def owned_by_total_items
  @owned_by_total_items
end

#past_teamObject (readonly)

Returns the value of attribute past_team.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def past_team
  @past_team
end

#past_team_total_itemsObject (readonly)

Returns the value of attribute past_team_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def past_team_total_items
  @past_team_total_items
end

Returns the value of attribute permalink.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def permalink
  @permalink
end

#primary_imageObject (readonly)

Returns the value of attribute primary_image.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def primary_image
  @primary_image
end

#primary_image_total_itemsObject (readonly)

Returns the value of attribute primary_image_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def primary_image_total_items
  @primary_image_total_items
end

#primary_roleObject (readonly)

Returns the value of attribute primary_role.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def primary_role
  @primary_role
end

#productsObject (readonly)

Returns the value of attribute products.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def products
  @products
end

#products_total_itemsObject (readonly)

Returns the value of attribute products_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def products_total_items
  @products_total_items
end

#role_companyObject (readonly)

Returns the value of attribute role_company.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def role_company
  @role_company
end

#role_groupObject (readonly)

Returns the value of attribute role_group.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def role_group
  @role_group
end

#role_investorObject (readonly)

Returns the value of attribute role_investor.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def role_investor
  @role_investor
end

#role_schoolObject (readonly)

Returns the value of attribute role_school.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def role_school
  @role_school
end

#short_descriptionObject (readonly)

Returns the value of attribute short_description.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def short_description
  @short_description
end

#stock_exchangeObject (readonly)

Returns the value of attribute stock_exchange.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def stock_exchange
  @stock_exchange
end

#stock_symbolObject (readonly)

Returns the value of attribute stock_symbol.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def stock_symbol
  @stock_symbol
end

#sub_organizationsObject (readonly)

Returns the value of attribute sub_organizations.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def sub_organizations
  @sub_organizations
end

#sub_organizations_total_itemsObject (readonly)

Returns the value of attribute sub_organizations_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def sub_organizations_total_items
  @sub_organizations_total_items
end

#total_funding_usdObject (readonly)

Returns the value of attribute total_funding_usd.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def total_funding_usd
  @total_funding_usd
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def updated_at
  @updated_at
end

#videosObject (readonly)

Returns the value of attribute videos.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def videos
  @videos
end

#videos_total_itemsObject (readonly)

Returns the value of attribute videos_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def videos_total_items
  @videos_total_items
end

#web_pathObject (readonly)

Returns the value of attribute web_path.



8
9
10
# File 'lib/crunchbase/model/organization.rb', line 8

def web_path
  @web_path
end

#websitesObject (readonly)

Returns the value of attribute websites.



17
18
19
# File 'lib/crunchbase/model/organization.rb', line 17

def websites
  @websites
end

#websites_total_itemsObject (readonly)

Returns the value of attribute websites_total_items.



22
23
24
# File 'lib/crunchbase/model/organization.rb', line 22

def websites_total_items
  @websites_total_items
end

Instance Method Details

#date_keysObject



76
77
78
# File 'lib/crunchbase/model/organization.rb', line 76

def date_keys
  %w[founded_on closed_on]
end

#property_keysObject



64
65
66
67
68
69
70
71
72
73
74
# File 'lib/crunchbase/model/organization.rb', line 64

def property_keys
  %w[
    permalink api_path web_path name also_known_as short_description description 
    primary_role role_company role_investor role_group role_school 
    founded_on founded_on_trust_code is_closed closed_on closed_on_trust_code 
    num_employees_min num_employees_max total_funding_usd 
    stock_exchange stock_symbol 
    number_of_investments homepage_url 
    created_at updated_at
  ]
end