Skip to content

Commit 24ebabd

Browse files
authored
feat: add support subscribed (#152)
* feat: Add support for subscribed resources * feat: Add support for subscribed resources
1 parent 5e647a8 commit 24ebabd

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

apps/workspaces/tasks.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,20 @@ def async_create_admin_subcriptions(workspace_id: int) -> None:
116116
platform = PlatformConnector(fyle_credentials)
117117
payload = {
118118
'is_enabled': True,
119-
'webhook_url': '{}/workspaces/{}/fyle/webhook_callback/'.format(settings.API_URL, workspace_id)
119+
'webhook_url': '{}/workspaces/{}/fyle/webhook_callback/'.format(settings.API_URL, workspace_id),
120+
'subscribed_resources': [
121+
'EXPENSE',
122+
'REPORT',
123+
'CATEGORY',
124+
'PROJECT',
125+
'COST_CENTER',
126+
'EXPENSE_FIELD',
127+
'DEPENDENT_EXPENSE_FIELD',
128+
'CORPORATE_CARD',
129+
'EMPLOYEE',
130+
'TAX_GROUP',
131+
'ORG_SETTING'
132+
]
120133
}
121134
platform.subscriptions.post(payload)
122135

0 commit comments

Comments
 (0)