Contents

init(restaurant:booking:partySize:bookingIdentifier:guest:selectedOffer:guestProvidedSpecialRequestText:)

Initializes the intent object with the specified booking information.

Declaration

init(restaurant: INRestaurant, booking bookingDateComponents: DateComponents, partySize: Int, bookingIdentifier: String?, guest: INRestaurantGuest?, selectedOffer: INRestaurantOffer?, guestProvidedSpecialRequestText: String?)

Parameters

  • restaurant:

    The restaurant to contact regarding the booking.

  • bookingDateComponents:

    The date and time of the reservation.

  • partySize:

    The total number of people in the user’s party.

  • bookingIdentifier:

    The unique identifier associated with the initial reservation data.

  • guest:

    The identity of the guest associated to associate with the reservation.

  • selectedOffer:

    The special offer, if any, selected by the user.

  • guestProvidedSpecialRequestText:

    Information about any special requests made by the user.

Return Value

An initialized intent object or nil if the object could not be created.

Discussion

Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when the user asks to create a restaurant booking. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.