Module: OnSIP::Account::ClassMethods
- Included in:
- OnSIP::Account
- Defined in:
- lib/onsip/models/account.rb
Instance Method Summary collapse
-
#edit_add_credit(*args) ⇒ Object
TODO.
-
#edit_contact(*args) ⇒ Object
TODO.
-
#edit_recharge(*args) ⇒ Object
TODO.
-
#invoice_browse(*args) ⇒ Object
TODO.
-
#invoice_read(*args) ⇒ Object
TODO.
- #process_read_account_response(response) ⇒ Object
- #read(account_id) ⇒ Object
Instance Method Details
#edit_add_credit(*args) ⇒ Object
TODO
51 52 53 |
# File 'lib/onsip/models/account.rb', line 51 def edit_add_credit(*args) raise NotImplementedError end |
#edit_contact(*args) ⇒ Object
TODO
46 47 48 |
# File 'lib/onsip/models/account.rb', line 46 def edit_contact(*args) raise NotImplementedError end |
#edit_recharge(*args) ⇒ Object
TODO
56 57 58 |
# File 'lib/onsip/models/account.rb', line 56 def edit_recharge(*args) raise NotImplementedError end |
#invoice_browse(*args) ⇒ Object
TODO
66 67 68 |
# File 'lib/onsip/models/account.rb', line 66 def invoice_browse(*args) raise NotImplementedError end |
#invoice_read(*args) ⇒ Object
TODO
61 62 63 |
# File 'lib/onsip/models/account.rb', line 61 def invoice_read(*args) raise NotImplementedError end |
#process_read_account_response(response) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/onsip/models/account.rb', line 35 def process_read_account_response(response) account = nil key_path = %w(Response Result AccountRead Account) a = ResponseParser.parse_response response, key_path account = (a.map { |h| new h }).first if a account end |
#read(account_id) ⇒ Object
30 31 32 33 |
# File 'lib/onsip/models/account.rb', line 30 def read(account_id) response = OnSIP.connection.get('/api', {'Action' => 'AccountRead', 'AccountId' => account_id, 'SessionId' => OnSIP.session.id, 'Output' => 'json'}, {}) process_read_account_response response end |