From 7ebcacf643fb0f22049771dd43cba9ed45dcae17 Mon Sep 17 00:00:00 2001 From: Ashwin Thanaraj <37061471+ashwin1111@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:34:15 +0530 Subject: [PATCH] feat: Add support for admin subscriptions (#82) --- fyle/platform/apis/v1beta/admin/__init__.py | 2 ++ fyle/platform/apis/v1beta/admin/subscriptions.py | 15 +++++++++++++++ setup.py | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 fyle/platform/apis/v1beta/admin/subscriptions.py diff --git a/fyle/platform/apis/v1beta/admin/__init__.py b/fyle/platform/apis/v1beta/admin/__init__.py index 66affd8..0c1ced5 100644 --- a/fyle/platform/apis/v1beta/admin/__init__.py +++ b/fyle/platform/apis/v1beta/admin/__init__.py @@ -17,6 +17,7 @@ from .corporate_cards import CorporateCards from .corporate_card_transactions import CorporateCardTransactions from .departments import Departments +from .subscriptions import Subscriptions from ..version import version role = 'admin' @@ -37,3 +38,4 @@ corporate_cards = CorporateCards(version, role) corporate_card_transactions = CorporateCardTransactions(version, role) departments = Departments(version, role) +subscriptions = Subscriptions(version, role) diff --git a/fyle/platform/apis/v1beta/admin/subscriptions.py b/fyle/platform/apis/v1beta/admin/subscriptions.py new file mode 100644 index 0000000..06bffd8 --- /dev/null +++ b/fyle/platform/apis/v1beta/admin/subscriptions.py @@ -0,0 +1,15 @@ +""" +V1 Beta Admin Subscriptions +""" + +from ....internals.list_resources import ListResources +from ....internals.list_all_resources import ListAllResources +from ....internals.post_resources import PostResources + +class Subscriptions(ListResources, ListAllResources, PostResources): + """Class for Subscriptions APIs.""" + + SUBSCRIPTIONS = '/subscriptions' + + def __init__(self, version, role): + super().__init__(version, role, Subscriptions.SUBSCRIPTIONS) diff --git a/setup.py b/setup.py index 18753f7..8b2c796 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='fyle', - version='v0.34.0', + version='v0.35.0', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing Fyle Platform APIs',