Module: Zm::Client::RequestMethodsMailbox
- Included in:
- Appointment, Contact, DataSource, Document, Folder, Identity, Message, MountPoint, SearchFolder, Signature, Tag
- Defined in:
- lib/zm/client/soap_request/request_methods_mailbox.rb
Instance Method Summary collapse
- #build_create ⇒ Object
- #build_delete ⇒ Object
- #build_modify ⇒ Object
- #build_rename(new_name) ⇒ Object
- #delete! ⇒ Object
- #modify! ⇒ Object
- #rename!(new_name) ⇒ Object
- #update!(hash) ⇒ Object
Instance Method Details
#build_create ⇒ Object
6 7 8 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 6 def build_create jsns_builder.to_jsns end |
#build_delete ⇒ Object
49 50 51 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 49 def build_delete jsns_builder.to_delete end |
#build_modify ⇒ Object
15 16 17 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 15 def build_modify jsns_builder.to_update end |
#build_rename(new_name) ⇒ Object
38 39 40 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 38 def build_rename(new_name) jsns_builder.to_rename(new_name) end |
#delete! ⇒ Object
42 43 44 45 46 47 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 42 def delete! return false if id.nil? @parent.soap_connector.invoke(build_delete) # remove_instance_variable(:id) end |
#modify! ⇒ Object
10 11 12 13 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 10 def modify! @parent.soap_connector.invoke(build_modify) true end |
#rename!(new_name) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 31 def rename!(new_name) return false if new_name == @name @parent.soap_connector.invoke(build_rename(new_name)) @name = new_name end |
#update!(hash) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/zm/client/soap_request/request_methods_mailbox.rb', line 19 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 |