The ruby library for integrating with Chargebee Recurring Billing and Subscription Management solution.
Chargebee now supports two API versions - V1 and V2. This library is for our older API version V1. The library for V2 can be found in the master branch.
You’d want to upgrade to V2 to benefit from the new functionality. Click here for the API V2 Upgradation Guide.
Install the latest version of the gem with the following command…
$ sudo gem install chargebee -v '~>1'
For API reference see here
To create a new subscription:
ChargeBee.configure({:api_key => "your_api_key"}, {:site => "your_site"}) result = ChargeBee::Subscription.create({ :id => "sub_KyVqDh__dev__NTn4VZZ1", :plan_id => "basic", }) subscription = result.subscription puts "created subscription is #{subscription}"
See the LICENSE file.