Class: JustimmoClient::V1::Employee

Inherits:
JustimmoBase show all
Defined in:
lib/justimmo_client/api/v1/models/employee.rb

Attributes collapse

Instance Method Summary collapse

Methods included from Utils

#autoload_dir, #translate

Methods included from Logging

default_logger, #logger, rails_logger

Instance Method Details

#attachmentsArray[Attachment]

Returns:



25
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 25

attribute :attachments,    Array[Attachment], default: []

#companyString

Returns:

  • (String)


18
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 18

attribute :company,        String

#emailString

Returns:

  • (String)


11
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 11

attribute :email,          String

#email_feedbackString

Returns:

  • (String)


22
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 22

attribute :email_feedback, String

#faxString

Returns:

  • (String)


14
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 14

attribute :fax,            String

#first_nameString

Returns:

  • (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

#idInteger

Returns:

  • (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

#imagesObject 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

#inspectObject



52
53
54
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 52

def inspect
  "#<#{self.class} #{self}>"
end

#last_nameString

Returns:

  • (String)


15
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 15

attribute :last_name,      String

#locationString

Returns:

  • (String)


21
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 21

attribute :location,       String

#mobileString

Returns:

  • (String)


13
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 13

attribute :mobile,         String

#numberInteger

Returns:

  • (Integer)


10
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 10

attribute :number,         Integer

#phoneString

Returns:

  • (String)


12
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 12

attribute :phone,          String

#positionString

Returns:

  • (String)


24
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 24

attribute :position,       String

#salutationString

Returns:

  • (String)


17
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 17

attribute :salutation,     String

#streetString

Returns:

  • (String)


19
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 19

attribute :street,         String

#to_sObject



48
49
50
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 48

def to_s
  full_name
end

#websiteString

Returns:

  • (String)


23
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 23

attribute :website,        String

#zip_codeInteger

Returns:

  • (Integer)


20
# File 'lib/justimmo_client/api/v1/models/employee.rb', line 20

attribute :zip_code,       Integer