Class: Zm::Client::FoldersCollection

Inherits:
Base::AccountObjectsCollection show all
Defined in:
lib/zm/client/folder/folders_collection.rb

Overview

collection of folders

Constant Summary

Constants inherited from Base::ObjectsCollection

Base::ObjectsCollection::METHODS_MISSING_LIST

Instance Attribute Summary collapse

Attributes inherited from Base::ObjectsCollection

#parent

Instance Method Summary collapse

Methods inherited from Base::ObjectsCollection

#all, #all!, #build_from_entry, #first, #logger, #method_missing, #new, #order, #page, #per_page, #respond_to_missing?

Constructor Details

#initialize(parent) ⇒ FoldersCollection



12
13
14
15
16
17
18
# File 'lib/zm/client/folder/folders_collection.rb', line 12

def initialize(parent)
  @child_class = Folder
  @builder_class = FoldersBuilder
  super(parent)
  @root = nil
  reset_query_params
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Zm::Client::Base::ObjectsCollection

Instance Attribute Details

#depthObject

Returns the value of attribute depth.



10
11
12
# File 'lib/zm/client/folder/folders_collection.rb', line 10

def depth
  @depth
end

#needGranteeNameObject

Returns the value of attribute needGranteeName.



10
11
12
# File 'lib/zm/client/folder/folders_collection.rb', line 10

def needGranteeName
  @needGranteeName
end

#rootObject (readonly)

Returns the value of attribute root.



8
9
10
# File 'lib/zm/client/folder/folders_collection.rb', line 8

def root
  @root
end

#trObject

Returns the value of attribute tr.



10
11
12
# File 'lib/zm/client/folder/folders_collection.rb', line 10

def tr
  @tr
end

#viewObject

Returns the value of attribute view.



10
11
12
# File 'lib/zm/client/folder/folders_collection.rb', line 10

def view
  @view
end

#visibleObject

Returns the value of attribute visible.



10
11
12
# File 'lib/zm/client/folder/folders_collection.rb', line 10

def visible
  @visible
end

Instance Method Details

#appointmentObject



50
51
52
53
# File 'lib/zm/client/folder/folders_collection.rb', line 50

def appointment
  @view = FolderDefault::CALENDAR[:type]
  self
end

#clearObject



39
40
41
42
43
# File 'lib/zm/client/folder/folders_collection.rb', line 39

def clear
  @all = nil
  @root = nil
  reset_query_params
end

#contactObject



55
56
57
58
# File 'lib/zm/client/folder/folders_collection.rb', line 55

def contact
  @view = FolderDefault::CONTACTS[:type]
  self
end

#documentObject



45
46
47
48
# File 'lib/zm/client/folder/folders_collection.rb', line 45

def document
  @view = FolderDefault::BRIEFCASE[:type]
  self
end

#find(id) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/zm/client/folder/folders_collection.rb', line 20

def find(id)
  folder = @child_class.new(@parent) do |f|
    f.id = id
  end
  folder.reload!
  folder
end

#idsObject



35
36
37
# File 'lib/zm/client/folder/folders_collection.rb', line 35

def ids
  @builder_class.new(@parent, make_query).ids
end

#messageObject



60
61
62
63
# File 'lib/zm/client/folder/folders_collection.rb', line 60

def message
  @view = FolderDefault::INBOX[:type]
  self
end

#taskObject



65
66
67
68
# File 'lib/zm/client/folder/folders_collection.rb', line 65

def task
  @view = FolderDefault::TASKS[:type]
  self
end

#where(view: nil, tr: nil) ⇒ Object



28
29
30
31
32
33
# File 'lib/zm/client/folder/folders_collection.rb', line 28

def where(view: nil, tr: nil)
  @view = view
  @tr = tr
  @all = nil
  self
end