private TE.Core.ServiceCatalogues.HotelCatalog.Dtos.HotelInfo TransformHotelPropertyInfo(TWS_HotelDetailsV3 response) { var hotelInfo = new TE.Core.ServiceCatalogues.HotelCatalog.Dtos.HotelInfo(); var basicPropertyInfo = response.Hotel[0]; //Hotel code hotelInfo.HotelCode = basicPropertyInfo.hotelID.ToString(); //Hotel Name hotelInfo.HotelName = basicPropertyInfo.name; //Chain Code #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' //if (!(basicPropertyInfo.brandId == null)) #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' hotelInfo.HotelChainCode = ""; // basicPropertyInfo.brandId.ToString(); //description hotelInfo.Description = basicPropertyInfo.GetDescriptionsRows()[0].GetLongDescriptionRows()[0].FreeTextLongDescription; //image url hotelInfo.HeroImageUrl = basicPropertyInfo.thumb; //City Code hotelInfo.CityCode = basicPropertyInfo.GetLocationRows()[0].destinationCode; //Hotel Award Provider hotelInfo.Rating = Convert.ToInt16(basicPropertyInfo.starLevel); //Hotel Contact Information hotelInfo.PhoneNumber = basicPropertyInfo.hotelPhone; //Address var hotelAddress = new Core.Shared.Dtos.AddressDto() { Address1 = response.Location[0].address, Address2 = "", City = response.Location[0].city, Zip = response.Location[0].zip }; hotelInfo.Address = hotelAddress; //Geo Code hotelInfo.Location = new GeoLocation() { Latitude = response.Location[0].latitude, Longitude = response.Location[0].longitude }; return(hotelInfo); }
private TE.Core.ServiceCatalogues.HotelCatalog.Dtos.HotelInfo TransformHotelPropertyInfo(TWS_HotelDetailsV3 response) { var hotelInfo = new TE.Core.ServiceCatalogues.HotelCatalog.Dtos.HotelInfo(); var basicPropertyInfo = response.Hotel[0]; //Hotel code hotelInfo.HotelCode = basicPropertyInfo.hotelID.ToString(); //Hotel Name hotelInfo.HotelName = basicPropertyInfo.name; //Chain Code hotelInfo.HotelChainCode = (!basicPropertyInfo.IsbrandIdNull()) ? basicPropertyInfo.brandId.ToString() : ""; //description hotelInfo.Description = basicPropertyInfo.GetDescriptionsRows()[0].GetLongDescriptionRows()[0].FreeTextLongDescription; //image url hotelInfo.HeroImageUrl = (!basicPropertyInfo.IsthumbNull()) ? basicPropertyInfo.thumb : ""; //City Code hotelInfo.CityCode = basicPropertyInfo.GetLocationRows()[0].destinationCode; //Hotel Award Provider hotelInfo.Rating = Convert.ToInt16(basicPropertyInfo.starLevel); //Hotel Contact Information hotelInfo.PhoneNumber = basicPropertyInfo.hotelPhone; //Address var hotelAddress = new Core.Shared.Dtos.AddressDto() { Address1 = response.Location[0].address, Address2 = "", City = response.Location[0].city, Zip = response.Location[0].zip }; hotelInfo.Address = hotelAddress; //Geo Code hotelInfo.Location = new GeoLocation() { Latitude = response.Location[0].latitude, Longitude = response.Location[0].longitude }; return(hotelInfo); }