Documentation ¶
Index ¶
- Variables
- type Address
- type Allotment
- type Availabilities
- type Bank
- type BoardBit
- type Booking
- type CancelPolicy
- type CancelledStatus
- type Channel
- type ChannelPriceList
- type CheckIn
- type CheckOut
- type Company
- type Contact
- type Coupon
- type CouponProvider
- type CouponService
- type CouponStatus
- type DateTime
- type DateTimeWithTimeZone
- type Day
- type Duration
- type Error
- type ErrorCode
- type Feature
- type Field
- type Form
- type FormField
- type FormIframe
- type FormMethod
- type Geolocation
- type Guest
- type Header
- type Hotel
- type HotelLocation
- type HotelPayment
- type Inquiry
- type Insurance
- type InsuranceType
- type Ints
- type LimitPerSeconds
- type Location
- type LocationName
- type Matching
- type NormalizedHTMLString
- type Occupancy
- type Offer
- type Paging
- type Payment
- type PaymentMethods
- type PaymentTerm
- type Penalty
- type Picture
- type Price
- type PriceEngine
- type PriceList
- type PriceUnit
- type Properties
- type RateLimit
- type Rating
- type RatingProvider
- type Restriction
- type RestrictionDescription
- type Result
- type Room
- type RoomDetail
- type RoomPrice
- type Root
- type Season
- type Source
- type SourceData
- type Special
- type Supplement
- type Theme
- type ThemeListItem
- type Time
- type Tracking
- type Visibility
- type Weekdays
Constants ¶
This section is empty.
Variables ¶
View Source
var BoardBits = []BoardBit{ BoardBitUndefined, BoardBitWithoutBoard, BoardBitWithBreakfast, BoardBitHalfBoard, BoardBitFullBoard, BoardBitAllInclusive, }
View Source
var CancelledStatuses = []CancelledStatus{ CancelledStatusNotCancelled, CancelledStatusCancelled, CancelledStatusNoShow, CancelledStatusUnknown, }
View Source
var CouponProviders = []CouponProvider{ CouponProviderNone, CouponProviderEasiCoupon, CouponProviderGetavo, CouponProviderAdditive, }
View Source
var CouponStatuses = []CouponStatus{ CouponStatusRegistered, CouponStatusRedeemable, CouponStatusRedeemed, CouponStatusExpired, CouponStatusCancelled, CouponStatusUnknown, }
View Source
var ErrorCodes = []ErrorCode{ ErrorCodeGenericError, ErrorCodeAuthenticationError, ErrorCodeInvalidXML, ErrorCodeInvalidMethod, ErrorCodeResultIDNotInCache, ErrorCodeInvalidMissingParameter, ErrorCodeBookingValidationFailed, ErrorCodePermissionsDenied, ErrorCodeMaxStayExceeded, }
View Source
var FormIframes = []FormIframe{ FormIframeNotAllowed, FormIframeAllowed, FormIframeAllowedIfHTTPS, }
View Source
var FormMethods = []FormMethod{ FormMethodPOST, FormMethodGET, }
View Source
var InsuranceTypes = []InsuranceType{ InsuranceTypeHGV, InsuranceTypeHogast, InsuranceTypeRoterHahn, InsuranceTypeVPS, InsuranceTypeHGVGlobal, InsuranceTypeGastropool, }
View Source
var PaymentMethodsList = []PaymentMethods{ PaymentMethodsCreditCard, PaymentMethodsATM, PaymentMethodsMastercard, PaymentMethodsVisa, PaymentMethodsDinersClub, PaymentMethodsAmericanExpress, }
View Source
var PriceEngines = []PriceEngine{ PriceEngineEasiSuite, PriceEngineLTS, PriceEngineDisabled, }
View Source
var PriceUnits = []PriceUnit{ PriceUnitEuro, PriceUnitPercent, }
View Source
var RatingProviders = []RatingProvider{ RatingProviderTrustYou, RatingProviderHotelnavigator, }
View Source
var Supplements = []Supplement{ SupplementRoomPrice, SupplementSurchargesOrDiscounts, SupplementIncludedServices, }
View Source
var Visibilities = []Visibility{ VisibilityHidden, VisibilityVisible1, VisibilityVisible3, }
View Source
var WeekdaysList = []Weekdays{ WeekdayMonday, WeekdayTuesday, WeekdayWednesday, WeekdayThursday, WeekdayFriday, WeekdaySaturday, WeekdaySunday, }
Functions ¶
This section is empty.
Types ¶
type Availabilities ¶
type Availabilities []bool
func (*Availabilities) UnmarshalXML ¶
func (input *Availabilities) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
type Booking ¶
type Booking struct { Inquiry StornoID string `xml:"storno_id"` Status bool `xml:"booking_status"` Cancelled CancelledStatus `xml:"cancelled"` Company Company `xml:"company"` Payment Payment `xml:"payment"` Rooms []Room `xml:"room"` ExtraPrices []Price `xml:"extra_price"` Offers []Offer `xml:"offer"` Insurance Insurance `xml:"insurance"` Coupon Coupon `xml:"coupon"` }
type CancelPolicy ¶
type CancelPolicy struct { ID int `xml:"id"` Refundable bool `xml:"refundable"` RefundableUntil DateTime `xml:"refundable_until"` Penalties []Penalty `xml:"penalties>penalty"` // Description can contain \n characters. Description string `xml:"description"` Priority string `xml:"priority"` Manual bool `xml:"manual"` }
type CancelledStatus ¶
type CancelledStatus int
const ( CancelledStatusNotCancelled CancelledStatus = iota CancelledStatusCancelled CancelledStatusNoShow CancelledStatus = iota + 5 CancelledStatusUnknown )
All statuses can be cancelled with cancelBooking except for Cancelled (1)
type Channel ¶
type Channel struct { ID string `xml:"channel_id"` OfferID int `xml:"offer_id"` OfferDescriptions []Offer `xml:"offer_description>offer"` RoomPrices []RoomPrice `xml:"room_price>price"` RoomDescriptions []Room `xml:"room_description>room"` ServicePrices []Price `xml:"service_price>price"` FromPrice int `xml:"from_price"` BasePrices []RoomPrice `xml:"base_price>price"` CancelPolicies []CancelPolicy `xml:"cancel_policies>cancel_policy"` PaymentTerms []PaymentTerm `xml:"payment_terms>payment_term"` PriceList ChannelPriceList `xml:"pricelist"` RestrictionDescriptions []RestrictionDescription `xml:"restriction_description>restriction"` }
type ChannelPriceList ¶
type CheckIn ¶
The From/To fields are inserted by users as strings without a specific format, so they can’t be parsed as time.Time.
type Coupon ¶
type Coupon struct { Type shared.CouponType `xml:"coupon_type"` Code string `xml:"coupon_code"` Status CouponStatus `xml:"coupon_status"` Valid bool `xml:"coupon_valid"` ValidFrom DateTimeWithTimeZone `xml:"coupon_valid_from"` ValidTo DateTimeWithTimeZone `xml:"coupon_valid_to"` Title string `xml:"coupon_title"` Percent float64 `xml:"coupon_percent"` Amount float64 `xml:"coupon_amount"` }
type CouponProvider ¶
type CouponProvider int
const ( CouponProviderNone CouponProvider = iota CouponProviderEasiCoupon CouponProviderGetavo CouponProviderAdditive )
type CouponService ¶
type CouponService struct {
Provider CouponProvider `xml:"provider"`
}
type CouponStatus ¶
type CouponStatus string
const ( CouponStatusRegistered CouponStatus = "registered" CouponStatusRedeemable CouponStatus = "redeemable" CouponStatusRedeemed CouponStatus = "redeemed" CouponStatusExpired CouponStatus = "expired" CouponStatusCancelled CouponStatus = "cancelled" CouponStatusUnknown CouponStatus = "unknown" )
type DateTime ¶
func (*DateTime) UnmarshalXML ¶
type DateTimeWithTimeZone ¶
func (*DateTimeWithTimeZone) UnmarshalXML ¶
func (t *DateTimeWithTimeZone) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
type Day ¶
type Day struct { Date shared.Date `xml:"date"` Free int `xml:"free"` Restrictions []Restriction `xml:"restrictions>restriction"` }
type Duration ¶
func (*Duration) UnmarshalXML ¶
type Form ¶
type Form struct { URL string `xml:"form_url"` Iframe FormIframe `xml:"form_iframe"` Methods []FormMethod `xml:"form_methods>method"` Fields []FormField `xml:"form_fields>field"` }
type FormIframe ¶
type FormIframe int
const ( FormIframeNotAllowed FormIframe = iota FormIframeAllowed FormIframeAllowedIfHTTPS )
type FormMethod ¶
type FormMethod string
const ( FormMethodPOST FormMethod = "POST" FormMethodGET FormMethod = "GET" )
type Geolocation ¶
type Hotel ¶
type Hotel struct { ID int `xml:"id"` IDLTS string `xml:"id_lts"` Bookable bool `xml:"bookable"` Name string `xml:"name"` CIN string `xml:"cin"` Type shared.HotelType `xml:"type"` Stars shared.HotelStars `xml:"stars"` Address Address `xml:"address"` Themes shared.Theme `xml:"themes"` Features shared.HotelFeature `xml:"features"` Location HotelLocation `xml:"location"` LocationName LocationName `xml:"location_name"` Geolocation Geolocation `xml:"geolocation"` Contact Contact `xml:"contact"` Headline NormalizedHTMLString `xml:"headline"` Description NormalizedHTMLString `xml:"description"` Payment HotelPayment `xml:"hotel_payment"` Matching Matching `xml:"matching"` Logo Picture `xml:"logo>picture"` Pictures []Picture `xml:"pictures>picture"` AvailableFrom shared.Date `xml:"available_from"` PricesChangedAt DateTime `xml:"prices_changed_at"` AvailabilityChangedAt DateTime `xml:"availability_changed_at"` BookableUntil Time `xml:"bookable_until"` Gallery []Picture `xml:"gallery>picture"` FeaturesView []Feature `xml:"features_view>feature"` Channel Channel `xml:"channel"` LTSData shared.LTSData `xml:"lts_data"` POS []string `xml:"pos>id_pos"` PriceEngine PriceEngine `xml:"price_engine"` Language language.Tag `xml:"language"` CheckIn CheckIn `xml:"check_in"` CheckOut CheckOut `xml:"check_out"` PriceFrom int `xml:"price_from"` Board BoardBit `xml:"board"` BoardThreeQuarters bool `xml:"board_tq"` PersAgeMin int `xml:"pers_age_min"` ChildAgeMin int `xml:"child_age_min"` AdultAgeMin int `xml:"adult_age_min"` ChildAgeMax int `xml:"child_age_max"` AdultCntMax int `xml:"adult_cnt_max"` ChildCntMax int `xml:"child_cnt_max"` Ratings []Rating `xml:"ratings>rating"` SourceData SourceData `xml:"source_data"` Coupon CouponService `xml:"coupon"` RoomTypes shared.RoomType `xml:"room_types"` InformalMail bool `xml:"informal_mail"` TouristTaxPPPN float64 `xml:"tourist_tax_pppn"` }
type HotelLocation ¶
type HotelPayment ¶
type HotelPayment struct {
Methods PaymentMethods `xml:"methods"`
}
type Inquiry ¶
type Inquiry struct { ID int `xml:"booking_id"` Date DateTime `xml:"booking_date"` Source string `xml:"source"` HotelID int `xml:"hotel_id"` Arrival shared.Date `xml:"arrival"` Departure shared.Date `xml:"departure"` Service shared.Board `xml:"service"` Note string `xml:"note"` Hotel Hotel `xml:"hotel"` Guest Guest `xml:"guest"` }
type Insurance ¶
type Insurance struct { Type InsuranceType `xml:"insurance_type"` URL string `xml:"insurance_url"` AgencyNr string `xml:"agency_nr"` }
type InsuranceType ¶
type InsuranceType int
const ( InsuranceTypeHGV InsuranceType = iota + 1 InsuranceTypeHogast InsuranceTypeRoterHahn InsuranceTypeVPS InsuranceTypeHGVGlobal InsuranceTypeGastropool )
type LimitPerSeconds ¶
func (*LimitPerSeconds) UnmarshalXML ¶
func (input *LimitPerSeconds) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
type Location ¶
type Location struct { ID int `xml:"id"` RootID int `xml:"root_id"` ParentID int `xml:"parent_id"` VirtualIDs Ints `xml:"virtual_id"` Type shared.LocationType `xml:"typ"` Visible Visibility `xml:"visible"` Latitude float64 `xml:"latitude"` Longitude float64 `xml:"longitude"` NameDeu string `xml:"name_deu"` NameIta string `xml:"name_ita"` NameSpa string `xml:"name_spa"` NameFra string `xml:"name_fra"` NameRus string `xml:"name_rus"` NameDan string `xml:"name_dan"` NameEng string `xml:"name_eng"` }
type LocationName ¶
type NormalizedHTMLString ¶
type NormalizedHTMLString string
func (*NormalizedHTMLString) UnmarshalXML ¶
func (input *NormalizedHTMLString) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
type Offer ¶
type Offer struct { ID int `xml:"offer_id"` GID int `xml:"offer_gid"` BaseID int `xml:"offer_base_id"` Type shared.OfferType `xml:"offer_typ"` OfferTitle string `xml:"offer_title"` Title string `xml:"title"` OfferDescription string `xml:"offer_description"` Description NormalizedHTMLString `xml:"description"` Pictures []Picture `xml:"pictures>picture"` Themes []Theme `xml:"themes>theme"` }
type PaymentMethods ¶
type PaymentMethods int
const ( PaymentMethodsCreditCard PaymentMethods = 8 << iota PaymentMethodsATM PaymentMethods = 32 << iota PaymentMethodsMastercard PaymentMethodsVisa PaymentMethodsDinersClub PaymentMethodsAmericanExpress )
type PaymentTerm ¶
type PaymentTerm struct { ID int `xml:"id"` OwnerID int `xml:"owner_id"` Methods shared.PaymentMethod `xml:"methods"` CCards int `xml:"ccards"` Prepayment int `xml:"prepayment"` Priority int `xml:"priority"` Bank Bank `xml:"bank"` Description string `xml:"description"` Insurance Insurance `xml:"insurance"` }
type Price ¶
type Price struct { ID int `xml:"price_id"` Type shared.OfferType `xml:"price_typ"` Title string `xml:"title"` PriceTitle string `xml:"price_title"` Description NormalizedHTMLString `xml:"description"` PriceDescription string `xml:"price_description"` Supplement Supplement `xml:"supplement"` PriceSupplement int `xml:"price_supplement"` PriceWS float64 `xml:"price_ws"` PriceBB float64 `xml:"price_bb"` PriceHB float64 `xml:"price_hb"` PriceFB float64 `xml:"price_fb"` PriceAI float64 `xml:"price_ai"` PriceAmount float64 `xml:"price_amount"` PriceValue float64 `xml:"price_value"` PriceTotal float64 `xml:"price_total"` Unit PriceUnit `xml:"unit"` Pictures []Picture `xml:"pictures>picture"` }
type PriceEngine ¶
type PriceEngine int
const ( PriceEngineEasiSuite PriceEngine = iota PriceEngineLTS PriceEngineDisabled )
type PriceList ¶
type PriceList struct { OfferID int `xml:"offer_id"` OfferType shared.OfferType `xml:"offer_typ"` OfferBaseID int `xml:"offer_base_id"` SpecialType shared.SpecialType `xml:"special_typ"` PrlMode int `xml:"prl_mode"` PrlUnit int `xml:"prl_unit"` DaysArrival Weekdays `xml:"days_arrival"` DaysDeparture Weekdays `xml:"days_departure"` DaysDurMin int `xml:"days_dur_min"` DaysDurMax int `xml:"days_dur_max"` DaysArrivalMin int `xml:"days_arrival_min"` DaysArrivalMax int `xml:"days_arrival_max"` ChildrenMin int `xml:"children_min"` ChildrenMax int `xml:"children_max"` AdultsMin int `xml:"adults_min"` AdultsMax int `xml:"adults_max"` Title string `xml:"title"` Seasons []Season `xml:"season"` }
type Properties ¶
type RateLimit ¶
type RateLimit struct { Limit LimitPerSeconds `xml:"limit"` Remaining int `xml:"remaining"` Reset Duration `xml:"reset"` }
type RatingProvider ¶
type RatingProvider string
const ( RatingProviderTrustYou RatingProvider = "trustyou" )
type Restriction ¶
type RestrictionDescription ¶
type RestrictionDescription struct { ObjID int `xml:"obj_id"` ObjSubID int `xml:"obj_sub_id"` ObjSubOnly int `xml:"obj_sub_only"` ChildrenMin int `xml:"children_min"` ChildrenMax int `xml:"children_max"` DaysArrivalMin int `xml:"days_arrival_min"` DaysArrivalMax int `xml:"days_arrival_max"` PersAgeMin int `xml:"pers_age_min"` Holes bool `xml:"holes"` // StayMin is the statically defined minimum amount of nights of the stay. StayMin int `xml:"stay_min"` // StayMax is the statically defined maximum amount of nights of the stay. StayMax int `xml:"stay_max"` }
type Result ¶
type Result struct { Hotels []Hotel `xml:"hotel"` Specials []Special `xml:"special"` Tracking Tracking `xml:"tracking"` Sources []Source `xml:"source"` Locations []Location `xml:"location"` Themes []ThemeListItem `xml:"theme"` Inquiry Inquiry `xml:"inquiry"` Booking Booking `xml:"booking"` Form Form `xml:"form"` Coupon Coupon `xml:"coupon"` }
type Room ¶
type Room struct { ID int `xml:"room_id"` LTSID string `xml:"room_lts_id"` OfferID int `xml:"offer_id"` Service shared.Board `xml:"service"` Type shared.RoomType `xml:"room_type"` Code string `xml:"room_code"` RoomTitle string `xml:"room_title"` RoomDescription string `xml:"room_description"` Title string `xml:"title"` // Description can contain \n characters. Description string `xml:"description"` Persons Ints `xml:"room_persons"` Free int `xml:"room_free"` Features int `xml:"features"` FeaturesView []Feature `xml:"features_view>feature"` RoomTotal float64 `xml:"room_total"` Pictures []Picture `xml:"pictures>picture"` Prices []Price `xml:"room_price"` CancelPolicy CancelPolicy `xml:"cancel_policy"` PaymentTerm PaymentTerm `xml:"payment_term"` Properties Properties `xml:"properties"` Occupancy Occupancy `xml:"occupancy"` Numbers []string `xml:"room_numbers>number"` Details []RoomDetail `xml:"room_details>room_detail"` Days []Day `xml:"days>day"` PriceFrom int `xml:"price_from"` PriceList []PriceList `xml:"pricelist"` Allotments []Allotment `xml:"allotments>allotment"` }
type RoomDetail ¶
type RoomDetail struct { Number string `xml:"number"` Availability Availabilities `xml:"availability"` }
type RoomPrice ¶
type RoomPrice struct { RoomID int `xml:"room_id"` RoomSeq int `xml:"room_seq"` OfferID int `xml:"offer_id"` PriceDetails []Price `xml:"price_details>price"` PriceTotal Price `xml:"price_total"` PriceInclusive Price `xml:"price_inclusive"` CancelPolicyID int `xml:"cancel_policy_id"` PaymentTermID int `xml:"payment_term_id"` AllotmentCode string `xml:"allotment_code"` }
type SourceData ¶
type Special ¶
type Special struct { OfferID int `xml:"offer_id"` Status int `xml:"status"` Valid bool `xml:"valid"` OfferType shared.OfferType `xml:"offer_typ"` Type shared.SpecialType `xml:"special_typ"` Premium shared.SpecialPremium `xml:"special_premium"` DaysArrival Weekdays `xml:"days_arrival"` DaysDeparture Weekdays `xml:"days_departure"` DaysDurMin int `xml:"days_dur_min"` DaysDurMax int `xml:"days_dur_max"` DaysArrivalMin int `xml:"days_arrival_min"` DaysArrivalMax int `xml:"days_arrival_max"` ChildrenMin int `xml:"children_min"` ChildrenMax int `xml:"children_max"` AdultsMin int `xml:"adults_min"` AdultsMax int `xml:"adults_max"` PersAgeMin int `xml:"pers_age_min"` ChildAgeMin int `xml:"child_age_min"` ChildAgeMax int `xml:"child_age_max"` AdultAgeMin int `xml:"adult_age_min"` ValidStart shared.Date `xml:"valid_start"` ValidEnd shared.Date `xml:"valid_end"` Title string `xml:"title"` Description NormalizedHTMLString `xml:"description"` Hotels []Hotel `xml:"hotels>hotel"` Seasons []Season `xml:"seasons>season"` Services []shared.Board `xml:"services>service"` Inclusives []Price `xml:"inclusive>price"` MandatoryServices []Price `xml:"mandatory>price"` Pictures []Picture `xml:"pictures>picture"` Themes []Theme `xml:"themes>theme"` }
type Supplement ¶
type Supplement int
const ( SupplementRoomPrice Supplement = iota SupplementSurchargesOrDiscounts SupplementIncludedServices )
type ThemeListItem ¶
type ThemeListItem struct { ID int `xml:"id"` FilterID int `xml:"filter_id"` VirtualIDs Ints `xml:"virtual_id"` Sequence int `xml:"sequence"` TitleDeu string `xml:"title_deu"` TitleIta string `xml:"title_ita"` TitleEng string `xml:"title_eng"` TitleSpa string `xml:"title_spa"` TitleFra string `xml:"title_fra"` TitleRus string `xml:"title_rus"` TitleDan string `xml:"title_dan"` }
type Time ¶
type Time struct { time.Time // Valid is true if Time (which can also be Time.isZero() == 0) is present Valid bool }
func (*Time) UnmarshalXML ¶
type Visibility ¶
type Visibility int
const ( VisibilityHidden Visibility = 0 VisibilityVisible1 Visibility = 1 VisibilityVisible3 Visibility = 3 )
The difference between VisibilityVisible1 and VisibilityVisible3 is unclear.
Click to show internal directories.
Click to hide internal directories.