Sha256: 45a1068338461fefa3e9e0f8d6cee5e1b42609bb9e5729e43f99f1c0bcc3025d
Contents?: true
Size: 749 Bytes
Versions: 1
Compression:
Stored size: 749 Bytes
Contents
require 'httparty' require 'bankster/bank_credentials' module Bankster class Client include HTTParty attr_reader :credentials def initialize(credentials, api_key) @credentials = credentials @api_key = api_key @options = { base_uri: BANKSTER_BASE_URI || 'https://api.bankster.io', headers: { 'Api-Key' => api_key, 'Bank-Credentials' => Base64.encode64(credentials.to_json) } } end def transactions(account, from, to) response = self.class.get("/transactions", @options.merge(query: {account: account, start: from, end: to})) if response.ok? JSON.parse(response.body) else raise(response.body) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bankster-client-0.0.3 | lib/bankster/client.rb |