Class: Processors::UBSChequing

Inherits:
Processor show all
Defined in:
lib/ynab_convert/processors/ubs_chequing_processor.rb

Overview

UBS Switzerland Chequing accounts processor

Instance Method Summary collapse

Methods inherited from Processor

#to_ynab!

Constructor Details

#initialize(filepath:) ⇒ UBSChequing

Returns a new instance of UBSChequing.

Parameters:

  • filepath (String)

    path to the CSV file



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ynab_convert/processors/ubs_chequing_processor.rb', line 7

def initialize(filepath:)
  transformers = [
    Transformers::Cleaners::UBSChequing.new,
    Transformers::Formatters::UBSChequing.new
  ]
  statement = Documents::Statements::UBSChequing.new(filepath: filepath)
  ynab4_file_options = { format: :flows,
                         institution_name: statement.institution_name }
  ynab4_file = Documents::YNAB4Files::YNAB4File.new(ynab4_file_options)

  super(statement: statement, ynab4_file: ynab4_file, transformers:
        transformers)
end