This is an experimental release heavily inspired by (and stolen from) the Stripe Ruby bindings.
gem build peakium.gemspec gem install
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")
The library will raise exceptions when errors are encountered, e.g. if a resource doesn’t exist.
-
Ruby 1.8.7 or above. (Ruby 1.8.6 may work if you load ActiveSupport.)
-
rest-client, multi_json
Test cases can be run with: ‘bundle exec rake test`