Class: JustimmoClient::V1::Employee
Instance Method Summary
collapse
Methods included from Utils
#autoload_dir, #translate
Methods included from Logging
default_logger, #logger, rails_logger
Instance Method Details
#attachments ⇒ Array[Attachment]
25
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 25
attribute :attachments, Array[Attachment], default: []
|
#company ⇒ String
18
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 18
attribute :company, String
|
#email ⇒ String
11
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 11
attribute :email, String
|
#email_feedback ⇒ String
22
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 22
attribute :email_feedback, String
|
#fax ⇒ String
14
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 14
attribute :fax, String
|
#first_name ⇒ String
16
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 16
attribute :first_name, String
|
#full_name(surname_first: false, with_salutation: true) ⇒ Object
41
42
43
44
45
46
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 41
def full_name(surname_first: false, with_salutation: true)
name = [first_name, last_name]
name.reverse! if surname_first
name.unshift(salutation) if with_salutation
name.compact.join(" ")
end
|
#id ⇒ Integer
9
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 9
attribute :id, Integer
|
#image(index = 0) ⇒ Object
Also known as:
picture
35
36
37
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 35
def image(index = 0)
images[index]
end
|
#images ⇒ Object
Also known as:
pictures
29
30
31
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 29
def images
attachments.select { |x| x.type == "pic" }
end
|
#inspect ⇒ Object
52
53
54
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 52
def inspect
"#<#{self.class} #{self}>"
end
|
#last_name ⇒ String
15
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 15
attribute :last_name, String
|
#location ⇒ String
21
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 21
attribute :location, String
|
#mobile ⇒ String
13
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 13
attribute :mobile, String
|
#number ⇒ Integer
10
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 10
attribute :number, Integer
|
#phone ⇒ String
12
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 12
attribute :phone, String
|
#position ⇒ String
24
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 24
attribute :position, String
|
#salutation ⇒ String
17
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 17
attribute :salutation, String
|
#street ⇒ String
19
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 19
attribute :street, String
|
#to_s ⇒ Object
48
49
50
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 48
def to_s
full_name
end
|
#website ⇒ String
23
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 23
attribute :website, String
|
#zip_code ⇒ Integer
20
|
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 20
attribute :zip_code, Integer
|