Class: Crunchbase::Model::Product

Inherits:
Entity
  • Object
show all
Defined in:
lib/crunchbase/model/product.rb

Constant Summary collapse

RESOURCE_LIST =
RESOURCE_NAME = 'products'.freeze

Instance Attribute Summary collapse

Attributes inherited from Entity

#type_name, #uuid

Instance Method Summary collapse

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) ⇒ Product

attr_reader :owner_total_items, :competitors_total_items, :customers_total_items



20
21
22
# File 'lib/crunchbase/model/product.rb', line 20

def initialize(json)
  super
end

Instance Attribute Details

#also_known_asObject (readonly)

Returns the value of attribute also_known_as.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def also_known_as
  @also_known_as
end

#api_pathObject (readonly)

Returns the value of attribute api_path.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def api_path
  @api_path
end

#categoriesObject (readonly)

Returns the value of attribute categories.



12
13
14
# File 'lib/crunchbase/model/product.rb', line 12

def categories
  @categories
end

#categories_itemsObject (readonly)

Returns the value of attribute categories_items.



14
15
16
# File 'lib/crunchbase/model/product.rb', line 14

def categories_items
  @categories_items
end

#closed_onObject (readonly)

Returns the value of attribute closed_on.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def closed_on
  @closed_on
end

#closed_on_trust_codeObject (readonly)

Returns the value of attribute closed_on_trust_code.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def closed_on_trust_code
  @closed_on_trust_code
end

#created_atObject (readonly)

Returns the value of attribute created_at.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def description
  @description
end

#homepage_urlObject (readonly)

Returns the value of attribute homepage_url.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def homepage_url
  @homepage_url
end

#imagesObject (readonly)

Returns the value of attribute images.



12
13
14
# File 'lib/crunchbase/model/product.rb', line 12

def images
  @images
end

#images_total_itemsObject (readonly)

Returns the value of attribute images_total_items.



12
13
14
# File 'lib/crunchbase/model/product.rb', line 12

def images_total_items
  @images_total_items
end

#launched_onObject (readonly)

Returns the value of attribute launched_on.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def launched_on
  @launched_on
end

#launched_on_trust_codeObject (readonly)

Returns the value of attribute launched_on_trust_code.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def launched_on_trust_code
  @launched_on_trust_code
end

#lifecycle_stageObject (readonly)

Returns the value of attribute lifecycle_stage.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def lifecycle_stage
  @lifecycle_stage
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def name
  @name
end

#new_total_itemsObject (readonly)

Returns the value of attribute new_total_items.



14
15
16
# File 'lib/crunchbase/model/product.rb', line 14

def new_total_items
  @new_total_items
end

#newsObject (readonly)

Returns the value of attribute news.



12
13
14
# File 'lib/crunchbase/model/product.rb', line 12

def news
  @news
end

Returns the value of attribute permalink.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def permalink
  @permalink
end

#primary_imageObject (readonly)

Returns the value of attribute primary_image.



12
13
14
# File 'lib/crunchbase/model/product.rb', line 12

def primary_image
  @primary_image
end

#primary_image_total_itemsObject (readonly)

Returns the value of attribute primary_image_total_items.



14
15
16
# File 'lib/crunchbase/model/product.rb', line 14

def primary_image_total_items
  @primary_image_total_items
end

#profile_image_urlObject (readonly)

Returns the value of attribute profile_image_url.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def profile_image_url
  @profile_image_url
end

#short_descriptionObject (readonly)

Returns the value of attribute short_description.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def short_description
  @short_description
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def updated_at
  @updated_at
end

#videoObject (readonly)

Returns the value of attribute video.



12
13
14
# File 'lib/crunchbase/model/product.rb', line 12

def video
  @video
end

#video_total_itemsObject (readonly)

Returns the value of attribute video_total_items.



14
15
16
# File 'lib/crunchbase/model/product.rb', line 14

def video_total_items
  @video_total_items
end

#web_pathObject (readonly)

Returns the value of attribute web_path.



7
8
9
# File 'lib/crunchbase/model/product.rb', line 7

def web_path
  @web_path
end

#websitesObject (readonly)

Returns the value of attribute websites.



12
13
14
# File 'lib/crunchbase/model/product.rb', line 12

def websites
  @websites
end

#websites_total_itemsObject (readonly)

Returns the value of attribute websites_total_items.



14
15
16
# File 'lib/crunchbase/model/product.rb', line 14

def websites_total_items
  @websites_total_items
end

Instance Method Details

#date_keysObject



43
44
45
# File 'lib/crunchbase/model/product.rb', line 43

def date_keys
  %w(launched_on closed_on)
end

#property_keysObject



34
35
36
37
38
39
40
41
# File 'lib/crunchbase/model/product.rb', line 34

def property_keys
  %w(
    permalink api_path web_path name also_known_as
    lifecycle_stage short_description description profile_image_url
    launched_on launched_on_trust_code closed_on closed_on_trust_code
    homepage_url created_at updated_at
  )
end

#relationship_listsObject



24
25
26
27
28
29
30
31
32
# File 'lib/crunchbase/model/product.rb', line 24

def relationship_lists
  {
    'categories' => Category,
    'primary_image' => PrimaryImage,
    'images' => Image,
    'video' => Video,
    'news' => New
  }
end