Class: Crunchbase::FundingRound
- Defined in:
- lib/crunchbase/funding_round.rb
Constant Summary collapse
- RESOURCE_NAME =
'funding-round'
- RESOURCE_LIST =
'funding_rounds'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#announced_on ⇒ Object
readonly
Returns the value of attribute announced_on.
-
#announced_on_day ⇒ Object
readonly
Returns the value of attribute announced_on_day.
-
#announced_on_month ⇒ Object
readonly
Returns the value of attribute announced_on_month.
-
#announced_on_trust_code ⇒ Object
readonly
Returns the value of attribute announced_on_trust_code.
-
#announced_on_year ⇒ Object
readonly
Returns the value of attribute announced_on_year.
-
#canonical_currency_code ⇒ Object
readonly
Returns the value of attribute canonical_currency_code.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#funded_organizations ⇒ Object
readonly
Returns the value of attribute funded_organizations.
-
#funded_organizations_total_items ⇒ Object
readonly
Returns the value of attribute funded_organizations_total_items.
-
#funding_type ⇒ Object
readonly
Returns the value of attribute funding_type.
-
#investments ⇒ Object
readonly
Returns the value of attribute investments.
-
#investments_total_items ⇒ Object
readonly
Returns the value of attribute investments_total_items.
-
#money_raised ⇒ Object
readonly
Returns the value of attribute money_raised.
-
#money_raised_currency_code ⇒ Object
readonly
Returns the value of attribute money_raised_currency_code.
-
#money_raised_usd ⇒ Object
readonly
Returns the value of attribute money_raised_usd.
-
#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.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#post_money_valuation_currency_code ⇒ Object
readonly
Returns the value of attribute post_money_valuation_currency_code.
-
#post_money_valuation_usd ⇒ Object
readonly
Returns the value of attribute post_money_valuation_usd.
-
#pre_money_valuation ⇒ Object
readonly
Returns the value of attribute pre_money_valuation.
-
#pre_money_valuation_currency_code ⇒ Object
readonly
Returns the value of attribute pre_money_valuation_currency_code.
-
#pre_money_valuation_usd ⇒ Object
readonly
Returns the value of attribute pre_money_valuation_usd.
-
#series ⇒ Object
readonly
Returns the value of attribute series.
-
#target_money_raised_usd ⇒ Object
readonly
Returns the value of attribute target_money_raised_usd.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ FundingRound
constructor
A new instance of FundingRound.
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) ⇒ FundingRound
Returns a new instance of FundingRound.
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 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/crunchbase/funding_round.rb', line 22 def initialize(json) @type_name = json['type'] properties = json['properties'] relationships = json['relationships'] @name = properties['name'] @funding_type = properties['funding_type'] @permalink = properties['permalink'] @series = properties['series'] @money_raised_usd = properties['money_raised_usd'] if (properties['announced_on'].blank? || properties['announced_on'] == "0000-01-01") @announced_on = nil else @announced_on = DateTime.parse(properties['announced_on']) end @announced_on_year = properties['announced_on_year'] @announced_on_month = properties['announced_on_month'] @announced_on_day = properties['announced_on_day'] @announced_on_trust_code = properties['announced_on_trust_code'] @canonical_currency_code = properties['canonical_currency_code'] @money_raised = properties['money_raised'] @created_at = Time.at(properties['created_at']).utc @updated_at = Time.at(properties['updated_at']).utc @money_raised_currency_code = properties['money_raised_currency_code'] @post_money_valuation_currency_code = properties['post_money_valuation_currency_code'] @post_money_valuation_usd = properties['post_money_valuation_usd'] @target_money_raised_usd = properties['target_money_raised_usd'] @pre_money_valuation_usd = properties['pre_money_valuation_usd'] @pre_money_valuation = properties['pre_money_valuation'] @pre_money_valuation_currency_code = properties['pre_money_valuation_currency_code'] @investments_list = relationships['investments'] @funded_organizations_list = relationships['funded_organization'] @new_items_list = relationships['news'] end |
Instance Attribute Details
#announced_on ⇒ Object (readonly)
Returns the value of attribute announced_on.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def announced_on @announced_on end |
#announced_on_day ⇒ Object (readonly)
Returns the value of attribute announced_on_day.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def announced_on_day @announced_on_day end |
#announced_on_month ⇒ Object (readonly)
Returns the value of attribute announced_on_month.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def announced_on_month @announced_on_month end |
#announced_on_trust_code ⇒ Object (readonly)
Returns the value of attribute announced_on_trust_code.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def announced_on_trust_code @announced_on_trust_code end |
#announced_on_year ⇒ Object (readonly)
Returns the value of attribute announced_on_year.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def announced_on_year @announced_on_year end |
#canonical_currency_code ⇒ Object (readonly)
Returns the value of attribute canonical_currency_code.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def canonical_currency_code @canonical_currency_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def created_at @created_at end |
#funded_organizations ⇒ Object (readonly)
Returns the value of attribute funded_organizations.
18 19 20 |
# File 'lib/crunchbase/funding_round.rb', line 18 def funded_organizations @funded_organizations end |
#funded_organizations_total_items ⇒ Object (readonly)
Returns the value of attribute funded_organizations_total_items.
20 21 22 |
# File 'lib/crunchbase/funding_round.rb', line 20 def funded_organizations_total_items @funded_organizations_total_items end |
#funding_type ⇒ Object (readonly)
Returns the value of attribute funding_type.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def funding_type @funding_type end |
#investments ⇒ Object (readonly)
Returns the value of attribute investments.
18 19 20 |
# File 'lib/crunchbase/funding_round.rb', line 18 def investments @investments end |
#investments_total_items ⇒ Object (readonly)
Returns the value of attribute investments_total_items.
20 21 22 |
# File 'lib/crunchbase/funding_round.rb', line 20 def investments_total_items @investments_total_items end |
#money_raised ⇒ Object (readonly)
Returns the value of attribute money_raised.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def money_raised @money_raised end |
#money_raised_currency_code ⇒ Object (readonly)
Returns the value of attribute money_raised_currency_code.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def money_raised_currency_code @money_raised_currency_code end |
#money_raised_usd ⇒ Object (readonly)
Returns the value of attribute money_raised_usd.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def money_raised_usd @money_raised_usd end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def name @name end |
#new_items ⇒ Object (readonly)
Returns the value of attribute new_items.
18 19 20 |
# File 'lib/crunchbase/funding_round.rb', line 18 def new_items @new_items end |
#new_items_total_items ⇒ Object (readonly)
Returns the value of attribute new_items_total_items.
20 21 22 |
# File 'lib/crunchbase/funding_round.rb', line 20 def new_items_total_items @new_items_total_items end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def permalink @permalink end |
#post_money_valuation_currency_code ⇒ Object (readonly)
Returns the value of attribute post_money_valuation_currency_code.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def post_money_valuation_currency_code @post_money_valuation_currency_code end |
#post_money_valuation_usd ⇒ Object (readonly)
Returns the value of attribute post_money_valuation_usd.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def post_money_valuation_usd @post_money_valuation_usd end |
#pre_money_valuation ⇒ Object (readonly)
Returns the value of attribute pre_money_valuation.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def pre_money_valuation @pre_money_valuation end |
#pre_money_valuation_currency_code ⇒ Object (readonly)
Returns the value of attribute pre_money_valuation_currency_code.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def pre_money_valuation_currency_code @pre_money_valuation_currency_code end |
#pre_money_valuation_usd ⇒ Object (readonly)
Returns the value of attribute pre_money_valuation_usd.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def pre_money_valuation_usd @pre_money_valuation_usd end |
#series ⇒ Object (readonly)
Returns the value of attribute series.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def series @series end |
#target_money_raised_usd ⇒ Object (readonly)
Returns the value of attribute target_money_raised_usd.
11 12 13 |
# File 'lib/crunchbase/funding_round.rb', line 11 def target_money_raised_usd @target_money_raised_usd end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
11 12 13 |
# File 'lib/crunchbase/funding_round.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/funding_round.rb', line 11 def updated_at @updated_at end |