Skip to content

Commit

Permalink
Support for Creating and Submitting Reports (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
NileshPant1999 authored Jan 25, 2023
1 parent a0fce69 commit 2bf4f47
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion fyle/platform/apis/v1beta/spender/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='fyle',
version='v0.30.0',
version='v0.31.0',
author='Siva Narayanan',
author_email='[email protected]',
description='Python SDK for accessing Fyle Platform APIs',
Expand Down

0 comments on commit 2bf4f47

Please sign in to comment.