Instance Method

handle(getAvailableRestaurantReservationBookings:completion:)

Handles generating the list of potential reservation times.

Required.

Declaration

func handle(getAvailableRestaurantReservationBookings intent: INGetAvailableRestaurantReservationBookingsIntent, completion: @escaping (INGetAvailableRestaurantReservationBookingsIntentResponse) -> Void)

Parameters

intent

The intent object containing details about the request. The information in this object has already been resolved and confirmed.

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 INGetAvailableRestaurantReservationBookingsIntentResponse object you create to report the status of the request. This parameter must not be nil.

Discussion

Your implementation of this method must create one or more INRestaurantReservationBooking objects representing the potential reservations from which the user can choose. Each reservation booking object contains the time of the reservation along with special offers and any requirements for making the reservation. When done, execute the provided block with a response object that contains your reservation booking objects.