Protocol
ActionableInsightsViewControllerDelegate
public protocol ActionableInsightsViewControllerDelegate: AnyObject
A set of methods that your delegate object should implement to get notified when the user selects an action that requires more user interaction.
Relationships
Conforms To
AnyObject
Requirements
actionableInsightsViewController(_:showBudget:budgetPeriodStart:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showBudget id: Budget.ID, budgetPeriodStart: Date)
Tells the delegate that it should present a specific budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
id | Budget.ID |
The id of the budget to show. |
budgetPeriodStart | Date |
The start date of period that the budget should show details for. |
actionableInsightsViewController(_:createBudgetWithSuggestion:completionHandler:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, createBudgetWithSuggestion suggestion: InsightActionData.BudgetSuggestion, completionHandler: @escaping (Result<Void, Error>) -> Void)
Tells the delegate that it should create a budget.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
suggestion | InsightActionData.BudgetSuggestion |
A suggestion of what budget to create. |
completionHandler | @escaping (Result<Void, Error>) -> Void |
A completion handler to call when the budget was created or failed. |
actionableInsightsViewController(_:initiateTransferFromAccount:to:amount:currencyCode:completionHandler:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, initiateTransferFromAccount source: URL?, to destination: URL?, amount: Double?, currencyCode: String?, completionHandler: @escaping (Result<Void, Error>) -> Void)
Tells the delegate that it should make a transfer.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
source | URL? |
A URI for the source account that the transfer should be from. |
destination | URL? |
A URI for the destination account the transfer should be to. |
amount | Double? |
The amount to transfer. |
currencyCode | String? |
The currency code. |
completionHandler | @escaping (Result<Void, Error>) -> Void |
A completion handler to call when transfer was completed. |
actionableInsightsViewController(_:showAccountWithID:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showAccountWithID id: Account.ID)
Tells the delegate that it should present a specific account.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
id | Account.ID |
The id of the account. |
actionableInsightsViewController(_:showTransactionWithID:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showTransactionWithID id: Transaction.ID)
Tells the delegate that it should present a specific transaction.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
id | Transaction.ID |
The id of the transaction. |
actionableInsightsViewController(_:categorizeTransactionWithID:completionHandler:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, categorizeTransactionWithID id: Transaction.ID, completionHandler: @escaping (Result<Void, Error>) -> Void)
Tells the delegate that it should categorize a specific transaction.
Usually a transaction that's uncategorized.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
id | Transaction.ID |
The id of the transaction. |
completionHandler | @escaping (Result<Void, Error>) -> Void |
A completion handler to call when the transaction has been categorized, the user cancelled categorizing, or an error occurred when categorizing. |
actionableInsightsViewController(_:showTransactionsWithIDs:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showTransactionsWithIDs ids: [Transaction.ID])
Tells the delegate that it should present a list of transactions.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
ids | [Transaction.ID] |
The identifiers of the transactions. |
actionableInsightsViewController(_:showTransactionsWithIDs:month:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showTransactionsWithIDs ids: [Transaction.ID], month: Month)
Tells the delegate that it should present a list of transactions for a specific month.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
ids | [Transaction.ID] |
The identifiers of the transactions. |
month | Month |
The month the transactions are for. |
actionableInsightsViewController(_:showTransactionsByCategoryCode:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showTransactionsByCategoryCode transactionIDsByCategoryCode: [TinkCore.Category.Code: [Transaction.ID]])
Tells the delegate that it should present a list of transactions grouped by category.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
transactionIDsByCategoryCode | [TinkCore.Category.Code: [Transaction.ID]] |
The identifiers of the transactions grouped by category code. |
actionableInsightsViewController(_:showTransactionsByCategoryCode:month:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showTransactionsByCategoryCode transactionIDsByCategoryCode: [TinkCore.Category.Code: [Transaction.ID]], month: Month)
Tells the delegate that it should present a list of transactions grouped by category for a specific month.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
transactionIDsByCategoryCode | [TinkCore.Category.Code: [Transaction.ID]] |
The identifiers of the transactions grouped by category code. |
month | Month |
The month the transactions are for. |
actionableInsightsViewController(_:categorizeTransactionsWithIDs:completionHandler:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, categorizeTransactionsWithIDs ids: [Transaction.ID], completionHandler: @escaping (Result<Void, Error>) -> Void)
Tells the delegate that is should categorize a list of transactions.
The transactions are usually uncategorized.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
ids | [Transaction.ID] |
The identifiers of the transactions. |
completionHandler | @escaping (Result<Void, Error>) -> Void |
A completion handler to call when the transactions have been categorized, the user cancelled categorizing, or an error occurred when categorizing. |
actionableInsightsViewController(_:showLeftToSpendForMonth:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showLeftToSpendForMonth month: Month)
Tells the delegate that is should present left to spend.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
month | Month |
The month that should be displayed. |
actionableInsightsViewController(_:refreshCredentialsWithID:completionHandler:)
func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, refreshCredentialsWithID credentialsID: Credentials.ID, completionHandler: @escaping (Result<Void, Error>) -> Void)
Tells the delegate that is should refresh credentials.
Parameters
Name | Type | Description |
---|---|---|
viewController | ActionableInsightsViewController |
The view controller that called this method. |
credentialsID | Credentials.ID |
The identifier of the credentials that should be refreshed. |
completionHandler | @escaping (Result<Void, Error>) -> Void |
A completion handler to call when the credentials have been refreshed, the user cancelled refresh, or an error occurred when refreshing. |
actionableInsightsViewController(_:imageForInsightWithKind:)
func actionableInsightsViewController(_ viewController: UIViewController, imageForInsightWithKind kind: ActionableInsight.Kind) -> UIImage?
Asks the delegate for a image to display instead of the default representation for a specific insight type.
Parameters
Name | Type | Description |
---|---|---|
viewController | UIViewController |
The view controller that called this method. |
kind | ActionableInsight.Kind |
The type of insight that an image is being requested for. |
Returns
The image to show instead of the default representation. If you return nil
the default representation will be used.