Class: CodaStandard::Transaction
- Inherits:
-
Object
- Object
- CodaStandard::Transaction
- Defined in:
- lib/coda_standard/transaction.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
Returns the value of attribute account.
-
#address ⇒ Object
Returns the value of attribute address.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#bic ⇒ Object
Returns the value of attribute bic.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#entry_date ⇒ Object
Returns the value of attribute entry_date.
-
#name ⇒ Object
Returns the value of attribute name.
-
#postcode ⇒ Object
Returns the value of attribute postcode.
-
#reference_number ⇒ Object
Returns the value of attribute reference_number.
-
#structured_communication ⇒ Object
Returns the value of attribute structured_communication.
Instance Method Summary collapse
- #amount_cents ⇒ Object
- #amount_money ⇒ Object
- #match_structured_communication(structured_communication) ⇒ Object
Instance Attribute Details
#account ⇒ Object
Returns the value of attribute account.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def account @account end |
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def address @address end |
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def amount @amount end |
#bic ⇒ Object
Returns the value of attribute bic.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def bic @bic end |
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def country @country end |
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def currency @currency end |
#entry_date ⇒ Object
Returns the value of attribute entry_date.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def entry_date @entry_date end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def name @name end |
#postcode ⇒ Object
Returns the value of attribute postcode.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def postcode @postcode end |
#reference_number ⇒ Object
Returns the value of attribute reference_number.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def reference_number @reference_number end |
#structured_communication ⇒ Object
Returns the value of attribute structured_communication.
3 4 5 |
# File 'lib/coda_standard/transaction.rb', line 3 def structured_communication @structured_communication end |
Instance Method Details
#amount_cents ⇒ Object
9 10 11 |
# File 'lib/coda_standard/transaction.rb', line 9 def amount_cents (@amount.to_f * 100).to_i end |
#amount_money ⇒ Object
13 14 15 |
# File 'lib/coda_standard/transaction.rb', line 13 def amount_money "#{ amount_cents.to_s.insert(-3, ',') } #{ @currency }" end |
#match_structured_communication(structured_communication) ⇒ Object
5 6 7 |
# File 'lib/coda_standard/transaction.rb', line 5 def match_structured_communication(structured_communication) @structured_communication == structured_communication end |