Class: Insightly::ContactInfo
Class Method Summary
collapse
Methods inherited from BaseData
#==, api_field, build, #build, #initialize, #remote_data, #to_json
Class Method Details
.blog(url) ⇒ Object
63
64
65
|
# File 'lib/insightly/contact_info.rb', line 63
def self.blog(url)
self.website("Blog", url)
end
|
.business_website(url) ⇒ Object
59
60
61
|
# File 'lib/insightly/contact_info.rb', line 59
def self.business_website(url)
self.website("Work", url)
end
|
.email(label, email) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/insightly/contact_info.rb', line 17
def self.email(label, email)
item = self.new
item.type = "EMAIL"
item.label = label
item.detail = email
item
end
|
.linked_in(url) ⇒ Object
46
47
48
|
# File 'lib/insightly/contact_info.rb', line 46
def self.linked_in(url)
self.social("LinkedInPublicProfileUrl", url, "LinkedInPublicProfileUrl")
end
|
.phone(label, number) ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/insightly/contact_info.rb', line 9
def self.phone(label, number)
item = self.new
item.type = "PHONE"
item.label = label
item.detail = number
item
end
|
.social(label, info, subtype) ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/insightly/contact_info.rb', line 25
def self.social(label, info, subtype)
item = self.new
item.type = "SOCIAL"
item.subtype = subtype
item.label = label
item.detail = info
item
end
|
42
43
44
|
# File 'lib/insightly/contact_info.rb', line 42
def self.(id)
self.social("TwitterID", id, "TwitterID")
end
|
.website(label, url) ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/insightly/contact_info.rb', line 34
def self.website(label, url)
item = self.new
item.type = "WEBSITE"
item.label = label
item.detail = url
item
end
|
.work_email(email) ⇒ Object
54
55
56
|
# File 'lib/insightly/contact_info.rb', line 54
def self.work_email(email)
self.email("Work", email)
end
|
.work_phone(number) ⇒ Object
50
51
52
|
# File 'lib/insightly/contact_info.rb', line 50
def self.work_phone(number)
self.phone("Work", number)
end
|