General Booking Logic
Enhanced Vehicle Book performs several steps when booking a vehicle depending on the chosen path:
Booking Key Path (triggered by populating /EnhancedVehBookRQ/VehBook
):
- Retrieves the state of a session to validate whether it already contains any vehicle segments.
- Decodes and retrieves shopped rate details based on the data provided by the Booking Key.
- Prepares and execute a vehicle sell request.
- If the booking is successful, validates the newly added segment statuses as returned by the vehicle vendor.
- If the segment status code is
UC
, considers the transaction as an error and stops processing. - Returns the details of the newly added vehicle segment.
Longsell Path (triggered by populating /EnhancedVehBookRQ/VehBookLongSell
):
- Retrieves the state of a session to validate whether it already contains any vehicle segments.
- Prepares and executes a vehicle sell request based on the XML payload.
- If the booking is successful, validates the newly added segment statuses as returned by the vehicle vendor.
- If the segment status code is
UC
, considers the transaction as an error and stops processing. - Returns the details of the newly added vehicle segment.