Class: Zm::Client::Cos
Overview
Instance Attribute Summary
Attributes inherited from Base::Object
#id, #name, #parent, #token
Instance Method Summary
collapse
#soap_admin_connector
#clone, #initialize, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute
Instance Method Details
#accounts ⇒ Object
47
48
49
50
51
|
# File 'lib/zm/client/cos/cos.rb', line 47
def accounts
return if @id.nil?
@accounts ||= CosAccountsCollection.new(self)
end
|
#attrs_write ⇒ Object
53
54
55
|
# File 'lib/zm/client/cos/cos.rb', line 53
def attrs_write
@parent.zimbra_attributes.all_cos_attrs_writable_names
end
|
#clone!(new_name) ⇒ Object
32
33
34
35
|
# File 'lib/zm/client/cos/cos.rb', line 32
def clone!(new_name)
resp = sac.invoke(jsns_builder.to_copy(new_name))
resp[:CopyCosResponse][:cos].first[:id]
end
|
#create! ⇒ Object
26
27
28
29
30
|
# File 'lib/zm/client/cos/cos.rb', line 26
def create!
resp = sac.invoke(jsns_builder.to_create)
@id = resp[:CreateCosResponse][:cos].first[:id]
end
|
#domains ⇒ Object
41
42
43
44
45
|
# File 'lib/zm/client/cos/cos.rb', line 41
def domains
return if @id.nil?
@domains ||= CosDomainsCollection.new(self)
end
|
#modify! ⇒ Object
9
10
11
12
|
# File 'lib/zm/client/cos/cos.rb', line 9
def modify!
sac.invoke(jsns_builder.to_update)
true
end
|
#update!(hash) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/zm/client/cos/cos.rb', line 14
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
|