Class: OctaSpace::Resources::Accounts

Inherits:
Base
  • Object
show all
Defined in:
lib/octaspace/resources/accounts.rb

Overview

Account-related API endpoints

Examples:

client.accounts.profile
client.accounts.balance

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from OctaSpace::Resources::Base

Instance Method Details

#balanceOctaSpace::Response

Fetch the authenticated user’s balance GET /accounts/balance

Returns:



21
22
23
# File 'lib/octaspace/resources/accounts.rb', line 21

def balance
  get("/accounts/balance")
end

#generate_walletOctaSpace::Response

Generate / create a new wallet for the authenticated user POST /accounts

Returns:



28
29
30
# File 'lib/octaspace/resources/accounts.rb', line 28

def generate_wallet
  post("/accounts")
end

#profileOctaSpace::Response

Fetch the authenticated user’s profile GET /accounts

Returns:



14
15
16
# File 'lib/octaspace/resources/accounts.rb', line 14

def profile
  get("/accounts")
end