Documentation
iOS ReferenceAndroid Reference
  • Overview
  • Release Notes
    • 2019 Release Notes
  • Quick Start
    • Configuration settings
  • Getting Started
    • Environments
    • Domain Whitelist
  • Traveler
    • Overview
    • Mobile SDKs
      • Overview
      • Minimum Requirements
      • iOS
        • Installation
        • Getting Started
      • Android
        • Installation
        • Getting Started
      • Usage
        • Booking Item Search
          • Booking Item Search UI
        • Flight Search
        • Catalog
        • Catalog Item Details
        • Availabilities
        • Getting Passes
        • Booking Form
          • Questions
          • Answers
          • Validation
        • Creating an Order
        • Processing an Order
      • Errors
    • Traveler API
    • Payments
  • Partner
    • Overview
    • Partner API
  • Glossary
    • API Convention
      • Error Codes
      • API Rate Limiting
    • Terminology
  • Support
    • Contact
Powered by GitBook
On this page

Was this helpful?

  1. Traveler
  2. Mobile SDKs
  3. Usage

Booking Form

PreviousGetting PassesNextQuestions

Last updated 6 years ago

Was this helpful?

Generally, 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) {
    
    }
});
bookable products