Class: RunApi::Core::Account

Inherits:
Object
  • Object
show all
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

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