razorpay 2.3.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +5 -5
  2. data/.github/dependabot.yml +8 -0
  3. data/.github/workflows/ruby.yml +38 -0
  4. data/.rubocop.yml +4 -3
  5. data/CHANGELOG.md +88 -12
  6. data/LICENSE.txt +1 -1
  7. data/README.md +29 -140
  8. data/documents/Invoice.md +531 -0
  9. data/documents/addon.md +169 -0
  10. data/documents/card.md +611 -0
  11. data/documents/customer.md +161 -0
  12. data/documents/emandate.md +484 -0
  13. data/documents/fund.md +87 -0
  14. data/documents/items.md +184 -0
  15. data/documents/order.md +230 -0
  16. data/documents/papernach.md +718 -0
  17. data/documents/payment.md +636 -0
  18. data/documents/paymentLink.md +1045 -0
  19. data/documents/paymentVerification.md +79 -0
  20. data/documents/plan.md +184 -0
  21. data/documents/qrcode.md +441 -0
  22. data/documents/refund.md +324 -0
  23. data/documents/registerEmandate.md +445 -0
  24. data/documents/registerNach.md +661 -0
  25. data/documents/settlement.md +477 -0
  26. data/documents/subscriptions.md +750 -0
  27. data/documents/tokens.md +208 -0
  28. data/documents/transfers.md +684 -0
  29. data/documents/upi.md +548 -0
  30. data/documents/virtualAccount.md +586 -0
  31. data/lib/extensions/httparty/hash_conversions.rb +44 -0
  32. data/lib/razorpay/addon.rb +4 -0
  33. data/lib/razorpay/constants.rb +1 -1
  34. data/lib/razorpay/customer.rb +15 -0
  35. data/lib/razorpay/entity.rb +2 -2
  36. data/lib/razorpay/fund_account.rb +19 -0
  37. data/lib/razorpay/invoice.rb +8 -0
  38. data/lib/razorpay/item.rb +34 -0
  39. data/lib/razorpay/order.rb +10 -0
  40. data/lib/razorpay/payment.rb +52 -0
  41. data/lib/razorpay/payment_link.rb +36 -0
  42. data/lib/razorpay/qr_code.rb +34 -0
  43. data/lib/razorpay/refund.rb +4 -0
  44. data/lib/razorpay/request.rb +16 -8
  45. data/lib/razorpay/settlement.rb +39 -0
  46. data/lib/razorpay/subscription.rb +24 -0
  47. data/lib/razorpay/subscription_registration.rb +16 -0
  48. data/lib/razorpay/transfer.rb +35 -0
  49. data/lib/razorpay/utility.rb +14 -6
  50. data/lib/razorpay/virtual_account.rb +14 -6
  51. data/lib/razorpay.rb +7 -0
  52. data/test/fixtures/addon_collection.json +60 -0
  53. data/test/fixtures/create_json_payment.json +13 -0
  54. data/test/fixtures/delete_token.json +3 -0
  55. data/test/fixtures/downtimes_collection.json +21 -0
  56. data/test/fixtures/empty.json +2 -0
  57. data/test/fixtures/fake_addon.json +3 -3
  58. data/test/fixtures/fake_direct_transfer.json +32 -0
  59. data/test/fixtures/fake_downtime.json +14 -0
  60. data/test/fixtures/fake_fund_account.json +18 -0
  61. data/test/fixtures/fake_instant_settlement.json +19 -0
  62. data/test/fixtures/fake_item.json +9 -0
  63. data/test/fixtures/fake_order_transfers.json +88 -0
  64. data/test/fixtures/fake_otp_generate.json +19 -0
  65. data/test/fixtures/fake_otp_resend.json +7 -0
  66. data/test/fixtures/fake_otp_submit.json +5 -0
  67. data/test/fixtures/fake_payment_link.json +40 -0
  68. data/test/fixtures/fake_pending_update.json +30 -0
  69. data/test/fixtures/fake_qrcode.json +20 -0
  70. data/test/fixtures/fake_qrcode_close.json +22 -0
  71. data/test/fixtures/fake_recurring.json +5 -0
  72. data/test/fixtures/fake_refund.json +1 -1
  73. data/test/fixtures/fake_settlement.json +11 -0
  74. data/test/fixtures/fake_settlement_on_demand.json +39 -0
  75. data/test/fixtures/fake_subscription_pause.json +19 -0
  76. data/test/fixtures/fake_subscription_registration.json +91 -0
  77. data/test/fixtures/fake_subscription_resume.json +19 -0
  78. data/test/fixtures/fake_token.json +31 -0
  79. data/test/fixtures/fake_transfer.json +18 -0
  80. data/test/fixtures/fake_transfer_reverse.json +15 -0
  81. data/test/fixtures/fake_update_payment.json +39 -0
  82. data/test/fixtures/fake_virtual_account_allowed.json +46 -0
  83. data/test/fixtures/fake_virtual_account_receiver.json +46 -0
  84. data/test/fixtures/fund_collection.json +20 -0
  85. data/test/fixtures/item_collection.json +24 -0
  86. data/test/fixtures/payment_collection.json +1 -1
  87. data/test/fixtures/payment_link_collection.json +43 -0
  88. data/test/fixtures/payment_link_response.json +3 -0
  89. data/test/fixtures/qrcode_collection.json +50 -0
  90. data/test/fixtures/qrcode_payments_collection.json +74 -0
  91. data/test/fixtures/settlement_collection.json +26 -0
  92. data/test/fixtures/settlement_instant_collection.json +84 -0
  93. data/test/fixtures/settlement_report_collection.json +117 -0
  94. data/test/fixtures/success.json +3 -0
  95. data/test/fixtures/tokens_collection.json +36 -0
  96. data/test/fixtures/transfer_settlements_collection.json +38 -0
  97. data/test/fixtures/transfers_collection.json +41 -0
  98. data/test/razorpay/test_addon.rb +15 -15
  99. data/test/razorpay/test_customer.rb +27 -3
  100. data/test/razorpay/test_entity.rb +4 -0
  101. data/test/razorpay/test_fund_account.rb +42 -0
  102. data/test/razorpay/test_invoice.rb +15 -2
  103. data/test/razorpay/test_item.rb +66 -0
  104. data/test/razorpay/test_order.rb +24 -1
  105. data/test/razorpay/test_payment.rb +184 -8
  106. data/test/razorpay/test_payment_link.rb +83 -0
  107. data/test/razorpay/test_plan.rb +2 -2
  108. data/test/razorpay/test_qr_code.rb +63 -0
  109. data/test/razorpay/test_razorpay.rb +2 -2
  110. data/test/razorpay/test_refund.rb +16 -2
  111. data/test/razorpay/test_settlement.rb +76 -0
  112. data/test/razorpay/test_subscription.rb +92 -4
  113. data/test/razorpay/test_subscription_registration.rb +58 -0
  114. data/test/razorpay/test_transfer.rb +77 -0
  115. data/test/razorpay/test_utility.rb +38 -4
  116. data/test/razorpay/test_virtual_account.rb +64 -17
  117. data/test/test_helper.rb +7 -0
  118. metadata +139 -10
  119. data/.travis.yml +0 -26
  120. data/test/razorpay/test_errors.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: cd8a703b64189d31348ac44fccf9edef384ff5af
4
- data.tar.gz: f007b3cd479849931bda5fc5f59d584f4a15e18b
2
+ SHA256:
3
+ metadata.gz: 16358451a0774ffe1eee29516c7a196315c9b224169fb28aa0faa07664041e14
4
+ data.tar.gz: 841f735f70da6e8b54b8d0370005ddbdad26ee393960133eb08505869dd04d6f
5
5
  SHA512:
6
- metadata.gz: 6d0c677d255482d7378c2eecf523d3ee8ae9d106af592885613d6c08a4a2b5be24c39c9c1c8dba270029336e1a1a56dc385358b48e90ff3e80adf638dedcf266
7
- data.tar.gz: 942c7c1247d66d697b4f597125d5c2c145112e0ea62f1fa14c4fe5835c03607a13fdcce26c36185a4ccd0fd08cd08fbaeb260a4751e2983c105c7a9d0229a22c
6
+ metadata.gz: ffd3b0c1f38c5debb4a6b8a15fdfa00df1ca7b5f3f7d72b1d64227681923ec7307ae39d0e060346660c3270e143bbf7ac88185e664331390a52e7103a53a868e
7
+ data.tar.gz: e6048a8c9abfb4169d1f5e69203d9abb5824c13b8655a85cc53648497cfb38103887073562f3188297b8437fd6a823219456cfd72db67876e50f8409e06888ea
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "04:00"
8
+ timezone: Asia/Calcutta
@@ -0,0 +1,38 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ ruby-version: ['2.6', '2.7', '3.0']
26
+
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Set up Ruby
30
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
32
+ # uses: ruby/setup-ruby@v1
33
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
34
+ with:
35
+ ruby-version: ${{ matrix.ruby-version }}
36
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37
+ - name: Run tests
38
+ run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -9,9 +9,6 @@ Metrics/LineLength:
9
9
  Style/SymbolArray:
10
10
  MinSize: 3
11
11
 
12
- Style/ClassVars:
13
- Enabled: false
14
-
15
12
  Metrics/MethodLength:
16
13
  Max: 15
17
14
 
@@ -19,3 +16,7 @@ Naming/UncommunicativeMethodParamName:
19
16
  MinNameLength: 1
20
17
  AllowNamesEndingInNumbers: false
21
18
 
19
+ # Near-duplicate of a file from an external package, want to keep changes minimal
20
+ AllCops:
21
+ Exclude:
22
+ - 'lib/extensions/httparty/hash_conversions.rb'
data/CHANGELOG.md CHANGED
@@ -4,32 +4,85 @@ Changelog for Razorpay-Ruby SDK.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## [3.0.0] - 2022-06-03
8
+
9
+ ### Added
10
+
11
+ - QR code end point API
12
+ - Settlement end point API
13
+ - Fund Account end point API
14
+ - PaymentLinks end point API
15
+ - Item end point API
16
+ - New APIs for Invoices (Delete, Send/resend)
17
+ - New API for Customers (Fetch Tokens, Delete Token)
18
+ - New APIs for Subscriptions (Update, Pause, Resume, Pending update, Delete offer)
19
+ - New API for Addons (Fetch all Addons)
20
+ - New API for Refund (Update refund)
21
+ - New APIs for Payments (Update, Create recurring, Create Json, Payment downtime details, refunds of a payment, Otp generate, Otp submit, Otp resend)
22
+ - New APIs for Virtual Account (Add receiver, add an allowed payer account, delete an allowed payer account)
23
+ - Updated Testcases
24
+ - Updated Readme
25
+
26
+ ## [2.4.1] - 2019-04-09
27
+
28
+ ### Fixed
29
+
30
+ - Subscription signature verification [[#81][81]]
31
+
32
+ ### Added
33
+
34
+ - Ruby version to user agent header [[#79][79]]
35
+
36
+ ## [2.4.0] - 2019-04-08
37
+
38
+ ### Changed
39
+
40
+ - Indexed keys used in x-www-form-urlencoded request bodies [[#68][68]]
41
+ - Updated Utility verify\_\* methods to return verification bool [[#72][72]]
42
+
43
+ ### Added
44
+
45
+ - Support for custom JSON options to Entity to_json [[#75][75]]
46
+
7
47
  ## [2.3.0] - 2018-04-20
48
+
8
49
  ### Added
50
+
9
51
  - Support for subscription signature verification
10
52
  - Bang! methods (`capture!`, `refund!`) that update the calling entity
11
53
 
12
54
  ## [2.2.0] - 2018-01-29
55
+
13
56
  ### Added
57
+
14
58
  - Support for Subscriptions
15
59
 
16
60
  ## [2.1.0] - 2017-11-17
61
+
17
62
  ### Changed
63
+
18
64
  - Generic `Razorpay::Error` is thrown when server is unreachable
19
65
 
20
66
  ### Added
67
+
21
68
  - Support for making raw requests to the API via `raw_request`.
22
69
 
23
70
  ## [2.1.0.pre] - 2017-08-17
71
+
24
72
  ### Added
73
+
25
74
  - Support for Virtual Accounts
26
75
 
27
76
  ## [2.0.1] - 2017-07-31
77
+
28
78
  ### Fixed
79
+
29
80
  - Webhook signature verification
30
81
 
31
82
  ## [2.0.0] - 2017-03-02
83
+
32
84
  ### Added
85
+
33
86
  - Adds `require` for all Razorpay supported entities
34
87
  - All entity objects now throw `NoMethodError` instead of `NameError` if the attribute doesn't exist
35
88
  - Adds customer edit API
@@ -42,43 +95,66 @@ Changelog for Razorpay-Ruby SDK.
42
95
  - Adds rake test groups
43
96
 
44
97
  ## [1.2.1] - 2016-12-22
98
+
45
99
  ### Changed
100
+
46
101
  - Drops ArgumentError checks for local validation. Rely on server side checks instead.
47
102
 
48
103
  ### Added
104
+
49
105
  - Support for customers and invoices API
50
106
  - Loads Order class by default.
51
107
 
52
108
  ## [1.2.0] - 2016-11-23
109
+
53
110
  ### Added
111
+
54
112
  - Fixed payment.method as an attribute accessor
55
113
 
56
114
  ## [1.1.0] - 2016-02-25
115
+
57
116
  ### Added
117
+
58
118
  - Add support for Orders API
59
119
  - Bundles the CA Certificate with the gem. See #6
60
120
 
61
121
  ## [1.0.3] - 2015-03-31
122
+
62
123
  ### Changed
124
+
63
125
  - Handles error requests properly
64
126
 
65
127
  ## [1.0.1] - 2015-02-23
128
+
66
129
  ### Added
130
+
67
131
  - Added support for ruby versions below 2.0
68
132
 
69
133
  ## [1.0.0] - 2015-01-17
134
+
70
135
  ### Added
136
+
71
137
  - Initial Release
72
138
 
73
- [Unreleased]: https://github.com/razorpay/razorpay-ruby/compare/2.3.0...HEAD
74
- [2.3.0]: https://github.com/razorpay/razorpay-ruby/compare/2.2.0...2.3.0
75
- [2.2.0]: https://github.com/razorpay/razorpay-ruby/compare/2.1.0...2.2.0
76
- [2.1.0]: https://github.com/razorpay/razorpay-ruby/compare/2.0.1...2.1.0
77
- [2.1.0.pre]: https://github.com/razorpay/razorpay-ruby/compare/2.0.1...2.1.0.pre
78
- [2.0.1]: https://github.com/razorpay/razorpay-ruby/compare/2.0.0...2.0.1
79
- [2.0.0]: https://github.com/razorpay/razorpay-ruby/compare/1.2.1...2.0.0
80
- [1.2.1]: https://github.com/razorpay/razorpay-ruby/compare/1.2.0...1.2.1
81
- [1.2.0]: https://github.com/razorpay/razorpay-ruby/compare/1.1.0...1.2.0
82
- [1.1.0]: https://github.com/razorpay/razorpay-ruby/compare/1.0.3...1.1.0
83
- [1.0.3]: https://github.com/razorpay/razorpay-ruby/compare/1.0.1...1.0.3
84
- [1.0.1]: https://github.com/razorpay/razorpay-ruby/compare/1.0.0...1.0.1
139
+ # Diff
140
+
141
+ - [Unreleased](https://github.com/razorpay/razorpay-ruby/compare/2.4.1...HEAD)
142
+ - [2.4.1](https://github.com/razorpay/razorpay-ruby/compare/2.4.0...2.4.1)
143
+ - [2.4.0](https://github.com/razorpay/razorpay-ruby/compare/2.3.0...2.4.0)
144
+ - [2.3.0](https://github.com/razorpay/razorpay-ruby/compare/2.2.0...2.3.0)
145
+ - [2.2.0](https://github.com/razorpay/razorpay-ruby/compare/2.1.0...2.2.0)
146
+ - [2.1.0](https://github.com/razorpay/razorpay-ruby/compare/2.0.1...2.1.0)
147
+ - [2.1.0.pre](https://github.com/razorpay/razorpay-ruby/compare/2.0.1...2.1.0.pre)
148
+ - [2.0.1](https://github.com/razorpay/razorpay-ruby/compare/2.0.0...2.0.1)
149
+ - [2.0.0](https://github.com/razorpay/razorpay-ruby/compare/1.2.1...2.0.0)
150
+ - [1.2.1](https://github.com/razorpay/razorpay-ruby/compare/1.2.0...1.2.1)
151
+ - [1.2.0](https://github.com/razorpay/razorpay-ruby/compare/1.1.0...1.2.0)
152
+ - [1.1.0](https://github.com/razorpay/razorpay-ruby/compare/1.0.3...1.1.0)
153
+ - [1.0.3](https://github.com/razorpay/razorpay-ruby/compare/1.0.1...1.0.3)
154
+ - [1.0.1](https://github.com/razorpay/razorpay-ruby/compare/1.0.0...1.0.1)
155
+
156
+ [68]: https://github.com/razorpay/razorpay-ruby/pull/68
157
+ [72]: https://github.com/razorpay/razorpay-ruby/pull/72
158
+ [75]: https://github.com/razorpay/razorpay-ruby/pull/75
159
+ [79]: https://github.com/razorpay/razorpay-ruby/pull/79
160
+ [81]: https://github.com/razorpay/razorpay-ruby/pull/81
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Razorpay
1
+ Copyright (c) 2019 Razorpay
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Razorpay Ruby bindings
2
2
 
3
- [![Build Status](https://travis-ci.org/razorpay/razorpay-ruby.svg?branch=master)](https://travis-ci.org/razorpay/razorpay-ruby) [![Gem Version](https://badge.fury.io/rb/razorpay.svg)](http://badge.fury.io/rb/razorpay) [![Coverage Status](https://coveralls.io/repos/github/Razorpay/razorpay-ruby/badge.svg?branch=master)](https://coveralls.io/github/Razorpay/razorpay-ruby?branch=master) [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
3
+ [![Build Status](https://travis-ci.org/razorpay/razorpay-ruby.svg?branch=master)](https://travis-ci.org/razorpay/razorpay-ruby) [![Gem Version](https://img.shields.io/badge/gem%20version-v3.0.0-dark%20green.svg)](http://badge.fury.io/rb/razorpay) [![Coverage Status](https://coveralls.io/repos/github/Razorpay/razorpay-ruby/badge.svg?branch=master)](https://coveralls.io/github/Razorpay/razorpay-ruby?branch=master) [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
4
4
 
5
5
  This is the base ruby gem for interacting with the Razorpay API. This is primarily meant for users who wish to perform interactions with the Razorpay API programatically.
6
6
 
@@ -20,9 +20,12 @@ Or install it yourself as:
20
20
 
21
21
  $ gem install razorpay
22
22
 
23
+ ## Requirements
24
+
25
+ Ruby 2.6.8 or later
23
26
  ## Usage
24
27
 
25
- Remember to `require razorpay` before anything else.
28
+ Remember to `require 'razorpay'` before anything else.
26
29
 
27
30
  Next, you need to setup your key and secret using the following:
28
31
 
@@ -39,131 +42,30 @@ You can find your API keys at <https://dashboard.razorpay.com/#/app/keys>.
39
42
 
40
43
  If you are using rails, the right place to do this might be `config/initializers/razorpay.rb`.
41
44
 
42
- The most common construct is capturing a payment, which you do via the following:
43
-
44
- ```rb
45
- Razorpay::Payment.fetch("payment_id").capture({amount:500})
46
- # Note that the amount should come from your session, so as to verify
47
- # that the purchase was correctly done and not tampered
48
- ```
49
-
50
- You can refund a payment via the following:
51
-
52
- ```rb
53
- Razorpay::Payment.fetch("payment_id").refund({amount:500})
54
- refunds = Razorpay::Payment.fetch("payment_id").refunds
55
- ```
56
-
57
- A payment can also be refunded without fetching it:
58
- ```rb
59
- refund = Razorpay::Refund.create(payment_id:"payment_id")
60
- Razorpay::Refund.fetch(refund.id)
61
- ```
62
-
63
- If payment is captured or refunded via `capture!` or `refund!`, then the calling object is also updated:
64
- ```rb
65
- payment = Razorpay::Payment.fetch('payment_id')
66
- payment.status
67
- # 'authorized'
68
- payment.capture!
69
- payment.status
70
- # 'captured'
71
- payment.refund!
72
- payment.status
73
- # 'refunded'
74
- ```
75
-
76
- For other applications (such as fetching payments and refunds),
77
- see our online documentation on <https://docs.razorpay.com>
78
-
79
- ### Orders API
80
-
81
- You can use the orders API using the following constructs:
82
-
83
- You can find docs at <https://docs.razorpay.com/v1/page/orders>
84
-
85
- ```rb
86
- order = Razorpay::Order.create amount: 5000, currency: 'INR', receipt: 'TEST'
87
- # order.id = order_50sX9hGHZJvjjI
88
-
89
- # Same collection as Refunds or Payments
90
- orders = Razorpay::Order.all
91
-
92
- # Fetching an Order
93
- order = Razorpay::Order.fetch('order_50sX9hGHZJvjjI')
94
- puts order.amount
95
-
96
- # Fetching payments corresponding to an order
97
- payments = order.payments
98
- ```
99
-
100
- ### Verification
101
- You can use the Utility class to verify the signature received in response to a payment made using Orders API
102
- ```rb
103
- puts payment_response
104
- # {
105
- # :razorpay_order_id => "fake_order_id",
106
- # :razorpay_payment_id => "fake_payment_id",
107
- # :razorpay_signature => "signature"
108
- # }
109
- Razorpay::Utility.verify_payment_signature(payment_response)
110
- ```
111
- You can also [verify the signature](https://github.com/razorpay/razorpay-ruby/wiki/Webhooks) received in a webhook:
112
- ```rb
113
- Razorpay::Utility.verify_webhook_signature(webhook_body, webhook_signature, webhook_secret)
114
- ```
115
-
116
- ### Customers
117
- ```rb
118
- # Create a customer
119
- customer = Razorpay::Customer.create email: 'test@razorpay.com', contact: '9876543210'
120
- puts customer.id #cust_6vRXClWqnLhV14
121
- ```
122
-
123
- ### Cards
124
- ```rb
125
- # Fetch a card
126
- card = Razorpay::Card.fetch('card_7EZLhWkDt05n7V')
127
- puts card.network #VISA
128
- ```
129
-
130
- You can find cards API documentation at <https://docs.razorpay.com/v1/page/cards>.
131
-
132
- ### Invoices
133
- ```rb
134
- # Creating an invoice
135
- invoice = Razorpay::Invoice.create customer_id: customer.id, amount: 100, currency: 'INR', description: 'Test description', type: 'link'
136
- ```
137
-
138
- You can find invoices API documentation at <https://docs.razorpay.com/v1/page/invoices>.
139
-
140
- ### Plan
141
- ```rb
142
- # Creating a plan
143
- plan = Razorpay::Plan.create interval: 1, period: 'monthly', item: { name: 'fake_plan', description: 'fake_desc', currency: 'INR', amount: 500 }, notes: { identifier: 'plan_monthly_super' }
144
- ```
145
-
146
- You can find plan API documentation at <https://razorpay.com/docs/subscriptions/api/#plan>.
147
-
148
- ### Subscription
149
- ```rb
150
- # Creating a subscription and starting after 24 hours (24 hours = 60 * 60 * 24)
151
- subscription = Razorpay::Subscription.create plan_id: plan.id, customer_id: customer.id, start_at: (Time.now + (60 * 60 * 24)).to_i, total_count: 3
152
- ```
153
-
154
- You can find subscription API documentation at <https://razorpay.com/docs/subscriptions/api/#subscription>.
155
-
156
- ### Addon
157
- ```rb
158
- # Creating an addon
159
- subscription_addon = Razorpay::Addon.create subscription.id, item: { name: 'fake_plan', description: 'fake_desc', currency: 'INR', amount: 500 }, quantity: 1
160
-
161
- # Fetching an addon
162
- addon = Razorpay::Addon.fetch subscription_addon.id
163
- ```
164
-
165
- You can find addon API documentation at <https://razorpay.com/docs/subscriptions/api/#add-on>.
166
-
45
+ ## Supported Resources
46
+ - [Customer](documents/customer.md)
47
+ - [Token](documents/tokens.md)
48
+ - [Order](documents/order.md)
49
+ - [Payments](documents/payment.md)
50
+ - [Settlements](documents/settlement.md)
51
+ - [Fund](documents/fund.md)
52
+ - [Refunds](documents/refund.md)
53
+ - [Invoice](documents/Invoice.md)
54
+ - [Plan](documents/plan.md)
55
+ - [Item](documents/items.md)
56
+ - [Subscriptions](documents/subscriptions.md)
57
+ - [Add-on](documents/addon.md)
58
+ - [Payment Links](documents/paymentLink.md)
59
+ - [Smart Collect](documents/virtualAccount.md)
60
+ - [Transfer](documents/transfers.md)
61
+ - [QR Code](documents/qrcode.md)
62
+ - [Emandate](documents/emandate.md)
63
+ - [Cards](documents/card.md)
64
+ - [Paper NACH](documents/papernach.md)
65
+ - [UPI](documents/upi.md)
66
+ - [Register Emandate and Charge First Payment Together](documents/registerEmandate.md)
67
+ - [Register NACH and Charge First Payment Together](documents/registerNach.md)
68
+ - [Payment Verification](documents/paymentVerification.md)
167
69
  ## Development
168
70
 
169
71
  - Everything is namespaced under the Razorpay module
@@ -183,19 +85,6 @@ You can find addon API documentation at <https://razorpay.com/docs/subscriptions
183
85
  5. Push to the branch (`git push origin my-new-feature`)
184
86
  6. Create a new Pull Request
185
87
 
186
- ## Supported Versions
187
-
188
- While we support [all currently supported versions of Ruby](https://www.ruby-lang.org/en/downloads/branches/)
189
- only, the code is tested against the following versions:
190
-
191
- * 1.9.3
192
- * 2.0.0
193
- * 2.1.10
194
- * 2.2.9
195
- * 2.3.6
196
- * 2.4.2
197
- * 2.5.0
198
-
199
88
  ## Release
200
89
 
201
90
  Steps to follow for a release: