Class: CzechBanksParser
- Inherits:
-
Object
- Object
- CzechBanksParser
- Defined in:
- lib/czech_banks_parser.rb
Instance Method Summary collapse
- #config(state) ⇒ Object
- #connect(token, bank) ⇒ Object
-
#initialize(opts = {}) ⇒ CzechBanksParser
constructor
A new instance of CzechBanksParser.
Constructor Details
#initialize(opts = {}) ⇒ CzechBanksParser
Returns a new instance of CzechBanksParser.
6 7 8 |
# File 'lib/czech_banks_parser.rb', line 6 def initialize(opts = {}) @opts = opts end |
Instance Method Details
#config(state) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/czech_banks_parser.rb', line 18 def config(state) case state when 'csas' { base_uri: @opts[:mode] == 'production' ? '' : 'https://www.csast.csas.cz/webapi/api/v3', auth_uri: @opts[:mode] == 'production' ? '' : 'https://www.csast.csas.cz/widp/oauth2/auth', token_uri: @opts[:mode] == 'production' ? '' : 'https://www.csast.csas.cz/widp/oauth2/token', client_id: @opts[:client_id], secret: @opts[:secret], web_api_key: @opts[:web_api_key] } when 'fio' { base_uri: 'https://www.fio.cz/ib_api/rest' } end end |