Class: SemaphoreSMS::Resources::Account
- Inherits:
-
Object
- Object
- SemaphoreSMS::Resources::Account
- Defined in:
- lib/semaphore_sms/resources/account.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Account
constructor
A new instance of Account.
- #retrieve ⇒ Object
- #sender_names(limit: nil, page: nil) ⇒ Object
- #transactions(limit: nil, page: nil) ⇒ Object
- #users(limit: nil, page: nil) ⇒ Object
Constructor Details
#initialize(client) ⇒ Account
Returns a new instance of Account.
4 5 6 |
# File 'lib/semaphore_sms/resources/account.rb', line 4 def initialize(client) @client = client end |
Instance Method Details
#retrieve ⇒ Object
8 9 10 |
# File 'lib/semaphore_sms/resources/account.rb', line 8 def retrieve @client.get_request(path: '/account') end |
#sender_names(limit: nil, page: nil) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/semaphore_sms/resources/account.rb', line 19 def sender_names(limit: nil, page: nil) @client.get_request( path: '/account/sendernames', parameters: compact_params(limit:, page:) ) end |
#transactions(limit: nil, page: nil) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/semaphore_sms/resources/account.rb', line 12 def transactions(limit: nil, page: nil) @client.get_request( path: '/account/transactions', parameters: compact_params(limit:, page:) ) end |
#users(limit: nil, page: nil) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/semaphore_sms/resources/account.rb', line 26 def users(limit: nil, page: nil) @client.get_request( path: '/account/users', parameters: compact_params(limit:, page:) ) end |