Class: Highrise::Person
Instance Method Summary
collapse
#convert_method_to_field_label, #field, #method_missing, #new_subject_data, #set_field_value, #transform_subject_field_label
Methods included from Searchable
included
Methods included from Taggable
#tag!, #tags, #untag!
Methods included from Pagination
included
Methods inherited from Subject
#add_note, #add_task, #emails, #notes, #upcoming_tasks
Methods inherited from Base
headers, oauth_token=
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Highrise::CustomFields
Instance Method Details
#address ⇒ Object
16
17
18
|
# File 'lib/highrise/person.rb', line 16
def address
contact_data.addresses.first
end
|
#company ⇒ Object
8
9
10
|
# File 'lib/highrise/person.rb', line 8
def company
Company.find(company_id) if company_id
end
|
#email_addresses ⇒ Object
24
25
26
|
# File 'lib/highrise/person.rb', line 24
def email_addresses
contact_data.email_addresses.collect { |address| address.address } rescue []
end
|
#label ⇒ Object
32
33
34
|
# File 'lib/highrise/person.rb', line 32
def label
'Party'
end
|
#name ⇒ Object
12
13
14
|
# File 'lib/highrise/person.rb', line 12
def name
"#{first_name rescue ''} #{last_name rescue ''}".strip
end
|
#phone_numbers ⇒ Object
28
29
30
|
# File 'lib/highrise/person.rb', line 28
def phone_numbers
contact_data.phone_numbers.collect { |phone_number| phone_number.number } rescue []
end
|
#web_address ⇒ Object
20
21
22
|
# File 'lib/highrise/person.rb', line 20
def web_address
contact_data.web_addresses.first
end
|