From 3d72bf1d7fae52c65b9f7eefbe3fc6725ba98f3c Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 24 Sep 2024 12:02:41 +0530 Subject: [PATCH] fix: api endpoint for save and reset action --- .../gst_india/api_classes/taxpayer_returns.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/india_compliance/gst_india/api_classes/taxpayer_returns.py b/india_compliance/gst_india/api_classes/taxpayer_returns.py index df994ff176..0e76f0a176 100644 --- a/india_compliance/gst_india/api_classes/taxpayer_returns.py +++ b/india_compliance/gst_india/api_classes/taxpayer_returns.py @@ -123,3 +123,13 @@ def get_files(self, gstin, token, otp=None): return response return FilesAPI().get_all(response) + + def save_or_reset_action(self, action, gstin, data, otp=None): + gov_data = {"rtin": gstin, "reqtyp": action, "invdata": data} + + return self.get( + action="RESETIMS" if action == "RESET" else action, + endpoint=self.END_POINT, + json=gov_data, + otp=otp, + )