Validate() public method

public Validate ( ) : void
return void
        public BookingRQ toBookingRQ()
        {
            BookingRQ bookingRQ = new BookingRQ();
            bookingRQ.holder = this.holder;
            bookingRQ.clientReference = this.clientReference;
            bookingRQ.remark = this.remark;
            if ( !String.IsNullOrEmpty(cardType) && !String.IsNullOrEmpty(cardNumber) && !String.IsNullOrEmpty(cardHolderName) && !String.IsNullOrEmpty(expiryDate) && cardCVC != null ||
                !String.IsNullOrEmpty(email) && !String.IsNullOrEmpty(phoneNumber))
            {
                PaymentData paymentData = new PaymentData();
                if ( !String.IsNullOrEmpty(cardType) && !String.IsNullOrEmpty(cardNumber) && !String.IsNullOrEmpty(cardHolderName) && !String.IsNullOrEmpty(expiryDate) && !String.IsNullOrEmpty(cardCVC))
                    paymentData.paymentCard = new PaymentCard() { cardType = cardType, cardNumber = cardNumber, cardHolderName = cardHolderName, expiryDate = expiryDate, cardCVC = cardCVC  };

                if (!String.IsNullOrEmpty(email) && !String.IsNullOrEmpty(phoneNumber))
                    paymentData.contactData = new PaymentContactData() { email = email, phoneNumber = phoneNumber };

                bookingRQ.paymentData = paymentData;
            }

            for(int i = 0; i < rooms.Count; i++)
            {
                BookingRoom room = new BookingRoom();
                room.rateKey = rooms[i].rateKey;
                room.paxes = new List<Pax>();
                for(int p = 0; p < rooms[i].details.Count; p++)
                {
                    Pax pax = new Pax();
                    pax.type = (rooms[i].details[p].getType() == RoomDetail.GuestType.ADULT) ? SimpleTypes.HotelbedsCustomerType.AD : SimpleTypes.HotelbedsCustomerType.CH;
                    pax.age = rooms[i].details[p].getAge();
                    pax.name = rooms[i].details[p].getName();
                    pax.surname = rooms[i].details[p].getSurname();
                    pax.roomId = rooms[i].details[p].getRoomId();
                    room.paxes.Add(pax);
                }
                bookingRQ.rooms.Add(room);
            }

            bookingRQ.Validate();

            return bookingRQ;
        }