Class: Crunchbase::FinancialOrganization

Inherits:
CB_Object
  • Object
show all
Includes:
DateMethods
Defined in:
lib/crunchbase/financial_organization.rb

Overview

Represents a Financial Organization listed in the Crunchbase.

Constant Summary collapse

ENT_NAME =
"financial-organization"
ENT_PLURAL =
"financial-organizations"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DateMethods

#date_from_components

Methods inherited from CB_Object

#===, #aliases, all, find, get, #tags

Constructor Details

#initialize(json) ⇒ FinancialOrganization

Returns a new instance of FinancialOrganization.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/crunchbase/financial_organization.rb', line 17

def initialize(json)
  @name = json['name']
  @permalink = json['permalink']
  @crunchbase_url = json['crunchbase_url']
  @homepage_url = json['homepage_url']
  @blog_url = json['blog_url']
  @blog_feed_url = json['blog_feed_url']
  @twitter_username = json['twitter_username']
  @phone_number = json['phone_number']
  @description = json['description']
  @email_address = json['email_address']
  @number_of_employees = json['number_of_employees']
  @founded_year = json['founded_year']
  @founded_month = json['founded_month']
  @founded_day = json['founded_day']
  @tag_list = json['tag_list']
  @alias_list = json['alias_list']
  @created_at = DateTime.parse(json["created_at"])
  @updated_at = DateTime.parse(json["updated_at"])
  @overview = json['overview']
  @image = json['image']
  @offices = json['offices']
  @relationships = Relationship.array_from_relationship_list(json["relationships"]) if json["relationships"]
  @investments = Investment.array_from_investment_list(json['investments']) if json['investments']
  @milestones = json['milestones']
  @providerships = Relationship.array_from_relationship_list(json['providerships']) if json["providerships"]
  @funds = json['funds']
  @video_embeds = json['video_embeds']
  @external_links = json['external_links']
end

Instance Attribute Details

#blog_feed_urlObject (readonly)

Returns the value of attribute blog_feed_url.



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

def blog_feed_url
  @blog_feed_url
end

#blog_urlObject (readonly)

Returns the value of attribute blog_url.



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

def blog_url
  @blog_url
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#crunchbase_urlObject (readonly)

Returns the value of attribute crunchbase_url.



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

def crunchbase_url
  @crunchbase_url
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#email_addressObject (readonly)

Returns the value of attribute email_address.



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

def email_address
  @email_address
end

Returns the value of attribute external_links.



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

def external_links
  @external_links
end

#fundsObject (readonly)

Returns the value of attribute funds.



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

def funds
  @funds
end

#homepage_urlObject (readonly)

Returns the value of attribute homepage_url.



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

def homepage_url
  @homepage_url
end

#imageObject (readonly)

Returns the value of attribute image.



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

def image
  @image
end

#investmentsObject (readonly)

Returns the value of attribute investments.



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

def investments
  @investments
end

#milestonesObject (readonly)

Returns the value of attribute milestones.



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

def milestones
  @milestones
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#number_of_employeesObject (readonly)

Returns the value of attribute number_of_employees.



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

def number_of_employees
  @number_of_employees
end

#officesObject (readonly)

Returns the value of attribute offices.



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

def offices
  @offices
end

#overviewObject (readonly)

Returns the value of attribute overview.



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

def overview
  @overview
end

Returns the value of attribute permalink.



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

def permalink
  @permalink
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



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

def phone_number
  @phone_number
end

#providershipsObject (readonly)

Returns the value of attribute providerships.



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

def providerships
  @providerships
end

#relationshipsObject (readonly)

Returns the value of attribute relationships.



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

def relationships
  @relationships
end

#twitter_usernameObject (readonly)

Returns the value of attribute twitter_username.



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

def twitter_username
  @twitter_username
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#video_embedsObject (readonly)

Returns the value of attribute video_embeds.



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

def video_embeds
  @video_embeds
end

Instance Method Details

#foundedObject

Returns the date the financial org was founded, or nil if not provided.



49
50
51
# File 'lib/crunchbase/financial_organization.rb', line 49

def founded
  @founded ||= date_from_components(@founded_year, @founded_month, @founded_day)    
end