Skip to content

Commit 5d8bfe5

Browse files
author
MousumiMohanty
committed
Added patch method to rest.py for update functionality
1 parent 435f808 commit 5d8bfe5

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

RELEASE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.3.0
2+
- Added patch method to the RestClient class to facilitate Update Verification Process action
3+
14
2.2.7
25
- Added tracking to requests
36

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
here = path.abspath(path.dirname(__file__))
1313

14-
version = "2.2.7"
14+
version = "2.3.0"
1515

1616
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
1717
long_description = f.read()

telesign/rest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,18 @@ def delete(self, resource, body=None, json_fields=None, **query_params):
221221
:return: The RestClient Response object.
222222
"""
223223
return self._execute(self.session.delete, 'DELETE', resource, body, json_fields, **query_params)
224+
225+
def patch(self, resource, body=None, json_fields=None, **query_params):
226+
"""
227+
Generic TeleSign REST API PATCH handler.
228+
229+
:param resource: The partial resource URI to perform the request against, as a string.
230+
:param body: (optional) A dictionary sent as a part of request body.
231+
:param json_fields: (optional) A dictionary sent as a JSON body.
232+
:param query_params: query_params to perform the PATCH request with, as a dictionary.
233+
:return: The RestClient Response object.
234+
"""
235+
return self._execute(self.session.patch, 'PATCH', resource, body, json_fields, **query_params)
224236

225237
def _execute(self, method_function, method_name, resource, body=None, json_fields=None, **query_params):
226238
"""

0 commit comments

Comments
 (0)