Skip to content

Commit af83bd7

Browse files
authored
Merge pull request #216 from razorpay/addon_api_correction
addon doc correction
2 parents 53a8bb4 + 996d6fa commit af83bd7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

documents/addon.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ client.subscription.createAddon('sub_I55auG9GnbsR8u',{
1919
| Name | Type | Description |
2020
|-------|-----------|--------------------------------------------------|
2121
| subscriptionId* | boolean | The subscription ID to which the add-on is being added. |
22-
| items* | object | Details of the add-on you want to create. |
23-
| quantity* | integer | This specifies the number of units of the add-on to be charged to the customer. |
22+
| items | array | All parameters listed [here](https://razorpay.com/docs/api/payments/subscriptions/#create-an-add-on) |
23+
| quantity | integer | This specifies the number of units of the add-on to be charged to the customer. |
2424

2525
**Response:**
2626
```json

razorpay/resources/addon.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def delete(self, addon_id, data={}, **kwargs):
2626
Args:
2727
addon_id : Id for which addon object has to be deleted
2828
"""
29-
return super(Addon, self).delete(addon_id, data, **kwargs)
29+
url = '{}/{}'.format(self.base_url, addon_id)
30+
31+
return self.delete_url(url, data, **kwargs)
3032

3133
def all(self, data={}, **kwargs):
3234
""""

tests/test_client_addon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_addon_fetch(self):
2222
@responses.activate
2323
def test_addon_delete(self):
2424
result = []
25-
url = '{}/{}/delete'.format(self.base_url, self.addon_id)
25+
url = '{}/{}'.format(self.base_url, self.addon_id)
2626
responses.add(responses.DELETE,
2727
url,
2828
status=200,

0 commit comments

Comments
 (0)