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

Copy Markdown View Source

A bookable rate for a room.

cancellation_timeline, conditions and loyalty_programme are kept as raw maps.

Summary

Functions

Decodes a raw stays rate map into a Duffel.Schema.Stays.Rate.

Types

t()

@type t() :: %Duffel.Schema.Stays.Rate{
  available_payment_methods: [String.t()],
  base_amount: String.t() | nil,
  base_currency: String.t() | nil,
  board_type: String.t() | nil,
  cancellation_timeline: [map()],
  conditions: [map()],
  due_at_accommodation_amount: String.t() | nil,
  due_at_accommodation_currency: String.t() | nil,
  fee_amount: String.t() | nil,
  fee_currency: String.t() | nil,
  id: String.t() | nil,
  loyalty_programme: map() | nil,
  negotiated_rate_code: String.t() | nil,
  payment_type: String.t() | nil,
  public_amount: String.t() | nil,
  public_currency: String.t() | nil,
  quantity_available: integer() | nil,
  source: String.t() | nil,
  supplier: String.t() | nil,
  tax_amount: String.t() | nil,
  tax_currency: String.t() | nil,
  total_amount: String.t() | nil,
  total_currency: String.t() | nil
}

Functions

from_map(decoded)

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

Decodes a raw stays rate map into a Duffel.Schema.Stays.Rate.