diff --git a/fyle/platform/apis/v1beta/spender/reports.py b/fyle/platform/apis/v1beta/spender/reports.py index aced49c..3c5c8f5 100644 --- a/fyle/platform/apis/v1beta/spender/reports.py +++ b/fyle/platform/apis/v1beta/spender/reports.py @@ -3,12 +3,29 @@ """ from ....internals.list_all_resources import ListAllResources from ....internals.list_resources import ListResources +from ....internals.post_resources import PostResources -class Reports(ListResources, ListAllResources): +class Reports(ListResources, ListAllResources, PostResources): """Class for Report APIs.""" REPORTS = '/reports' + ADD_EXPENSE_TO_REPORT = '/reports/add_expenses' + SUBMIT_REPORT = '/reports/submit' def __init__(self, version, role): super().__init__(version, role, Reports.REPORTS) + + + def add_expense_to_report(self, payload): + return self.api.make_post_request( + api_url=Reports.ADD_EXPENSE_TO_REPORT, + payload=payload + ) + + + def submit_report(self, payload): + return self.api.make_post_request( + api_url=Reports.SUBMIT_REPORT, + payload=payload + ) diff --git a/setup.py b/setup.py index 486376d..2dc180d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='fyle', - version='v0.30.0', + version='v0.31.0', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing Fyle Platform APIs',