Class: Zm::Client::Account
- Inherits:
-
Base::MailboxObject
- Object
- Base::Object
- Base::MailboxObject
- Zm::Client::Account
- Includes:
- RequestMethodsAdmin
- Defined in:
- lib/zm/client/account/account.rb
Overview
objectClass: zimbraAccount
Instance Attribute Summary
Attributes inherited from Base::MailboxObject
#carLicense, #domain_key, #home_url, #password, #public_url, #used
Attributes inherited from Base::Object
Instance Method Summary collapse
-
#aliases ⇒ Object
################################################################# Associations #################################################################.
- #attrs_write ⇒ Object
- #batch ⇒ Object
- #build_flush_cache ⇒ Object
- #cos ⇒ Object
-
#create! ⇒ Object
################################################################# SOAP Actions #################################################################.
- #created_at ⇒ Object
- #flush_cache! ⇒ Object
- #jsns_builder ⇒ Object
Methods included from RequestMethodsAdmin
#build_create, #build_delete, #build_modify, #build_rename, #delete!, #modify!, #rename!, #update!
Methods inherited from Base::MailboxObject
#account_content_by, #account_login, #account_login_password, #account_login_preauth, #aces, #admin_login, #alive?, #appointments, #build_uploader, #contacts, #data_sources, #dls_owner, #documents, #domain_name, #filter_rules, #folders, #identities, #infos, #is_external_transport?, #is_local_transport?, #last_logon, #local_transport, #local_transport!, #logged?, #logged_and_alive?, #login, #mailbox_infos, #mbxid, #mbxid!, #memberships, #messages, #mountpoints, #outgoing_filter_rules, #password!, #prefs, #rest_account_url, #rest_admin_url, #rest_options, #rest_url, #search_folders, #shares, #signatures, #soap_account_connector, #soap_connector, #tags, #tasks, #token, #token=, #used!
Methods included from HasSoapAdminConnector
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
#aliases ⇒ Object
################################################################# Associations #################################################################
15 16 17 18 19 |
# File 'lib/zm/client/account/account.rb', line 15 def aliases return @aliases if defined? @aliases @aliases = AccountAliasesCollection.new(self) end |
#attrs_write ⇒ Object
59 60 61 |
# File 'lib/zm/client/account/account.rb', line 59 def attrs_write @parent.zimbra_attributes.all_account_attrs_writable_names end |
#batch ⇒ Object
69 70 71 72 73 |
# File 'lib/zm/client/account/account.rb', line 69 def batch return @batch if defined? @batch @batch = BatchRequest.new(soap_account_connector) end |
#build_flush_cache ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/zm/client/account/account.rb', line 47 def build_flush_cache soap_request = SoapElement.admin(SoapAdminConstants::FLUSH_CACHE_REQUEST) node_cache = SoapElement.create('cache') .add_attributes({ type: SoapConstants::ACCOUNT, allServers: SoapUtils::ON }) soap_request.add_node(node_cache) node_entry = SoapElement.create('entry') .add_attribute(SoapConstants::BY, SoapConstants::ID) .add_content(@id) node_cache.add_node(node_entry) soap_request end |
#cos ⇒ Object
21 22 23 24 25 |
# File 'lib/zm/client/account/account.rb', line 21 def cos return @cos if defined? @cos @cos = @parent.coses.find_by(id: zimbraCOSId) end |
#create! ⇒ Object
################################################################# SOAP Actions #################################################################
31 32 33 34 |
# File 'lib/zm/client/account/account.rb', line 31 def create! resp = sac.invoke(build_create) @id = resp[:CreateAccountResponse][:account].first[:id] end |
#created_at ⇒ Object
36 37 38 39 40 |
# File 'lib/zm/client/account/account.rb', line 36 def created_at return @created_at if defined? @created_at @created_at = Time.parse(zimbraCreateTimestamp) unless zimbraCreateTimestamp.nil? end |
#flush_cache! ⇒ Object
42 43 44 45 |
# File 'lib/zm/client/account/account.rb', line 42 def flush_cache! sac.invoke(build_flush_cache) true end |
#jsns_builder ⇒ Object
63 64 65 66 67 |
# File 'lib/zm/client/account/account.rb', line 63 def jsns_builder return @jsns_builder if defined? @jsns_builder @jsns_builder = AccountJsnsBuilder.new(self) end |