class Remitano::Client

Attributes

default_authenticator_secret[RW]
default_key[RW]
default_secret[RW]
default_verbose[RW]
authenticator_secret[RW]
key[RW]
secret[RW]
verbose[RW]

Public Class Methods

default() click to toggle source
# File lib/remitano/client.rb, line 17
def default
  @default ||= new(key: default_key, secret: default_secret, authenticator_secret: default_authenticator_secret, verbose: default_verbose)
end
new(key:, secret:, authenticator_secret: nil, verbose: false) click to toggle source
# File lib/remitano/client.rb, line 24
def initialize(key:, secret:, authenticator_secret: nil, verbose: false)
  self.key = key
  self.secret = secret
  self.authenticator_secret = authenticator_secret
  self.verbose = verbose
end

Public Instance Methods

action_confirmations() click to toggle source
# File lib/remitano/client.rb, line 43
def action_confirmations
  @action_confirmations ||= ActionConfirmations.new(config: self)
end
authenticator_token() click to toggle source
# File lib/remitano/client.rb, line 31
def authenticator_token
  ROTP::TOTP.new(authenticator_secret).now
end
coin_accounts(coin) click to toggle source
# File lib/remitano/client.rb, line 47
def coin_accounts(coin)
  @coin_accounts ||= {}
  @coin_accounts[coin] ||= CoinAccounts.new(coin, config: self)
end
coin_withdrawals(coin) click to toggle source
# File lib/remitano/client.rb, line 67
def coin_withdrawals(coin)
  @coin_withdrawals ||= CoinWithdrawals.new(coin, config: self)
end
fiat_accounts(currency) click to toggle source
# File lib/remitano/client.rb, line 52
def fiat_accounts(currency)
  @fiat_accounts ||= {}
  @fiat_accounts[currency] ||= FiatAccounts.new(currency, config: self)
end
hotp(otp_counter) click to toggle source
# File lib/remitano/client.rb, line 35
def hotp(otp_counter)
  ROTP::HOTP.new(authenticator_secret).at(otp_counter)
end
merchant_charges() click to toggle source
# File lib/remitano/client.rb, line 88
def merchant_charges
  @merchant_charges ||= MerchantCharges.new(config: self)
end
merchant_withdrawals() click to toggle source
# File lib/remitano/client.rb, line 92
def merchant_withdrawals
  @merchant_withdrawals ||= MerchantWithdrawals.new(config: self)
end
net() click to toggle source
# File lib/remitano/client.rb, line 39
def net
  @net ||= Remitano::Client::Net.new(config: self)
end
offers(coin) click to toggle source
# File lib/remitano/client.rb, line 57
def offers(coin)
  @offers ||= {}
  @offers[coin] ||= Offers.new(coin, config: self)
end
orders() click to toggle source
# File lib/remitano/client.rb, line 71
def orders
  @orders ||= Orders.new(config: self)
end
price_ladders() click to toggle source
# File lib/remitano/client.rb, line 84
def price_ladders
  @price_ladders ||= PriceLadders.new
end
public_offers(coin) click to toggle source
# File lib/remitano/client.rb, line 79
def public_offers(coin)
  @public_offers ||= {}
  @public_offers[coin] ||= PublicOffers.new(coin)
end
rates() click to toggle source
# File lib/remitano/client.rb, line 75
def rates
  @rates ||= Rates.new
end
trades(coin) click to toggle source
# File lib/remitano/client.rb, line 62
def trades(coin)
  @trades ||= {}
  @trades[coin] ||= Trades.new(coin, config: self)
end