Class: Hbci::Services::AccountsReceiver

Inherits:
Object
  • Object
show all
Defined in:
lib/hbci/services/accounts_receiver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dialog) ⇒ AccountsReceiver

Returns a new instance of AccountsReceiver.



8
9
10
# File 'lib/hbci/services/accounts_receiver.rb', line 8

def initialize(dialog)
  @dialog = dialog
end

Instance Attribute Details

#dialogObject (readonly)

Returns the value of attribute dialog.



6
7
8
# File 'lib/hbci/services/accounts_receiver.rb', line 6

def dialog
  @dialog
end

Instance Method Details

#performObject



12
13
14
15
16
# File 'lib/hbci/services/accounts_receiver.rb', line 12

def perform
  dialog.response.find('HNVSD').find_all('HIUPD').map do |hiupd|
    { account_number: hiupd.ktv.number, bank_code: hiupd.ktv.kik_blz }
  end
end