diff --git a/src/alpine_bits_python/alpine_bits_helpers.py b/src/alpine_bits_python/alpine_bits_helpers.py index dc3087e..f2558f9 100644 --- a/src/alpine_bits_python/alpine_bits_helpers.py +++ b/src/alpine_bits_python/alpine_bits_helpers.py @@ -701,9 +701,16 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]): reservation.num_adults, children_ages ) + + unique_id_string = reservation.form_id + + + if len(unique_id_string) > 32: + unique_id_string = unique_id_string[:32] # Truncate to 32 characters + # UniqueID unique_id = OtaResRetrieveRs.ReservationsList.HotelReservation.UniqueId( - type_value=UniqueIdType2.VALUE_14, id=reservation.form_id + type_value=UniqueIdType2.VALUE_14, id=unique_id_string ) # TimeSpan @@ -780,6 +787,8 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]): ) ) + + hotel_reservation = OtaResRetrieveRs.ReservationsList.HotelReservation( create_date_time=datetime.now(timezone.utc).isoformat(), res_status=HotelReservationResStatus.REQUESTED,