README.md in razorpay-2.1.0 vs README.md in razorpay-2.2.0

- old
+ new

@@ -122,10 +122,37 @@ invoice = Razorpay::Invoice.create customer_id: customer.id, amount: 100, currency: 'INR', description: 'Test description', type: 'link' ``` You can find invoices API documentation at <https://docs.razorpay.com/v1/page/invoices>. +### Plan +```rb +# Creating a plan +plan = Razorpay::Plan.create interval: 1, period: 'monthly', item: { name: 'fake_plan', description: 'fake_desc', currency: 'INR', amount: 500 }, notes: { identifier: 'plan_monthly_super' } +``` + +You can find plan API documentation at <https://razorpay.com/docs/subscriptions/api/#plan>. + +### Subscription +```rb +# Creating a subscription and starting after 24 hours (24 hours = 60 * 60 * 24) +subscription = Razorpay::Subscription.create plan_id: plan.id, customer_id: customer.id, start_at: (Time.now + (60 * 60 * 24)).to_i, total_count: 3 +``` + +You can find subscription API documentation at <https://razorpay.com/docs/subscriptions/api/#subscription>. + +### Addon +```rb +# Creating an addon +subscription_addon = Razorpay::Addon.create subscription.id, item: { name: 'fake_plan', description: 'fake_desc', currency: 'INR', amount: 500 }, quantity: 1 + +# Fetching an addon +addon = Razorpay::Addon.fetch subscription_addon.id +``` + +You can find addon API documentation at <https://razorpay.com/docs/subscriptions/api/#add-on>. + ## Development - Everything is namespaced under the Razorpay module - We use rubocop for checking style guidelines - Rake + MiniTest is using as the testrunner @@ -140,9 +167,22 @@ 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Run `rake` and `rubocop` after making your changes to make sure you didn't break anything 4. Commit your changes (`git commit -am 'Add some feature'`) 5. Push to the branch (`git push origin my-new-feature`) 6. Create a new Pull Request + +## Supported Versions + +While we support [all currently supported versions of Ruby](https://www.ruby-lang.org/en/downloads/branches/) +only, the code is tested against the following versions: + +* 1.9.3 +* 2.0.0 +* 2.1.10 +* 2.2.9 +* 2.3.6 +* 2.4.2 +* 2.5.0 ## Release Steps to follow for a release: