Creating an Order

Now that the user has completed the BookingForm, it is time to create the Order. The following method will create the Order which you can then present to the user for review.

Traveler.createOrder(bookingForm: bookingForm) { (order, error) in

}

Alternatively you can use the delegate pattern

Traveler.createOrder(bookingForm: bookingForm, delegate: self)
extension MyViewController: OrderCreateDelegate {
    func orderCreationDidSucceed(_ order: Order) {
    
    }
    
    func orderCreationDidFail(_ error: Error) {
    
    }
}

Last updated