Class: Zm::Client::Base::AccountSearchObjectsCollection
Overview
Collection AccountSearchObjectsCollection
Constant Summary
ObjectsCollection::METHODS_MISSING_LIST
Instance Attribute Summary collapse
#parent
Instance Method Summary
collapse
#all, #all!, #first, #logger, #method_missing, #new, #page, #per_page, #respond_to_missing?
Methods included from Inspector
#inspect, #instance_variables_map, #to_h, #to_s
Constructor Details
Returns a new instance of AccountSearchObjectsCollection.
10
11
12
13
14
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 10
def initialize(parent)
super(parent)
@more = true
reset_query_params
end
|
Instance Attribute Details
Returns the value of attribute more.
8
9
10
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 8
def more
@more
end
|
Instance Method Details
#end_at(end_at) ⇒ Object
31
32
33
34
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 31
def end_at(end_at)
@end_at = end_at
self
end
|
16
17
18
19
20
21
22
23
24
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 16
def find(id)
jsns = { m: { id: id, html: 1 } }
soap_request = SoapElement.mail(SoapMailConstants::GET_MSG_REQUEST).add_attributes(jsns)
rep = @parent.sacc.invoke(soap_request)
entry = rep[:GetMsgResponse][:m].first
MessageJsnsInitializer.create(@parent, entry)
end
|
#folder_ids(*folder_ids) ⇒ Object
45
46
47
48
49
50
51
52
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 45
def folder_ids(*folder_ids)
folder_ids.flatten!
folder_ids.uniq!
return self if @folder_ids == folder_ids
@folder_ids = folder_ids
self
end
|
#folders(*folders) ⇒ Object
36
37
38
39
40
41
42
43
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 36
def folders(*folders)
folders.flatten!
folders.select! { |folder| folder.is_a?(Zm::Client::Folder) }
return self if folders.empty?
@folders = folders
folder_ids(*@folders.map(&:id))
end
|
67
68
69
70
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 67
def ids
@resultMode = 'IDS'
search_builder.ids
end
|
#order(sort_by) ⇒ Object
59
60
61
62
63
64
65
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 59
def order(sort_by)
return self if @sort_by == sort_by
@all = nil
@sort_by = sort_by
self
end
|
72
73
74
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 72
def reset
reset_query_params
end
|
#start_at(start_at) ⇒ Object
26
27
28
29
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 26
def start_at(start_at)
@start_at = start_at
self
end
|
#where(query) ⇒ Object
54
55
56
57
|
# File 'lib/zm/client/base/account_search_objects_collection.rb', line 54
def where(query)
@query = query
self
end
|