Contents

resolveBillType(for:with:)

Resolves the type of the bill.

Declaration

optional func resolveBillType(for intent: INPayBillIntent, with completion: @escaping  @Sendable (INBillTypeResolutionResult) -> Void)
optional func resolveBillType(for intent: INPayBillIntent) async -> INBillTypeResolutionResult

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 Inbilltype value that classifies the bill’s purpose. This parameter must not be nil.

Discussion

Implement this method to verify that the type of the bill matches one associated with the specified payee in the user’s account. Typically, you use the billType and billPayee properties of the intent to identify where to apply any payments. When the user can pay multiple bills from the same payee, use the bill type to determine where to apply the payment. For example, if the user has a car loan and mortgage with the same payee, use the bill type to determine which loan receives the payment. Return a successful resolution if the user’s account contains a bill of the specified type. If the payee has only one bill type and that bill type isn’t the same one specified in the intent, you might return a resolution with the bill type you expected and ask the user for confirmation. If the payee and bill type don’t correlate at all to each other, you might ask the user to disambiguate from a set of possible options.

See Also

Resolving the Intent Parameters