Class: IBANPayment

Inherits:
DTA::Payments::Base show all
Includes:
DTA::Payment::Sortable
Defined in:
lib/payment_dta/payments/iban_payment.rb

Constant Summary

Constants included from DTA::CharacterConversion

DTA::CharacterConversion::CONVERSION_MAP_UTF8

Instance Method Summary collapse

Methods included from DTA::Payment::Sortable

#<=>

Methods inherited from DTA::Payments::Base

#account_to_be_debited, #amount, #bank_payment_instructions, #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_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_purpose, #initialize, #issuer_identification, #ordering_party_bank_clearing_number, #ordering_partys_address_line1, #ordering_partys_address_line2, #ordering_partys_address_line3, #ordering_partys_address_line4, #output_sequence_number, #payment_amount, #payment_amount_currency, #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, #segment1, #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

#beneficiary_address(line_size = 35) ⇒ Object



51
52
53
# File 'lib/payment_dta/payments/iban_payment.rb', line 51

def beneficiary_address(line_size=35)
  beneficiary_address_line1(line_size) + beneficiary_address_line2(line_size) + beneficiary_address_line3(line_size)
end

#beneficiary_institution_address(line_size = 24) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/payment_dta/payments/iban_payment.rb', line 43

def beneficiary_institution_address(line_size=24)
  if identification_bank_address == 'A'
    @data[:beneficiarys_institution_swift_address_].to_s.ljust(70)
  else
    @data[:beneficiary_institution_address_line1].to_s.ljust(35) + @data[:beneficiary_institution_address_line2].to_s.ljust(35)
  end
end

#convertion_rateObject



31
32
33
# File 'lib/payment_dta/payments/iban_payment.rb', line 31

def convertion_rate
  @data[:convertion_rate].to_s.ljust(12)
end

#identification_bank_addressObject



39
40
41
# File 'lib/payment_dta/payments/iban_payment.rb', line 39

def identification_bank_address
  @data[:identification_bank_address].to_s
end

#ordering_partys_address(line_size = 35) ⇒ Object



35
36
37
# File 'lib/payment_dta/payments/iban_payment.rb', line 35

def ordering_partys_address(line_size = 35)
  ordering_partys_address_line1(line_size) + ordering_partys_address_line2(line_size) + ordering_partys_address_line3(line_size)
end

#payment_amount_valueObject



27
28
29
# File 'lib/payment_dta/payments/iban_payment.rb', line 27

def payment_amount_value
  super(15)
end

#payment_amount_value_dateObject



23
24
25
# File 'lib/payment_dta/payments/iban_payment.rb', line 23

def payment_amount_value_date
 @data[:payment_amount_value_date].to_s.ljust(6)
end

#payment_typeObject



15
16
17
# File 'lib/payment_dta/payments/iban_payment.rb', line 15

def payment_type
  '1'
end

#recordObject



7
8
9
# File 'lib/payment_dta/payments/iban_payment.rb', line 7

def record
  @record ||= segment1 + segment2 + segment3 + segment4 + segment5
end

#requested_processing_dateObject



19
20
21
# File 'lib/payment_dta/payments/iban_payment.rb', line 19

def requested_processing_date
  '000000'
end

#transaction_typeObject



11
12
13
# File 'lib/payment_dta/payments/iban_payment.rb', line 11

def transaction_type
  '836'
end