Skip to content

Commit

Permalink
fix: api endpoint for save and reset action
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninad1306 committed Sep 24, 2024
1 parent 65a2a70 commit 322cc4b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions india_compliance/gst_india/api_classes/taxpayer_returns.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,15 @@ 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):
ACTION_MAP = {"RESET": "RESETIMS", "SAVE": "SAVE"}

gov_data = {"rtin": gstin, "reqtyp": action, "invdata": data}

return self.get(
action=ACTION_MAP[action],
endpoint=self.END_POINT,
json=gov_data,
otp=otp,
)

0 comments on commit 322cc4b

Please sign in to comment.