From 403f139ced3bb1e8e62cdb5a38af046e2f94ba08 Mon Sep 17 00:00:00 2001 From: Gott Date: Mon, 20 Mar 2023 15:13:30 +0000 Subject: [PATCH] feat(booking): add `stops` to `OfferSliceSegment` (#702) Marking this optional for the time being as this type is shared with `Order` but we haven't implemented this field for `Order` just yet. --- src/booking/Offers/OfferTypes.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/booking/Offers/OfferTypes.ts b/src/booking/Offers/OfferTypes.ts index a088d047..d8dbf49b 100644 --- a/src/booking/Offers/OfferTypes.ts +++ b/src/booking/Offers/OfferTypes.ts @@ -490,6 +490,38 @@ export interface OfferSliceSegment { * Additional segment-specific information about the passengers included in the offer (e.g. their baggage allowance and the cabin class they will be travelling in) */ passengers: OfferSliceSegmentPassenger[] + + /** + * Additional segment-specific information about the stops, if any, included in the segment + */ + stops?: OfferSliceSegmentStop[] +} + +export interface OfferSliceSegmentStop { + /** + * Duffel's unique identifier for the Stop + */ + id: string + + /** + * The airport at which the Stop happens + */ + airport: Airport + + /** + * The ISO 8601 datetime at which the Stop is scheduled to arrive, in the airport's timezone (see destination.timezone) + */ + arrivingAt: string + + /** + * The ISO 8601 datetime at which the Stop is scheduled to depart, in the airport's timezone (see origin.timezone) + */ + departingAt: string + + /** + * The duration of the Stop, represented as a ISO 8601 duration + */ + duration: string } export interface OfferSliceSegmentPassenger {