Class: SEPA::Transaction
- Inherits:
-
Object
- Object
- SEPA::Transaction
- Extended by:
- Converter
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/sepa_king/transaction.rb
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_REQUESTED_DATE =
Date.new(1999, 1, 1).freeze
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#batch_booking ⇒ Object
Returns the value of attribute batch_booking.
-
#bic ⇒ Object
Returns the value of attribute bic.
-
#creditor_address ⇒ Object
Returns the value of attribute creditor_address.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#debtor_address ⇒ Object
Returns the value of attribute debtor_address.
-
#iban ⇒ Object
Returns the value of attribute iban.
-
#instruction ⇒ Object
Returns the value of attribute instruction.
-
#name ⇒ Object
Returns the value of attribute name.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#remittance_information ⇒ Object
Returns the value of attribute remittance_information.
-
#requested_date ⇒ Object
Returns the value of attribute requested_date.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Transaction
constructor
A new instance of Transaction.
Methods included from Converter
Constructor Details
#initialize(attributes = {}) ⇒ Transaction
Returns a new instance of Transaction.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/sepa_king/transaction.rb', line 35 def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end self.requested_date ||= DEFAULT_REQUESTED_DATE self.reference ||= 'NOTPROVIDED' self.batch_booking = true if self.batch_booking.nil? self.currency ||= 'EUR' end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def amount @amount end |
#batch_booking ⇒ Object
Returns the value of attribute batch_booking.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def batch_booking @batch_booking end |
#bic ⇒ Object
Returns the value of attribute bic.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def bic @bic end |
#creditor_address ⇒ Object
Returns the value of attribute creditor_address.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def creditor_address @creditor_address end |
#currency ⇒ Object
Returns the value of attribute currency.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def currency @currency end |
#debtor_address ⇒ Object
Returns the value of attribute debtor_address.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def debtor_address @debtor_address end |
#iban ⇒ Object
Returns the value of attribute iban.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def iban @iban end |
#instruction ⇒ Object
Returns the value of attribute instruction.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def instruction @instruction end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def name @name end |
#reference ⇒ Object
Returns the value of attribute reference.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def reference @reference end |
#remittance_information ⇒ Object
Returns the value of attribute remittance_information.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def remittance_information @remittance_information end |
#requested_date ⇒ Object
Returns the value of attribute requested_date.
9 10 11 |
# File 'lib/sepa_king/transaction.rb', line 9 def requested_date @requested_date end |