Skip to content

Latest commit

 

History

History
executable file
·
43 lines (24 loc) · 871 Bytes

README.rdoc

File metadata and controls

executable file
·
43 lines (24 loc) · 871 Bytes

Peakium Ruby API Bindings

About

This is an experimental release heavily inspired by (and stolen from) the Stripe Ruby bindings.

Installation

gem build peakium.gemspec
gem install

Example usage

Set API key:

Peakium.api_key = "you_secret_api_key"

Retrieve a customer:

customer = Peakium::Customer.retrieve("test_customer")

Create a submission form:

submission_form = Peakium::SubmissionForm.build('create-subscription', args)

Cancel a subscription:

customer.cancel_subscription("test_subscription")

Errors

The library will raise exceptions when errors are encountered, e.g. if a resource doesn’t exist.

Requirements

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

  • rest-client, multi_json

Development

Test cases can be run with: ‘bundle exec rake test`