Class: RunApi::Core::Account
- Inherits:
-
Object
- Object
- RunApi::Core::Account
- Includes:
- ResourceHelpers
- Defined in:
- lib/runapi/core/account.rb
Defined Under Namespace
Classes: AccountRecord, BalanceResponse, InfoResponse
Constant Summary collapse
- INFO_ENDPOINT =
"/api/v1/me"- BALANCE_ENDPOINT =
"/api/v1/me/balance"
Instance Method Summary collapse
- #balance(options: nil) ⇒ Object
- #info(options: nil) ⇒ Object
-
#initialize(http) ⇒ Account
constructor
A new instance of Account.
Constructor Details
#initialize(http) ⇒ Account
Returns a new instance of Account.
31 32 33 |
# File 'lib/runapi/core/account.rb', line 31 def initialize(http) @http = http end |
Instance Method Details
#balance(options: nil) ⇒ Object
39 40 41 |
# File 'lib/runapi/core/account.rb', line 39 def balance(options: nil) request(:get, BALANCE_ENDPOINT, options:, response_class: BalanceResponse) end |
#info(options: nil) ⇒ Object
35 36 37 |
# File 'lib/runapi/core/account.rb', line 35 def info(options: nil) request(:get, INFO_ENDPOINT, options:, response_class: InfoResponse) end |