Class: Crunchbase::Model::FundingRound
- Defined in:
- lib/crunchbase/model/funding_round.rb
Constant Summary collapse
- RESOURCE_LIST =
'funding_rounds'.freeze
- RESOURCE_NAME =
'funding-rounds'.freeze
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.
-
#api_path ⇒ Object
readonly
Returns the value of attribute api_path.
-
#closed_on ⇒ Object
readonly
Returns the value of attribute closed_on.
-
#closed_on_trust_code ⇒ Object
readonly
Returns the value of attribute closed_on_trust_code.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#funded_organization ⇒ Object
readonly
Returns the value of attribute funded_organization.
-
#funded_organization_total_items ⇒ Object
readonly
Returns the value of attribute funded_organization_total_items.
-
#funding_type ⇒ Object
readonly
Returns the value of attribute funding_type.
-
#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.
-
#investors ⇒ Object
readonly
Returns the value of attribute investors.
-
#investors_total_items ⇒ Object
readonly
Returns the value of attribute investors_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.
-
#news ⇒ Object
readonly
Returns the value of attribute news.
-
#news_total_items ⇒ Object
readonly
Returns the value of attribute news_total_items.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#series ⇒ Object
readonly
Returns the value of attribute series.
-
#series_qualifier ⇒ Object
readonly
Returns the value of attribute series_qualifier.
-
#target_money_raised ⇒ Object
readonly
Returns the value of attribute target_money_raised.
-
#target_money_raised_currency_code ⇒ Object
readonly
Returns the value of attribute target_money_raised_currency_code.
-
#target_money_raised_usd ⇒ Object
readonly
Returns the value of attribute target_money_raised_usd.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#videos ⇒ Object
readonly
Returns the value of attribute videos.
-
#videos_total_items ⇒ Object
readonly
Returns the value of attribute videos_total_items.
-
#web_path ⇒ Object
readonly
Returns the value of attribute web_path.
Attributes inherited from Entity
Instance Method Summary collapse
- #date_keys ⇒ Object
-
#initialize(json) ⇒ FundingRound
constructor
A new instance of FundingRound.
- #property_keys ⇒ Object
- #relationship_lists ⇒ Object
- #relationship_with_funded(funded_organization) ⇒ Object
Methods inherited from Entity
#convert_date!, #fetch, #instance_multi_relationship_objects, #instance_relationships_object, #instance_timestamps, #one_to_many, #one_to_one, #parse_hash_items, #set_relationships_object, #set_variables, #setup_relationships_data!, #special_relationship, #verify_item?
Methods included from Request::Client
#api, #array_from_list, #funding_rounds_lists, #get, #kclass_name, #list, #organization_lists, #parsing_from_list, #person_lists, #total_items_from_list
Constructor Details
#initialize(json) ⇒ FundingRound
Returns a new instance of FundingRound.
19 20 21 22 23 24 25 26 |
# File 'lib/crunchbase/model/funding_round.rb', line 19 def initialize(json) super(json) relationships = json['relationships'] return if relationships.nil? relationship_with_funded(relationships['funded_organization']) end |
Instance Attribute Details
#announced_on ⇒ Object (readonly)
Returns the value of attribute announced_on.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def announced_on @announced_on end |
#announced_on_trust_code ⇒ Object (readonly)
Returns the value of attribute announced_on_trust_code.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def announced_on_trust_code @announced_on_trust_code end |
#api_path ⇒ Object (readonly)
Returns the value of attribute api_path.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def api_path @api_path end |
#closed_on ⇒ Object (readonly)
Returns the value of attribute closed_on.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def closed_on @closed_on end |
#closed_on_trust_code ⇒ Object (readonly)
Returns the value of attribute closed_on_trust_code.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def closed_on_trust_code @closed_on_trust_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def created_at @created_at end |
#funded_organization ⇒ Object (readonly)
Returns the value of attribute funded_organization.
14 15 16 |
# File 'lib/crunchbase/model/funding_round.rb', line 14 def funded_organization @funded_organization end |
#funded_organization_total_items ⇒ Object (readonly)
Returns the value of attribute funded_organization_total_items.
16 17 18 |
# File 'lib/crunchbase/model/funding_round.rb', line 16 def funded_organization_total_items @funded_organization_total_items end |
#funding_type ⇒ Object (readonly)
Returns the value of attribute funding_type.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def funding_type @funding_type end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
14 15 16 |
# File 'lib/crunchbase/model/funding_round.rb', line 14 def images @images end |
#images_total_items ⇒ Object (readonly)
Returns the value of attribute images_total_items.
16 17 18 |
# File 'lib/crunchbase/model/funding_round.rb', line 16 def images_total_items @images_total_items end |
#investments ⇒ Object (readonly)
Returns the value of attribute investments.
14 15 16 |
# File 'lib/crunchbase/model/funding_round.rb', line 14 def investments @investments end |
#investments_total_items ⇒ Object (readonly)
Returns the value of attribute investments_total_items.
16 17 18 |
# File 'lib/crunchbase/model/funding_round.rb', line 16 def investments_total_items @investments_total_items end |
#investors ⇒ Object (readonly)
Returns the value of attribute investors.
14 15 16 |
# File 'lib/crunchbase/model/funding_round.rb', line 14 def investors @investors end |
#investors_total_items ⇒ Object (readonly)
Returns the value of attribute investors_total_items.
16 17 18 |
# File 'lib/crunchbase/model/funding_round.rb', line 16 def investors_total_items @investors_total_items end |
#money_raised ⇒ Object (readonly)
Returns the value of attribute money_raised.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def money_raised @money_raised end |
#money_raised_currency_code ⇒ Object (readonly)
Returns the value of attribute money_raised_currency_code.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def money_raised_currency_code @money_raised_currency_code end |
#money_raised_usd ⇒ Object (readonly)
Returns the value of attribute money_raised_usd.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def money_raised_usd @money_raised_usd end |
#news ⇒ Object (readonly)
Returns the value of attribute news.
14 15 16 |
# File 'lib/crunchbase/model/funding_round.rb', line 14 def news @news end |
#news_total_items ⇒ Object (readonly)
Returns the value of attribute news_total_items.
16 17 18 |
# File 'lib/crunchbase/model/funding_round.rb', line 16 def news_total_items @news_total_items end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def permalink @permalink end |
#series ⇒ Object (readonly)
Returns the value of attribute series.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def series @series end |
#series_qualifier ⇒ Object (readonly)
Returns the value of attribute series_qualifier.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def series_qualifier @series_qualifier end |
#target_money_raised ⇒ Object (readonly)
Returns the value of attribute target_money_raised.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def target_money_raised @target_money_raised end |
#target_money_raised_currency_code ⇒ Object (readonly)
Returns the value of attribute target_money_raised_currency_code.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def target_money_raised_currency_code @target_money_raised_currency_code end |
#target_money_raised_usd ⇒ Object (readonly)
Returns the value of attribute target_money_raised_usd.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def target_money_raised_usd @target_money_raised_usd end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def updated_at @updated_at end |
#videos ⇒ Object (readonly)
Returns the value of attribute videos.
14 15 16 |
# File 'lib/crunchbase/model/funding_round.rb', line 14 def videos @videos end |
#videos_total_items ⇒ Object (readonly)
Returns the value of attribute videos_total_items.
16 17 18 |
# File 'lib/crunchbase/model/funding_round.rb', line 16 def videos_total_items @videos_total_items end |
#web_path ⇒ Object (readonly)
Returns the value of attribute web_path.
8 9 10 |
# File 'lib/crunchbase/model/funding_round.rb', line 8 def web_path @web_path end |
Instance Method Details
#date_keys ⇒ Object
61 62 63 |
# File 'lib/crunchbase/model/funding_round.rb', line 61 def date_keys %w(announced_on closed_on) end |
#property_keys ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/crunchbase/model/funding_round.rb', line 51 def property_keys %w( permalink api_path web_path funding_type series series_qualifier announced_on announced_on_trust_code closed_on closed_on_trust_code money_raised money_raised_currency_code money_raised_usd target_money_raised target_money_raised_currency_code target_money_raised_usd created_at updated_at ) end |
#relationship_lists ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/crunchbase/model/funding_round.rb', line 41 def relationship_lists { 'investments' => Investment, 'images' => Image, 'videos' => Video, 'news' => New, 'investors' => Investor } end |
#relationship_with_funded(funded_organization) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/crunchbase/model/funding_round.rb', line 28 def relationship_with_funded(funded_organization) return if funded_organization.nil? if funded_organization['item'].nil? # Get organization's (investments - funding - organization) instance_relationships_object(Organization, 'funded_organization', funded_organization) else # Get funding-rounds (funded_organization - item) set_relationships_object(Organization, 'funded_organization', funded_organization) end end |