ExOpenTravel v0.3.0 ExOpenTravel View Source

Documentation for ExOpenTravel.

Link to this section Summary

Link to this section Types

Link to this type

credentials()

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

options()

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

response()

View Source
response() ::
  {:ok, any(), ExOpenTravel.Meta.t()} | {:error, map(), ExOpenTravel.Meta.t()}

Link to this section Functions

Link to this function

get_default_mapping(module)

View Source
Link to this function

ota_hotel_avail_query(params, credentials, customization \\ %{}, opts \\ [])

View Source
ota_hotel_avail_query(
  ExOpenTravel.Composers.OtaHotelAvailQuery.t(),
  credentials(),
  map(),
  options()
) :: response()

This method is used to Availability querying

Link to this function

ota_hotel_booking_rule_notif(params, credentials, customization \\ %{}, opts \\ [])

View Source
ota_hotel_booking_rule_notif(
  ExOpenTravel.Composers.OtaHotelBookingRuleNotif.t(),
  credentials(),
  map(),
  options()
) :: response()

This method is used to update booking rule.

Link to this function

ota_hotel_inv_count_notif(params, credentials, customization \\ %{}, opts \\ [])

View Source
ota_hotel_inv_count_notif(
  ExOpenTravel.Composers.OtaHotelInvCountNotif.t(),
  credentials(),
  map(),
  options()
) :: response()

This method is used to update availability.

Link to this function

ota_hotel_rate_amount_notif(params, credentials, customization \\ %{}, opts \\ [])

View Source
ota_hotel_rate_amount_notif(
  ExOpenTravel.Composers.OtaHotelRateAmountNotif.t(),
  credentials(),
  map(),
  options()
) :: response()

This method is used to update rates (per room prices).

Link to this function

ota_hotel_res_notif(booking_ids, credentials, customization \\ %{}, opts \\ [])

View Source
ota_hotel_res_notif(
  ExOpenTravel.Composers.OtaHotelResNotif.t(),
  credentials(),
  map(),
  options()
) :: response()

This method is used for booking confirmation.

Link to this function

ota_ping(credentials, customization \\ %{}, opts \\ [])

View Source
ota_ping(credentials(), map(), options()) :: response()

Ping message

This is a simple XML message that could be useful to test if the connection is working correctly. We suggest to implement this method first in order to be sure that the SOAP level communication is correct.

Example

ExOpenTravel.ota_ping()

Link to this function

ota_read(params, credentials, customization \\ %{}, opts \\ [])

View Source
ota_read(ExOpenTravel.Composers.OtaRead.t(), credentials(), map(), options()) ::
  response()

This method is retrieve reservations for property. Credential need contain fields: endpoint, user, password

Examples

iex > ExOpenTravel.ota_read(%{hotel_code: "123456"},
                           %{endpoint: "https://pms.otachannel.com/requestor_id/OTA_PMS.php",
                             password: "123456789",
                             user: "987654321"}
                           )
{:ok, %{}, %{}}

Also if you need request tokenization on PCI_Booking, credential should include pci_proxy: :pci_booking ## Examples

iex > ExOpenTravel.ota_read(%{hotel_code: "123456"},
                           %{endpoint: "https://pms.otachannel.com/requestor_id/OTA_PMS.php",
                             password: "123456789",
                             user: "987654321",
                             pci_pci_proxy: :pci_booking,
                             pci_booking_fetch_header: "X-OTACHANNELFETCHCC",
                             pci_booking_profile_name: "ConcreteOpenTravelProfile",
                             pci_booking_api_key: "00000000000000000000000000000000"}
                           )
{:ok, %{}, %{}}