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

Copy Markdown View Source

A confirmed price for a rate, ready to book.

car, supplier, mileage, pickup_location, dropoff_location, charges, conditions and privacy_policies are kept as raw maps.

Summary

Functions

Decodes a raw cars quote map into a Duffel.Schema.Cars.Quote.

Types

t()

@type t() :: %Duffel.Schema.Cars.Quote{
  base_amount: String.t() | nil,
  base_currency: String.t() | nil,
  car: map() | nil,
  charges: [map()],
  conditions: [map()],
  dropoff_date: String.t() | nil,
  dropoff_location: map() | nil,
  dropoff_time: String.t() | nil,
  id: String.t() | nil,
  live_mode: boolean() | nil,
  mileage: map() | nil,
  payment_type: String.t() | nil,
  pickup_date: String.t() | nil,
  pickup_location: map() | nil,
  pickup_time: String.t() | nil,
  privacy_policies: [map()],
  rate_id: String.t() | nil,
  search_id: String.t() | nil,
  supplier: map() | nil,
  total_amount: String.t() | nil,
  total_currency: String.t() | nil
}

Functions

from_map(decoded)

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

Decodes a raw cars quote map into a Duffel.Schema.Cars.Quote.