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

Copy Markdown View Source

A bookable rate for a rental car.

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

Summary

Functions

Decodes a raw cars rate map into a Duffel.Schema.Cars.Rate.

Types

t()

@type t() :: %Duffel.Schema.Cars.Rate{
  base_amount: String.t() | nil,
  base_currency: String.t() | nil,
  car: map() | nil,
  charges: [map()],
  conditions: [map()],
  id: String.t() | nil,
  mileage: map() | nil,
  payment_type: 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 rate map into a Duffel.Schema.Cars.Rate.