Class: TotalRecord

Inherits:
DTA::Payments::Base show all
Defined in:
lib/payment_dta/payments/total_record.rb

Constant Summary

Constants included from DTA::CharacterConversion

DTA::CharacterConversion::CONVERSION_MAP_UTF8

Instance Method Summary collapse

Methods inherited from DTA::Payments::Base

#account_to_be_debited, #amount, #bank_payment_instructions, #beneficiary_address, #beneficiary_address_line1, #beneficiary_address_line2, #beneficiary_address_line3, #beneficiary_address_line4, #beneficiary_bank_account_number, #beneficiary_bank_clearing_number, #beneficiary_iban_number, #beneficiary_institution_address, #beneficiary_institution_address_line1, #beneficiary_institution_address_line2, #beneficiary_institution_address_line3, #beneficiary_institution_address_line4, #beneficiary_institution_bank_account_number, #creation_date, #data_file_sender_identification, #entry_sequence_number, #entry_sequence_number=, #header, #identification_bank_address, #identification_purpose, #initialize, #issuer_identification, #ordering_partys_address, #ordering_partys_address_line1, #ordering_partys_address_line2, #ordering_partys_address_line3, #ordering_partys_address_line4, #output_sequence_number, #payment_amount, #payment_amount_currency, #payment_amount_value, #payment_amount_value_date, #processing_flag, #purpose, #reason_for_payment_message, #reason_for_payment_message_line1, #reason_for_payment_message_line2, #reason_for_payment_message_line3, #reason_for_payment_message_line4, #reference_number, #rule_of_charge, #segment2, #segment3, #segment4, #segment5, #segment6, #to_dta, #transaction_number, #transaction_number=

Methods included from DTA::CharacterConversion

#dta_string, #encode_characters, #map_characters

Constructor Details

This class inherits a constructor from DTA::Payments::Base

Instance Method Details

#ordering_party_bank_clearing_numberObject



17
18
19
# File 'lib/payment_dta/payments/total_record.rb', line 17

def ordering_party_bank_clearing_number
  ''.ljust(7)
end

#payment_typeObject



25
26
27
# File 'lib/payment_dta/payments/total_record.rb', line 25

def payment_type
  '0'
end

#recordObject



8
9
10
# File 'lib/payment_dta/payments/total_record.rb', line 8

def record
  segment1
end

#requested_processing_dateObject



29
30
31
# File 'lib/payment_dta/payments/total_record.rb', line 29

def requested_processing_date
  '000000'
end

#segment1Object



4
5
6
# File 'lib/payment_dta/payments/total_record.rb', line 4

def segment1
  super + total_amount + reserve_field(59)
end

#total_amountObject



12
13
14
15
# File 'lib/payment_dta/payments/total_record.rb', line 12

def total_amount
  number = BigDecimal.new(@data[:total_amount].to_s, 16).round(3)
  number.to_s('F').gsub(/\./,',').ljust(16)
end

#transaction_typeObject



21
22
23
# File 'lib/payment_dta/payments/total_record.rb', line 21

def transaction_type
  '890'
end