Class: Zimbra::Account
- Inherits:
-
Object
- Object
- Zimbra::Account
- Defined in:
- lib/zimbra/account.rb
Instance Attribute Summary collapse
-
#acls ⇒ Object
Returns the value of attribute acls.
-
#cos_id ⇒ Object
Returns the value of attribute cos_id.
-
#delegated_admin ⇒ Object
Returns the value of attribute delegated_admin.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#password ⇒ Object
Returns the value of attribute password.
Class Method Summary collapse
- .acl_name ⇒ Object
- .all ⇒ Object
- .create(options) ⇒ Object
- .find_by_id(id) ⇒ Object
- .find_by_name(name) ⇒ Object
Instance Method Summary collapse
- #delegated_admin? ⇒ Boolean
- #delete ⇒ Object
-
#initialize(options = {}) ⇒ Account
constructor
A new instance of Account.
- #save ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Account
Returns a new instance of Account.
28 29 30 31 32 33 34 35 |
# File 'lib/zimbra/account.rb', line 28 def initialize( = {}) self.id = [:id] self.name = [:name] self.password = [:password] self.acls = [:acls] || [] self.cos_id = ([:cos] ? [:cos].id : [:cos_id]) self.delegated_admin = [:delegated_admin] end |
Instance Attribute Details
#acls ⇒ Object
Returns the value of attribute acls.
26 27 28 |
# File 'lib/zimbra/account.rb', line 26 def acls @acls end |
#cos_id ⇒ Object
Returns the value of attribute cos_id.
26 27 28 |
# File 'lib/zimbra/account.rb', line 26 def cos_id @cos_id end |
#delegated_admin ⇒ Object
Returns the value of attribute delegated_admin.
26 27 28 |
# File 'lib/zimbra/account.rb', line 26 def delegated_admin @delegated_admin end |
#id ⇒ Object
Returns the value of attribute id.
26 27 28 |
# File 'lib/zimbra/account.rb', line 26 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
26 27 28 |
# File 'lib/zimbra/account.rb', line 26 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
26 27 28 |
# File 'lib/zimbra/account.rb', line 26 def password @password end |
Class Method Details
.acl_name ⇒ Object
21 22 23 |
# File 'lib/zimbra/account.rb', line 21 def acl_name 'account' end |
.all ⇒ Object
4 5 6 |
# File 'lib/zimbra/account.rb', line 4 def all AccountService.all end |
.create(options) ⇒ Object
16 17 18 19 |
# File 'lib/zimbra/account.rb', line 16 def create() account = new() AccountService.create(account) end |
.find_by_id(id) ⇒ Object
8 9 10 |
# File 'lib/zimbra/account.rb', line 8 def find_by_id(id) AccountService.get_by_id(id) end |
.find_by_name(name) ⇒ Object
12 13 14 |
# File 'lib/zimbra/account.rb', line 12 def find_by_name(name) AccountService.get_by_name(name) end |
Instance Method Details
#delegated_admin? ⇒ Boolean
40 41 42 |
# File 'lib/zimbra/account.rb', line 40 def delegated_admin? @delegated_admin end |
#delete ⇒ Object
48 49 50 |
# File 'lib/zimbra/account.rb', line 48 def delete AccountService.delete(self) end |
#save ⇒ Object
44 45 46 |
# File 'lib/zimbra/account.rb', line 44 def save AccountService.modify(self) end |