Class: CoinbaseCustody::Wallets
- Defined in:
- lib/coinbase_custody/wallets.rb
Overview
Wallets API's
Constant Summary collapse
- WALLETS_PATH =
'/wallets'
Constants included from Util
Instance Method Summary collapse
-
#create(wallet_details) ⇒ Hash
Creates a new wallet.
-
#fetch(wallet_id) ⇒ Hash
fetch a specific wallet by id.
-
#list(params = {}) ⇒ Hash
Gets a list of wallets.
Methods inherited from Client
#get, #headers, #http_request, #initialize, #post
Methods included from Util
#format_response, #pagination_params, #send_request
Constructor Details
This class inherits a constructor from CoinbaseCustody::Client
Instance Method Details
#create(wallet_details) ⇒ Hash
Creates a new wallet
Request a new wallet be created for your organization The response value can be filtered by query parameters. apporval_url, currency, name, activity_id
26 27 28 |
# File 'lib/coinbase_custody/wallets.rb', line 26 def create(wallet_details) format_response(post(WALLETS_PATH, body: wallet_details)) end |
#fetch(wallet_id) ⇒ Hash
fetch a specific wallet by id
Retrieve information about an individual wallet for your organization.
35 36 37 |
# File 'lib/coinbase_custody/wallets.rb', line 35 def fetch(wallet_id) format_response(get("#{WALLETS_PATH}/#{wallet_id}")) end |
#list(params = {}) ⇒ Hash
Gets a list of wallets
Retrieve a list of your organization's wallets. The response value can be filtered by query parameters.
14 15 16 |
# File 'lib/coinbase_custody/wallets.rb', line 14 def list(params = {}) format_response(get(WALLETS_PATH, query: params)) end |