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

Copy Markdown View Source

A property that can be booked.

rooms is a list of Duffel.Schema.Stays.Room structs. check_in_information, location, photos, amenities, brand, chain and key_collection are kept as raw maps.

Summary

Functions

Decodes a raw stays accommodation map into a Duffel.Schema.Stays.Accommodation.

Types

t()

@type t() :: %Duffel.Schema.Stays.Accommodation{
  amenities: [map()],
  brand: map() | nil,
  chain: map() | nil,
  check_in_information: map() | nil,
  description: String.t() | nil,
  email: String.t() | nil,
  id: String.t() | nil,
  key_collection: map() | nil,
  location: map() | nil,
  name: String.t() | nil,
  payment_instruction_supported: boolean() | nil,
  phone_number: String.t() | nil,
  photos: [map()],
  rating: integer() | nil,
  ratings: [map()],
  review_count: integer() | nil,
  review_score: number() | nil,
  rooms: [Duffel.Schema.Stays.Room.t()],
  supported_loyalty_programme: String.t() | nil
}

Functions

from_map(decoded)

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

Decodes a raw stays accommodation map into a Duffel.Schema.Stays.Accommodation.