Class: OnSIP::Account

Inherits:
Object
  • Object
show all
Extended by:
ClassMethods
Includes:
Model
Defined in:
lib/onsip/models/account.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary

Constants included from Model::ClassMethods

Model::ClassMethods::DEFAULT_OPTIONS

Instance Attribute Summary

Attributes included from Model

#attributes, #session

Instance Method Summary collapse

Methods included from ClassMethods

edit_add_credit, edit_contact, edit_recharge, invoice_browse, invoice_read, process_read_account_response, read

Methods included from Model

#initialize

Methods included from Model::ClassMethods

#merge_params

Instance Method Details

#external_addressesObject



21
22
23
# File 'lib/onsip/models/account.rb', line 21

def external_addresses
  ExternalAddress.browse 'AccountId' => self.id
end

#idObject



5
6
7
# File 'lib/onsip/models/account.rb', line 5

def id
  @attributes.AccountId
end

#organization_idObject



9
10
11
# File 'lib/onsip/models/account.rb', line 9

def organization_id
  @attributes.OrganizationId
end

#organizationsObject



13
14
15
# File 'lib/onsip/models/account.rb', line 13

def organizations
  Organization.browse self.id
end

#user_addressesObject



25
26
27
# File 'lib/onsip/models/account.rb', line 25

def user_addresses
  UserAddress.browse 'AccountId' => self.id
end

#users(session = nil) ⇒ Object



17
18
19
# File 'lib/onsip/models/account.rb', line 17

def users(session = nil)
  User.browse self.id
end