razorpay 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16358451a0774ffe1eee29516c7a196315c9b224169fb28aa0faa07664041e14
4
- data.tar.gz: 841f735f70da6e8b54b8d0370005ddbdad26ee393960133eb08505869dd04d6f
3
+ metadata.gz: 5c4fb260fdb3eb6145048d041b76ee337b0f46c9e8b9e6ccf916a41e9f3fb690
4
+ data.tar.gz: b01589e9fa2b7c77708da8f97d124ef97b408cb31a6b286f1f16b4d34ec7d638
5
5
  SHA512:
6
- metadata.gz: ffd3b0c1f38c5debb4a6b8a15fdfa00df1ca7b5f3f7d72b1d64227681923ec7307ae39d0e060346660c3270e143bbf7ac88185e664331390a52e7103a53a868e
7
- data.tar.gz: e6048a8c9abfb4169d1f5e69203d9abb5824c13b8655a85cc53648497cfb38103887073562f3188297b8437fd6a823219456cfd72db67876e50f8409e06888ea
6
+ metadata.gz: d26b56696dc657b033effe4ff7bade43867a8be6d793803fcdf4e36ca1649eac099f1847b66d3e07855e36b02788b82bb76c1cd3ddb8e483dd651964190718ac
7
+ data.tar.gz: 32c3fccc3a47e63650a207a0250bbfdb0b8a17cfd1b5d0d72ece1716e192190757f2b99dbb70b03a250ce2dc0aad8724a3683e9adaf56826f7fa1b6323c380d6
@@ -0,0 +1,8 @@
1
+ ## Note :- Please follow the below points while attaching test cases document link below:
2
+ ### - If label `Tested` is added then test cases document URL is mandatory.
3
+ ### - Link added should be a valid URL and accessible throughout the org.
4
+ ### - If the branch name contains hotfix / revert by default the BVT workflow check will pass.
5
+
6
+ | Test Case Document URL |
7
+ |-----------------------------------------------|
8
+ | Please paste test case document link here.... |
@@ -0,0 +1,79 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ tags:
7
+ - v[0-9]+.[0-9]+.[0-9]+*
8
+ pull_request:
9
+ branches:
10
+ - master
11
+ jobs:
12
+ build:
13
+ name: Build
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Set up Ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: 3.1
22
+ - name: Install dependencies
23
+ run: bundle install
24
+ - name: Build
25
+ run: gem build *.gemspec
26
+ - name: 'Upload Artifact'
27
+ uses: actions/upload-artifact@v3
28
+ with:
29
+ name: gems
30
+ path: '*.gem'
31
+ test:
32
+ runs-on: ubuntu-latest
33
+ needs: build
34
+ strategy:
35
+ matrix:
36
+ ruby-version: ['2.6', '2.7', '3.0', '3.1']
37
+
38
+ steps:
39
+ - name: Checkout
40
+ uses: actions/checkout@v2
41
+ - name: Set up Ruby latest
42
+ uses: ruby/setup-ruby@v1
43
+ with:
44
+ ruby-version: 3.1
45
+ - name: Install dependencies
46
+ run: bundle install
47
+ - name: Run tests and collect coverage
48
+ run: bundle exec rake
49
+ - name: Upload coverage to Codecov
50
+ if: ${{ matrix.ruby-version == 3.1 }}
51
+ uses: codecov/codecov-action@v3
52
+ with:
53
+ files: ${{ github.workspace }}/coverage/coverage.xml
54
+ publish:
55
+ name: Publish
56
+ #if: startsWith(github.ref, 'refs/tags/v')
57
+ needs: [build, test]
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: actions/checkout@v2
61
+ - run: sudo apt-get install -y oathtool
62
+ - name: Download all workflow run artifacts
63
+ uses: actions/download-artifact@v3
64
+ with:
65
+ name: gems
66
+ path: gems
67
+ - name: Set up Ruby
68
+ uses: ruby/setup-ruby@v1
69
+ with:
70
+ ruby-version: 3.1
71
+ - name: Publish gems to Rubygems
72
+ run: |
73
+ mkdir -p $HOME/.gem
74
+ touch $HOME/.gem/credentials
75
+ chmod 0600 $HOME/.gem/credentials
76
+ printf -- "---\n:rubygems_api_key: ${GEM_API_KEY}\n" > $HOME/.gem/credentials
77
+ gem push gems/*.gem
78
+ env:
79
+ GEM_API_KEY: ${{secrets.GEM_API_KEY}}
data/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ Changelog for Razorpay-Ruby SDK.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## [3.0.1] - 2022-07-11
8
+
9
+ ### Added
10
+
11
+ - Added Third party validation API for Payments (create_upi, validate_vpa)
12
+ - New API for Payment Methods
13
+ - Doc Updated
14
+
7
15
  ## [3.0.0] - 2022-06-03
8
16
 
9
17
  ### Added
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://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)
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.1-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
 
data/documents/Invoice.md CHANGED
@@ -67,8 +67,16 @@ Razorpay::Invoice.create({
67
67
  |-----------------|---------|------------------------------------------------------------------------------|
68
68
  |type* | string | entity type (here its invoice) |
69
69
  |description | string | A brief description of the invoice. |
70
- |customer_id | string | customer id for which invoice need be raised |
71
- |customer | object | customer details in a object format |
70
+ |customer_id | string | customer id for which invoice need be raised |
71
+ |draft | string | Invoice is created in draft state when value is set to `1` |
72
+ | customer.name* | object | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
73
+ | line_items | object | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
74
+
75
+ |expire_by | object | Details of the line item that is billed in the invoice. |
76
+ |sms_notify | object | Details of the line item that is billed in the invoice. |
77
+ |email_notify | object | Details of the line item that is billed in the invoice. |
78
+ |partial_payment | boolean | Indicates whether customers can make partial payments on the invoice . Possible values: true - Customer can make partial payments. false (default) - Customer cannot make partial payments. |
79
+ | currency* | string | The currency of the payment (defaults to INR) |
72
80
 
73
81
  **Response:**
74
82
  For create invoice response please click [here](https://razorpay.com/docs/api/invoices/#create-an-invoice)
@@ -507,7 +515,7 @@ invoiceId = "inv_E7q0tqkxBRzdau"
507
515
 
508
516
  medium = "email"
509
517
 
510
- Razorpay::Invoice.notifyBy(invoiceId,medium)
518
+ Razorpay::Invoice.notify_by(invoiceId,medium)
511
519
  ```
512
520
 
513
521
  **Parameters:**
data/documents/addon.md CHANGED
@@ -28,7 +28,7 @@ Razorpay::Addon.create(subscriptionId,{
28
28
  |-------|-----------|--------------------------------------------------|
29
29
  | subscriptionId* | boolean | The subscription ID to which the add-on is being added. |
30
30
  | items* | object | Details of the add-on you want to create. |
31
- | quantity* | integer | This specifies the number of units of the add-on to be charged to the customer. |
31
+ | quantity | integer | This specifies the number of units of the add-on to be charged to the customer. |
32
32
 
33
33
  **Response:**
34
34
  ```json
@@ -161,6 +161,28 @@ Razorpay::Addon.fetch(addonId)
161
161
  "invoice_id":null
162
162
  }
163
163
  ```
164
+ ----------------------------------------------------------------------------------------------------
165
+
166
+ ### Delete an addon
167
+
168
+ ```rb
169
+ addonId = "ao_IrSY3UIqDRx7df"
170
+
171
+ Razorpay::Addon.delete(addonId)
172
+ ```
173
+
174
+
175
+ **Parameters:**
176
+
177
+ | Name | Type | Description |
178
+ |-----------------|---------|------------------------------------------------------------------------------|
179
+ | addonId* | string | addon id to be deleted |
180
+
181
+ **Response:**
182
+
183
+ ```json
184
+ []
185
+ ```
164
186
  -------------------------------------------------------------------------------------------------------
165
187
 
166
188
  **PN: * indicates mandatory fields**
data/documents/card.md CHANGED
@@ -53,7 +53,7 @@ Razorpay::Customer.create(para_attr)
53
53
  ### Create Order
54
54
 
55
55
  ```rb
56
- param_attr = {
56
+ para_attr = {
57
57
  "amount":100,
58
58
  "currency": "INR",
59
59
  "customer_id": "cust_4xbQrmEoA5WJ01",
@@ -150,8 +150,7 @@ Razorpay::SubscriptionRegistration.create(para_attr)
150
150
 
151
151
  | Name | Type | Description |
152
152
  |-----------------|---------|------------------------------------------------------------------------------|
153
- | customer | object | Details of the customer to whom the registration link will be sent. |
154
- | type* | string | the value is `link`. |
153
+ | customer | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/authorization-transaction/#121-create-a-registration-link) are supported |
155
154
  | amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
156
155
  | currency* | string | The currency of the payment (defaults to INR) |
157
156
  | description* | string | A brief description of the payment. |
@@ -304,7 +303,7 @@ para_attr = {
304
303
  "note_key 2": "Tea. Earl Gray. Hot."
305
304
  }
306
305
  }
307
- Razorpay::Payment.createRecurringPayment(para_attr)
306
+ Razorpay::Payment.create_recurring_payment(para_attr)
308
307
  ```
309
308
  **Parameters:**
310
309
 
@@ -344,7 +343,7 @@ invoiceId = "inv_JDdNb4xdf4gxQ7"
344
343
 
345
344
  medium = "email"
346
345
 
347
- Razorpay::Invoice.notifyBy(invoiceId, medium)
346
+ Razorpay::Invoice.notify_by(invoiceId, medium)
348
347
  ```
349
348
  **Parameters:**
350
349
 
@@ -493,7 +492,7 @@ Razorpay::Payment.fetch(paymentId)
493
492
  ```rb
494
493
  customerId = "cust_1Aa00000000004"
495
494
 
496
- Razorpay::Customer.fetchTokens(customerId)
495
+ Razorpay::Customer.fetch(customerId).fetchTokens
497
496
  ```
498
497
  **Parameters:**
499
498
 
@@ -549,58 +548,58 @@ Razorpay::Customer.fetchTokens(customerId)
549
548
  ```
550
549
  -------------------------------------------------------------------------------------------------------
551
550
 
552
- ### Fetch card
551
+ ## Delete tokens
553
552
 
554
553
  ```rb
555
- cardId = ""
554
+ customerId = "cust_1Aa00000000004"
556
555
 
557
- Razorpay::Card.fetch(cardId)
558
- ```
556
+ tokenId = "token_Hxe0skTXLeg9pF"
559
557
 
558
+ Razorpay::Customer.fetch(customerId).deleteToken(tokenId)
559
+ ```
560
560
  **Parameters:**
561
561
 
562
562
  | Name | Type | Description |
563
563
  |-----------------|---------|------------------------------------------------------------------------------|
564
- | cardId* | string | card id to be fetched |
564
+ | customerId* | string | The id of the customer to be fetched |
565
+ | tokenId* | string | The id of the token to be fetched |
565
566
 
566
567
  **Response:**
567
568
  ```json
568
569
  {
569
- "id": "card_JXPULjlKqC5j0i",
570
- "entity": "card",
571
- "name": "gaurav.kumar",
572
- "last4": "4366",
573
- "network": "Visa",
574
- "type": "credit",
575
- "issuer": "UTIB",
576
- "international": false,
577
- "emi": true,
578
- "sub_type": "consumer",
579
- "token_iin": null
570
+ "deleted": true
580
571
  }
581
-
572
+ ```
582
573
  -------------------------------------------------------------------------------------------------------
583
574
 
584
- ## Delete tokens
575
+ ### Fetch card
585
576
 
586
577
  ```rb
587
- customerId = "cust_1Aa00000000004"
588
-
589
- tokenId = "token_Hxe0skTXLeg9pF"
578
+ cardId = "card_JXPULjlKqC5j0i"
590
579
 
591
- Razorpay::fetch(customerId).deleteToken(tokenId)
580
+ Razorpay::Card.fetch(cardId)
592
581
  ```
582
+
593
583
  **Parameters:**
594
584
 
595
585
  | Name | Type | Description |
596
586
  |-----------------|---------|------------------------------------------------------------------------------|
597
- | customerId* | string | The id of the customer to be fetched |
598
- | tokenId* | string | The id of the token to be fetched |
587
+ | cardId* | string | card id to be fetched |
599
588
 
600
589
  **Response:**
601
590
  ```json
602
591
  {
603
- "deleted": true
592
+ "id": "card_JXPULjlKqC5j0i",
593
+ "entity": "card",
594
+ "name": "Gaurav",
595
+ "last4": "4366",
596
+ "network": "Visa",
597
+ "type": "credit",
598
+ "issuer": "UTIB",
599
+ "international": false,
600
+ "emi": true,
601
+ "sub_type": "consumer",
602
+ "token_iin": null
604
603
  }
605
604
  ```
606
605
  -------------------------------------------------------------------------------------------------------
@@ -28,6 +28,8 @@ Razorpay::Customer.create({
28
28
  | name* | string | Name of the customer |
29
29
  | email | string | Email of the customer |
30
30
  | contact | string | Contact number of the customer |
31
+ | fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`|
32
+ | gstin | string | Customer's GST number, if available. For example, `29XAbbA4369J1PA` |
31
33
  | notes | object | A key-value pair |
32
34
 
33
35
  **Response:**
@@ -12,7 +12,6 @@ Razorpay::Customer.create({
12
12
  "contact": 9123456780,
13
13
  "email": "gaurav.kumar@example.com",
14
14
  "fail_existing": 0,
15
- "gstin": "29XAbbA4369J1PA",
16
15
  "notes": {
17
16
  "notes_key_1": "Tea, Earl Grey, Hot",
18
17
  "notes_key_2": "Tea, Earl Grey… decaf."
@@ -28,6 +27,7 @@ Razorpay::Customer.create({
28
27
  | email | string | Email of the customer |
29
28
  | contact | string | Contact number of the customer |
30
29
  | notes | object | A key-value pair |
30
+ | fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`|
31
31
 
32
32
  **Response:**
33
33
  ```json
@@ -50,9 +50,10 @@ Razorpay::Customer.create({
50
50
  ### Create order
51
51
 
52
52
  ```rb
53
- Razorpay::Customer.create({
53
+ Razorpay::Order.create({
54
54
  "amount": 0,
55
55
  "currency": "INR",
56
+ "payment_capture": true,
56
57
  "method": "emandate",
57
58
  "customer_id": "cust_1Aa00000000001",
58
59
  "receipt": "Receipt No. 1",
@@ -70,7 +71,7 @@ Razorpay::Customer.create({
70
71
  },
71
72
  "bank_account": {
72
73
  "beneficiary_name": "Gaurav Kumar",
73
- "account_number": 1121431121541121,
74
+ "account_number": "1121431121541121",
74
75
  "account_type": "savings",
75
76
  "ifsc_code": "HDFC0000001"
76
77
  }
@@ -86,12 +87,14 @@ Razorpay::Customer.create({
86
87
  | currency* | string | Currency of the order. Currently only `INR` is supported. |
87
88
  | method* | string | The authorization method. In this case the value will be `emandate` |
88
89
  | receipt | string | Your system order reference id. |
90
+ | customer_id* | string | The `customer_id` for the customer you want to charge.|
89
91
  | payment_capture | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. |
90
- | notes | object | A key-value pair |
91
- | token | object | A key-value pair |
92
+ | notes | object | A key-value pair |
93
+ | token | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#112-create-an-order) are supported|
92
94
 
93
95
  **Response:**
94
96
  Create order response please click [here](https://razorpay.com/docs/api/recurring-payments/emandate/authorization-transaction/#112-create-an-order)
97
+
95
98
  -------------------------------------------------------------------------------------------------------
96
99
 
97
100
  ### Create an Authorization Payment
@@ -142,16 +145,20 @@ Razorpay::SubscriptionRegistration.create(para_attr)
142
145
 
143
146
  | Name | Type | Description |
144
147
  |-----------------|---------|------------------------------------------------------------------------------|
145
- | customer | object | Details of the customer to whom the registration link will be sent. |
148
+ | customer* | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#121-create-a-registration-link) are supported |
146
149
  | type* | string | In this case, the value is `link`. |
147
150
  | currency* | string | The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. |
148
151
  | amount* | integer | The payment amount in the smallest currency sub-unit. |
149
152
  | description* | string | A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar`). |
150
- | subscription_registration | object | Details of the authorization payment. |
151
- | notes | object | A key-value pair |
153
+ | subscription_registration | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#121-create-a-registration-link) are supported |
154
+ | email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
155
+ | expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
156
+ | receipt | string | Your system order reference id. |
157
+ | notes | object | A key-value pair |
152
158
 
153
159
  **Response:**
154
160
  Create registration link response please click [here](https://razorpay.com/docs/api/recurring-payments/emandate/authorization-transaction/#121-create-a-registration-link)
161
+
155
162
  -------------------------------------------------------------------------------------------------------
156
163
 
157
164
  ### Send/Resend notifications
@@ -161,7 +168,7 @@ invoiceId = "inv_JDdNb4xdf4gxQ7"
161
168
 
162
169
  medium = "email"
163
170
 
164
- Razorpay::Invoice.notifyBy(invoiceId, medium)
171
+ Razorpay::Invoice.notify_by(invoiceId, medium)
165
172
  ```
166
173
 
167
174
  **Parameters:**
@@ -313,7 +320,7 @@ Razorpay::Payment.fetch(paymentId)
313
320
  ```rb
314
321
  customerId = "cust_1Aa00000000004"
315
322
 
316
- Razorpay::Customer.fetchTokens(customerId)
323
+ Razorpay::Customer.fetch(customerId).fetchTokens
317
324
  ```
318
325
 
319
326
  **Parameters:**
@@ -367,7 +374,7 @@ customerId = "cust_1Aa00000000004"
367
374
 
368
375
  tokenId = "token_Hxe0skTXLeg9pF"
369
376
 
370
- Razorpay::fetch(customerId).deleteToken(tokenId)
377
+ Razorpay::Customer.fetch(customerId).deleteToken(tokenId)
371
378
  ```
372
379
 
373
380
  **Parameters:**
@@ -409,6 +416,7 @@ Razorpay::Order.create(para_attr)
409
416
  | currency* | string | Currency of the order. Currently only `INR` is supported. |
410
417
  | receipt | string | Your system order reference id. |
411
418
  | notes | object | A key-value pair |
419
+ | payment_capture* | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. |
412
420
 
413
421
  **Response:**
414
422
  ```json
@@ -450,7 +458,7 @@ para_attr = {
450
458
  "note_key 2": "Tea. Earl Gray. Hot."
451
459
  }
452
460
  }
453
- Razorpay::Payment.createRecurringPayment(para_attr)
461
+ Razorpay::Payment.create_recurring_payment(para_attr)
454
462
  ```
455
463
 
456
464
  **Parameters:**
data/documents/fund.md CHANGED
@@ -8,16 +8,16 @@ Razorpay.setup('key_id', 'key_secret')
8
8
  ### Create a fund account
9
9
  ```rb
10
10
  para_attr = {
11
- "customer_id":"cust_Aa000000000001",
12
- "account_type":"bank_account",
11
+ "customer_id": "cust_Aa000000000001",
12
+ "account_type": "bank_account",
13
13
  "bank_account":{
14
- "name":"Gaurav Kumar",
15
- "account_number":"11214311215411",
16
- "ifsc":"HDFC0000053"
14
+ "name": "Gaurav Kumar",
15
+ "account_number": "11214311215411",
16
+ "ifsc": "HDFC0000053"
17
17
  }
18
18
  }
19
19
 
20
- Razorpay::FundAccount.create(data)
20
+ Razorpay::FundAccount.create(para_attr)
21
21
  ```
22
22
 
23
23
  **Parameters:**
@@ -31,18 +31,20 @@ Razorpay::FundAccount.create(data)
31
31
  **Response:**
32
32
  ```json
33
33
  {
34
- "id":"fa_Aa00000000001",
35
- "entity":"fund_account",
36
- "customer_id":"cust_Aa000000000001",
37
- "account_type":"bank_account",
38
- "bank_account":{
39
- "name":"Gaurav Kumar",
40
- "account_number":"11214311215411",
41
- "ifsc":"HDFC0000053",
42
- "bank_name":"HDFC Bank"
34
+ "id": "fa_JcXaLomo4ck5IY",
35
+ "entity": "fund_account",
36
+ "customer_id": "cust_JZse2vlC5nK9AQ",
37
+ "account_type": "bank_account",
38
+ "bank_account": {
39
+ "ifsc": "HDFC0000053",
40
+ "bank_name": "HDFC Bank",
41
+ "name": "Gaurav Kumar",
42
+ "notes": [],
43
+ "account_number": "11214311215411"
43
44
  },
44
- "active":true,
45
- "created_at":1543650891
45
+ "batch_id": null,
46
+ "active": true,
47
+ "created_at": 1654154246
46
48
  }
47
49
  ```
48
50
  -------------------------------------------------------------------------------------------------------
data/documents/items.md CHANGED
@@ -23,17 +23,27 @@ Razorpay::Item.create({
23
23
  | name* | string | Name of the item. |
24
24
  | description | string | A brief description of the item. |
25
25
  | amount | integer | Amount of the order to be paid |
26
- | currency | string | Currency of the order. Currently only `INR` is supported. |
26
+ | currency* | string | Currency of the order. Currently only `INR` is supported. |
27
27
 
28
28
  **Response:**
29
29
  ```json
30
30
  {
31
- "id": "item_7Oxp4hmm6T4SCn",
31
+ "id": "item_Jf5MlwKlPMOKBV",
32
32
  "active": true,
33
33
  "name": "Book / English August",
34
34
  "description": "An indian story, Booker prize winner.",
35
35
  "amount": 20000,
36
- "currency": "INR"
36
+ "unit_amount": 20000,
37
+ "currency": "INR",
38
+ "type": "invoice",
39
+ "unit": null,
40
+ "tax_inclusive": false,
41
+ "hsn_code": null,
42
+ "sac_code": null,
43
+ "tax_rate": null,
44
+ "tax_id": null,
45
+ "tax_group_id": null,
46
+ "created_at": 1654709890
37
47
  }
38
48
  ```
39
49
 
@@ -63,34 +73,28 @@ Razorpay::Item.all(options)
63
73
  **Response:**
64
74
  ```json
65
75
  {
66
- "entity": "collection",
67
- "count": 3,
68
- "items": [
69
- {
70
- "id": "item_7Oy8OMV6BdEAac",
71
- "active": true,
72
- "name": "Book / Ignited Minds",
73
- "description": null,
74
- "amount": 15000,
75
- "currency": "INR"
76
- },
77
- {
78
- "id": "item_7Oxp4hmm6T4SCn",
79
- "active": true,
80
- "name": "Book / English August",
81
- "description": "An indian story, Booker prize winner.",
82
- "amount": 20000,
83
- "currency": "INR"
84
- },
85
- {
86
- "id": "item_7OxoGnoxCuUKbo",
87
- "active": true,
88
- "name": "Book / English August",
89
- "description": null,
90
- "amount": 20000,
91
- "currency": "INR"
92
- }
93
- ]
76
+ "entity": "collection",
77
+ "count": 1,
78
+ "items": [
79
+ {
80
+ "id": "item_JnjKnSWxjILdWu",
81
+ "active": true,
82
+ "name": "Book / English August",
83
+ "description": "An indian story, Booker prize winner.",
84
+ "amount": 20000,
85
+ "unit_amount": 20000,
86
+ "currency": "INR",
87
+ "type": "invoice",
88
+ "unit": null,
89
+ "tax_inclusive": false,
90
+ "hsn_code": null,
91
+ "sac_code": null,
92
+ "tax_rate": null,
93
+ "tax_id": null,
94
+ "tax_group_id": null,
95
+ "created_at": 1656597363
96
+ }
97
+ ]
94
98
  }
95
99
  ```
96
100
  -------------------------------------------------------------------------------------------------------
@@ -110,12 +114,22 @@ Razorpay::Item.fetch(itemId)
110
114
  **Response:**
111
115
  ```json
112
116
  {
113
- "id": "item_7Oxp4hmm6T4SCn",
114
- "active": true,
115
- "name": "Book / English August",
116
- "description": "An indian story, Booker prize winner.",
117
- "amount": 20000,
118
- "currency": "INR"
117
+ "id": "item_JnjKnSWxjILdWu",
118
+ "active": true,
119
+ "name": "Book / English August",
120
+ "description": "An indian story, Booker prize winner.",
121
+ "amount": 20000,
122
+ "unit_amount": 20000,
123
+ "currency": "INR",
124
+ "type": "invoice",
125
+ "unit": null,
126
+ "tax_inclusive": false,
127
+ "hsn_code": null,
128
+ "sac_code": null,
129
+ "tax_rate": null,
130
+ "tax_id": null,
131
+ "tax_group_id": null,
132
+ "created_at": 1656597363
119
133
  }
120
134
  ```
121
135
 
@@ -150,12 +164,22 @@ Razorpay::Item.edit(itemId,para_attr)
150
164
  **Response:**
151
165
  ```json
152
166
  {
153
- "id": "item_7Oy8OMV6BdEAac",
167
+ "id": "item_JInaSLODeDUQiQ",
154
168
  "active": true,
155
169
  "name": "Book / Ignited Minds - Updated name!",
156
- "description": "New descirption too. :)",
157
- "amount": 15000,
158
- "currency": "INR"
170
+ "description": "New descirption too.",
171
+ "amount": 20000,
172
+ "unit_amount": 20000,
173
+ "currency": "INR",
174
+ "type": "invoice",
175
+ "unit": null,
176
+ "tax_inclusive": false,
177
+ "hsn_code": null,
178
+ "sac_code": null,
179
+ "tax_rate": null,
180
+ "tax_id": null,
181
+ "tax_group_id": null,
182
+ "created_at": 1649843796
159
183
  }
160
184
  ```
161
185
  -------------------------------------------------------------------------------------------------------