Class: Remitano::Client::CoinWithdrawals
- Inherits:
-
CoinCollection
- Object
- Collection
- CoinCollection
- Remitano::Client::CoinWithdrawals
- Defined in:
- lib/remitano/client/coin_withdrawals.rb
Instance Attribute Summary
Attributes inherited from CoinCollection
Attributes inherited from Collection
#config, #path, #resource_name
Instance Method Summary collapse
- #cancel(id) ⇒ Object
- #my_withdrawals ⇒ Object
- #withdraw(coin_address:, coin_amount:, destination_tag: nil) ⇒ Object
Methods inherited from CoinCollection
Methods inherited from Collection
#all, #create, #get, #initialize, #update
Constructor Details
This class inherits a constructor from Remitano::Client::CoinCollection
Instance Method Details
#cancel(id) ⇒ Object
9 10 11 |
# File 'lib/remitano/client/coin_withdrawals.rb', line 9 def cancel(id) config.net.post("/coin_withdrawals/#{id}/cancel").execute end |
#my_withdrawals ⇒ Object
5 6 7 |
# File 'lib/remitano/client/coin_withdrawals.rb', line 5 def my_withdrawals config.net.get("/coin_withdrawals?coin_currency=#{coin}").execute end |
#withdraw(coin_address:, coin_amount:, destination_tag: nil) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/remitano/client/coin_withdrawals.rb', line 13 def withdraw(coin_address:, coin_amount:, destination_tag: nil) params = { coin_address: coin_address, coin_currency: coin, coin_amount: coin_amount, destination_tag: destination_tag, } response = config.net.post("/coin_withdrawals", coin_withdrawal: params).execute config.action_confirmations.confirm_if_neccessary!(response) end |