Class: BankPayments::SwedbankImport::ReconciliationRecord

Inherits:
BankPayments::SpisuRecord show all
Defined in:
lib/bank_payments/swedbank_import/reconciliation_record.rb

Instance Method Summary collapse

Methods inherited from BankPayments::SpisuRecord

define_field, defined_fields, definition_for, #extract_date, #extract_field_value, #extract_raw_value, inherited, #method_missing, #serialize_value, #set_numeric_value, #set_text_value, #set_value, #to_s, #type, #type=

Constructor Details

#initialize(raw_record) ⇒ ReconciliationRecord



12
13
14
15
# File 'lib/bank_payments/swedbank_import/reconciliation_record.rb', line 12

def initialize(raw_record)
  super
  self.type = '6'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BankPayments::SpisuRecord

Instance Method Details

#sum_amount_foreignObject



25
26
27
# File 'lib/bank_payments/swedbank_import/reconciliation_record.rb', line 25

def sum_amount_foreign
  AmountConverter.value_to_decimal(extract_raw_value __callee__)
end

#sum_amount_sekObject



17
18
19
# File 'lib/bank_payments/swedbank_import/reconciliation_record.rb', line 17

def sum_amount_sek
  AmountConverter.value_to_decimal(extract_raw_value __callee__)
end

#sum_bank_amount_sekObject



21
22
23
# File 'lib/bank_payments/swedbank_import/reconciliation_record.rb', line 21

def sum_bank_amount_sek
  AmountConverter.value_to_decimal(extract_raw_value __callee__)
end

#transaction_costObject



29
30
31
# File 'lib/bank_payments/swedbank_import/reconciliation_record.rb', line 29

def transaction_cost
  AmountConverter.value_to_decimal(extract_raw_value __callee__)
end