Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllBookingStatuses ¶
func GetAllBookingStatuses() *allBookingStatuses
Types ¶
type BookingData ¶
type BookingData struct { Id Identifier `json:"bookingIdentifier"` Reference resharmonics.BookingReference `json:"bookingReference"` Status BookingStatus `json:"status"` StartDate string `json:"startDate"` // just date as 2005-01-01 EndDate string `json:"endDate"` // just date as 2005-01-01 Guests []contact.Details `json:"guests"` Property property.PropertyData `json:"property"` NightlyAverageRate float64 `json:"nightlyAverageRate"` Invoices []financials.Invoice `json:"invoices"` Extras []Extra `json:"extras"` BookingAccountName string `json:"bookingAccountName"` BillingAccountName string `json:"billingAccountName"` }
BookingData is the raw payload format as returned by the Resharmonics API endpoint /bookings
type BookingL ¶
type BookingL struct { Id Identifier `json:"bookingIdentifier"` Reference resharmonics.BookingReference `json:"bookingReference"` Status BookingStatus `json:"status"` Period utils.BookingPeriod `json:"period"` Guests []contact.Details `json:"guests"` Property property.PropertyData `json:"property"` Extras []Extra `json:"extras"` }
BookingL is just a bit more parsed and less raw than BookingData. Otherwise just the sae
type BookingS ¶
type BookingS struct { Reference resharmonics.BookingReference `json:"bookingReference"` Identifier Identifier `json:"bookingIdentifier"` Period utils.BookingPeriod `json:"period"` ContactDetails contact.Details `json:"contactDetails"` Invoices []*financials.Invoice `json:"invoices"` Property property.PropertyData `json:"property"` }
BookingS is just a bit more parsed and less raw than BookingData. Otherwise just the sae
type BookingSearchResponse ¶
type BookingSearchResponse struct {
Results []*BookingData `json:"results"`
}
type BookingStatus ¶
type BookingStatus string
type BookingsClient ¶
type BookingsClient interface { List(period utils.BookingPeriod, lastUpdated *time.Time, status []*BookingStatus, pagination *utils.Pagination) ([]*BookingL, error) Get(bookingIdentified Identifier) (*BookingS, error) GetStatus(id Identifier) (BookingStatus, error) }
func Init ¶
func Init(creds resharmonics.Credentials, preAuthorize bool) (BookingsClient, error)
type ExtraPricing ¶
type Identifier ¶
type Identifier string
func MergeBookingIdentifiers ¶
func MergeBookingIdentifiers(s1 []Identifier, s2 []Identifier) []Identifier
type RawBookingS ¶
type RawBookingS struct { Reference resharmonics.BookingReference `json:"bookingReference"` Id Identifier `json:"bookingIdentifier"` MaxOccupancy int `json:"maxOccupancy"` Guest contact.Details `json:"contactDetails"` Period RawSinglePeriod `json:"datePeriod"` Extras []Extra `json:"extras"` FloorSpace *string `json:"floorSpace"` UnitName *string `json:"unitName"` UnitType string `json:"unitType"` Description string `json:"description"` Invoices []financials.Invoice `json:"invoices"` BuildingAddress property.Address `json:"buildingAddress"` BuildingName string `json:"buildingName"` Features []property.Feature `json:"features"` Currency string `json:"currencySymbol"` }
type RawSinglePeriod ¶
type StatusResponse ¶
type StatusResponse struct {
Status BookingStatus `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.