0.0
No release in over 3 years
Low commit activity in last 3 years
Allows you to request information on the user profile, payment history, wallet balance, etc.
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
~> 3.0
~> 3.3

Runtime

 Project Readme

QiwiObserver

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/qiwi_observer. To experiment with that code, run bin/console for an interactive prompt.

Installation

Add this line to your application's Gemfile:

gem 'qiwi_observer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install qiwi_observer

Как работать

Инициализируйте объект

  • request = QiwiObserver::Payments.new(wallet: '7XXXXXXXXXX', token: 'asd23dsvdljoihiscgasdcrpoi')

Вызовите метод #call на объекте с переданным хэшом, формата {rows: Integer, operation: String, startDate: DateTime, endDate: DateTime}*

  • response = request.call({rows: 15, operation: 'IN'})

Сделайте проверку, при успешном запросе через метод #short_info получите массив хэшей с информацией платежей (:account_id, :date, :amount, :comment)

  • if response.success?
    • result = response.short_info
  • else
    • redirect_to some_apth flash {error: response.error}
  • end
    • rows: целое число от 1 до 50. Обязательный параметр.
    • Возможные значения параметра operation: ALL, IN, OUT & QIWI_CARD.
    • startDate: Начальная дата поиска платежей. Дату можно указать в любой временной зоне TZD (формат ГГГГ-ММ-ДД'T'чч:мм:ссTZD), однако она должна совпадать с временной зоной в параметре endDate.

License

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