Duffel.Schema.Slice (Duffel v0.1.0)

Copy Markdown View Source

One leg of a journey on an offer or order.

segments is a list of Duffel.Schema.Segment structs. origin, destination and conditions are kept as raw maps.

Summary

Functions

Decodes a raw slice map into a Duffel.Schema.Slice.

Types

t()

@type t() :: %Duffel.Schema.Slice{
  comparison_key: String.t() | nil,
  conditions: map() | nil,
  destination: map() | nil,
  destination_type: String.t() | nil,
  duration: String.t() | nil,
  fare_brand_name: String.t() | nil,
  id: String.t() | nil,
  ngs_shelf: integer() | nil,
  origin: map() | nil,
  origin_type: String.t() | nil,
  segments: [Duffel.Schema.Segment.t()]
}

Functions

from_map(decoded)

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

Decodes a raw slice map into a Duffel.Schema.Slice.