Class: Coinbase::Transfers
Overview
Coinbase transfer APIs
Direct Known Subclasses
Instance Method Summary collapse
-
#fetch(transfer_id) ⇒ Hash
Fetch information on a single deposit.
-
#list(options = {}) ⇒ Hash
Fetch the list of deposits from the profile of the API key, in descending order by created time.
-
#payment_methods ⇒ Hash
List available payment methods.
Methods inherited from Client
configuration, configure, #delete, #get, #headers, #http_request, #initialize, #post, #put, #signature
Methods included from Util
#base_uri, #build_query_params, #format_response, #pagination_params, #send_request
Constructor Details
This class inherits a constructor from Coinbase::Client
Instance Method Details
#fetch(transfer_id) ⇒ Hash
Fetch information on a single deposit.
19 20 21 22 23 |
# File 'lib/coinbase/transfers.rb', line 19 def fetch(transfer_id) operation_url = "/transfers/#{transfer_id}" response = get(operation_url) format_response(response) end |
#list(options = {}) ⇒ Hash
Fetch the list of deposits from the profile of the API key, in descending order by created time.
before [String] If before is set, then it returns deposits created after
the before timestamp, sorted by oldest creation date (optional).
after [String] If after is set, then it returns deposits created before
the after timestamp, sorted by newest (optional).
limit [Integer] Truncate list to this many deposits, capped at 100.
Default is 100. (optional).
39 40 41 42 43 44 45 46 |
# File 'lib/coinbase/transfers.rb', line 39 def list( = {}) operation_url = '/transfers' query_params = build_query_params() operation_url += '/?' + query_params if query_params.present? response = get(operation_url) format_response(response) end |
#payment_methods ⇒ Hash
List available payment methods.
8 9 10 11 12 |
# File 'lib/coinbase/transfers.rb', line 8 def payment_methods operation_url = '/payment-methods' response = get(operation_url) format_response(response) end |