guestrequests

package
v0.0.0-...-5a83cc3 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfileTypeTravelAgent = 4
)
View Source
const (
	ResIDTypeInternetBroker = 13
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Acknowledgement

type Acknowledgement struct {
	UniqueID UniqueID `xml:"UniqueID"`
}

type Address

type Address struct {
	Language    string       `xml:"Language,attr,omitempty"`
	Remark      Remark       `xml:"Remark,attr,omitempty"`
	AddressLine *string      `xml:"AddressLine,omitempty"`
	CityName    *string      `xml:"CityName,omitempty"`
	PostalCode  *string      `xml:"PostalCode,omitempty"`
	StateProv   *StateProv   `xml:"StateProv,omitempty"`
	CountryName *CountryName `xml:"CountryName,omitempty"`
}

type BasicPropertyInfo

type BasicPropertyInfo struct {
	HotelCode string `xml:"HotelCode,attr"`
	HotelName string `xml:"HotelName,attr,omitempty"`
}

type Comment

type Comment struct {
	Name      string     `xml:"Name,attr"`
	ListItems []ListItem `xml:"ListItem,omitempty"`
	Text      *Text      `xml:"Text,omitempty"`
}

type Commission

type Commission struct {
	Percent                 *int                     `xml:"Percent,attr"`
	CommissionPayableAmount *CommissionPayableAmount `xml:"CommissionPayableAmount"`
}

type CommissionPayableAmount

type CommissionPayableAmount struct {
	Amount       string `xml:"Amount,attr"`
	CurrencyCode string `xml:"CurrencyCode,attr"`
}

type CompanyInfo

type CompanyInfo struct {
	CompanyName   CompanyName `xml:"CompanyName"`
	AddressInfo   *Address    `xml:"AddressInfo"`
	TelephoneInfo *Phone      `xml:"TelephoneInfo"`
	Email         *Email      `xml:"Email"`
}

type CompanyName

type CompanyName struct {
	Code        string `xml:"Code,attr"`
	CodeContext string `xml:"CodeContext,attr"`
	Value       string `xml:",innerxml"`
}

type CountryName

type CountryName struct {
	Code string `xml:"Code,attr"`
}

type Customer

type Customer struct {
	Gender     *Gender     `xml:"Gender,attr"`
	BirthDate  *timex.Date `xml:"BirthDate,attr,omitempty"`
	Language   string      `xml:"Language,attr,omitempty"`
	PersonName PersonName  `xml:"PersonName"`
	Phones     []Phone     `xml:"Telephone"`
	Email      *Email      `xml:"Email"`
	Address    *Address    `xml:"Address"`
}

type Email

type Email struct {
	Remark Remark `xml:"Remark,attr,omitempty"`
	Value  string `xml:",innerxml"`
}

type Gender

type Gender string
const (
	GenderMale    Gender = "Male"
	GenderFemale  Gender = "Female"
	GenderUnknown Gender = "Unknown"
)

type GuestCount

type GuestCount struct {
	Count int  `xml:"Count,attr"`
	Age   *int `xml:"Age,attr"`
}

type HotelReadRequest

type HotelReadRequest struct {
	HotelCode         string             `xml:"HotelCode,attr"`
	SelectionCriteria *SelectionCriteria `xml:"SelectionCriteria,omitempty"`
}

type HotelReservation

type HotelReservation struct {
	CreateDateTime time.Time      `xml:"CreateDateTime,attr"`
	ResStatus      ResStatus      `xml:"ResStatus,attr"`
	UniqueID       UniqueID       `xml:"UniqueID"`
	RoomStays      *[]RoomStay    `xml:"RoomStays>RoomStay"`
	Customer       *Customer      `xml:"ResGuests>ResGuest>Profiles>ProfileInfo>Profile>Customer"`
	ResGlobalInfo  *ResGlobalInfo `xml:"ResGlobalInfo"`
}

type HotelReservationID

type HotelReservationID struct {
	ResIDType          ResIDType `xml:"ResID_Type,attr"`
	ResIDValue         *string   `xml:"ResID_Value,attr"`
	ResIDSource        *string   `xml:"ResID_Source,attr"`
	ResIDSourceContext *string   `xml:"ResID_SourceContext,attr"`
}

type ListItem

type ListItem struct {
	ListItem int    `xml:"ListItem,attr,omitempty"`
	Language string `xml:"Language,attr,omitempty"`
	Value    string `xml:",innerxml"`
}

type NotifReportRQ

type NotifReportRQ struct {
	XMLName           xml.Name          `xml:"http://www.opentravel.org/OTA/2003/05 OTA_NotifReportRQ"`
	Version           string            `xml:"Version,attr"`
	Success           common.Success    `xml:"Success"`
	Warnings          *[]common.Warning `xml:"Warnings>Warning"`
	HotelReservations []Acknowledgement `xml:"NotifDetails>HotelNotifReport>HotelReservations>HotelReservation"`
}

type NotifReportRS

type NotifReportRS struct {
	common.Response

	XMLName xml.Name `xml:"http://www.opentravel.org/OTA/2003/05 OTA_NotifReportRS"`
	Version string   `xml:"Version,attr"`
}

type PersonName

type PersonName struct {
	NamePrefix *string `xml:"NamePrefix"`
	GivenName  string  `xml:"GivenName"`
	Surname    string  `xml:"Surname"`
	NameTitle  *string `xml:"NameTitle"`
}

type Phone

type Phone struct {
	PhoneTechType PhoneTechType `xml:"PhoneTechType,attr"`
	PhoneNumber   string        `xml:"PhoneNumber,attr"`
}

type PhoneTechType

type PhoneTechType string
const (
	PhoneTechTypeVoice  PhoneTechType = "1"
	PhoneTechTypeFax    PhoneTechType = "3"
	PhoneTechTypeMobile PhoneTechType = "5"
)

type Profile

type Profile struct {
	ProfileType ProfileType `xml:"ProfileType,attr"`
	CompanyInfo CompanyInfo `xml:"CompanyInfo"`
}

type ProfileType

type ProfileType int

type ReadRQ

type ReadRQ struct {
	XMLName          xml.Name         `xml:"http://www.opentravel.org/OTA/2003/05 OTA_ReadRQ"`
	Version          string           `xml:"Version,attr"`
	HotelReadRequest HotelReadRequest `xml:"ReadRequests>HotelReadRequest"`
}

func (ReadRQ) HotelCode

func (r ReadRQ) HotelCode() string

type ReadValidator

type ReadValidator struct{}

func (ReadValidator) Validate

func (v ReadValidator) Validate(r ReadRQ) error

type Remark

type Remark string
const (
	RemarkNewsletterYes Remark = "newsletter:yes"
	RemarkNewsletterNo  Remark = "newsletter:no"
	RemarkCatalogYes    Remark = "catalog:yes"
	RemarkCatalogNo     Remark = "catalog:no"
)

type ResGlobalInfo

type ResGlobalInfo struct {
	Comments           *[]Comment          `xml:"Comments>Comment"`
	SpecialRequests    *[]SpecialRequest   `xml:"SpecialRequests>SpecialRequest"`
	CancelPenalty      *string             `xml:"CancelPenalties>CancelPenalty>PenaltyDescription>Text"`
	HotelReservationID *HotelReservationID `xml:"HotelReservationIDs>HotelReservationID"`
	Profile            *Profile            `xml:"Profiles>ProfileInfo>Profile"`
	BasicPropertyInfo  BasicPropertyInfo   `xml:"BasicPropertyInfo"`
}

type ResIDType

type ResIDType int

type ResRatePlan

type ResRatePlan struct {
	RatePlanCode  string                   `xml:"RatePlanCode,attr,omitempty"`
	Commission    *Commission              `xml:"Commission"`
	MealsIncluded *rateplans.MealsIncluded `xml:"MealsIncluded"`
}

type ResRetrieveRS

type ResRetrieveRS struct {
	common.Response

	XMLName           xml.Name            `xml:"http://www.opentravel.org/OTA/2003/05 OTA_ResRetrieveRS"`
	Version           string              `xml:"Version,attr"`
	HotelReservations *[]HotelReservation `xml:"ReservationsList>HotelReservation"`
}

type ResRetrieveValidator

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

func NewResRetrieveValidator

func NewResRetrieveValidator(opts ...ResRetrieveValidatorFunc) ResRetrieveValidator

func (ResRetrieveValidator) Validate

type ResRetrieveValidatorFunc

type ResRetrieveValidatorFunc func(*ResRetrieveValidator)

func WithRoomTypeCodes

func WithRoomTypeCodes(mapping map[string]struct{}) ResRetrieveValidatorFunc

type ResRoomType

type ResRoomType struct {
	RoomTypeCode           string `xml:"RoomTypeCode,attr,omitempty"`
	RoomClassificationCode int    `xml:"RoomClassificationCode,attr,omitempty"`
	RoomType               *int   `xml:"RoomType,attr,omitempty"`
}

type ResStatus

type ResStatus string
const (
	ResStatusRequested ResStatus = "Requested"
	ResStatusReserved  ResStatus = "Reserved"
	ResStatusModify    ResStatus = "Modify"
	ResStatusCancelled ResStatus = "Cancelled"
)

func (ResStatus) IsReservation

func (s ResStatus) IsReservation() bool

type RoomStay

type RoomStay struct {
	RoomType    *ResRoomType `xml:"RoomTypes>RoomType"`
	RatePlan    *ResRatePlan `xml:"RatePlans>RatePlan"`
	GuestCounts []GuestCount `xml:"GuestCounts>GuestCount"`
	TimeSpan    TimeSpan     `xml:"TimeSpan"`
	Total       *Total       `xml:"Total"`
}

type SelectionCriteria

type SelectionCriteria struct {
	Start time.Time `xml:"Start,attr"`
}

type SpecialRequest

type SpecialRequest struct {
	Name string `xml:"Name,attr"`
	Text *Text  `xml:"Text"`
}

type StartDateWindow

type StartDateWindow struct {
	EarliestDate timex.Date `xml:"EarliestDate,attr"`
	LatestDate   timex.Date `xml:"LatestDate,attr"`
}

type StateProv

type StateProv struct {
	StateCode string `xml:"StateCode,attr"`
}

type Text

type Text struct {
	Value string `xml:",innerxml"`
}

type TimeSpan

type TimeSpan struct {
	Start           *timex.Date      `xml:"Start,attr,omitempty"`
	End             *timex.Date      `xml:"End,attr,omitempty"`
	Duration        *duration.Nights `xml:"Duration,attr,omitempty"`
	StartDateWindow *StartDateWindow `xml:"StartDateWindow"`
}

type Total

type Total struct {
	AmountAfterTax string `xml:"AmountAfterTax,attr"`
	CurrencyCode   string `xml:"CurrencyCode,attr"`
}

type UniqueID

type UniqueID struct {
	Type UniqueIDType `xml:"Type,attr"`
	ID   string       `xml:"ID,attr"`
}

type UniqueIDType

type UniqueIDType int
const (
	UniqueIDTypeReservation  UniqueIDType = 14
	UniqueIDTypeCancellation UniqueIDType = 15
)

Jump to

Keyboard shortcuts

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