For the complete documentation index, see llms.txt. This page is also available as Markdown.

Booking Form

Generally, bookable products require some information about the user and or the individuals attending. Once the user has selected all the passes they are interested in, you must fetch a BookingForm and provide an interface for the user to complete this form.

Note that the Passes in the arguments is a flattened array of Passes. For example if the user requires two of a single pass (i.e. two adult passes) then the array holds two of the same Pass type.

Traveler.fetchBookingForm(product: catalogItemDetails,
                           passes: selectedPasses) { (form, error) in

}

Alternatively you can use the delegate pattern

Traveler.fetchBookingForm(product: catalogItemDetails,
                           passes: selectedPasses,
                         delegate: self)
extension MyViewController: BookingFormFetchDelegate {
    func bookingFormFetchDidFailWith(_ error: Error) {
    
    }
    
    func bookingFormFetchDidSucceedWith(_ bookingForm: BookingForm) {
    
    }
}

Traveler.fetchBookingForm(catalogItemDetail, passes, new FetchBookingFormCallback() {
    @Override
    void onBookingFormFetchSuccess(BookingForm bookingForm) {
    
    }
    
    @Override
    void onBookingFormFetchError(Error error) {
    
    }
});

Last updated