Class: MercadoBitcoin::Console::Commands::Account::Withdraw::BTC

Inherits:
BaseNoTakeCommand
  • Object
show all
Defined in:
lib/mercado_bitcoin/console/commands/account/withdraw/btc.rb

Instance Attribute Summary

Attributes inherited from Base

#console

Instance Method Summary collapse

Methods inherited from BaseNoTakeCommand

#take_commands

Methods inherited from Base

command_classes, inherited, #initialize, long_desc, short_desc, take_commands, #take_commands

Constructor Details

This class inherits a constructor from MercadoBitcoin::Console::Commands::Base

Instance Method Details

#after_initializeObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/mercado_bitcoin/console/commands/account/withdraw/btc.rb', line 5

def after_initialize
  argument_desc(quantity: 'Valor bruto do saque.', address: 'Endereço Bitcoin marcado como confiável')
  options do |opts|
    opts.on("--[no-]tx-aggregate", "retirada pode ser feita junto de outras retiradas em uma mesma transação no Blockchain.") do |v|
      console.options[:tx_aggregate] = v
    end
    opts.on("--[no-]via-blockchain", "retirada para endereço no Mercado Bitcoin pode ser feita via Blockchain para gerar uma transação na rede Bitcoin.") do |v|
      console.options[:via_blockchain] = v
    end
  end
end

#execute(quantity, address) ⇒ Object



17
18
19
# File 'lib/mercado_bitcoin/console/commands/account/withdraw/btc.rb', line 17

def execute(quantity, address)
  super(coin: 'btc', quantity: quantity, address: address)
end