Class: XeroCLI::Commands::Transfer
- Defined in:
- lib/xero_cli/commands/transfer.rb
Constant Summary collapse
- TRANSACTION_TYPE =
'RECEIVE'.freeze
Instance Method Summary collapse
-
#initialize(options) ⇒ Transfer
constructor
A new instance of Transfer.
- #perform ⇒ Object
Methods inherited from Base
#format_date, #money_to_cents, #read_guid, #xero_api
Constructor Details
#initialize(options) ⇒ Transfer
Returns a new instance of Transfer.
4 5 6 7 8 9 |
# File 'lib/xero_cli/commands/transfer.rb', line 4 def initialize() @transfer = .transfer @to = .to @from = .from @on = .on end |
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 16 |
# File 'lib/xero_cli/commands/transfer.rb', line 11 def perform check_exceptions transfer_attributes = XeroCLI::Templates::Transfer.attributes(transfer, from, to, on) create_transfer(transfer_attributes) write_to_terminal end |