Module: OnSIP::ExternalAddress::ClassMethods
- Included in:
- OnSIP::ExternalAddress
- Defined in:
- lib/onsip/models/external_address.rb
Instance Method Summary collapse
-
#add(*args) ⇒ Object
TODO.
- #browse(args) ⇒ Object
-
#delete(*args) ⇒ Object
TODO.
-
#edit(*args) ⇒ Object
TODO.
- #process_browse_external_address_response(response) ⇒ Object
-
#read(*args) ⇒ Object
TODO.
Instance Method Details
#add(*args) ⇒ Object
TODO
7 8 9 |
# File 'lib/onsip/models/external_address.rb', line 7 def add(*args) raise NotImplementedError end |
#browse(args) ⇒ Object
16 17 18 19 20 |
# File 'lib/onsip/models/external_address.rb', line 16 def browse(args) params = args.merge({'Action' => 'ExternalAddressBrowse', 'SessionId' => OnSIP.session.id, 'Output' => 'json'}) response = OnSIP.connection.get('/api', params, {}) process_browse_external_address_response response end |
#delete(*args) ⇒ Object
TODO
33 34 35 |
# File 'lib/onsip/models/external_address.rb', line 33 def delete(*args) raise NotImplementedError end |
#edit(*args) ⇒ Object
TODO
38 39 40 |
# File 'lib/onsip/models/external_address.rb', line 38 def edit(*args) raise NotImplementedError end |
#process_browse_external_address_response(response) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/onsip/models/external_address.rb', line 22 def process_browse_external_address_response(response) external_addresses = [] key_path = %w(Response Result ExternalAddressBrowse ExternalAddresses ExternalAddress) a = ResponseParser.parse_response response, key_path external_addresses = a.map { |h| new h } if a external_addresses end |
#read(*args) ⇒ Object
TODO
12 13 14 |
# File 'lib/onsip/models/external_address.rb', line 12 def read(*args) raise NotImplementedError end |