Class: ProsperWorks::Person

Inherits:
BaseEntity show all
Defined in:
lib/prosperworks/person.rb

Instance Attribute Summary collapse

Attributes inherited from BaseEntity

#assignee_id, #custom_fields, #date_modified, #details, #name, #tags

Attributes inherited from Base

#date_created, #id

Class Method Summary collapse

Methods included from ApiOperations::Create

#create

Methods included from ApiOperations::Connect

#get_uri, #handle_multiple_response, #handle_response, #send_request

Methods included from ApiOperations::Delete

#delete, #handle_delete_response

Methods included from ApiOperations::Find

#find

Methods included from ApiOperations::Update

#update

Methods included from ApiOperations::Search

#search

Methods inherited from Base

client, #initialize, #set_attributes

Methods included from SerializeEntity

#to_json

Constructor Details

This class inherits a constructor from ProsperWorks::Base

Instance Attribute Details

#addressObject

Returns the value of attribute address.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def address
  @address
end

#company_idObject

Returns the value of attribute company_id.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def company_id
  @company_id
end

#company_nameObject

Returns the value of attribute company_name.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def company_name
  @company_name
end

#contact_type_idObject

Returns the value of attribute contact_type_id.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def contact_type_id
  @contact_type_id
end

#date_last_contactedObject

Returns the value of attribute date_last_contacted.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def date_last_contacted
  @date_last_contacted
end

#emailsObject

Returns the value of attribute emails.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def emails
  @emails
end

#first_nameObject

Returns the value of attribute first_name.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def first_name
  @first_name
end

#interaction_countObject

Returns the value of attribute interaction_count.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def interaction_count
  @interaction_count
end

#last_nameObject

Returns the value of attribute last_name.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def last_name
  @last_name
end

#middle_nameObject

Returns the value of attribute middle_name.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def middle_name
  @middle_name
end

#phone_numbersObject

Returns the value of attribute phone_numbers.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def phone_numbers
  @phone_numbers
end

#prefixObject

Returns the value of attribute prefix.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def prefix
  @prefix
end

#socialsObject

Returns the value of attribute socials.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def socials
  @socials
end

#suffixObject

Returns the value of attribute suffix.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def suffix
  @suffix
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def title
  @title
end

#websitesObject

Returns the value of attribute websites.



4
5
6
# File 'lib/prosperworks/person.rb', line 4

def websites
  @websites
end

Class Method Details

.api_nameObject



23
24
25
# File 'lib/prosperworks/person.rb', line 23

def self.api_name
  "people"
end

.find_by_email(email) ⇒ Object



27
28
29
30
31
32
# File 'lib/prosperworks/person.rb', line 27

def self.find_by_email(email)
  uri = get_uri(api_name, 'fetch_by_email')

  response = send_request("post", uri, email: email)
  handle_response(new, response)
end