Class: SEPA::Transaction
- Inherits:
-
Object
- Object
- SEPA::Transaction
- Extended by:
- Converter
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/sepa_king/transaction.rb
Direct Known Subclasses
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.
-
#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.
20 21 22 23 24 25 26 27 28 |
# File 'lib/sepa_king/transaction.rb', line 20 def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end self.requested_date ||= Date.today.next self.reference ||= 'NOTPROVIDED' self.batch_booking = true if self.batch_booking.nil? end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def amount @amount end |
#batch_booking ⇒ Object
Returns the value of attribute batch_booking.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def batch_booking @batch_booking end |
#bic ⇒ Object
Returns the value of attribute bic.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def bic @bic end |
#iban ⇒ Object
Returns the value of attribute iban.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def iban @iban end |
#instruction ⇒ Object
Returns the value of attribute instruction.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def instruction @instruction end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def name @name end |
#reference ⇒ Object
Returns the value of attribute reference.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def reference @reference end |
#remittance_information ⇒ Object
Returns the value of attribute remittance_information.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def remittance_information @remittance_information end |
#requested_date ⇒ Object
Returns the value of attribute requested_date.
7 8 9 |
# File 'lib/sepa_king/transaction.rb', line 7 def requested_date @requested_date end |