The ULPMTripInfo Object
  • 20 Jun 2023
  • 1 Minute to read
  • Dark
    Light

The ULPMTripInfo Object

  • Dark
    Light

Article summary

The ULPMTripInfo Object

ULPMTripInfo stores detailed itinerary information about the customer's trip. It's built using multiple sub-objects to clearly organize information. In order to get the best offer possible from Uplift, it is important to be as detailed as possible when constructing the ULPMTripInfo and include all available information in this object.

Here is a sample ULPMTripInfo object, for the full documentation please check the ULPMTripInfo class or the Technical documentation.

let birthday: Date = birthday_of_the_traveler
let checkInDate: Date = check_in_date
let checkOutDate: Date = check_out_date
let reservation = ULHotelReservation(numberOfRooms: 1,
                                     address: nil,
                                     reservationType: nil,
                                     ticketType: nil,
                                     hotelName: "Hoover Dam Lodge",
                                     checkIn: checkInDate,
                                     checkOut: checkOutDate,
                                     price: 0,
                                     insurances: nil,
                                     travelers: nil)
                                     
let traveler = ULTraveler(travelerId: 0,
                          title: nil,
                          firstName: "Arthur",
                          lastName: "Davis",
                          dateOfBirth: birthday)
                          
let itinerary0 = ULItinerary(arrivalCity: nil,
                             arrivalApc: "LAS",
                             arrivalTime: checkInDate,
                             departureCity: nil,
                             departureApc: "DFW",
                             departureTime: checkInDate,
                             ticketType: nil,
                             fareClass: nil,
                             carrierCode: nil,
                             travelers: [traveler])
                             
let itinerary1 = ULItinerary(arrivalCity: nil,
                             arrivalApc: "DFW",
                             arrivalTime: checkOutDate,
                             departureCity: nil,
                             departureApc: "LAS",
                             departureTime: checkOutDate,
                             ticketType: nil,
                             fareClass: nil,
                             carrierCode: nil,
                             travelers: [traveler])
                             
let insurance = ULInsurance(types: [.cancellation], price: 300)
let airReservation = ULAirReservation(pnr: nil,
                                      reservationType: nil,
                                      tripType: .roundTrip,
                                      itineraries: [itinerary0, itinerary1],
                                      insurances: [insurance],
                                      origin: nil,
                                      destination: nil,
                                      price: 10000)
                                      
let billingContact = ULContact(email: "arthur@uplift.com",
                               title: nil,
                               firstName: "Arthur",
                               middleName: nil,
                               lastName: "Davis",
                               phone: "5555559339",
                               streetAddress: "1013 weda cir",
                               streetAddress2: nil,
                               postalCode: "99999",
                               city: "Mayfield",
                               region: "KY",
                               country: "United States")
                               
let tripInfo = ULPMTripInfo(billingContact: billingContact,
                            shippingContact: nil,
                            orderBookedAt: nil,
                            merchant: nil,
                            merchantField1: nil,
                            merchantField2: nil,
                            orderTaxAmount: 0,
                            orderAmount: 100000,
                            travelers: [traveler],
                            hotelReservations: [reservation],
                            airReservations: [airReservation],
                            cruiseReservations: nil,
                            orderLines: nil)

Was this article helpful?