Class: Zm::Client::Contact

Inherits:
Base::Object show all
Includes:
BelongsToFolder, BelongsToTag, MailboxItemConcern, RequestMethodsMailbox
Defined in:
lib/zm/client/contact/contact.rb

Overview

class account tag

Constant Summary collapse

GROUP_PATTERN =
'group'

Instance Attribute Summary collapse

Attributes included from MailboxItemConcern

#l

Attributes inherited from Base::Object

#id, #parent, #token

Instance Method Summary collapse

Methods included from MailboxItemConcern

#id, #id=, #mailbox_id

Methods included from RequestMethodsMailbox

#build_create, #build_delete, #build_modify, #delete!, #modify!, #update!

Methods included from BelongsToTag

#tags

Methods included from BelongsToFolder

#folder, #folder!, #folder=, #move!, #trash!

Methods inherited from Base::Object

#clone, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute

Constructor Details

#initialize(parent) ⇒ Contact

Returns a new instance of Contact.



25
26
27
28
29
30
# File 'lib/zm/client/contact/contact.rb', line 25

def initialize(parent)
  @l = FolderDefault::CONTACTS.id
  @shared_account_id = nil
  @shared_folder_account_id = nil
  super
end

Instance Attribute Details

#anniversaryObject

Returns the value of attribute anniversary.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def anniversary
  @anniversary
end

#assistantPhoneObject

Returns the value of attribute assistantPhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def assistantPhone
  @assistantPhone
end

#birthdayObject

Returns the value of attribute birthday.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def birthday
  @birthday
end

#callbackPhoneObject

Returns the value of attribute callbackPhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def callbackPhone
  @callbackPhone
end

#carPhoneObject

Returns the value of attribute carPhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def carPhone
  @carPhone
end

#companyObject

Returns the value of attribute company.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def company
  @company
end

#companyPhoneObject

Returns the value of attribute companyPhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def companyPhone
  @companyPhone
end

#custom1Object

Returns the value of attribute custom1.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def custom1
  @custom1
end

#departmentObject

Returns the value of attribute department.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def department
  @department
end

#emailObject

Returns the value of attribute email.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def email
  @email
end

#email2Object

Returns the value of attribute email2.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def email2
  @email2
end

#email3Object

Returns the value of attribute email3.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def email3
  @email3
end

#email4Object

Returns the value of attribute email4.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def email4
  @email4
end

#email5Object

Returns the value of attribute email5.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def email5
  @email5
end

#email6Object

Returns the value of attribute email6.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def email6
  @email6
end

#email7Object

Returns the value of attribute email7.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def email7
  @email7
end

#firstNameObject

Returns the value of attribute firstName.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def firstName
  @firstName
end

#fullNameObject

Returns the value of attribute fullName.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def fullName
  @fullName
end

#homeCityObject

Returns the value of attribute homeCity.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homeCity
  @homeCity
end

#homeCountryObject

Returns the value of attribute homeCountry.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homeCountry
  @homeCountry
end

#homeFaxObject

Returns the value of attribute homeFax.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homeFax
  @homeFax
end

#homePhoneObject

Returns the value of attribute homePhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homePhone
  @homePhone
end

#homePostalCodeObject

Returns the value of attribute homePostalCode.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homePostalCode
  @homePostalCode
end

#homeStateObject

Returns the value of attribute homeState.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homeState
  @homeState
end

#homeStreetObject

Returns the value of attribute homeStreet.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homeStreet
  @homeStreet
end

#homeURLObject

Returns the value of attribute homeURL.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def homeURL
  @homeURL
end

#imAddress1Object

Returns the value of attribute imAddress1.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def imAddress1
  @imAddress1
end

#imAddress2Object

Returns the value of attribute imAddress2.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def imAddress2
  @imAddress2
end

#imAddress3Object

Returns the value of attribute imAddress3.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def imAddress3
  @imAddress3
end

#imAddress4Object

Returns the value of attribute imAddress4.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def imAddress4
  @imAddress4
end

#imAddress5Object

Returns the value of attribute imAddress5.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def imAddress5
  @imAddress5
end

#imageObject

Returns the value of attribute image.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def image
  @image
end

#jobTitleObject

Returns the value of attribute jobTitle.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def jobTitle
  @jobTitle
end

#lastNameObject

Returns the value of attribute lastName.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def lastName
  @lastName
end

#maidenNameObject

Returns the value of attribute maidenName.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def maidenName
  @maidenName
end

#middleNameObject

Returns the value of attribute middleName.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def middleName
  @middleName
end

#mobilePhoneObject

Returns the value of attribute mobilePhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def mobilePhone
  @mobilePhone
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def name
  @name
end

#namePrefixObject

Returns the value of attribute namePrefix.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def namePrefix
  @namePrefix
end

#nameSuffixObject

Returns the value of attribute nameSuffix.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def nameSuffix
  @nameSuffix
end

#nicknameObject

Returns the value of attribute nickname.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def nickname
  @nickname
end

#notesObject

Returns the value of attribute notes.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def notes
  @notes
end

#otherCityObject

Returns the value of attribute otherCity.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherCity
  @otherCity
end

#otherCountryObject

Returns the value of attribute otherCountry.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherCountry
  @otherCountry
end

#otherFaxObject

Returns the value of attribute otherFax.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherFax
  @otherFax
end

#otherPhoneObject

Returns the value of attribute otherPhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherPhone
  @otherPhone
end

#otherPostalCodeObject

Returns the value of attribute otherPostalCode.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherPostalCode
  @otherPostalCode
end

#otherStateObject

Returns the value of attribute otherState.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherState
  @otherState
end

#otherStreetObject

Returns the value of attribute otherStreet.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherStreet
  @otherStreet
end

#otherURLObject

Returns the value of attribute otherURL.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def otherURL
  @otherURL
end

#pagerObject

Returns the value of attribute pager.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def pager
  @pager
end

#shared_account_idObject

Returns the value of attribute shared_account_id.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def 
  @shared_account_id
end

#shared_folder_account_idObject

Returns the value of attribute shared_folder_account_id.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def 
  @shared_folder_account_id
end

#tnObject

Returns the value of attribute tn.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def tn
  @tn
end

#typeObject

Returns the value of attribute type.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def type
  @type
end

#workCityObject

Returns the value of attribute workCity.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workCity
  @workCity
end

#workCountryObject

Returns the value of attribute workCountry.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workCountry
  @workCountry
end

#workFaxObject

Returns the value of attribute workFax.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workFax
  @workFax
end

#workPhoneObject

Returns the value of attribute workPhone.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workPhone
  @workPhone
end

#workPostalCodeObject

Returns the value of attribute workPostalCode.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workPostalCode
  @workPostalCode
end

#workStateObject

Returns the value of attribute workState.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workState
  @workState
end

#workStreetObject

Returns the value of attribute workStreet.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workStreet
  @workStreet
end

#workURLObject

Returns the value of attribute workURL.



14
15
16
# File 'lib/zm/client/contact/contact.rb', line 14

def workURL
  @workURL
end

Instance Method Details

#add_custom_property(key, value) ⇒ Object



40
41
42
# File 'lib/zm/client/contact/contact.rb', line 40

def add_custom_property(key, value)
  instance_variable_set(Utils.arrow_name(key), value)
end

#build_rename(*args) ⇒ Object

Raises:

  • (NotImplementedError)


55
56
57
# File 'lib/zm/client/contact/contact.rb', line 55

def build_rename(*args)
  raise NotImplementedError
end

#create!Object



44
45
46
47
48
49
# File 'lib/zm/client/contact/contact.rb', line 44

def create!
  rep = @parent.soap_connector.invoke(build_create)
  ContactJsnsInitializer.update(self, rep[:CreateContactResponse][:cn].first)

  id
end

#emailsObject



36
37
38
# File 'lib/zm/client/contact/contact.rb', line 36

def emails
  [email, email2, email3, email4, email5, email6, email7].compact
end

#group?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/zm/client/contact/contact.rb', line 32

def group?
  @type == GROUP_PATTERN
end

#reload!Object

Raises:

  • (NotImplementedError)


59
60
61
# File 'lib/zm/client/contact/contact.rb', line 59

def reload!
  raise NotImplementedError
end

#rename!(*args) ⇒ Object

Raises:

  • (NotImplementedError)


51
52
53
# File 'lib/zm/client/contact/contact.rb', line 51

def rename!(*args)
  raise NotImplementedError
end