partner gem
Switch branches/tags
Clone or download
nickhurlburt Change partner ruby client to return Sift::Response (#11)
Change partner ruby client to return response
Latest commit 460ba24 Jul 19, 2016


Sift Science Partner Ruby bindings Build Status


  • Ruby 1.8.7 or above. (Ruby 1.8.6 might work if you load ActiveSupport.)

  • HTTParty, 0.13.1 or greater

  • Multi Json, 1.0 or greater

  • sift, or greater

For development only:

  • bundler

  • rspec, 2.14.1 or greater

  • webmock, 1.16 or greater

  • rake, any version


If you want to build the gem from source:

$ gem build sift-partner.gemspec

Alternatively, you can install the gem from Rubyforge:

$ gem install sift-partner


require "sift-partner"

# you can get these values from the console
partner_client =, partner_acct_id)

# create a new account for a given merchant
merchant_account_response = partner_client.new_account(
  "", # the url for the merchant's site
  "", # an email belonging to the merchant
  "", # an email used to log in to Sift
  "s0m3l0ngp455w0rd" # password associated with that log in

merchant_account_response.ok?  # returns true or false
merchant_account_response.body  # API response body
merchant_account_response.http_status_code  # HTTP response code, 200 is ok.

# get a listing of all your accounts
all_accounts = partner_client.get_accounts

# config http notifications
cfg = {
    :http_notification_threshold => 0.15,
    :http_notification_url => ""
updated = partner_client.update_notification_config(cfg)


Building and publishing the gem is captured by the following steps:

$ gem build sift-partner.gemspec
$ gem push sift-partner<current version>.gem

$ bundle
$ rake -T
$ rake build
$ rake install
$ rake release


To run the various tests use the rake command as follows:

$ rake spec