Class: Zm::Client::Server

Inherits:
Base::Object show all
Includes:
HasSoapAdminConnector
Defined in:
lib/zm/client/server/server.rb

Overview

objectClass: zimbraServer

Instance Attribute Summary

Attributes inherited from Base::Object

#id, #name, #parent, #token

Instance Method Summary collapse

Methods included from HasSoapAdminConnector

#soap_admin_connector

Methods inherited from Base::Object

#clone, #initialize, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute

Constructor Details

This class inherits a constructor from Zm::Client::Base::Object

Instance Method Details

#accountsObject



24
25
26
27
28
# File 'lib/zm/client/server/server.rb', line 24

def accounts
  return @accounts if defined? @accounts

  @accounts = ServerAccountsCollection.new(self)
end

#backupsObject



18
19
20
21
22
# File 'lib/zm/client/server/server.rb', line 18

def backups
  return @backups if defined? @backups

  @backups = BackupsCollection.new(self)
end

#mta_queuesObject



12
13
14
15
16
# File 'lib/zm/client/server/server.rb', line 12

def mta_queues
  return @mta_queues if defined? @mta_queues

  @mta_queues = MtaQueuesCollection.new(self)
end

#update!(hash) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/zm/client/server/server.rb', line 30

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