Flow

public enum Flow
extension Flow: Equatable

A flow that the SDK can present with associated parameters

  • Completion handler to call when a flow is complete (and pass back a booking object if the flow produced one)

    Declaration

    Swift

    public typealias CompletionHandler = (Result<Booking, APIError>) -> Void
  • The standlone flow - complete booking path starting with taking search parameters from the user Parameters: - preferredLanguage: (Optional) two-character language code to override for the customer’s preferred language - e.g. “EN” - partnerInformation: Partner nnformation to be passed when presenting standalone flows

    Declaration

    Swift

    case standalone(preferredLanguage: String? = nil, partnerInformation: PartnerInformation?)
  • The in-path flow - complete booking path starting with taking search parameters from the user Parameters: - searchContext: The search that will be made when the flow opens - partnerInformation: Partner Information to be passed when presenting inPath

    Declaration

    Swift

    case inPath(searchContext: SearchContext, partnerInformation: PartnerInformation?)
  • Test whether two flows are equivalent Parameters: - lhs: The first flow to compare - rhs: The second flow to compare

    Declaration

    Swift

    public static func == (lhs: Flow, rhs: Flow) -> Bool