Duffel.Schema.Cars.Search (Duffel v0.1.0)

Copy Markdown View Source

A cars search with the rates it returned.

rates is a list of Duffel.Schema.Cars.Rate structs. driver, pickup_location and dropoff_location are kept as raw maps.

Summary

Functions

Decodes a raw cars search map into a Duffel.Schema.Cars.Search.

Types

t()

@type t() :: %Duffel.Schema.Cars.Search{
  created_at: String.t() | nil,
  driver: map() | nil,
  dropoff_date: String.t() | nil,
  dropoff_location: map() | nil,
  dropoff_time: String.t() | nil,
  id: String.t() | nil,
  live_mode: boolean() | nil,
  pickup_date: String.t() | nil,
  pickup_location: map() | nil,
  pickup_time: String.t() | nil,
  rates: [Duffel.Schema.Cars.Rate.t()]
}

Functions

from_map(decoded)

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

Decodes a raw cars search map into a Duffel.Schema.Cars.Search.