Insight Action Handler
This interface contains a set of methods that you can implement to perform the necessary logic when a user selects an action for an insight that requires more user interaction.
All the methods have a Boolean return type to indicate if the action is handled by this handler or not. If you are overriding a method to perform custom logic for the action, the method should return true
.
For methods with a onComplete
lambda block parameter, you have to invoke the lambda block when the task related to the requested action has completed or been cancelled. If the action has completed successfully, the block can be invoked with the boolean value set to true
. Eg: onComplete.invoke(true) If the action has failed or is cancelled, the block can be invoked with the boolean value set to false
. Eg: onComplete.invoke(false) If you don’t invoke the onComplete
block, the insight will remain in the list and will not be archived.
Functions
Handle action where the user wants to categorize a transaction matching the id. This corresponds to InsightAction.Type.CATEGORIZE_EXPENSE action type.
Handle action where the user wants to categorize multiple transactions matching a list of ids. This corresponds to InsightAction.Type.CATEGORIZE_TRANSACTIONS action type.
Handle action where the user wants to create a budget. This corresponds to InsightAction.Type.CREATE_BUDGET action type.
Handle action where the user wants to make a transfer. This corresponds to InsightAction.Type.CREATE_TRANSFER action type.
Handle action where the user requests to refresh an aggregated credential. This corresponds to InsightAction.Type.REFRESH_CREDENTIAL action type.
Handle action where the user wants to view account matching the id. This corresponds to InsightAction.Type.VIEW_ACCOUNT and InsightAction.Type.VIEW_TRANSACTIONS action types.
Handle action where the user wants to view information for a budget matching the id and start period. This corresponds to InsightAction.Type.VIEW_BUDGET action type.
Handle action where the user wants to view the Monthly LEFT_TO_SPEND for the corresponding month. This corresponds to InsightAction.Type.VIEW_LEFT_TO_SPEND action type.
Handle action where the user wants to view the Monthly RECURRING_EXPENSE_BY_COST for the corresponding month. This corresponds to InsightAction.Type.VIEW_RECURRING_EXPENSE_BY_COST action type.
Handle action where the user wants to view the Monthly SAFE_TO_SPEND for the corresponding month. This corresponds to InsightAction.Type.VIEW_SAFE_TO_SPEND action type.
Handle action where the user wants to view transactions matching the list of ids. This corresponds to InsightAction.Type.VIEW_TRANSACTION and InsightAction.Type.VIEW_TRANSACTIONS action types.