From fd745a5c2175f2282d7421a78949735cbcf2b781 Mon Sep 17 00:00:00 2001 From: Sravan Kumar <30795376+Sravanksk@users.noreply.github.com> Date: Mon, 6 Sep 2021 17:44:06 +0530 Subject: [PATCH] Support for Reimbursements and Settlements (#14) --- fyle/platform/apis/v1/admin/__init__.py | 6 +++++- fyle/platform/apis/v1/admin/reimbursements.py | 17 +++++++++++++++++ fyle/platform/apis/v1/admin/settlements.py | 17 +++++++++++++++++ setup.py | 2 +- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 fyle/platform/apis/v1/admin/reimbursements.py create mode 100644 fyle/platform/apis/v1/admin/settlements.py diff --git a/fyle/platform/apis/v1/admin/__init__.py b/fyle/platform/apis/v1/admin/__init__.py index f7c1158..65656e7 100644 --- a/fyle/platform/apis/v1/admin/__init__.py +++ b/fyle/platform/apis/v1/admin/__init__.py @@ -7,6 +7,8 @@ from .employees import Employees from .expenses import Expenses from .tax_groups import TaxGroups +from .reimbursements import Reimbursements +from .settlements import Settlements from .invitations import Invitations from .projects import Projects from ..version import version @@ -19,4 +21,6 @@ projects = Projects(version, role) invitations = Invitations(version, role) expenses = Expenses(version, role) -tax_groups = TaxGroups(version, role) \ No newline at end of file +tax_groups = TaxGroups(version, role) +reimbursements = Reimbursements(version, role) +settlements = Settlements(version, role) diff --git a/fyle/platform/apis/v1/admin/reimbursements.py b/fyle/platform/apis/v1/admin/reimbursements.py new file mode 100644 index 0000000..19f9c6c --- /dev/null +++ b/fyle/platform/apis/v1/admin/reimbursements.py @@ -0,0 +1,17 @@ +""" +V1 Admin Reimbursements +""" + +from ....internals.get_resources import GetResources +from ....internals.list_all_resources import ListAllResources +from ....internals.list_resources import ListResources +from ....internals.post_resources import PostResources + + +class Reimbursements(ListResources, ListAllResources, PostResources, GetResources): + """Class for Reimbursements APIs.""" + + REIMBURSEMENTS = '/reimbursements' + + def __init__(self, version, role): + super().__init__(version, role, Reimbursements.REIMBURSEMENTS) diff --git a/fyle/platform/apis/v1/admin/settlements.py b/fyle/platform/apis/v1/admin/settlements.py new file mode 100644 index 0000000..862620e --- /dev/null +++ b/fyle/platform/apis/v1/admin/settlements.py @@ -0,0 +1,17 @@ +""" +V1 Admin Settlements +""" + +from ....internals.get_resources import GetResources +from ....internals.list_all_resources import ListAllResources +from ....internals.list_resources import ListResources +from ....internals.post_resources import PostResources + + +class Settlements(ListResources, ListAllResources, PostResources, GetResources): + """Class for Settlements APIs.""" + + SETTLEMENTS = '/settlements' + + def __init__(self, version, role): + super().__init__(version, role, Settlements.SETTLEMENTS) diff --git a/setup.py b/setup.py index e16700d..d92f966 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='fyle', - version='v0.9.0', + version='v0.10.0', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing Fyle Platform APIs',