Class: Processors::UBSCredit

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

Overview

UBS Switzerland Credit Card accounts processor

Instance Method Summary collapse

Methods inherited from Processor

#to_ynab!

Constructor Details

#initialize(filepath:) ⇒ UBSCredit

Returns a new instance of UBSCredit.



6
7
8
9
10
11
12
13
14
15
# File 'lib/ynab_convert/processors/ubs_credit_processor.rb', line 6

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

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