Ejemplo n.º 1
0
        public EndTransactionRS Book(HotelSelectDto hotelSelectDto)
        {
            var session = SabreSessionManager.Create();
            hotelSelectDto.SessionId = session.SecurityValue.BinarySecurityToken;

            try
            {
                var hotelDescription = new HotelPropertyDescription()
                    .HotelDescription(hotelSelectDto);

                var addTravelerInfo = new AddTravelerInfo()
                    .AddTraveler(session.SecurityValue.BinarySecurityToken);

                var bookHotel = new BookHotel()
                    .Book(session.SecurityValue.BinarySecurityToken, hotelSelectDto.propertyRphNumber);

                var readTravelerInfo = new ReadTravelerInfo()
                    .ReadInfo(session.SecurityValue.BinarySecurityToken);

                var endTransaction = new EndTransaction().End(session.SecurityValue.BinarySecurityToken);

                return endTransaction;
                //var pnrDetails = new ReadTravelerInfo().ReadInfo(session.SecurityValue.BinarySecurityToken, endTransaction.ItineraryRef.ID);
                //return pnrDetails;
            }
            catch
            {
                throw;
            }
            finally
            {
                SessionClose close = new SessionClose();
                close.Close(session.SecurityValue.BinarySecurityToken);
            }
        }
Ejemplo n.º 2
0
        public TravelItineraryReadRS GetDetails(string pnrIdentifier)
        {
            var session = SabreSessionManager.Create();

            var t = new ReadTravelerInfo().ReadInfo(session.SecurityValue.BinarySecurityToken, pnrIdentifier);

            SessionClose close = new SessionClose();
            close.Close(session.SecurityValue.BinarySecurityToken);

            return t;
        }
Ejemplo n.º 3
0
        public TravelItineraryReadRS GetDetails(string pnrIdentifier)
        {
            var session = SabreSessionManager.Create();

            var t = new ReadTravelerInfo().ReadInfo(session.SecurityValue.BinarySecurityToken, pnrIdentifier);

            SessionClose close = new SessionClose();

            close.Close(session.SecurityValue.BinarySecurityToken);

            return(t);
        }
Ejemplo n.º 4
0
        public HotelResModifyRS Modify(string pnr)
        {
            var session = SabreSessionManager.Create();
            ReadTravelerInfo readInfo = new ReadTravelerInfo();
            var result = readInfo.ReadInfo(session.SecurityValue.BinarySecurityToken, pnr);

            HotelResModifyRQ req = new HotelResModifyRQ();

            HotelResModifyService client = new HotelResModifyService();
            var modifyResult = client.HotelResModifyRQ(req);

            SessionClose close = new SessionClose();
            close.Close(session.SecurityValue.BinarySecurityToken);

            return modifyResult;
        }
Ejemplo n.º 5
0
        public HotelResModifyRS Modify(string pnr)
        {
            var session = SabreSessionManager.Create();
            ReadTravelerInfo readInfo = new ReadTravelerInfo();
            var result = readInfo.ReadInfo(session.SecurityValue.BinarySecurityToken, pnr);

            HotelResModifyRQ req = new HotelResModifyRQ();

            HotelResModifyService client = new HotelResModifyService();
            var modifyResult             = client.HotelResModifyRQ(req);

            SessionClose close = new SessionClose();

            close.Close(session.SecurityValue.BinarySecurityToken);

            return(modifyResult);
        }
Ejemplo n.º 6
0
        public EndTransactionRS Book(HotelSelectDto hotelSelectDto)
        {
            var session = SabreSessionManager.Create();

            hotelSelectDto.SessionId = session.SecurityValue.BinarySecurityToken;

            try
            {
                var hotelDescription = new HotelPropertyDescription()
                                       .HotelDescription(hotelSelectDto);

                var addTravelerInfo = new AddTravelerInfo()
                                      .AddTraveler(session.SecurityValue.BinarySecurityToken);

                var bookHotel = new BookHotel()
                                .Book(session.SecurityValue.BinarySecurityToken, hotelSelectDto.propertyRphNumber);

                var readTravelerInfo = new ReadTravelerInfo()
                                       .ReadInfo(session.SecurityValue.BinarySecurityToken);

                var endTransaction = new EndTransaction().End(session.SecurityValue.BinarySecurityToken);

                return(endTransaction);
                //var pnrDetails = new ReadTravelerInfo().ReadInfo(session.SecurityValue.BinarySecurityToken, endTransaction.ItineraryRef.ID);
                //return pnrDetails;
            }
            catch
            {
                throw;
            }
            finally
            {
                SessionClose close = new SessionClose();
                close.Close(session.SecurityValue.BinarySecurityToken);
            }
        }