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, category_name, date) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/xero_cli/templates/transaction.rb', line 4

def self.attributes(amount, type, user_name, bank_name, category_name, date)
  {
    'amount' => amount,
    'description' => 'Transaction created manually',
    'customer_name' => user_name,
    'type' => type,
    'bank_name' => bank_name || XeroCLI::Constants::STRIPE_BANK_NAME,
    'category_name' => category_name || XeroCLI::Constants::DEFAULT_CATEGORY_NAME,
    'date' => date
  }
end