0.0
No commit activity in last 3 years
No release in over 3 years
Ruby client library for the Saas Runner REST API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0

Runtime

 Project Readme

SaasRunner

Build Status

Ruby client library for the SaaS Runner REST API

Installation

Add this line to your application's Gemfile:

gem 'saas_runner'

And then execute:

$ bundle

Or install it yourself as:

$ gem install saas_runner

Usage

Refer to the SaaS Runner API docs for more information on the API.

First create a new client object with your SaaS Runner API key

client = SaasRunner::Client.new(api_key: 'YOUR API KEY')

And then call the relevant resource

Subscribers

Create a new subscriber

client.subscribers.create!(subscriber_uid: 'ABC123')

Transactions

Create a new transaction charge using the three digit letter code for the currency (eg USD or GBP)

client.transactions.charge!(subscriber_uid: 'ABC123', transaction_uid: '123', amount_in_cents: 1000, currency: 'USD')

Create a new transaction refund

client.transactions.refund!(subscriber_uid: 'ABC123', transaction_uid: '124', amount_in_cents: 150, currecny: 'USD')

Activations

client.activations.create!(subscriber_uid: 'ABC123')

Events

List all events

client.events.index

List a single event

client.events.show(568)

Delete an event

client.events.destroy!(568)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request