35 const stdair::BookingRequestStruct& iBookingRequest)
const {
36 stdair::TravelSolutionStruct* oChosenTS_ptr = NULL;
39 const stdair::NbOfSeats_T& lPartySize = iBookingRequest.getPartySize();
42 const stdair::WTP_T& lWTP = iBookingRequest.getWTP();
45 stdair::Fare_T lLowestFare = std::numeric_limits<stdair::Fare_T>::max();
46 for (stdair::TravelSolutionList_T::iterator itTS = ioTSList.begin();
47 itTS != ioTSList.end(); ++itTS) {
48 stdair::TravelSolutionStruct& lTS = *itTS;
51 const stdair::FareOptionList_T& lFOList = lTS.getFareOptionList();
52 for (stdair::FareOptionList_T::const_iterator itFO = lFOList.begin();
53 itFO != lFOList.end(); ++itFO) {
54 const stdair::FareOptionStruct& lFO = *itFO;
58 bool lHardRestrictionsSatisfied =
true;
59 if (lFO.getChangeFees() ==
true
60 && iBookingRequest.getChangeFees() ==
false) {
61 lHardRestrictionsSatisfied =
false;
62 }
else if (lFO.getNonRefundable() ==
true
63 && iBookingRequest.getNonRefundable() ==
false) {
64 lHardRestrictionsSatisfied =
false;
67 if (lHardRestrictionsSatisfied ==
true) {
70 const stdair::Fare_T& lFOFare = lFO.getFare();
71 const stdair::Availability_T& lFOAvl = lFO.getAvailability();
73 if (lFOFare < lLowestFare && lFOFare <= lWTP
74 && lFOAvl >= lPartySize) {
87 lLowestFare = lFOFare;
89 oChosenTS_ptr->setChosenFareOption (lFO);
107 return oChosenTS_ptr;