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