diff --git a/qbosdk/apis/purchases.py b/qbosdk/apis/purchases.py index 59d79e7..82a4f2e 100644 --- a/qbosdk/apis/purchases.py +++ b/qbosdk/apis/purchases.py @@ -11,6 +11,7 @@ class Purchases(ApiBase): GET_PURCHASES = '/query?query=select * from Purchase STARTPOSITION {0} MAXRESULTS 1000' POST_PURCHASE = '/purchase?minorversion=38' DELETE_PURCHASE = '/purchase?operation=delete' + GET_PURCHASE_BY_ID = "/query?query=select * from Purchase where Id = \'{0}\'" def get(self): """ @@ -45,3 +46,11 @@ def delete(self, purchase_id: str): 'SyncToken': '1' } return self._post_request(data, Purchases.DELETE_PURCHASE) + + def get_by_id(self, purchase_id: str): + """ + Get Purchase by Id + :param purchase_id: Purchase Id + :return: Dict in Purchase schema + """ + return self._query(self.GET_PURCHASE_BY_ID.format(purchase_id)) diff --git a/setup.py b/setup.py index ca13f6c..c8afca0 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='qbosdk', - version='0.18.1', + version='0.19.0', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Python SDK for accessing Quickbooks Online APIs',