Contents

resolveTransactionAmount(for:with:)

Resolves the amount that the user wants to transfer.

Declaration

optional func resolveTransactionAmount(for intent: INTransferMoneyIntent, with completion: @escaping  @Sendable (INPaymentAmountResolutionResult) -> Void)
optional func resolveTransactionAmount(for intent: INTransferMoneyIntent) async -> INPaymentAmountResolutionResult

Parameters

  • 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 Inpaymentamount object containing the amount to transfer. This parameter must not be nil.

Discussion

Implement this method to resolve the amount of money the user wants to transfer. The transactionAmount property of the intent contains information about how much the user wants to transfer. Return a successful resolution if you’re able to transfer the specified amount. If the amount exceeds the maximum or minimum amount allowed by your app, return an adjusted amount and ask for confirmation.

See Also

Resolving the Intent Parameters