Duffel.Schema.Offer (Duffel v0.1.0)

Copy Markdown View Source

A bookable offer returned by a search.

slices is a list of Duffel.Schema.Slice structs and passengers a list of Duffel.Schema.Passenger structs. The owner airline, payment_requirements, available_services, conditions and private_fares are kept as raw maps.

Summary

Functions

Decodes a raw offer map into a Duffel.Schema.Offer.

Types

t()

@type t() :: %Duffel.Schema.Offer{
  available_airline_credit_ids: [String.t()],
  available_services: [map()],
  base_amount: String.t() | nil,
  base_currency: String.t() | nil,
  conditions: map() | nil,
  created_at: String.t() | nil,
  expires_at: String.t() | nil,
  id: String.t() | nil,
  intended_payment_methods: [String.t()],
  intended_services: [map()],
  live_mode: boolean() | nil,
  owner: map() | nil,
  partial: boolean() | nil,
  passenger_identity_documents_required: boolean() | nil,
  passengers: [Duffel.Schema.Passenger.t()],
  payment_requirements: map() | nil,
  private_fares: [map()],
  slices: [Duffel.Schema.Slice.t()],
  supported_loyalty_programmes: [String.t()],
  supported_passenger_identity_document_types: [String.t()],
  tax_amount: String.t() | nil,
  tax_currency: String.t() | nil,
  total_amount: String.t() | nil,
  total_currency: String.t() | nil,
  total_emissions_kg: String.t() | nil,
  updated_at: String.t() | nil
}

Functions

from_map(decoded)

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

Decodes a raw offer map into a Duffel.Schema.Offer.