Class: Zm::Client::MailboxInfosCollection
- Inherits:
-
Object
- Object
- Zm::Client::MailboxInfosCollection
- Defined in:
- lib/zm/client/base/mailbox_infos_collection.rb
Instance Method Summary collapse
- #all ⇒ Object
- #all! ⇒ Object
- #clear ⇒ Object
-
#initialize(parent) ⇒ MailboxInfosCollection
constructor
A new instance of MailboxInfosCollection.
- #read ⇒ Object
- #rights(*entries) ⇒ Object
- #sections(*entries) ⇒ Object
Constructor Details
#initialize(parent) ⇒ MailboxInfosCollection
Returns a new instance of MailboxInfosCollection.
6 7 8 9 10 |
# File 'lib/zm/client/base/mailbox_infos_collection.rb', line 6 def initialize(parent) @parent = parent @sections = [] @rights = [] end |
Instance Method Details
#all ⇒ Object
12 13 14 |
# File 'lib/zm/client/base/mailbox_infos_collection.rb', line 12 def all @all || all! end |
#all! ⇒ Object
16 17 18 |
# File 'lib/zm/client/base/mailbox_infos_collection.rb', line 16 def all! build_response end |
#clear ⇒ Object
20 21 22 23 |
# File 'lib/zm/client/base/mailbox_infos_collection.rb', line 20 def clear reset_query_params @all.clear end |
#read ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/zm/client/base/mailbox_infos_collection.rb', line 35 def read reset_query_params @sections = ['mbox'] rep = build_response @parent.id = rep[:id] @parent.used = rep[:used] @parent.public_url = rep[:publicURL] @parent.zimbraCOSId = rep[:cos][:id] @parent.home_url = rep[:rest] rep end |
#rights(*entries) ⇒ Object
30 31 32 33 |
# File 'lib/zm/client/base/mailbox_infos_collection.rb', line 30 def rights(*entries) @rights += entries self end |
#sections(*entries) ⇒ Object
25 26 27 28 |
# File 'lib/zm/client/base/mailbox_infos_collection.rb', line 25 def sections(*entries) @sections += entries self end |