Project

ifns

0.0
No release in over 3 years
Low commit activity in last 3 years
Client for Ifns api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 10.0
~> 0.72.0

Runtime

>= 5.0, < 7.0
~> 0.15
~> 0.0, >= 0.0.5
~> 4.1
 Project Readme

Ifns

Installation

Add this line to your application's Gemfile:

gem 'ifns', github: 'inshopper/ifns'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ifns

Usage

Create intitializer config/initializers/ifns.rb

Ifns.configure do |config|
  config.host = 'YOUR_HOST'
  config.token = 'YOUR_TOKEN'
  config.logger = 'YOUR_LOGGER'
end
example_data = { id: 'resource_id', fn: 8710000101674196, fd: 7078, fpd: 1050183412, date: '2019-03-01T12:21:00', sum: 209900, type_operation: 1}
client = ::Ifns::Client.new(example_data)
client.create_ticket
# wait 1500ms
client.find_ticket
# if response status is accepted do loop over 30 seconds and each 2 seconds retry request until you get a different status
# after loop if you still get accepted try again later

License

The gem is available as open source under the terms of the MIT License.