/// <summary> /// Initializes a new instance of the <see cref="FlightSearchItinerary" /> class. /// </summary> /// <param name="Outbound">The bound container for the flight information for bringing the traveler from the origin airport to the destination airport (required).</param> /// <param name="Inbound">The bound container for the flight information for bringing the traveler from the destination airport to the origin airport.</param> public FlightSearchItinerary(FlightSearchBound Outbound = default(FlightSearchBound), FlightSearchBound Inbound = default(FlightSearchBound)) { // to ensure "Outbound" is required (not null) if (Outbound == null) { throw new InvalidDataException("Outbound is a required property for FlightSearchItinerary and cannot be null"); } else { this.Outbound = Outbound; } this.Inbound = Inbound; }
/// <summary> /// Initializes a new instance of the <see cref="AffiliateSearchResult" /> class. /// </summary> /// <param name="Outbound">The flight from the origin to the destination (required).</param> /// <param name="Inbound">The return flight from the destination to the origin.</param> /// <param name="Fare">The price and fare information which applies to all itineraries in this response (required).</param> /// <param name="Payout">Details of the amount of payout that the affiliate will received per click or if this flight is sold (required).</param> /// <param name="Airline">The 2 character alphanumeric <a href=\"https://en.wikipedia.org/wiki/Airline_codes\">IATA airline code</a> of the airline that is selling this result (required).</param> /// <param name="DeepLink">A link to the page from which this result can be purchased from the affiliate (required).</param> public AffiliateSearchResult(FlightSearchBound Outbound = default(FlightSearchBound), FlightSearchBound Inbound = default(FlightSearchBound), AffiliateFlightSearchPrice Fare = default(AffiliateFlightSearchPrice), AffiliatePayout Payout = default(AffiliatePayout), string Airline = default(string), string DeepLink = default(string)) { // to ensure "Outbound" is required (not null) if (Outbound == null) { throw new InvalidDataException("Outbound is a required property for AffiliateSearchResult and cannot be null"); } else { this.Outbound = Outbound; } // to ensure "Fare" is required (not null) if (Fare == null) { throw new InvalidDataException("Fare is a required property for AffiliateSearchResult and cannot be null"); } else { this.Fare = Fare; } // to ensure "Payout" is required (not null) if (Payout == null) { throw new InvalidDataException("Payout is a required property for AffiliateSearchResult and cannot be null"); } else { this.Payout = Payout; } // to ensure "Airline" is required (not null) if (Airline == null) { throw new InvalidDataException("Airline is a required property for AffiliateSearchResult and cannot be null"); } else { this.Airline = Airline; } // to ensure "DeepLink" is required (not null) if (DeepLink == null) { throw new InvalidDataException("DeepLink is a required property for AffiliateSearchResult and cannot be null"); } else { this.DeepLink = DeepLink; } this.Inbound = Inbound; }