Instance Method

handle(intent:completion:)

Handles scheduling payment of the bill.

Required.

Declaration

func handle(intent: INPayBillIntent, completion: @escaping (INPayBillIntentResponse) -> Void)

Parameters

intent

The intent object containing details about the user's request. The information in this object has already been resolved and confirmed by your handler object.

completion

The handler block to execute with your response. 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:

response

The INPayBillIntentResponse object containing the status of the request. This parameter must not be nil.

Discussion

Your implementation of this method must schedule payment of the specified bill using the information in the intent object. The response object you provide should include the transaction details and indicate whether or not scheduling of the transaction was successful.

When configuring your response object, you specify the bill details and the user account to transfer the money from. You also specify the scheduled transaction date for the payment. The successful scheduling of a payment means that your service has recorded the transaction details and will make the payment on the specified date.