Documentation
¶
Index ¶
- type AdditionalGuestAmount
- type AgeQualifyingCode
- type BaseByGuestAmt
- type BookingRule
- type CodeContext
- type DaysOfWeek
- type Discount
- type GalleryItem
- type Guest
- type HotelRatePlanNotifRQ
- type HotelRatePlanNotifRS
- type HotelRatePlanNotifValidator
- type HotelRatePlanNotifValidatorFunc
- func WithAdultOccupancy(occupancy RatePlanOccupancySettings) HotelRatePlanNotifValidatorFunc
- func WithArrivalDOW() HotelRatePlanNotifValidatorFunc
- func WithChildOccupancy(occupancy RatePlanOccupancySettings) HotelRatePlanNotifValidatorFunc
- func WithDepartureDOW() HotelRatePlanNotifValidatorFunc
- func WithFamilyOffer() HotelRatePlanNotifValidatorFunc
- func WithFreeNightOffer() HotelRatePlanNotifValidatorFunc
- func WithGenericBookingRules() HotelRatePlanNotifValidatorFunc
- func WithOfferRuleBookingOffset() HotelRatePlanNotifValidatorFunc
- func WithOfferRuleDOWLOS() HotelRatePlanNotifValidatorFunc
- func WithOverlay() HotelRatePlanNotifValidatorFunc
- func WithRatePlanJoin() HotelRatePlanNotifValidatorFunc
- func WithRatePlanMapping(mapping map[string]MasterRatePlan) HotelRatePlanNotifValidatorFunc
- func WithRoomTypeBookingRules() HotelRatePlanNotifValidatorFunc
- func WithRoomTypeCodes(mapping map[string]RoomTypeOccupancySettings) HotelRatePlanNotifValidatorFunc
- func WithSupplements() HotelRatePlanNotifValidatorFunc
- type Instance
- type InvType
- type LengthOfStay
- type ListItem
- type MasterRatePlan
- type MealPlan
- type MealsIncluded
- type Occupancy
- type Offer
- type OfferRule
- type PrerequisiteInventory
- type PrerequisiteInventoryInvType
- type Rate
- type RatePlan
- type RatePlanChargeType
- type RatePlanDescription
- type RatePlanNotifType
- type RatePlanOccupancySettings
- type RatePlanType
- type RatePlans
- type Restriction
- type RestrictionStatus
- type RoomTypeOccupancySettings
- type Status
- type StayType
- type Supplement
- type SupplementChargeType
- type TimeUnit
- type UniqueID
- type UniqueIDType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalGuestAmount ¶
type AdditionalGuestAmount struct {
AgeQualifyingCode *AgeQualifyingCode `xml:"AgeQualifyingCode,attr"`
MinAge *int `xml:"MinAge,attr,omitempty"`
MaxAge *int `xml:"MaxAge,attr,omitempty"`
Amount *string `xml:"Amount,attr"`
}
func (AdditionalGuestAmount) IsAdult ¶
func (a AdditionalGuestAmount) IsAdult() bool
func (AdditionalGuestAmount) IsChild ¶
func (a AdditionalGuestAmount) IsChild() bool
type AgeQualifyingCode ¶
type AgeQualifyingCode int
const ( AgeQualifyingCodeAdult AgeQualifyingCode = 10 AgeQualifyingCodeChild AgeQualifyingCode = 8 )
type BaseByGuestAmt ¶
type BaseByGuestAmt struct {
Type *RatePlanChargeType `xml:"Type,attr,omitempty"`
NumberOfGuests *int `xml:"NumberOfGuests,attr,omitempty"`
AgeQualifyingCode *AgeQualifyingCode `xml:"AgeQualifyingCode,attr,omitempty"`
AmountAfterTax *string `xml:"AmountAfterTax,attr,omitempty"`
}
type BookingRule ¶
type BookingRule struct {
Start timex.Date `xml:"Start,attr"`
End timex.Date `xml:"End,attr"`
Code string `xml:"Code,attr"`
CodeContext CodeContext `xml:"CodeContext,attr"`
LengthsOfStay []LengthOfStay `xml:"LengthsOfStay>LengthOfStay"`
ArrivalDaysOfWeek *DaysOfWeek `xml:"DOW_Restrictions>ArrivalDaysOfWeek"`
DepartureDaysOfWeek *DaysOfWeek `xml:"DOW_Restrictions>DepartureDaysOfWeek"`
RestrictionStatus *RestrictionStatus `xml:"RestrictionStatus,omitempty"`
}
func (BookingRule) DateRange ¶
func (b BookingRule) DateRange() timex.DateRange
type DaysOfWeek ¶
type GalleryItem ¶
type Guest ¶
type Guest struct {
AgeQualifyingCode AgeQualifyingCode `xml:"AgeQualifyingCode,attr"`
MaxAge int `xml:"MaxAge,attr"`
MinCount int `xml:"MinCount,attr"`
FirstQualifyingPosition int `xml:"FirstQualifyingPosition,attr"`
LastQualifyingPosition int `xml:"LastQualifyingPosition,attr"`
}
type HotelRatePlanNotifRQ ¶
type HotelRatePlanNotifRQ struct {
XMLName xml.Name `xml:"http://www.opentravel.org/OTA/2003/05 OTA_HotelRatePlanNotifRQ"`
UniqueID *UniqueID `xml:"UniqueID,omitempty"`
RatePlans RatePlans `xml:"RatePlans"`
}
func (HotelRatePlanNotifRQ) HotelCode ¶
func (h HotelRatePlanNotifRQ) HotelCode() string
func (HotelRatePlanNotifRQ) IsReset ¶
func (r HotelRatePlanNotifRQ) IsReset() bool
type HotelRatePlanNotifRS ¶
type HotelRatePlanNotifValidator ¶
type HotelRatePlanNotifValidator struct {
// contains filtered or unexported fields
}
func NewHotelRatePlanNotifValidator ¶
func NewHotelRatePlanNotifValidator(opts ...HotelRatePlanNotifValidatorFunc) HotelRatePlanNotifValidator
func (*HotelRatePlanNotifValidator) Validate ¶
func (v *HotelRatePlanNotifValidator) Validate(r HotelRatePlanNotifRQ) error
type HotelRatePlanNotifValidatorFunc ¶
type HotelRatePlanNotifValidatorFunc func(*HotelRatePlanNotifValidator)
func WithAdultOccupancy ¶
func WithAdultOccupancy(occupancy RatePlanOccupancySettings) HotelRatePlanNotifValidatorFunc
func WithArrivalDOW ¶
func WithArrivalDOW() HotelRatePlanNotifValidatorFunc
func WithChildOccupancy ¶
func WithChildOccupancy(occupancy RatePlanOccupancySettings) HotelRatePlanNotifValidatorFunc
func WithDepartureDOW ¶
func WithDepartureDOW() HotelRatePlanNotifValidatorFunc
func WithFamilyOffer ¶
func WithFamilyOffer() HotelRatePlanNotifValidatorFunc
func WithFreeNightOffer ¶
func WithFreeNightOffer() HotelRatePlanNotifValidatorFunc
func WithGenericBookingRules ¶
func WithGenericBookingRules() HotelRatePlanNotifValidatorFunc
func WithOfferRuleBookingOffset ¶
func WithOfferRuleBookingOffset() HotelRatePlanNotifValidatorFunc
func WithOfferRuleDOWLOS ¶
func WithOfferRuleDOWLOS() HotelRatePlanNotifValidatorFunc
func WithOverlay ¶
func WithOverlay() HotelRatePlanNotifValidatorFunc
func WithRatePlanJoin ¶
func WithRatePlanJoin() HotelRatePlanNotifValidatorFunc
func WithRatePlanMapping ¶
func WithRatePlanMapping(mapping map[string]MasterRatePlan) HotelRatePlanNotifValidatorFunc
func WithRoomTypeBookingRules ¶
func WithRoomTypeBookingRules() HotelRatePlanNotifValidatorFunc
func WithRoomTypeCodes ¶
func WithRoomTypeCodes(mapping map[string]RoomTypeOccupancySettings) HotelRatePlanNotifValidatorFunc
func WithSupplements ¶
func WithSupplements() HotelRatePlanNotifValidatorFunc
type LengthOfStay ¶
type MasterRatePlan ¶
type MasterRatePlan struct {
ChargeType RatePlanChargeType
DerivedPlans map[string]MealPlan
}
type MealsIncluded ¶
type Occupancy ¶
type Occupancy struct {
AgeQualifyingCode AgeQualifyingCode `xml:"AgeQualifyingCode,attr"`
MinAge *int `xml:"MinAge,attr,omitempty"`
MaxAge *int `xml:"MaxAge,attr,omitempty"`
MinOccupancy *int `xml:"MinOccupancy,attr,omitempty"`
MaxOccupancy *int `xml:"MaxOccupancy,attr,omitempty"`
}
type Offer ¶
type Offer struct {
OfferRule *OfferRule `xml:"OfferRules>OfferRule"`
Discount *Discount `xml:"Discount,omitempty"`
Guest *Guest `xml:"Guests>Guest"`
}
func (Offer) IsFamilyOffer ¶
func (Offer) IsFreeNightOffer ¶
type OfferRule ¶
type OfferRule struct {
MinAdvancedBookingOffset *duration.Days `xml:"MinAdvancedBookingOffset,attr,omitempty"`
MaxAdvancedBookingOffset *duration.Days `xml:"MaxAdvancedBookingOffset,attr,omitempty"`
LengthsOfStay []LengthOfStay `xml:"LengthsOfStay>LengthOfStay"`
ArrivalDaysOfWeek *DaysOfWeek `xml:"DOW_Restrictions>ArrivalDaysOfWeek"`
DepartureDaysOfWeek *DaysOfWeek `xml:"DOW_Restrictions>DepartureDaysOfWeek"`
Occupancies []Occupancy `xml:"Occupancy,omitempty"`
}
type PrerequisiteInventory ¶
type PrerequisiteInventory struct {
InvType PrerequisiteInventoryInvType `xml:"InvType,attr"`
InvCode string `xml:"InvCode,attr"`
}
type PrerequisiteInventoryInvType ¶
type PrerequisiteInventoryInvType string
const ( PrerequisiteInventoryInvTypeAlpineBitsDOW PrerequisiteInventoryInvType = "ALPINEBITSDOW" PrerequisiteInventoryInvTypeRoomType PrerequisiteInventoryInvType = "ROOMTYPE" )
type Rate ¶
type Rate struct {
RateTimeUnit *TimeUnit `xml:"RateTimeUnit,attr,omitempty"`
UnitMultiplier int `xml:"UnitMultiplier,attr,omitempty"`
InvTypeCode string `xml:"InvTypeCode,attr,omitempty"`
Start *timex.Date `xml:"Start,attr,omitempty"`
End *timex.Date `xml:"End,attr,omitempty"`
BaseByGuestAmts []BaseByGuestAmt `xml:"BaseByGuestAmts>BaseByGuestAmt"`
AdditionalGuestAmounts []AdditionalGuestAmount `xml:"AdditionalGuestAmounts>AdditionalGuestAmount"`
MealsIncluded *MealsIncluded `xml:"MealsIncluded,omitempty"`
}
func (Rate) IsStaticRate ¶
type RatePlan ¶
type RatePlan struct {
RatePlanNotifType RatePlanNotifType `xml:"RatePlanNotifType,attr"`
RatePlanType RatePlanType `xml:"RatePlanType,attr,omitempty"`
CurrencyCode string `xml:"CurrencyCode,attr"`
RatePlanCode string `xml:"RatePlanCode,attr"`
RatePlanID string `xml:"RatePlanID,attr,omitempty"`
RatePlanQualifier *bool `xml:"RatePlanQualifier,attr,omitempty"`
BookingRules []BookingRule `xml:"BookingRules>BookingRule"`
Rates []Rate `xml:"Rates>Rate"`
Supplements []Supplement `xml:"Supplements>Supplement"`
Offers []Offer `xml:"Offers>Offer"`
Descriptions RatePlanDescription `xml:"Description"`
}
type RatePlanChargeType ¶
type RatePlanChargeType int
const ( RatePlanChargeTypePerPerson RatePlanChargeType = 7 RatePlanChargeTypePerRoom RatePlanChargeType = 25 )
type RatePlanDescription ¶
type RatePlanDescription struct {
Titles []common.Description
Intros []common.Description
Descriptions []common.Description
Themes []ListItem
Gallery []GalleryItem
}
func (*RatePlanDescription) UnmarshalXML ¶
func (rd *RatePlanDescription) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type RatePlanNotifType ¶
type RatePlanNotifType string
const ( RatePlanNotifTypeNew RatePlanNotifType = "New" RatePlanNotifTypeOverlay RatePlanNotifType = "Overlay" RatePlanNotifTypeRemove RatePlanNotifType = "Remove" )
type RestrictionStatus ¶
type RestrictionStatus struct {
Restriction Restriction `xml:"Restriction,attr"`
Status Status `xml:"Status,attr"`
}
type Supplement ¶
type Supplement struct {
InvType InvType `xml:"InvType,attr"`
InvCode string `xml:"InvCode,attr"`
AddToBasicRateIndicator *bool `xml:"AddToBasicRateIndicator,attr,omitempty"`
MandatoryIndicator *bool `xml:"MandatoryIndicator,attr,omitempty"`
ChargeTypeCode *SupplementChargeType `xml:"ChargeTypeCode,attr,omitempty"`
PrerequisiteInventory *PrerequisiteInventory `xml:"PrerequisiteInventory,omitempty"`
Descriptions *RatePlanDescription `xml:"Description,omitempty"`
Start *timex.Date `xml:"Start,attr,omitempty"`
End *timex.Date `xml:"End,attr,omitempty"`
Amount *string `xml:"Amount,attr,omitempty"`
}
func (Supplement) DateRange ¶
func (s Supplement) DateRange() timex.DateRange
type SupplementChargeType ¶
type SupplementChargeType int
const ( SupplementChargeTypePerPerson SupplementChargeType = 7 SupplementChargeTypePerRoom SupplementChargeType = 25 )
type UniqueID ¶
type UniqueID struct {
Type UniqueIDType `xml:"Type,attr"`
ID string `xml:"ID,attr"`
Instance Instance `xml:"Instance,attr"`
}
Click to show internal directories.
Click to hide internal directories.