Class: BankAccountConnectorExternal

Inherits:
BankAccountConnector show all
Defined in:
app/lib/bank_account_connector_external.rb

Instance Attribute Summary

Attributes inherited from BankAccountConnector

#auto_submit, #controls, #count

Instance Method Summary collapse

Methods inherited from BankAccountConnector

#confirm_text, #continuation_point, find, #finish, #hidden_field, #iban, #initialize, #password_field, register, #set_balance, #set_balance_as_sum, #set_continuation_point, #t, #text, #text_field, #update_or_create_transaction, #wait_for_app, #wait_with_text

Constructor Details

This class inherits a constructor from BankAccountConnector

Instance Method Details

#connector_importObject



11
12
13
14
15
16
17
# File 'app/lib/bank_account_connector_external.rb', line 11

def connector_import
  set_balance @connector.balance iban
  cp = @connector.transactions iban, continuation_point do |t|
    update_or_create_transaction t[:id], map_transaction(t)
  end
  set_continuation_point cp if cp
end

#connector_logoutObject



19
20
21
# File 'app/lib/bank_account_connector_external.rb', line 19

def connector_logout
  @connector.logout
end

#dumpObject



7
8
9
# File 'app/lib/bank_account_connector_external.rb', line 7

def dump
  @connector.dump
end

#import(data) ⇒ Object



23
24
25
26
27
28
29
# File 'app/lib/bank_account_connector_external.rb', line 23

def import(data)
  return false unless (data)

  connector_import
  connector_logout
  true
end

#load(data) ⇒ Object



2
3
4
5
# File 'app/lib/bank_account_connector_external.rb', line 2

def load(data)
  @connector = create_connector
  @connector.load data
end