module OnSIP::Organization::ClassMethods
Public Instance Methods
add(*args)
click to toggle source
TODO
# File lib/onsip/models/organization.rb, line 87 def add(*args) raise NotImplementedError end
browse(account_id) { |response| ... }
click to toggle source
# File lib/onsip/models/organization.rb, line 33 def browse(account_id) params = {'Action' => 'OrganizationBrowse', 'AccountId' => account_id, 'SessionId' => OnSIP.session.id, 'Output' => 'json'} response = OnSIP.connection.get('/api', params, {}) yield response if block_given? process_browse_organization_response response end
edit_authenticated(*args)
click to toggle source
TODO
# File lib/onsip/models/organization.rb, line 97 def edit_authenticated(*args) raise NotImplementedError end
edit_contact(*args)
click to toggle source
TODO
# File lib/onsip/models/organization.rb, line 92 def edit_contact(*args) raise NotImplementedError end
migrate_domain(organization_id, old_domain, new_domain) { |response| ... }
click to toggle source
# File lib/onsip/models/organization.rb, line 68 def migrate_domain(organization_id, old_domain, new_domain) params = {'Action' => 'OrganizationMigrateDomain', 'OrganizationId' => organization_id, 'OldDomain' => old_domain, 'NewDomain' => new_domain, 'SessionId' => OnSIP.session.id, 'Output' => 'json'} response = OnSIP.connection.get('/api', params, {}) yield response if block_given? process_migrate_domain_response response end
process_browse_organization_response(response)
click to toggle source
# File lib/onsip/models/organization.rb, line 40 def process_browse_organization_response(response) organizations = [] key_path = %w(Response Result OrganizationBrowse Organizations Organization) a = ResponseParser.parse_response response, key_path organizations = a.map { |h| new h } if a organizations end
process_migrate_domain_response(response) { |response| ... }
click to toggle source
# File lib/onsip/models/organization.rb, line 75 def process_migrate_domain_response(response) organization = nil key_path = %w(Response Result OrganizationMigrateDomain Organization) a = ResponseParser.parse_response response, key_path yield response if block_given? organization = (a.map { |h| new h }).first if a organization end
process_read_organization_response(response) { |response| ... }
click to toggle source
# File lib/onsip/models/organization.rb, line 57 def process_read_organization_response(response) organization = nil key_path = %w(Response Result OrganizationRead Organization) a = ResponseParser.parse_response response, key_path yield response if block_given? organization = (a.map { |h| new h }).first if a organization end
read(organization_id) { |response| ... }
click to toggle source
# File lib/onsip/models/organization.rb, line 50 def read(organization_id) params = {'Action' => 'OrganizationRead', 'OrganizationId' => organization_id, 'SessionId' => OnSIP.session.id, 'Output' => 'json'} response = OnSIP.connection.get('/api', params, {}) yield response if block_given? process_read_organization_response response end