Class: Sepa::DirectDebitOrder::BankAccount
- Inherits:
-
Object
- Object
- Sepa::DirectDebitOrder::BankAccount
- Defined in:
- lib/sepa/direct_debit_order.rb
Instance Attribute Summary collapse
-
#iban ⇒ Object
Returns the value of attribute iban.
-
#swift ⇒ Object
Returns the value of attribute swift.
Instance Method Summary collapse
-
#initialize(iban, swift) ⇒ BankAccount
constructor
A new instance of BankAccount.
- #to_properties(prefix, opts) ⇒ Object
Constructor Details
#initialize(iban, swift) ⇒ BankAccount
Returns a new instance of BankAccount.
232 233 234 |
# File 'lib/sepa/direct_debit_order.rb', line 232 def initialize iban, swift @iban, @swift = iban, swift end |
Instance Attribute Details
#iban ⇒ Object
Returns the value of attribute iban.
230 231 232 |
# File 'lib/sepa/direct_debit_order.rb', line 230 def iban @iban end |
#swift ⇒ Object
Returns the value of attribute swift.
230 231 232 |
# File 'lib/sepa/direct_debit_order.rb', line 230 def swift @swift end |
Instance Method Details
#to_properties(prefix, opts) ⇒ Object
236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/sepa/direct_debit_order.rb', line 236 def to_properties prefix, opts bic_tag = ( opts[:pain_008_001_version] == "04" ? "bic_fi" : "bic" ) if swift.nil? { "#{prefix}_account.identification.iban" => iban.gsub(/\s/, ''), "#{prefix}_agent.financial_institution_identification.other.identification" => "NOTPROVIDED" } else { "#{prefix}_account.identification.iban" => iban.gsub(/\s/, ''), "#{prefix}_agent.financial_institution_identification.#{bic_tag}" => swift } end end |