Class: Zm::Client::Identity
- Inherits:
-
Base::Object
- Object
- Base::Object
- Zm::Client::Identity
- Defined in:
- lib/zm/client/identity/identity.rb
Overview
class account identity
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#zimbraPrefDefaultSignatureId ⇒ Object
Returns the value of attribute zimbraPrefDefaultSignatureId.
-
#zimbraPrefForwardReplySignatureId ⇒ Object
Returns the value of attribute zimbraPrefForwardReplySignatureId.
-
#zimbraPrefFromAddress ⇒ Object
Returns the value of attribute zimbraPrefFromAddress.
-
#zimbraPrefFromAddressType ⇒ Object
Returns the value of attribute zimbraPrefFromAddressType.
-
#zimbraPrefFromDisplay ⇒ Object
Returns the value of attribute zimbraPrefFromDisplay.
-
#zimbraPrefIdentityName ⇒ Object
Returns the value of attribute zimbraPrefIdentityName.
-
#zimbraPrefReplyToAddress ⇒ Object
Returns the value of attribute zimbraPrefReplyToAddress.
-
#zimbraPrefReplyToDisplay ⇒ Object
Returns the value of attribute zimbraPrefReplyToDisplay.
-
#zimbraPrefReplyToEnabled ⇒ Object
Returns the value of attribute zimbraPrefReplyToEnabled.
-
#zimbraPrefWhenInFoldersEnabled ⇒ Object
Returns the value of attribute zimbraPrefWhenInFoldersEnabled.
-
#zimbraPrefWhenSentToAddresses ⇒ Object
Returns the value of attribute zimbraPrefWhenSentToAddresses.
-
#zimbraPrefWhenSentToEnabled ⇒ Object
Returns the value of attribute zimbraPrefWhenSentToEnabled.
Attributes inherited from Base::Object
Instance Method Summary collapse
- #clone {|new_identity| ... } ⇒ Object
- #create! ⇒ Object
- #delete! ⇒ Object
- #modify! ⇒ Object
- #rename!(new_name) ⇒ Object
- #update!(hash) ⇒ Object
Methods inherited from Base::Object
#initialize, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute
Constructor Details
This class inherits a constructor from Zm::Client::Base::Object
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def name @name end |
#zimbraPrefDefaultSignatureId ⇒ Object
Returns the value of attribute zimbraPrefDefaultSignatureId.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefDefaultSignatureId @zimbraPrefDefaultSignatureId end |
#zimbraPrefForwardReplySignatureId ⇒ Object
Returns the value of attribute zimbraPrefForwardReplySignatureId.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefForwardReplySignatureId @zimbraPrefForwardReplySignatureId end |
#zimbraPrefFromAddress ⇒ Object
Returns the value of attribute zimbraPrefFromAddress.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefFromAddress @zimbraPrefFromAddress end |
#zimbraPrefFromAddressType ⇒ Object
Returns the value of attribute zimbraPrefFromAddressType.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefFromAddressType @zimbraPrefFromAddressType end |
#zimbraPrefFromDisplay ⇒ Object
Returns the value of attribute zimbraPrefFromDisplay.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefFromDisplay @zimbraPrefFromDisplay end |
#zimbraPrefIdentityName ⇒ Object
Returns the value of attribute zimbraPrefIdentityName.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefIdentityName @zimbraPrefIdentityName end |
#zimbraPrefReplyToAddress ⇒ Object
Returns the value of attribute zimbraPrefReplyToAddress.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefReplyToAddress @zimbraPrefReplyToAddress end |
#zimbraPrefReplyToDisplay ⇒ Object
Returns the value of attribute zimbraPrefReplyToDisplay.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefReplyToDisplay @zimbraPrefReplyToDisplay end |
#zimbraPrefReplyToEnabled ⇒ Object
Returns the value of attribute zimbraPrefReplyToEnabled.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefReplyToEnabled @zimbraPrefReplyToEnabled end |
#zimbraPrefWhenInFoldersEnabled ⇒ Object
Returns the value of attribute zimbraPrefWhenInFoldersEnabled.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefWhenInFoldersEnabled @zimbraPrefWhenInFoldersEnabled end |
#zimbraPrefWhenSentToAddresses ⇒ Object
Returns the value of attribute zimbraPrefWhenSentToAddresses.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefWhenSentToAddresses @zimbraPrefWhenSentToAddresses end |
#zimbraPrefWhenSentToEnabled ⇒ Object
Returns the value of attribute zimbraPrefWhenSentToEnabled.
7 8 9 |
# File 'lib/zm/client/identity/identity.rb', line 7 def zimbraPrefWhenSentToEnabled @zimbraPrefWhenSentToEnabled end |
Instance Method Details
#clone {|new_identity| ... } ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'lib/zm/client/identity/identity.rb', line 46 def clone new_identity = super do |obj| %i[@zimbraPrefDefaultSignatureId @zimbraPrefForwardReplySignatureId].each do |arrow_key| obj.remove_instance_variable(arrow_key) if obj.instance_variable_get(arrow_key) end end yield(new_identity) if block_given? new_identity end |
#create! ⇒ Object
12 13 14 15 16 |
# File 'lib/zm/client/identity/identity.rb', line 12 def create! rep = @parent.sacc.invoke(jsns_builder.to_jsns) IdentityJsnsInitializer.update(self, rep[:CreateIdentityResponse][:identity].first) @id end |
#delete! ⇒ Object
39 40 41 42 43 44 |
# File 'lib/zm/client/identity/identity.rb', line 39 def delete! return if @id.nil? @parent.sacc.invoke(jsns_builder.to_delete) @id = nil end |
#modify! ⇒ Object
18 19 20 21 |
# File 'lib/zm/client/identity/identity.rb', line 18 def modify! @parent.sacc.invoke(jsns_builder.to_update) true end |
#rename!(new_name) ⇒ Object
35 36 37 |
# File 'lib/zm/client/identity/identity.rb', line 35 def rename!(new_name) raise NotImplementedError end |
#update!(hash) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/zm/client/identity/identity.rb', line 23 def update!(hash) return false if hash.delete_if { |k, v| v.nil? || !respond_to?(k) }.empty? do_update!(hash) hash.each do |key, value| update_attribute(key, value) end true end |