From 4b0d8bcfaccc3301d854db32ea22adaa83dc3670 Mon Sep 17 00:00:00 2001 From: Shwetabh Kumar Date: Thu, 2 Sep 2021 14:34:45 +0530 Subject: [PATCH] Support for Tax Groups and Expenses APIs (#13) * Support for Tax Groups and Expenses APIs --- fyle/platform/apis/v1/admin/__init__.py | 4 ++++ fyle/platform/apis/v1/admin/expenses.py | 17 +++++++++++++++++ fyle/platform/apis/v1/admin/tax_groups.py | 17 +++++++++++++++++ setup.py | 2 +- 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 fyle/platform/apis/v1/admin/expenses.py create mode 100644 fyle/platform/apis/v1/admin/tax_groups.py diff --git a/fyle/platform/apis/v1/admin/__init__.py b/fyle/platform/apis/v1/admin/__init__.py index 0ec5511..f7c1158 100644 --- a/fyle/platform/apis/v1/admin/__init__.py +++ b/fyle/platform/apis/v1/admin/__init__.py @@ -5,6 +5,8 @@ from .categories import Categories from .cost_centers import CostCenters from .employees import Employees +from .expenses import Expenses +from .tax_groups import TaxGroups from .invitations import Invitations from .projects import Projects from ..version import version @@ -16,3 +18,5 @@ employees = Employees(version, role) projects = Projects(version, role) invitations = Invitations(version, role) +expenses = Expenses(version, role) +tax_groups = TaxGroups(version, role) \ No newline at end of file diff --git a/fyle/platform/apis/v1/admin/expenses.py b/fyle/platform/apis/v1/admin/expenses.py new file mode 100644 index 0000000..73c6e8e --- /dev/null +++ b/fyle/platform/apis/v1/admin/expenses.py @@ -0,0 +1,17 @@ +""" +V1 Admin Expenses +""" + +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 Expenses(ListResources, ListAllResources, PostResources, GetResources): + """Class for Expenses APIs.""" + + EXPENSES = '/expenses' + + def __init__(self, version, role): + super().__init__(version, role, Expenses.EXPENSES) diff --git a/fyle/platform/apis/v1/admin/tax_groups.py b/fyle/platform/apis/v1/admin/tax_groups.py new file mode 100644 index 0000000..7627b2a --- /dev/null +++ b/fyle/platform/apis/v1/admin/tax_groups.py @@ -0,0 +1,17 @@ +""" +V1 Admin Tax Groups +""" + +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 TaxGroups(ListResources, ListAllResources, PostResources, GetResources): + """Class for Tax Groups APIs.""" + + TAX_GROUPS = '/tax_groups' + + def __init__(self, version, role): + super().__init__(version, role, TaxGroups.TAX_GROUPS) diff --git a/setup.py b/setup.py index 77aa543..e16700d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='fyle', - version='v0.8.0', + version='v0.9.0', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing Fyle Platform APIs',