/// <summary> /// Constructor of the class. <see cref="Door2DoorCore.Door2Door"/> /// </summary> /// <param name="d2dReq"> /// <para><see cref="Door2DoorCore.Types.Door2DoorRequest.D2DRequest"/></para> /// Parameters for the request include coordinates of origin and destination, /// arrival and return dates, external flight options and filters. /// </param> public Door2Door(D2DRequest d2dReq) { if (d2dReq.requestType == D2DRequestType.r2r) { r2r = new Door2DoorRome2Rio(d2dReq); } else { throw new D2DRequestException("Only D2DRequestType.r2r is supported so far."); } }
/// <summary> /// Constructor of the class. <see cref="Door2DoorCore.Door2Door"/> /// </summary> /// <param name="d2dReq"> /// <para><see cref="Door2DoorCore.Types.Door2DoorRequest.D2DRequest"/></para> /// Parameters for the request include coordinates of origin and destination, /// arrival and return dates, external flight options and filters. /// </param> /// <param name="maxWalkingMinutes"> /// Max walking minutes. Controls how much time is acceptable for a walk <see cref="Door2DoorCore.Types.Door2DoorResponse.Segment"/>. If not informed, the default is 10 min. /// </param> /// <param name="flightAntecipation"> /// How many minutes should be considered as antecipation to get to the airport. If not informed, the default is 120 (two hours). /// </param> /// <param name="minutesAfterFlight"> /// How many minutes should be considered after the Arriving time of a flight. If not informed, the default is 30. /// </param> public Door2Door(D2DRequest d2dReq, int maxWalkingMinutes, int flightAntecipation, int minutesAfterFlight) { if (d2dReq.requestType == D2DRequestType.r2r) { r2r = new Door2DoorRome2Rio(d2dReq, maxWalkingMinutes, flightAntecipation, minutesAfterFlight); } else { throw new D2DRequestException("Only D2DRequestType.r2r is supported so far."); } }