From b142989443ce4872c6646f8bc35108f5897ea733 Mon Sep 17 00:00:00 2001 From: ankitdas13 Date: Thu, 30 Jun 2022 00:28:13 +0530 Subject: [PATCH 1/2] addon doc correction --- documents/addon.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documents/addon.md b/documents/addon.md index 74b8f3be..f2abc853 100644 --- a/documents/addon.md +++ b/documents/addon.md @@ -19,8 +19,8 @@ client.subscription.createAddon('sub_I55auG9GnbsR8u',{ | Name | Type | Description | |-------|-----------|--------------------------------------------------| | subscriptionId* | boolean | The subscription ID to which the add-on is being added. | -| items* | object | Details of the add-on you want to create. | -| quantity* | integer | This specifies the number of units of the add-on to be charged to the customer. | +| items | array | All parameters listed [here](https://razorpay.com/docs/api/payments/subscriptions/#create-an-add-on) | +| quantity | integer | This specifies the number of units of the add-on to be charged to the customer. | **Response:** ```json From 996d6fac8046266085fbd44bde8e2fba987b82df Mon Sep 17 00:00:00 2001 From: ankitdas13 Date: Fri, 1 Jul 2022 00:59:06 +0530 Subject: [PATCH 2/2] update delete addon --- razorpay/resources/addon.py | 4 +++- tests/test_client_addon.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/razorpay/resources/addon.py b/razorpay/resources/addon.py index 85a995e1..a3953c94 100644 --- a/razorpay/resources/addon.py +++ b/razorpay/resources/addon.py @@ -26,7 +26,9 @@ def delete(self, addon_id, data={}, **kwargs): Args: addon_id : Id for which addon object has to be deleted """ - return super(Addon, self).delete(addon_id, data, **kwargs) + url = '{}/{}'.format(self.base_url, addon_id) + + return self.delete_url(url, data, **kwargs) def all(self, data={}, **kwargs): """" diff --git a/tests/test_client_addon.py b/tests/test_client_addon.py index 9a4d9588..f5a9e1bd 100644 --- a/tests/test_client_addon.py +++ b/tests/test_client_addon.py @@ -22,7 +22,7 @@ def test_addon_fetch(self): @responses.activate def test_addon_delete(self): result = [] - url = '{}/{}/delete'.format(self.base_url, self.addon_id) + url = '{}/{}'.format(self.base_url, self.addon_id) responses.add(responses.DELETE, url, status=200,