Class: Crunchbase::Model::Person

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

Direct Known Subclasses

Founder

Constant Summary collapse

RESOURCE_LIST =
RESOURCE_NAME = 'people'.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) ⇒ Person

Returns a new instance of Person.



22
23
24
# File 'lib/crunchbase/model/person.rb', line 22

def initialize(json)
  super(json)
end

Instance Attribute Details

#advisory_rolesObject (readonly)

Returns the value of attribute advisory_roles.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def advisory_roles
  @advisory_roles
end

#advisory_roles_total_itemsObject (readonly)

Returns the value of attribute advisory_roles_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def advisory_roles_total_items
  @advisory_roles_total_items
end

#also_known_asObject (readonly)

Returns the value of attribute also_known_as.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def also_known_as
  @also_known_as
end

#api_pathObject (readonly)

Returns the value of attribute api_path.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def api_path
  @api_path
end

#bioObject (readonly)

Returns the value of attribute bio.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def bio
  @bio
end

#born_onObject (readonly)

Returns the value of attribute born_on.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def born_on
  @born_on
end

#born_on_trust_codeObject (readonly)

Returns the value of attribute born_on_trust_code.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def born_on_trust_code
  @born_on_trust_code
end

#created_atObject (readonly)

Returns the value of attribute created_at.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def created_at
  @created_at
end

#degreesObject (readonly)

Returns the value of attribute degrees.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def degrees
  @degrees
end

#degrees_total_itemsObject (readonly)

Returns the value of attribute degrees_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def degrees_total_items
  @degrees_total_items
end

#died_onObject (readonly)

Returns the value of attribute died_on.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def died_on
  @died_on
end

#died_on_trust_codeObject (readonly)

Returns the value of attribute died_on_trust_code.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def died_on_trust_code
  @died_on_trust_code
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def first_name
  @first_name
end

#founded_companiesObject (readonly)

Returns the value of attribute founded_companies.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def founded_companies
  @founded_companies
end

#founded_companies_total_itemsObject (readonly)

Returns the value of attribute founded_companies_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def founded_companies_total_items
  @founded_companies_total_items
end

#genderObject (readonly)

Returns the value of attribute gender.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def gender
  @gender
end

#imagesObject (readonly)

Returns the value of attribute images.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def images
  @images
end

#images_total_itemsObject (readonly)

Returns the value of attribute images_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def images_total_items
  @images_total_items
end

#investmentsObject (readonly)

Returns the value of attribute investments.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def investments
  @investments
end

#investments_total_itemsObject (readonly)

Returns the value of attribute investments_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def investments_total_items
  @investments_total_items
end

#is_deceasedObject (readonly)

Returns the value of attribute is_deceased.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def is_deceased
  @is_deceased
end

#jobsObject (readonly)

Returns the value of attribute jobs.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def jobs
  @jobs
end

#jobs_total_itemsObject (readonly)

Returns the value of attribute jobs_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def jobs_total_items
  @jobs_total_items
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def last_name
  @last_name
end

#membershipsObject (readonly)

Returns the value of attribute memberships.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def memberships
  @memberships
end

#memberships_total_itemsObject (readonly)

Returns the value of attribute memberships_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def memberships_total_items
  @memberships_total_items
end

#nameObject (readonly)

custom name from first name and last name



57
58
59
# File 'lib/crunchbase/model/person.rb', line 57

def name
  @name
end

#newsObject (readonly)

Returns the value of attribute news.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def news
  @news
end

#news_total_itemsObject (readonly)

Returns the value of attribute news_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def news_total_items
  @news_total_items
end

Returns the value of attribute permalink.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def permalink
  @permalink
end

#primary_affiliationObject (readonly)

Returns the value of attribute primary_affiliation.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def primary_affiliation
  @primary_affiliation
end

#primary_affiliation_total_itemsObject (readonly)

Returns the value of attribute primary_affiliation_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def primary_affiliation_total_items
  @primary_affiliation_total_items
end

#primary_imageObject (readonly)

Returns the value of attribute primary_image.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def primary_image
  @primary_image
end

#primary_image_total_itemsObject (readonly)

Returns the value of attribute primary_image_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def primary_image_total_items
  @primary_image_total_items
end

#primary_locationObject (readonly)

Returns the value of attribute primary_location.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def primary_location
  @primary_location
end

#primary_location_total_itemsObject (readonly)

Returns the value of attribute primary_location_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def primary_location_total_items
  @primary_location_total_items
end

#profile_image_urlObject (readonly)

Returns the value of attribute profile_image_url.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def profile_image_url
  @profile_image_url
end

#role_investorObject (readonly)

Returns the value of attribute role_investor.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def role_investor
  @role_investor
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def updated_at
  @updated_at
end

#videosObject (readonly)

Returns the value of attribute videos.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def videos
  @videos
end

#videos_total_itemsObject (readonly)

Returns the value of attribute videos_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def videos_total_items
  @videos_total_items
end

#web_pathObject (readonly)

Returns the value of attribute web_path.



9
10
11
# File 'lib/crunchbase/model/person.rb', line 9

def web_path
  @web_path
end

#websitesObject (readonly)

Returns the value of attribute websites.



13
14
15
# File 'lib/crunchbase/model/person.rb', line 13

def websites
  @websites
end

#websites_total_itemsObject (readonly)

Returns the value of attribute websites_total_items.



16
17
18
# File 'lib/crunchbase/model/person.rb', line 16

def websites_total_items
  @websites_total_items
end

Instance Method Details

#date_keysObject



52
53
54
# File 'lib/crunchbase/model/person.rb', line 52

def date_keys
  %w(born_on died_on)
end

#property_keysObject



44
45
46
47
48
49
50
# File 'lib/crunchbase/model/person.rb', line 44

def property_keys
  %w(
    permalink api_path web_path first_name last_name gender also_known_as bio profile_image_url
    role_investor born_on born_on_trust_code is_deceased died_on died_on_trust_code
    created_at updated_at
  )
end

#relationship_listsObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/crunchbase/model/person.rb', line 26

def relationship_lists
  {
    'primary_affiliation' => PrimaryAffiliation,
    'primary_location' => PrimaryLocation,
    'primary_image' => PrimaryImage,
    'websites' => Website,
    'degrees' => Degree,
    'jobs' => Job,
    'advisory_roles' => AdvisoryRole,
    'founded_companies' => FoundedCompany,
    'investments' => Investment,
    'memberships' => Membership,
    'images' => Image,
    'videos' => Video,
    'news' => New
  }
end