resolveTransactionScheduledDate(for:with:)
Resolves the date on which the transfer is to occur.
Declaration
optional func resolveTransactionScheduledDate(for intent: INTransferMoneyIntent, with completion: @escaping @Sendable (INDateComponentsRangeResolutionResult) -> Void)optional func resolveTransactionScheduledDate(for intent: INTransferMoneyIntent) async -> INDateComponentsRangeResolutionResultParameters
- intent:
The intent object containing details of the user’s request. Use this object to get the initial information, if any, provided by the user.
- completion:
The handler block to execute with the resolution. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:
- resolutionResult
The resolution object containing your proposed resolution. For successful resolutions, create a resolution object whose value is the date range for the transfer to occur. This parameter must not be
nil.
Discussion
Implement this method to resolve the date on which to transfer money between the user’s accounts. Adjust the date, as needed, to ensure that you can perform the transfer. If the user doesn’t specify a date, assume that the user wants to transfer the money immediately.
Return a successful resolution if you’re able to schedule the transfer on the requested date, or if there’s no date and you can perform the transaction immediately. If the user-specified date falls on a banking holiday or on a date when you’d be unable to schedule the transaction, suggest a different date and ask the user for confirmation or use a disambiguation resolution to ask the user to select from two or three alternative dates.