Duffel.Schema.ItineraryView.Itinerary (Duffel v0.1.0)

Copy Markdown View Source

A set of flights shared by every offer beneath it: the same segments, in the same order, in the same cabins. The fares that can be bought on those flights are the brands.

segments stay raw maps. They name their carriers and places by ID rather than inline, and Duffel does not document their fields for this shape, so decoding them into Duffel.Schema.Segment would be wrong.

Summary

Types

t()

@type t() :: %Duffel.Schema.ItineraryView.Itinerary{
  brands: [Duffel.Schema.ItineraryView.Brand.t()],
  segments: [map()]
}

Functions

from_map(decoded)

@spec from_map(map() | t()) :: t()

Decodes a raw itinerary into a Duffel.Schema.ItineraryView.Itinerary.