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
51
52
53
54
55
|
# File 'lib/zm/client/cos/cos.rb', line 51
def accounts
return if @id.nil?
@accounts ||= CosAccountsCollection.new(self)
end
|
#attrs_write ⇒ Object
57
58
59
|
# File 'lib/zm/client/cos/cos.rb', line 57
def attrs_write
@parent.zimbra_attributes.all_cos_attrs_writable_names
end
|
#clone!(new_name) ⇒ Object
36
37
38
39
|
# File 'lib/zm/client/cos/cos.rb', line 36
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
|
#delete! ⇒ Object
32
33
34
|
# File 'lib/zm/client/cos/cos.rb', line 32
def delete!
sac.invoke(jsns_builder.to_delete)
end
|
#domains ⇒ Object
45
46
47
48
49
|
# File 'lib/zm/client/cos/cos.rb', line 45
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
|