Class: XeroCLI::Templates::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/xero_cli/templates/transaction.rb

Class Method Summary collapse

Class Method Details

.attributes(amount, type, user_name, bank_name, account_code, date) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/xero_cli/templates/transaction.rb', line 4

def self.attributes(amount, type, user_name, bank_name, , date)
  {
      date: date,
      type: type,
      is_reconciled: false,
      line_items: {
          description: 'Transaction created manually',
          quantity: 1,
          unit_amount: amount,
          account_code:  || XeroCLI::Constants::DEFAULT_CATEGORY_CODE
      },
      contact: {
          name: user_name
      },
      bank_name: bank_name
  }
end