v_2020_10

package
v0.0.0-...-d6eac5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedAction = errors.New("unsupported action")

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionPing                                  Action = "OTA_Ping:Handshaking"
	ActionHotelInvCountNotif                    Action = "OTA_HotelInvCountNotif:FreeRooms"
	ActionReadGuestRequests                     Action = "OTA_Read:GuestRequests"
	ActionNotifReportGuestRequests              Action = "OTA_NotifReport:GuestRequests"
	ActionHotelDescriptiveContentNotifInventory Action = "OTA_HotelDescriptiveContentNotif:Inventory"
	ActionHotelDescriptiveContentNotifInfo      Action = "OTA_HotelDescriptiveContentNotif:Info"
	ActionHotelRatePlanNotifRatePlans           Action = "OTA_HotelRatePlanNotif:RatePlans"
)

func (Action) HandshakeName

func (a Action) HandshakeName() string

func (Action) String

func (a Action) String() string

func (Action) Unmarshal

func (a Action) Unmarshal(b []byte) (any, error)

type Capability

type Capability string
const (
	CapabilityHotelInvCountNotifAcceptRooms                          Capability = "OTA_HotelInvCountNotif_accept_rooms"
	CapabilityHotelInvCountNotifAcceptRoomCategories                 Capability = "OTA_HotelInvCountNotif_accept_categories"
	CapabilityHotelInvCountNotifAcceptDeltas                         Capability = "OTA_HotelInvCountNotif_accept_deltas"
	CapabilityHotelInvCountNotifAcceptOutOfOrder                     Capability = "OTA_HotelInvCountNotif_accept_out_of_order"
	CapabilityHotelInvCountNotifAcceptOutOfMarket                    Capability = "OTA_HotelInvCountNotif_accept_out_of_market"
	CapabilityHotelInvCountNotifAcceptClosingSeasons                 Capability = "OTA_HotelInvCountNotif_accept_closing_seasons"
	CapabilityHotelDescriptiveContentNotifInventoryUseRooms          Capability = "OTA_HotelDescriptiveContentNotif_Inventory_use_rooms"
	CapabilityHotelDescriptiveContentNotifInventoryOccupancyChildren Capability = "OTA_HotelDescriptiveContentNotif_Inventory_occupancy_children"
	CapabilityHotelRatePlanNotifAcceptArrivalDOW                     Capability = "OTA_HotelRatePlanNotif_accept_ArrivalDOW"
	CapabilityHotelRatePlanNotifAcceptDepartureDOW                   Capability = "OTA_HotelRatePlanNotif_accept_DepartureDOW"
	CapabilityHotelRatePlanNotifAcceptRatePlanBookingRule            Capability = "OTA_HotelRatePlanNotif_accept_RatePlan_BookingRule"
	CapabilityHotelRatePlanNotifAcceptRatePlanRoomTypeBookingRule    Capability = "OTA_HotelRatePlanNotif_accept_RatePlan_RoomType_BookingRule"
	CapabilityHotelRatePlanNotifAcceptRatePlanMixedBookingRule       Capability = "OTA_HotelRatePlanNotif_accept_RatePlan_mixed_BookingRule"
	CapabilityHotelRatePlanNotifAcceptSupplements                    Capability = "OTA_HotelRatePlanNotif_accept_Supplements"
	CapabilityHotelRatePlanNotifAcceptFreeNightsOffers               Capability = "OTA_HotelRatePlanNotif_accept_FreeNightsOffers"
	CapabilityHotelRatePlanNotifAcceptFamilyOffers                   Capability = "OTA_HotelRatePlanNotif_accept_FamilyOffers"
	CapabilityHotelRatePlanNotifAcceptOverlay                        Capability = "OTA_HotelRatePlanNotif_accept_overlay"
	CapabilityHotelRatePlanNotifAcceptRatePlanJoin                   Capability = "OTA_HotelRatePlanNotif_accept_RatePlanJoin"
	CapabilityHotelRatePlanNotifAcceptOfferRuleBookingOffset         Capability = "OTA_HotelRatePlanNotif_accept_OfferRule_BookingOffset"
	CapabilityHotelRatePlanNotifAcceptOfferRuleDOWLOS                Capability = "OTA_HotelRatePlanNotif_accept_OfferRule_DOWLOS"
)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config ClientConfig) (*Client, error)

type ClientConfig

type ClientConfig struct {
	URL               string
	Username          string
	Password          string
	ClientID          string
	Version           version.Version[version.Action]
	NegotiatedVersion map[string][]string
	HttpClient        *http.Client
}

type ClientResponse

type ClientResponse[RS any] struct {
	*http.Response

	Data          *RS
	SendInventory bool
	SendFreeRooms bool
	SendRatePlans bool
}

type Version

type Version struct {
	// contains filtered or unexported fields
}

func NewVersion

func NewVersion() (*Version, error)

func (*Version) String

func (v *Version) String() string

func (*Version) ValidateXML

func (v *Version) ValidateXML(xml string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL