0.0
There's a lot of open issues
A long-lived project that still receives updates
Ruby SDK for Zold online wallets management system (WTS)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.2
= 1.4.0
~> 0.31
 Project Readme

EO principles respected here DevOps By Rultor.com We recommend RubyMine

rake PDD status Gem Version Test Coverage Yard Docs License Hits-of-Code

Here is the White Paper.

Join our Telegram group to discuss it all live.

This is a simple Ruby SDK for making payments, checking balances, and finding transactions in Zold wallets via WTS system.

There are other languages too: Java SDK.

First, you install it:

gem install zold-ruby-sdk

Then, you get your API key here.

The, you make an instance of class Zold::WTS:

require 'zold/wts'
wts = Zold::WTS.new(key)

Now you can pull your wallet and then check its balance:

job = wts.pull # Initiate PULL and returns the unique ID of the job
wts.wait(job) # Wait for the job to finish
b = wts.balance # Retrieve the balance as an instance of Zold::Amount
puts b

To make a payment you will need to know your keygap:

job = wts.pay(keygap, 'yegor256', '19.95', 'For pizza') # Initiate a payment request
wts.wait(job) # Wait for the job to finish

To find a payment in your wallet, you do this (don't forget to pull first):

# Finds all payments that match this query and returns
# an array of Zold::Txn objects.
txns = wts.find(id: '123', details: /pizza/)

That's it.

How to contribute

Read these guidelines. Make sure you build is green before you contribute your pull request. You will need to have Ruby 2.3+ and Bundler installed. Then:

$ bundle update
$ bundle exec rake

If it's clean and you don't see any error messages, submit your pull request.