Class: Sepa::DirectDebitOrder::DirectDebit
- Inherits:
-
Object
- Object
- Sepa::DirectDebitOrder::DirectDebit
- Defined in:
- lib/sepa/direct_debit_order.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#debtor ⇒ Object
Returns the value of attribute debtor.
-
#debtor_account ⇒ Object
Returns the value of attribute debtor_account.
-
#end_to_end_id ⇒ Object
Returns the value of attribute end_to_end_id.
Instance Method Summary collapse
-
#initialize(debtor, debtor_account, end_to_end_id, amount, currency) ⇒ DirectDebit
constructor
A new instance of DirectDebit.
- #to_properties(prefix) ⇒ Object
Constructor Details
#initialize(debtor, debtor_account, end_to_end_id, amount, currency) ⇒ DirectDebit
Returns a new instance of DirectDebit.
109 110 111 |
# File 'lib/sepa/direct_debit_order.rb', line 109 def initialize debtor, debtor_account, end_to_end_id, amount, currency @debtor, @debtor_account, @end_to_end_id, @amount, @currency = debtor, debtor_account, end_to_end_id, amount, currency end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
107 108 109 |
# File 'lib/sepa/direct_debit_order.rb', line 107 def amount @amount end |
#currency ⇒ Object
Returns the value of attribute currency.
107 108 109 |
# File 'lib/sepa/direct_debit_order.rb', line 107 def currency @currency end |
#debtor ⇒ Object
Returns the value of attribute debtor.
107 108 109 |
# File 'lib/sepa/direct_debit_order.rb', line 107 def debtor @debtor end |
#debtor_account ⇒ Object
Returns the value of attribute debtor_account.
107 108 109 |
# File 'lib/sepa/direct_debit_order.rb', line 107 def debtor_account @debtor_account end |
#end_to_end_id ⇒ Object
Returns the value of attribute end_to_end_id.
107 108 109 |
# File 'lib/sepa/direct_debit_order.rb', line 107 def end_to_end_id @end_to_end_id end |
Instance Method Details
#to_properties(prefix) ⇒ Object
113 114 115 116 117 118 119 120 121 122 |
# File 'lib/sepa/direct_debit_order.rb', line 113 def to_properties prefix hsh = { "#{prefix}.payment_identification.end_to_end_identification" => end_to_end_id, "#{prefix}.instructed_amount" => ("%.2f" % amount), "#{prefix}.instructed_amount_currency" => "EUR", } hsh = hsh.merge debtor.to_properties("#{prefix}.debtor") hsh = hsh.merge debtor_account.to_properties("#{prefix}.debtor") hsh end |