Class: Serwersms::Subaccounts
- Inherits:
-
Object
- Object
- Serwersms::Subaccounts
- Defined in:
- lib/library/subaccounts.rb
Instance Method Summary collapse
- #add(subaccount_username, subaccount_password, subaccount_id, params = {}) ⇒ Object
- #delete(id) ⇒ Object
- #index ⇒ Object
-
#initialize(obj) ⇒ Subaccounts
constructor
A new instance of Subaccounts.
- #limit(id, type, value) ⇒ Object
- #view(id) ⇒ Object
Constructor Details
#initialize(obj) ⇒ Subaccounts
Returns a new instance of Subaccounts.
2 3 4 |
# File 'lib/library/subaccounts.rb', line 2 def initialize(obj) @serwersms = obj end |
Instance Method Details
#add(subaccount_username, subaccount_password, subaccount_id, params = {}) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/library/subaccounts.rb', line 18 def add(subaccount_username, subaccount_password, subaccount_id, params = {}) params['subaccount_username'] = subaccount_username params['subaccount_password'] = subaccount_password params['subaccount_id'] = subaccount_id @serwersms.call('subaccounts/add',params); end |
#delete(id) ⇒ Object
81 82 83 84 85 |
# File 'lib/library/subaccounts.rb', line 81 def delete(id) params = {} params['id'] = id @serwersms.call('subaccounts/delete',params); end |
#index ⇒ Object
34 35 36 37 |
# File 'lib/library/subaccounts.rb', line 34 def index() params = {} @serwersms.call('subaccounts/index',params); end |
#limit(id, type, value) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/library/subaccounts.rb', line 66 def limit(id, type, value) params = {} params['id'] = id params['type'] = type params['value'] = value @serwersms.call('subaccounts/limit',params); end |
#view(id) ⇒ Object
50 51 52 53 54 |
# File 'lib/library/subaccounts.rb', line 50 def view(id) params = {} params['id'] = id @serwersms.call('subaccounts/view',params); end |