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) {
}
}Last updated
Was this helpful?