Class: Cryptopay::Coins

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptopay/api/coins.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Coins

Returns a new instance of Coins.



8
9
10
# File 'lib/cryptopay/api/coins.rb', line 8

def initialize(connection)
  @connection = connection
end

Instance Method Details

#list(_opts = {}) ⇒ CoinListResult

List supported coins

Parameters:

  • opts (Hash)

    the optional parameters

Returns:



15
16
17
18
19
20
21
22
23
24
# File 'lib/cryptopay/api/coins.rb', line 15

def list(_opts = {})
  path = '/api/coins'

  req = Request.new(
    method: :get,
    path: path
  )

  connection.call(req, return_type: CoinListResult)
end