/** * Add the search passengers to the request. We only add ADT (adult) * passengers and this only works for LowFareSearchReq objects. * @param request the req to add the passenger parameter to * @param n number of adults to put in the requset */ public static void AddAdultPassengers(BaseLowFareSearchReq request, int n) { List<SearchPassenger> passList = new List<SearchPassenger>(); for (int i = 0; i < n; ++i) { SearchPassenger adult = new SearchPassenger(); adult.Code = "ADT"; passList.Add(adult); } request.SearchPassenger = passList.ToArray(); }
/** * Add the search passengers to the request. We only add ADT (adult) * passengers and this only works for LowFareSearchReq objects. * @param request the req to add the passenger parameter to * @param n number of adults to put in the requset */ public static void AddAdultPassengers(BaseLowFareSearchReq request, int n) { List <SearchPassenger> passList = new List <SearchPassenger>(); for (int i = 0; i < n; ++i) { SearchPassenger adult = new SearchPassenger(); adult.Code = "ADT"; passList.Add(adult); } request.SearchPassenger = passList.ToArray(); }