Giter VIP home page Giter VIP logo

sift-partner-ruby's Introduction

Sift Science Partner Ruby bindings

Requirements

  • 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, 1.1.6.2 or greater

For development only:

  • bundler

  • rspec, 2.14.1 or greater

  • webmock, 1.16 or greater

  • rake, any version

Installation

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

Usage

require "sift-partner"

# you can get these values from the console
partner_client = SiftPartner::Client.new(partner_api_key, partner_acct_id)

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

# 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 => "http://api.partner.com/notify?id=%s"
}
updated = partner_client.update_notification_config(cfg)

Building

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

Testing

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

$ rake spec

sift-partner-ruby's People

Contributors

abeppu avatar leofischer avatar mauriciomurga avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.