Class: CoinbaseCustody::AddressBook

Inherits:
Client
  • Object
show all
Defined in:
lib/coinbase_custody/address_book.rb

Overview

AddressBook API

Constant Summary collapse

ADDRESS_BOOK_PATH =
'/address_book'

Constants included from Util

Util::BASE_API_URL

Instance Method Summary collapse

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(address_book_details) ⇒ Hash

Creates a new address book address

Request a new address be added to your organization's address book new allowed address new allowed address allowed address

Returns:

  • (Hash)

    a hash with status code and address detail



33
34
35
# File 'lib/coinbase_custody/address_book.rb', line 33

def create(address_book_details)
  format_response(post(ADDRESS_BOOK_PATH, body: address_book_details))
end

#list(params = {}) ⇒ Hash

Gets a list of address book addresses

Retrieve a list of addresses in your organization's address book The response value can be filtered by query parameters. filter by

Returns:

  • (Hash)

    a hash with status code and organization's address book



18
19
20
# File 'lib/coinbase_custody/address_book.rb', line 18

def list(params = {})
  format_response(get(ADDRESS_BOOK_PATH, query: params))
end