Class: Zimbra::AccountService
- Inherits:
-
HandsoapService
- Object
- Handsoap::Service
- HandsoapService
- Zimbra::AccountService
- Defined in:
- lib/zimbra/account.rb
Overview
Doc Placeholder
Defined Under Namespace
Instance Method Summary collapse
- #add_alias(account, alias_name) ⇒ Object
- #create(name, password, attributes) ⇒ Object
- #set_password(id, new_password) ⇒ Object
Methods inherited from HandsoapService
#on_create_document, #on_response_document
Methods included from HandsoapUriOverrides
#envelope_namespace, #request_content_type, #uri
Methods included from HandsoapNamespaces
#request_namespaces, #response_namespaces
Methods included from HandsoapErrors
#http_error?, #http_not_found?, #on_after_create_http_request, #on_http_error, #report_error, #soap_fault_not_found?
Instance Method Details
#add_alias(account, alias_name) ⇒ Object
61 62 63 64 65 |
# File 'lib/zimbra/account.rb', line 61 def add_alias(account,alias_name) xml = invoke('n2:AddAccountAliasRequest') do || Builder.add_alias(,account.id,alias_name) end end |
#create(name, password, attributes) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/zimbra/account.rb', line 46 def create(name, password, attributes) xml = invoke("n2:CreateAccountRequest") do || Builder.create(, name, password, attributes) end class_name = Zimbra::Account.class_name Zimbra::BaseService::Parser.response(class_name, xml/"//n2:account") end |
#set_password(id, new_password) ⇒ Object
54 55 56 57 58 59 |
# File 'lib/zimbra/account.rb', line 54 def set_password(id, new_password) xml = invoke('n2:SetPasswordRequest') do || Builder.set_password(, id, new_password) end true end |