Class: OnSIP::User
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary
Attributes included from Model
#attributes, #session
Instance Method Summary
collapse
browse, edit_status, process_add_user_response, process_browse_user_response, process_delete_user_response, process_edit_user_status_response, process_read_user_response, read
Methods included from Model
#initialize
Instance Method Details
#account ⇒ Object
17
18
19
|
# File 'lib/onsip/models/user.rb', line 17
def account
Account.read self.account_id
end
|
#account_id ⇒ Object
9
10
11
|
# File 'lib/onsip/models/user.rb', line 9
def account_id
@attributes.AccountId
end
|
#add(organization = nil) ⇒ Object
21
22
23
|
# File 'lib/onsip/models/user.rb', line 21
def add(organization = nil)
self.class.add organization, @attributes
end
|
#addresses ⇒ Object
33
34
35
|
# File 'lib/onsip/models/user.rb', line 33
def addresses
Address.browse({'UserId' => self.id})
end
|
#delete! ⇒ Object
25
26
27
|
# File 'lib/onsip/models/user.rb', line 25
def delete!
self.class.delete! self.id
end
|
#id ⇒ Object
5
6
7
|
# File 'lib/onsip/models/user.rb', line 5
def id
@attributes.UserId
end
|
#organization ⇒ Object
29
30
31
|
# File 'lib/onsip/models/user.rb', line 29
def organization
@organization ||= Organization.read(self.organization_id)
end
|
#organization_id ⇒ Object
13
14
15
|
# File 'lib/onsip/models/user.rb', line 13
def organization_id
@attributes.OrganizationId
end
|