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

Getting Passes

Once you have the Availability the user is interested in, you can then fetch a list of Passes that are available for the given Product and Availability (and optionally a BookingOption). An example of a Pass might be "Adult" or "Child" passes that correspond to a tour. Passes may have different prices.

Traveler.fetchPasses(product: catalogItem, 
                availability: selectedAvailability,
                      option: nil) { (passes, error) in
                      
}

Alternatively you can use the delegate pattern

Traveler.fetchPasses(product: catalogItem, 
                availability: selectedAvailability,
                      option: nil,
                    delegate: self)
extension MyViewController: PassFetchDelegate {
    func passFetchDidSucceedWith(_ result: [Pass]) {
    
    }
    
    func passFetchDidFailWith(_ error: Error) {
    
    }
}
Traveler.fetchPasses(catalogItemDetail, availability, null, new FetchPassesCallback() {
    @Override
    void onSuccess(List<Pass> pass) {
    
    }
    
    @Override
    void onError(Error error) {
    
    }
});

PreviousAvailabilitiesNextBooking Form

Last updated 6 years ago

Was this helpful?