From f08842cfdd9fc92ec6a1f9beeffffc2b464a1f49 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Wed, 12 Jun 2024 17:29:16 +0530 Subject: [PATCH 1/4] Add mark as paid API, remove settlement --- fyle/platform/apis/v1beta/admin/__init__.py | 2 ++ fyle/platform/apis/v1beta/admin/reports.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 fyle/platform/apis/v1beta/admin/reports.py diff --git a/fyle/platform/apis/v1beta/admin/__init__.py b/fyle/platform/apis/v1beta/admin/__init__.py index ef76323..cb64550 100644 --- a/fyle/platform/apis/v1beta/admin/__init__.py +++ b/fyle/platform/apis/v1beta/admin/__init__.py @@ -1,6 +1,7 @@ """ Initializing Admin API's """ +from .reports import Reports from .categories import Categories from .cost_centers import CostCenters from .employees import Employees @@ -41,3 +42,4 @@ departments = Departments(version, role) subscriptions = Subscriptions(version, role) scheduled_callbacks = ScheduledCallbacks(version, role) +reports = Reports(version, role) diff --git a/fyle/platform/apis/v1beta/admin/reports.py b/fyle/platform/apis/v1beta/admin/reports.py new file mode 100644 index 0000000..0ed1530 --- /dev/null +++ b/fyle/platform/apis/v1beta/admin/reports.py @@ -0,0 +1,16 @@ +from ....internals.post_resources import PostResources + + +class Reports(PostResources): + + REPORTS = '/reports' + MARK_AS_PAID = '/reports/mark_paid/bulk' + + def __init__(self, version, role): + super().__init__(version, role, Reports.REPORTS) + + def bulk_mark_as_paid(self, payload): + return self.api.make_post_request( + api_url=Reports.MARK_AS_PAID, + payload=payload + ) From 6207c74ca34ba185399aefb717e35735e912f0d7 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Thu, 13 Jun 2024 22:56:45 +0530 Subject: [PATCH 2/4] version bump up --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3ebb8e7..baaa2e4 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='fyle', - version='v0.36.1', + version='v0.37.0', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing Fyle Platform APIs', From 9dbd1d37f89764f61a82166b222f212a366cbf19 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Thu, 27 Jun 2024 11:42:35 +0530 Subject: [PATCH 3/4] Remove settlement --- fyle/platform/apis/v1beta/admin/__init__.py | 2 -- fyle/platform/apis/v1beta/admin/settlements.py | 17 ----------------- .../approver/fixtures/mock_approver_data.json | 1 - 3 files changed, 20 deletions(-) delete mode 100644 fyle/platform/apis/v1beta/admin/settlements.py diff --git a/fyle/platform/apis/v1beta/admin/__init__.py b/fyle/platform/apis/v1beta/admin/__init__.py index cb64550..2a04da7 100644 --- a/fyle/platform/apis/v1beta/admin/__init__.py +++ b/fyle/platform/apis/v1beta/admin/__init__.py @@ -8,7 +8,6 @@ from .expenses import Expenses from .tax_groups import TaxGroups from .reimbursements import Reimbursements -from .settlements import Settlements from .projects import Projects from .expense_fields import ExpenseFields from .dependent_expense_field_values import DependentExpenseFieldValues @@ -33,7 +32,6 @@ expenses = Expenses(version, role) tax_groups = TaxGroups(version, role) reimbursements = Reimbursements(version, role) -settlements = Settlements(version, role) advance_requests = AdvanceRequests(version, role) files = Files(version, role) accounting_exports = AccountingExports(version, role) diff --git a/fyle/platform/apis/v1beta/admin/settlements.py b/fyle/platform/apis/v1beta/admin/settlements.py deleted file mode 100644 index 6b9c40c..0000000 --- a/fyle/platform/apis/v1beta/admin/settlements.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -V1 Beta 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/test/integration/approver/fixtures/mock_approver_data.json b/test/integration/approver/fixtures/mock_approver_data.json index afba30b..ef3a46a 100644 --- a/test/integration/approver/fixtures/mock_approver_data.json +++ b/test/integration/approver/fixtures/mock_approver_data.json @@ -67,7 +67,6 @@ "physical_bill_submitted_at":"None", "purpose":"#2: Oct 2021", "seq_num":"C/2021/10/R/2", - "settlement_id":"setKvFHOzcAjt", "source":"WEBAPP", "state":"PAID", "tax":0.5, From 2f71ef6c463b2d83b8539f2e39cf63fb5657ffb5 Mon Sep 17 00:00:00 2001 From: Ashutosh619-sudo Date: Thu, 27 Jun 2024 12:27:40 +0530 Subject: [PATCH 4/4] version bump up --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index baaa2e4..b7ceda7 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='fyle', - version='v0.37.0', + version='v0.37.1', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing Fyle Platform APIs',