Bankster::Client
A tiny http wrapper for bankster.io
Installation
Add this line to your application's Gemfile:
gem 'bankster-client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bankster-client
Usage
Bankster::Client can be configured globaly or on instance level.
Global Configuration:
Bankster::Client.configure do
api_key = "my_api_key"
api_url = "http://bankster.io"
credentials = some_bankster_credentials
end
Afterwards, the Bankster::Client can be initialized:
client = Bankster::Client.new
Configure every instance:
If configuration params are given to the initializer, they override an existing global configuration:
client = Bankster::Client.new(credentials: hbci_credentials, api_key: 'my_key', base_uri: 'http://some_host')
Credentials
Credentials are one of Bankster::BankCredentials::Hbci
or Bankster::BankCredentials::Ebics
, e.g.:
hbci_credentials = Bankster::BankCredentials::Hbci.new({
url: 'https://hbci11.fiducia.de/cgi-bin/hbciservlet',
bank_code: '67290000',
user_id: 'my_hbci_user_id',
pin: 'my_hbci_pin'
})
Receiving transactions
transactions = client.transactions('my_account_number', Date.new(2016,5,1), Date.new(2016,5,11))
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/bankster/bankster-client.
License
The gem is available as open source under the terms of the MIT License.