Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ target/

.DS_Store
.idea
venv
2 changes: 1 addition & 1 deletion razorpay/resources/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def createAddon(self, subscription_id, data={}, **kwargs):
url = "{}/{}/addons".format(self.base_url, subscription_id)
return self.post_url(url, data, **kwargs)

def edit(self, subscription_id, data={}, **kwargs):
def update(self, subscription_id, data={}, **kwargs):
"""
Update particular subscription

Expand Down
4 changes: 2 additions & 2 deletions tests/test_client_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_subscription_create_addon(self):
self.assertEqual(response['item']['amount'], 30000)

@responses.activate
def test_subscription_edit(self):
def test_subscription_update(self):
param = {
"quantity":2,
"schedule_change_at":"cycle_end",
Expand All @@ -91,7 +91,7 @@ def test_subscription_edit(self):
url = '{}/{}'.format(self.base_url, 'subscription_id')
responses.add(responses.PATCH, url, status=200, body=json.dumps(result),
match_querystring=True)
self.assertEqual(self.client.subscription.edit('subscription_id', param), result)
self.assertEqual(self.client.subscription.update('subscription_id', param), result)

@responses.activate
def test_subscription_pending_update(self):
Expand Down