public OTA_HotelResRS Book(string securityToken, string propertyInfo) { OTA_HotelResRQ hrq = new OTA_HotelResRQ(); hrq.Hotel = new OTA_HotelResRQHotel(); hrq.Hotel.BasicPropertyInfo = new OTA_HotelResRQHotelBasicPropertyInfo(); hrq.Hotel.BasicPropertyInfo.RPH = propertyInfo; hrq.Hotel.Customer = new OTA_HotelResRQHotelCustomer(); hrq.Hotel.Customer.NameNumber = "1.1"; hrq.Hotel.Guarantee = new OTA_HotelResRQHotelGuarantee(); hrq.Hotel.Guarantee.Type = "GDPST"; hrq.Hotel.Guarantee.CC_Info = new OTA_HotelResRQHotelGuaranteeCC_Info(); hrq.Hotel.Guarantee.CC_Info.PaymentCard = new OTA_HotelResRQHotelGuaranteeCC_InfoPaymentCard(); hrq.Hotel.Guarantee.CC_Info.PaymentCard.Code = "AX"; hrq.Hotel.Guarantee.CC_Info.PaymentCard.Number = "371449635398431"; hrq.Hotel.Guarantee.CC_Info.PaymentCard.ExpireDate = "2016-12"; hrq.Hotel.Guarantee.CC_Info.PersonName = new OTA_HotelResRQHotelGuaranteeCC_InfoPersonName(); hrq.Hotel.Guarantee.CC_Info.PersonName.Surname = "Test"; hrq.Hotel.RoomType = new OTA_HotelResRQHotelRoomType(); hrq.Hotel.RoomType.NumberOfUnits = "1"; OTA_HotelResService hrs = new OTA_HotelResService(); hrs.Security = this.CreateSecurityDto(securityToken); hrs.MessageHeaderValue = this.CreateMessageHeader(); var t = Utility.Serialize<OTA_HotelResRQ>(hrq); return hrs.OTA_HotelResRQ(hrq); }
/// <remarks/> public void OTA_HotelResRQAsync(OTA_HotelResRQ OTA_HotelResRQ1, object userState) { if ((this.OTA_HotelResRQOperationCompleted == null)) { this.OTA_HotelResRQOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOTA_HotelResRQOperationCompleted); } this.InvokeAsync("OTA_HotelResRQ", new object[] { OTA_HotelResRQ1}, this.OTA_HotelResRQOperationCompleted, userState); }
/// <remarks/> public void OTA_HotelResRQAsync(OTA_HotelResRQ OTA_HotelResRQ1) { this.OTA_HotelResRQAsync(OTA_HotelResRQ1, null); }