Class: Crunchbase::Acquisition
- Defined in:
- lib/crunchbase/acquisition.rb
Constant Summary collapse
- RESOURCE_NAME =
'acquisition'
- RESOURCE_LIST =
'acquisitions'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#acquirees ⇒ Object
readonly
Returns the value of attribute acquirees.
-
#acquirees_total_items ⇒ Object
readonly
Returns the value of attribute acquirees_total_items.
-
#acquirers ⇒ Object
readonly
Returns the value of attribute acquirers.
-
#acquirers_total_items ⇒ Object
readonly
Returns the value of attribute acquirers_total_items.
-
#acquisition_status ⇒ Object
readonly
Returns the value of attribute acquisition_status.
-
#acquisition_type ⇒ Object
readonly
Returns the value of attribute acquisition_type.
-
#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.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#disposition_of_acquired ⇒ Object
readonly
Returns the value of attribute disposition_of_acquired.
-
#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.
-
#payment_type ⇒ Object
readonly
Returns the value of attribute payment_type.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#price_currency_code ⇒ Object
readonly
Returns the value of attribute price_currency_code.
-
#price_usd ⇒ Object
readonly
Returns the value of attribute price_usd.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ Acquisition
constructor
A new instance of Acquisition.
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) ⇒ Acquisition
Returns a new instance of Acquisition.
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 |
# File 'lib/crunchbase/acquisition.rb', line 19 def initialize(json) @type_name = json['type'] properties = json['properties'] relationships = json['relationships'] @announced_on = properties['announced_on'] && DateTime.parse(properties['announced_on']) @announced_on_trust_code = properties['announced_on_trust_code'] @price_currency_code = properties['price_currency_code'] @permalink = properties['permalink'] @name = properties['name'] @payment_type = properties['payment_type'] @price = properties['price'] @disposition_of_acquired = properties['disposition_of_acquired'] @acquisition_type = properties['acquisition_type'] @acquisition_status = properties['acquisition_status'] @price_usd = properties['price_usd'] @announced_on_year = properties['announced_on_year'] @announced_on_day = properties['announced_on_day'] @announced_on_month = properties['announced_on_month'] @created_at = Time.at(properties['created_at']).utc @updated_at = Time.at(properties['updated_at']).utc @acquirers_list = relationships['acquirer'] @acquirees_list = relationships['acquiree'] @new_items_list = relationships['news'] end |
Instance Attribute Details
#acquirees ⇒ Object (readonly)
Returns the value of attribute acquirees.
15 16 17 |
# File 'lib/crunchbase/acquisition.rb', line 15 def acquirees @acquirees end |
#acquirees_total_items ⇒ Object (readonly)
Returns the value of attribute acquirees_total_items.
17 18 19 |
# File 'lib/crunchbase/acquisition.rb', line 17 def acquirees_total_items @acquirees_total_items end |
#acquirers ⇒ Object (readonly)
Returns the value of attribute acquirers.
15 16 17 |
# File 'lib/crunchbase/acquisition.rb', line 15 def acquirers @acquirers end |
#acquirers_total_items ⇒ Object (readonly)
Returns the value of attribute acquirers_total_items.
17 18 19 |
# File 'lib/crunchbase/acquisition.rb', line 17 def acquirers_total_items @acquirers_total_items end |
#acquisition_status ⇒ Object (readonly)
Returns the value of attribute acquisition_status.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def acquisition_status @acquisition_status end |
#acquisition_type ⇒ Object (readonly)
Returns the value of attribute acquisition_type.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def acquisition_type @acquisition_type end |
#announced_on ⇒ Object (readonly)
Returns the value of attribute announced_on.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def announced_on @announced_on end |
#announced_on_day ⇒ Object (readonly)
Returns the value of attribute announced_on_day.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def announced_on_day @announced_on_day end |
#announced_on_month ⇒ Object (readonly)
Returns the value of attribute announced_on_month.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def announced_on_month @announced_on_month end |
#announced_on_trust_code ⇒ Object (readonly)
Returns the value of attribute announced_on_trust_code.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def announced_on_trust_code @announced_on_trust_code end |
#announced_on_year ⇒ Object (readonly)
Returns the value of attribute announced_on_year.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def announced_on_year @announced_on_year end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def created_at @created_at end |
#disposition_of_acquired ⇒ Object (readonly)
Returns the value of attribute disposition_of_acquired.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def disposition_of_acquired @disposition_of_acquired end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def name @name end |
#new_items ⇒ Object (readonly)
Returns the value of attribute new_items.
15 16 17 |
# File 'lib/crunchbase/acquisition.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/acquisition.rb', line 17 def new_items_total_items @new_items_total_items end |
#payment_type ⇒ Object (readonly)
Returns the value of attribute payment_type.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def payment_type @payment_type end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def permalink @permalink end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def price @price end |
#price_currency_code ⇒ Object (readonly)
Returns the value of attribute price_currency_code.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def price_currency_code @price_currency_code end |
#price_usd ⇒ Object (readonly)
Returns the value of attribute price_usd.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def price_usd @price_usd end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
10 11 12 |
# File 'lib/crunchbase/acquisition.rb', line 10 def updated_at @updated_at end |