TinkMoneyManagerUI Documentation Beta

Protocol Actionable​Insights​View​Controller​Delegate

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.

ActionableInsightsViewControllerDelegate ActionableInsightsViewControllerDelegate AnyObject AnyObject ActionableInsightsViewControllerDelegate->AnyObject

Conforms To

AnyObject

Requirements

actionable​Insights​View​Controller(_:​show​Budget:​budget​Period​Start:​)

func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showBudget id: Budget.ID, budgetPeriodStart: Date)

Tells the delegate that it should present a specific budget.

Parameters

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

id Budget.​ID

The id of the budget to show.

budget​Period​Start Date

The start date of period that the budget should show details for.

actionable​Insights​View​Controller(_:​create​Budget​With​Suggestion:​completion​Handler:​)

func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, createBudgetWithSuggestion suggestion: InsightActionData.BudgetSuggestion, completionHandler: @escaping (Result<Void, Error>) -> Void)

Tells the delegate that it should create a budget.

Parameters

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

suggestion Insight​Action​Data.​Budget​Suggestion

A suggestion of what budget to create.

completion​Handler @escaping (Result<Void, Error>) -> Void

A completion handler to call when the budget was created or failed.

actionable​Insights​View​Controller(_:​initiate​Transfer​From​Account:​to:​amount:​currency​Code:​completion​Handler:​)

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

view​Controller Actionable​Insights​View​Controller

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.

currency​Code String?

The currency code.

completion​Handler @escaping (Result<Void, Error>) -> Void

A completion handler to call when transfer was completed.

actionable​Insights​View​Controller(_:​show​Account​With​ID:​)

func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showAccountWithID id: Account.ID)

Tells the delegate that it should present a specific account.

Parameters

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

id Account.​ID

The id of the account.

actionable​Insights​View​Controller(_:​show​Transaction​With​ID:​)

func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showTransactionWithID id: Transaction.ID)

Tells the delegate that it should present a specific transaction.

Parameters

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

id Transaction.​ID

The id of the transaction.

actionable​Insights​View​Controller(_:​categorize​Transaction​With​ID:​completion​Handler:​)

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

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

id Transaction.​ID

The id of the transaction.

completion​Handler @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.

actionable​Insights​View​Controller(_:​show​Transactions​With​IDs:​)

func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showTransactionsWithIDs ids: [Transaction.ID])

Tells the delegate that it should present a list of transactions.

Parameters

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

ids [Transaction.​ID]

The identifiers of the transactions.

actionable​Insights​View​Controller(_:​show​Transactions​With​IDs:​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

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

ids [Transaction.​ID]

The identifiers of the transactions.

month Month

The month the transactions are for.

actionable​Insights​View​Controller(_:​show​Transactions​ByCategory​Code:​)

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

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

transaction​IDsByCategory​Code [Tink​Core.​Category.​Code:​ [Transaction.​ID]]

The identifiers of the transactions grouped by category code.

actionable​Insights​View​Controller(_:​show​Transactions​ByCategory​Code:​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

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

transaction​IDsByCategory​Code [Tink​Core.​Category.​Code:​ [Transaction.​ID]]

The identifiers of the transactions grouped by category code.

month Month

The month the transactions are for.

actionable​Insights​View​Controller(_:​categorize​Transactions​With​IDs:​completion​Handler:​)

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

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

ids [Transaction.​ID]

The identifiers of the transactions.

completion​Handler @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.

actionable​Insights​View​Controller(_:​show​Left​ToSpend​For​Month:​)

func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, showLeftToSpendForMonth month: Month)

Tells the delegate that is should present left to spend.

Parameters

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

month Month

The month that should be displayed.

actionable​Insights​View​Controller(_:​refresh​Credentials​With​ID:​completion​Handler:​)

func actionableInsightsViewController(_ viewController: ActionableInsightsViewController, refreshCredentialsWithID credentialsID: Credentials.ID, completionHandler: @escaping (Result<Void, Error>) -> Void)

Tells the delegate that is should refresh credentials.

Parameters

view​Controller Actionable​Insights​View​Controller

The view controller that called this method.

credentials​ID Credentials.​ID

The identifier of the credentials that should be refreshed.

completion​Handler @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.

actionable​Insights​View​Controller(_:​image​For​Insight​With​Kind:​)

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

view​Controller UIView​Controller

The view controller that called this method.

kind Actionable​Insight.​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.