ExOpenTravel v0.3.0 ExOpenTravel.Composers.OtaHotelBookingRuleNotif.Request View Source

Link to this section Summary

Link to this section Types

Link to this type

credentials()

View Source
credentials() :: %{user: String.t(), password: String.t(), endpoint: String.t()}
Link to this type

options()

View Source
options() :: keyword() | any()
Link to this type

t()

View Source
t() :: %{
  hotel_code: String.t(),
  rule_messages: [
    %{
      status_application_control: %{
        start: String.t(),
        end: String.t(),
        inv_type_code: String.t(),
        rate_plan_code: String.t(),
        destination_system_codes: [integer()]
      },
      booking_rules: [
        %{
          lengths_of_stay:
            [
              %{
                time: String.t(),
                time_unit: String.t(),
                min_max_message_type: String.t()
              }
            ]
            | nil,
          restriction_status:
            %{restriction: String.t(), status: String.t()} | nil
        }
      ]
    }
  ]
}

Link to this section Functions

Link to this function

build_booking_rules(booking_rules)

View Source
Link to this function

build_hotel_booking_rule_notif(payload, meta)

View Source
build_hotel_booking_rule_notif(t(), ExOpenTravel.Meta.t()) ::
  {{atom(), map() | nil, list() | nil}, ExOpenTravel.Meta.t()}
Link to this function

build_lengths_of_stay(lengths_of_stay)

View Source
Link to this function

build_restriction_status(arg1)

View Source
Link to this function

destination_system_codes(destination_system_codes)

View Source
Link to this function

execute(params, credentials, meta, opts)

View Source
execute(t(), credentials(), ExOpenTravel.Meta.t(), options()) ::
  {:ok, struct(), ExOpenTravel.Meta.t()}
  | {:error, any(), ExOpenTravel.Meta.t()}

This method is used to update booking rule.