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_trust_code ⇒ Object
readonly
Returns the value of attribute announced_on_trust_code.
-
#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.
-
#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, #fetch, get, list, lists_for_permalink, search, total_items_from_list
Constructor Details
#initialize(json) ⇒ FundingRound
Returns a new instance of FundingRound.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/crunchbase/funding_round.rb', line 19 def initialize(json) @type_name = json['type'] properties = json['properties'] relationships = json['relationships'] @name = properties['name'] @funding_type = properties['funding_type'] @permalink = properties['permalink'] @money_raised_usd = properties['money_raised_usd'] @announced_on = properties['announced_on'] && DateTime.parse(properties['announced_on']) @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'] @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.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def announced_on @announced_on end |
#announced_on_trust_code ⇒ Object (readonly)
Returns the value of attribute announced_on_trust_code.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def announced_on_trust_code @announced_on_trust_code end |
#canonical_currency_code ⇒ Object (readonly)
Returns the value of attribute canonical_currency_code.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def canonical_currency_code @canonical_currency_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def created_at @created_at end |
#funded_organizations ⇒ Object (readonly)
Returns the value of attribute funded_organizations.
15 16 17 |
# File 'lib/crunchbase/funding_round.rb', line 15 def funded_organizations @funded_organizations end |
#funded_organizations_total_items ⇒ Object (readonly)
Returns the value of attribute funded_organizations_total_items.
17 18 19 |
# File 'lib/crunchbase/funding_round.rb', line 17 def funded_organizations_total_items @funded_organizations_total_items end |
#funding_type ⇒ Object (readonly)
Returns the value of attribute funding_type.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def funding_type @funding_type end |
#investments ⇒ Object (readonly)
Returns the value of attribute investments.
15 16 17 |
# File 'lib/crunchbase/funding_round.rb', line 15 def investments @investments end |
#investments_total_items ⇒ Object (readonly)
Returns the value of attribute investments_total_items.
17 18 19 |
# File 'lib/crunchbase/funding_round.rb', line 17 def investments_total_items @investments_total_items end |
#money_raised ⇒ Object (readonly)
Returns the value of attribute money_raised.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def money_raised @money_raised end |
#money_raised_currency_code ⇒ Object (readonly)
Returns the value of attribute money_raised_currency_code.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def money_raised_currency_code @money_raised_currency_code end |
#money_raised_usd ⇒ Object (readonly)
Returns the value of attribute money_raised_usd.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def money_raised_usd @money_raised_usd end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def name @name end |
#new_items ⇒ Object (readonly)
Returns the value of attribute new_items.
15 16 17 |
# File 'lib/crunchbase/funding_round.rb', line 15 def new_items @new_items end |
#new_items_total_items ⇒ Object (readonly)
Returns the value of attribute new_items_total_items.
17 18 19 |
# File 'lib/crunchbase/funding_round.rb', line 17 def new_items_total_items @new_items_total_items end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def permalink @permalink end |
#post_money_valuation_currency_code ⇒ Object (readonly)
Returns the value of attribute post_money_valuation_currency_code.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def post_money_valuation_currency_code @post_money_valuation_currency_code end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def type_name @type_name end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
10 11 12 |
# File 'lib/crunchbase/funding_round.rb', line 10 def updated_at @updated_at end |