Skip to content
This repository has been archived by the owner. It is now read-only.
Ruby Wrapper for Tango Card RaaS API.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib bump version and raise error if not cached Dec 8, 2016
spec More cache options (#17) Dec 8, 2016
.gitignore Update .gitignore Sep 17, 2013
.rspec Add tangocard code Sep 17, 2013
Gemfile Bundle update Mar 11, 2015
Gemfile.lock bump version and raise error if not cached Dec 8, 2016
MIT-LICENSE Initial commit Sep 17, 2013 More cache options (#17) Dec 8, 2016
Rakefile Initial commit Sep 17, 2013
tangocard.gemspec no warnings, bump version Dec 8, 2016


Codeship Status for bonusly/tangocard

Ruby Wrapper for Tango Card RaaS API.

Tango Card provides a RaaS API for developers ( This gem provides commonsense Ruby objects to wrap the JSON endpoints of the RaaS API.


Getting Help


Add the tangocard gem to your Gemfile:

gem 'tangocard'

Create an initializer, e.g. config/initializers/tangocard.rb:

Tangocard.configure do |c| = "BonuslyXYZ"
  c.key = "Dnv9ehvff29"
  c.base_uri = ""

There are three required configuration parameters:

  • name - The API account name you receive from Tango Card
  • key - The API account key you receive from Tango Card
  • base_uri - This defaults to the Tango Card sandbox. For production, you must specify the base URI for the production RaaS API. Make sure not to include /raas/v1 or any trailing slashes.

There are also optional configuration parameters:

  • default_brands - An array of strings for the brands you want to retrieve with Tangocard::Brand.default. The strings should match the unique brand description fields exactly.
  • local_images - An array of local image names/URIs that you want to display instead of the default Tango Card-provided image_url. image_url is sometimes blank, so this can be handy in those cases.
  • sku_blacklist - Reward SKUs that are blacklisted, ie. should never be returned as a purchasable reward.
  • use_cache - Use cache for Tangocard::Brand queries, defaults to true. The cache can be refreshed by calling Tangocard.warm_cache
  • cache - Which cache to use, defaults to ActiveSupport::Cache::MemoryStore. Using an out-of-process cache e.g. hosted memcache will improve performance and stability.
  • logger - i.e. Rails.logger

Getting Started

This gem provides two tools:

  1. A simple wrapper for the Tango Card RaaS API, consisting of two classes: Tangocard::Raas and Tangocard::Response.
  2. Models for each of the Tango Card objects: Tangocard::Account, Tangocard::Brand, Tangocard::Reward, Tangocard::Order and Tangocard::ExchangeRate. These provide a greater level of abstraction and ease of use.

Notes and Credits

This project is developed and maintained by Smartly, Inc. - makers of

This project uses the MIT-LICENSE.

You can’t perform that action at this time.