Build Status

Fio API

This project rocks and uses MIT-LICENSE.

This gem is a wrapper for Fio bank API.

Usage

Add to your gemfile

gem 'fio_api'

Setup API token

FioAPI.token = "8JSKJ823DN86YRH87UIRUI2363ND5xcr3"

Request transactions in date range 2012-11-05 and 2012-12-26

list = FioAPI::List.new                                         # Create new listing request
list.by_date_range(Date.new(2012,11,05), Date.new(2012,12,26))  # Specify listing condition and fetch request
list.response                                                   # Return deserialized response

Request to get transactions form last request

list = FioAPI::List.new
list.from_last_fetch
list.response

Request transactions by listing_id and year

list = FioAPI::List.new
list.by_listing_id_and_year(1, 2012)
list.response

Request to set last request id

list = FioAPI::List.new
list.set_last_fetch_id("SHXG738377834")
list.response

Request to set last request date

list = FioAPI::List.new
list.set_last_fetch_date(Date.new(2012,11,05))
list.response

Import domestic payments for authorization

payment = FioAPI::Payments::Domestic.new(:account_from, :currency, :amount, :account_to,
        :bank_code, :ks, :vs, :ss, :date, :message_for_recipient, :comment)
service = FioAPI::Payment.new [payment]                         # Pass one payment or array of payments
service.import                                                  # Call API
service.response                                                # Return deserialized response with status code etc.
service.success?                                                # => true / false

Contributing to fio_api