public GetBookingResponse GetBooking(GetBookingRequest request)
        {
            AdministrationServiceDAO adminDAO = new AdministrationServiceDAO();
            booking result = adminDAO.GetBooking(request.id, request.user_id, request.apartment_id, request.date_from, request.date_to);

            return(new GetBookingResponse(result));
        }
        public GetBookingResponse GetBooking(GetBookingRequest request)
        {
            PublicServiceDAO             publicDAO = new PublicServiceDAO();
            booking_description_response desc      = publicDAO.GetBooking(request.booking_id);

            if (desc != null)
            {
                return(new GetBookingResponse(new booking_description_response[] { desc }));
            }
            else
            {
                return(new GetBookingResponse(new booking_description_response[] { }));
            }
        }
Ejemplo n.º 3
0
        public GetBookingResponse GetBooking(GetBookingRequest request)
        {
            AdministrationServiceDAO adminDAO = new AdministrationServiceDAO();
            booking result = adminDAO.GetBooking(request.id, request.user_id, request.apartment_id, request.date_from, request.date_to);

            if (result != null)
            {
                return(new GetBookingResponse(result));
            }
            else
            {
                ThrowNotFoundException();
                return(null);
            }
        }
Ejemplo n.º 4
0
        // i need to pass in this obj to get the segment related parameters
        //to populate seats, to tie back with the seat group
        public SeatAvailabilityResponse SeatAvailability(String pnr)
        {
            //because im passing the pnr in, i need to call the booking in state first

            GetBookingRequest bookingrequest = new GetBookingRequest();
            bookingrequest.Signature = signature;

            Booking booking = RetrieveBooking(pnr);

            GetSeatAvailabilityRequest getseatavailabilityrequest = new GetSeatAvailabilityRequest();
            getseatavailabilityrequest.Signature = signature;
            SeatAvailabilityRequest seatavailabilityrequest = new SeatAvailabilityRequest();

            getseatavailabilityrequest.SeatAvailabilityRequest = seatavailabilityrequest;
            //how do i get it to work for multiple segments seating: as Journeys are only tied to sell, this code only works for 1 segment

            seatavailabilityrequest.CarrierCode = booking.Journeys[0].Segments[0].FlightDesignator.CarrierCode;
            seatavailabilityrequest.FlightNumber = booking.Journeys[0].Segments[0].FlightDesignator.FlightNumber;
               // seatavailabilityrequest.OpSuffix = booking.Journeys[0].Segments[0].
            seatavailabilityrequest.DepartureStation = booking.Journeys[0].Segments[0].ArrivalStation;
            seatavailabilityrequest.ArrivalStation = booking.Journeys[0].Segments[0].DepartureStation;
            seatavailabilityrequest.STD = booking.Journeys[0].Segments[0].STD;
            seatavailabilityrequest.SeatAssignmentMode = SeatAssignmentMode.PreSeatAssignment;
            seatavailabilityrequest.EnforceSeatGroupRestrictions = true;
            seatavailabilityrequest.IncludePropertyLookup = false;

            GetSeatAvailabilityResponse seatavailabilityresponse = clientapi.GetSeatAvailability(getseatavailabilityrequest);

            Console.WriteLine("Seats avaialble");

            return seatavailabilityresponse.SeatAvailabilityResponse;
        }
Ejemplo n.º 5
0
        //get the BookingPNR number
        public Booking RetrieveBooking(String pnr)
        {
            GetBookingRequest bookingreq = new GetBookingRequest();
            bookingreq.GetBookingReqData = new GetBookingRequestData();
            bookingreq.Signature = signature;
            bookingreq.ContractVersion = 0;

            bookingreq.GetBookingReqData.GetBookingBy = GetBookingBy.RecordLocator;
            bookingreq.GetBookingReqData.GetByRecordLocator = new GetByRecordLocator();
            bookingreq.GetBookingReqData.GetByRecordLocator.RecordLocator = pnr;

            GetBookingResponse response = clientapi.GetBooking(bookingreq);

            Booking locator = response.Booking;

            //GetBookingFromStateResponse bookingfromstateresponse = new GetBookingFromStateResponse();
            //Console.WriteLine("Booking's State :" + bookingfromstateresponse.BookingData.RecordLocator);

            if (locator != null && locator.BookingInfo.BookingStatus == BookingStatus.Confirmed)
            {
                Console.WriteLine("Booking is confirmed" + "&& Booking PNR -RECLOC {0} retreived : ", locator.RecordLocator);
            }
            else
            {
                Console.WriteLine("Booking not found");
            }

            GetBookingPaymentsRequest getbookingpaymentrequest = new GetBookingPaymentsRequest();
            getbookingpaymentrequest.Signature = signature;

            GetBookingPaymentsRequestData getbookingpaymentrequestdata = new GetBookingPaymentsRequestData();
            getbookingpaymentrequest.GetBookingPaymentsReqData = getbookingpaymentrequestdata;
            getbookingpaymentrequestdata.GetCurrentState = true;

            return locator;
        }
        public GetBookingResponse GetBooking(GetBookingRequest request)
        {
            booking_description_response desc = new booking_description_response();

            return(new GetBookingResponse(new booking_description_response[] { desc }));
        }