cloudbeds

package module
v0.0.0-...-c611d4a Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StatusNotConfirmed Status = "not_confirmed"
	StatusCanceled     Status = "canceled"
	StatusCheckedIn    Status = "checked_in"
	StatusCheckedOut   Status = "checked_out"
	StatusNoShow       Status = "no_show"

	TransactionFilterSimpleTransactions TransactionFilter = "simple_transactions"
	TransactionFilterAdjustments        TransactionFilter = "adjustments"
	TransactionFilterAdjustmentsVoids   TransactionFilter = "adjustments_voids"
	TransactionFilterVoids              TransactionFilter = "voids"
	TransactionFilterRefunds            TransactionFilter = "refunds"
)
View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "hotels.cloudbeds.com",
		Path:   "api/v1.1",
	}
)

Functions

func AddQueryParamsToRequest

func AddQueryParamsToRequest(requestParams interface{}, req *http.Request, skipEmpty bool) error

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the Client response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. Client error responses are expected to have either no response body, or a json response body that maps to ErrorResponse. Any other response body will be silently ignored.

func NewSchemaEncoder

func NewSchemaEncoder() *schema.Encoder

Types

type AccessTokenCheckPathParams

type AccessTokenCheckPathParams struct {
}

func (*AccessTokenCheckPathParams) Params

func (p *AccessTokenCheckPathParams) Params() map[string]string

type AccessTokenCheckQueryParams

type AccessTokenCheckQueryParams struct {
}

func (AccessTokenCheckQueryParams) ToURLValues

func (p AccessTokenCheckQueryParams) ToURLValues() (url.Values, error)

type AccessTokenCheckRequest

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

func (*AccessTokenCheckRequest) Do

func (*AccessTokenCheckRequest) Method

func (r *AccessTokenCheckRequest) Method() string

func (*AccessTokenCheckRequest) NewResponseBody

func (*AccessTokenCheckRequest) PathParams

func (*AccessTokenCheckRequest) QueryParams

func (*AccessTokenCheckRequest) RequestBody

func (*AccessTokenCheckRequest) SetMethod

func (r *AccessTokenCheckRequest) SetMethod(method string)

func (*AccessTokenCheckRequest) SetRequestBody

func (r *AccessTokenCheckRequest) SetRequestBody(body AccessTokenCheckRequestBody)

func (*AccessTokenCheckRequest) URL

func (r *AccessTokenCheckRequest) URL() url.URL

type AccessTokenCheckRequestBody

type AccessTokenCheckRequestBody struct {
}

type AccessTokenCheckResponseBody

type AccessTokenCheckResponseBody struct {
	Success bool `json:"success"`
}

type Bool

type Bool bool

func (Bool) MarshalJSON

func (b Bool) MarshalJSON() ([]byte, error)

func (Bool) MarshalSchema

func (b Bool) MarshalSchema() string

type Client

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

Client manages communication with InvoiceXpress Client

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient returns a new InvoiceXpress Client client

func (*Client) BaseURL

func (c *Client) BaseURL() url.URL

func (*Client) Charset

func (c *Client) Charset() string

func (*Client) Debug

func (c *Client) Debug() bool

func (*Client) Do

func (c *Client) Do(req *http.Request, responseBody interface{}) (*http.Response, error)

Do sends an Client request and returns the Client response. The Client response is json decoded and stored in the value pointed to by v, or returned as an error if an Client error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.

func (*Client) GetEndpointURL

func (c *Client) GetEndpointURL(relative string, pathParams PathParams) url.URL

func (*Client) MediaType

func (c *Client) MediaType() string

func (*Client) NewAccessTokenCheckPathParams

func (c *Client) NewAccessTokenCheckPathParams() *AccessTokenCheckPathParams

func (*Client) NewAccessTokenCheckQueryParams

func (c *Client) NewAccessTokenCheckQueryParams() *AccessTokenCheckQueryParams

func (*Client) NewAccessTokenCheckRequest

func (c *Client) NewAccessTokenCheckRequest() AccessTokenCheckRequest

func (*Client) NewAccessTokenCheckRequestBody

func (s *Client) NewAccessTokenCheckRequestBody() AccessTokenCheckRequestBody

func (*Client) NewGetCustomFieldsPathParams

func (c *Client) NewGetCustomFieldsPathParams() *GetCustomFieldsPathParams

func (*Client) NewGetCustomFieldsQueryParams

func (c *Client) NewGetCustomFieldsQueryParams() *GetCustomFieldsQueryParams

func (*Client) NewGetCustomFieldsRequest

func (c *Client) NewGetCustomFieldsRequest() GetCustomFieldsRequest

func (*Client) NewGetCustomFieldsRequestBody

func (s *Client) NewGetCustomFieldsRequestBody() GetCustomFieldsRequestBody

func (*Client) NewGetHotelDetailsPathParams

func (c *Client) NewGetHotelDetailsPathParams() *GetHotelDetailsPathParams

func (*Client) NewGetHotelDetailsQueryParams

func (c *Client) NewGetHotelDetailsQueryParams() *GetHotelDetailsQueryParams

func (*Client) NewGetHotelDetailsRequest

func (c *Client) NewGetHotelDetailsRequest() GetHotelDetailsRequest

func (*Client) NewGetHotelDetailsRequestBody

func (s *Client) NewGetHotelDetailsRequestBody() GetHotelDetailsRequestBody

func (*Client) NewGetHotelsPathParams

func (c *Client) NewGetHotelsPathParams() *GetHotelsPathParams

func (*Client) NewGetHotelsQueryParams

func (c *Client) NewGetHotelsQueryParams() *GetHotelsQueryParams

func (*Client) NewGetHotelsRequest

func (c *Client) NewGetHotelsRequest() GetHotelsRequest

func (*Client) NewGetHotelsRequestBody

func (s *Client) NewGetHotelsRequestBody() GetHotelsRequestBody

func (*Client) NewGetPaymentsPathParams

func (c *Client) NewGetPaymentsPathParams() *GetPaymentsPathParams

func (*Client) NewGetPaymentsQueryParams

func (c *Client) NewGetPaymentsQueryParams() *GetPaymentsQueryParams

func (*Client) NewGetPaymentsRequest

func (c *Client) NewGetPaymentsRequest() GetPaymentsRequest

func (*Client) NewGetPaymentsRequestBody

func (s *Client) NewGetPaymentsRequestBody() GetPaymentsRequestBody

func (*Client) NewGetReservationsPathParams

func (c *Client) NewGetReservationsPathParams() *GetReservationsPathParams

func (*Client) NewGetReservationsQueryParams

func (c *Client) NewGetReservationsQueryParams() *GetReservationsQueryParams

func (*Client) NewGetReservationsRequest

func (c *Client) NewGetReservationsRequest() GetReservationsRequest

func (*Client) NewGetReservationsRequestBody

func (s *Client) NewGetReservationsRequestBody() GetReservationsRequestBody

func (*Client) NewGetTransactionsPathParams

func (c *Client) NewGetTransactionsPathParams() *GetTransactionsPathParams

func (*Client) NewGetTransactionsQueryParams

func (c *Client) NewGetTransactionsQueryParams() *GetTransactionsQueryParams

func (*Client) NewGetTransactionsRequest

func (c *Client) NewGetTransactionsRequest() GetTransactionsRequest

func (*Client) NewGetTransactionsRequestBody

func (s *Client) NewGetTransactionsRequestBody() GetTransactionsRequestBody

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method string, URL url.URL, body interface{}) (*http.Request, error)

func (*Client) NewUserinfoPathParams

func (c *Client) NewUserinfoPathParams() *UserinfoPathParams

func (*Client) NewUserinfoQueryParams

func (c *Client) NewUserinfoQueryParams() *UserinfoQueryParams

func (*Client) NewUserinfoRequest

func (c *Client) NewUserinfoRequest() UserinfoRequest

func (*Client) NewUserinfoRequestBody

func (s *Client) NewUserinfoRequestBody() UserinfoRequestBody

func (*Client) RegisterRequestTimestamp

func (c *Client) RegisterRequestTimestamp(t time.Time)

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(baseURL url.URL)

func (*Client) SetCharset

func (c *Client) SetCharset(charset string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetDisallowUnknownFields

func (c *Client) SetDisallowUnknownFields(disallowUnknownFields bool)

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (*Client) SleepUntilRequestRate

func (c *Client) SleepUntilRequestRate()

func (*Client) Unmarshal

func (c *Client) Unmarshal(r io.Reader, vv ...interface{}) error

func (*Client) UserAgent

func (c *Client) UserAgent() string

type Date

type Date struct {
	time.Time
}

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (Date) MarshalSchema

func (d Date) MarshalSchema() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []byte) (err error)

type DateTime

type DateTime struct {
	time.Time
}

func (DateTime) IsEmpty

func (d DateTime) IsEmpty() bool

func (*DateTime) MarshalJSON

func (d *DateTime) MarshalJSON() ([]byte, error)

func (DateTime) MarshalSchema

func (d DateTime) MarshalSchema() string

func (*DateTime) UnmarshalJSON

func (d *DateTime) UnmarshalJSON(text []byte) (err error)

type ErrorResponse

type ErrorResponse struct {
	// HTTP response that caused this error
	Response *http.Response `json:"-"`

	Messages Messages
}

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

func (*ErrorResponse) UnmarshalJSON

func (r *ErrorResponse) UnmarshalJSON(data []byte) error

type GetCustomFieldsPathParams

type GetCustomFieldsPathParams struct {
}

func (*GetCustomFieldsPathParams) Params

func (p *GetCustomFieldsPathParams) Params() map[string]string

type GetCustomFieldsQueryParams

type GetCustomFieldsQueryParams struct {
}

func (GetCustomFieldsQueryParams) ToURLValues

func (p GetCustomFieldsQueryParams) ToURLValues() (url.Values, error)

type GetCustomFieldsRequest

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

func (*GetCustomFieldsRequest) Do

func (*GetCustomFieldsRequest) Method

func (r *GetCustomFieldsRequest) Method() string

func (*GetCustomFieldsRequest) NewResponseBody

func (*GetCustomFieldsRequest) PathParams

func (*GetCustomFieldsRequest) QueryParams

func (*GetCustomFieldsRequest) RequestBody

func (*GetCustomFieldsRequest) SetMethod

func (r *GetCustomFieldsRequest) SetMethod(method string)

func (*GetCustomFieldsRequest) SetRequestBody

func (r *GetCustomFieldsRequest) SetRequestBody(body GetCustomFieldsRequestBody)

func (*GetCustomFieldsRequest) URL

func (r *GetCustomFieldsRequest) URL() url.URL

type GetCustomFieldsRequestBody

type GetCustomFieldsRequestBody struct {
}

type GetCustomFieldsResponseBody

type GetCustomFieldsResponseBody struct {
	Success bool       `json:"success"`
	Count   int        `json:"count"`
	Total   int        `json:"total"`
	Message string     `json:"message"`
	Data    []struct{} `json:"data"`
}

type GetHotelDetailsPathParams

type GetHotelDetailsPathParams struct {
}

func (*GetHotelDetailsPathParams) Params

func (p *GetHotelDetailsPathParams) Params() map[string]string

type GetHotelDetailsQueryParams

type GetHotelDetailsQueryParams struct {
}

func (GetHotelDetailsQueryParams) ToURLValues

func (p GetHotelDetailsQueryParams) ToURLValues() (url.Values, error)

type GetHotelDetailsRequest

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

func (*GetHotelDetailsRequest) Do

func (*GetHotelDetailsRequest) Method

func (r *GetHotelDetailsRequest) Method() string

func (*GetHotelDetailsRequest) NewResponseBody

func (*GetHotelDetailsRequest) PathParams

func (*GetHotelDetailsRequest) QueryParams

func (*GetHotelDetailsRequest) RequestBody

func (*GetHotelDetailsRequest) SetMethod

func (r *GetHotelDetailsRequest) SetMethod(method string)

func (*GetHotelDetailsRequest) SetRequestBody

func (r *GetHotelDetailsRequest) SetRequestBody(body GetHotelDetailsRequestBody)

func (*GetHotelDetailsRequest) URL

func (r *GetHotelDetailsRequest) URL() url.URL

type GetHotelDetailsRequestBody

type GetHotelDetailsRequestBody struct {
}

type GetHotelDetailsResponseBody

type GetHotelDetailsResponseBody struct {
	Success bool   `json:"success"`
	Count   int    `json:"count"`
	Total   int    `json:"total"`
	Message string `json:"message"`
	Data    struct {
		PropertyID    string `json:"propertyID"`
		PropertyName  string `json:"propertyName"`
		PropertyImage []struct {
			Thumb string `json:"thumb"`
			Image string `json:"image"`
		} `json:"propertyImage"`
		PropertyDescription string `json:"propertyDescription"`
		PropertyCurrency    struct {
			CurrencyCode     string `json:"currencyCode"`
			CurrencySymbol   string `json:"currencySymbol"`
			CurrencyPosition string `json:"currencyPosition"`
		} `json:"propertyCurrency"`
		PropertyAdditionalPhotos []struct {
			Thumb string `json:"thumb"`
			Image string `json:"image"`
		} `json:"propertyAdditionalPhotos"`
		PropertyPhone   string `json:"propertyPhone"`
		PropertyEmail   string `json:"propertyEmail"`
		PropertyAddress struct {
			PropertyAddress1  string `json:"propertyAddress1"`
			PropertyAddress2  string `json:"propertyAddress2"`
			PropertyCity      string `json:"propertyCity"`
			PropertyState     string `json:"propertyState"`
			PropertyZip       string `json:"propertyZip"`
			PropertyCountry   string `json:"propertyCountry"`
			PropertyLatitude  string `json:"propertyLatitude"`
			PropertyLongitude string `json:"propertyLongitude"`
		} `json:"propertyAddress"`
		PropertyPolicy struct {
			PropertyCheckInTime         string `json:"propertyCheckInTime"`
			PropertyCheckOutTime        string `json:"propertyCheckOutTime"`
			PropertyLateCheckOutAllowed bool   `json:"propertyLateCheckOutAllowed"`
			PropertyLateCheckOutType    string `json:"propertyLateCheckOutType"`
			PropertyLateCheckOutValue   string `json:"propertyLateCheckOutValue"`
			PropertyTermsAndConditions  string `json:"propertyTermsAndConditions"`
		} `json:"propertyPolicy"`
		PropertyAmenities []string `json:"propertyAmenities"`
	} `json:"data"`
}

type GetHotelsPathParams

type GetHotelsPathParams struct {
}

func (*GetHotelsPathParams) Params

func (p *GetHotelsPathParams) Params() map[string]string

type GetHotelsQueryParams

type GetHotelsQueryParams struct {
}

func (GetHotelsQueryParams) ToURLValues

func (p GetHotelsQueryParams) ToURLValues() (url.Values, error)

type GetHotelsRequest

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

func (*GetHotelsRequest) Do

func (*GetHotelsRequest) Method

func (r *GetHotelsRequest) Method() string

func (*GetHotelsRequest) NewResponseBody

func (r *GetHotelsRequest) NewResponseBody() *GetHotelsResponseBody

func (*GetHotelsRequest) PathParams

func (r *GetHotelsRequest) PathParams() *GetHotelsPathParams

func (*GetHotelsRequest) QueryParams

func (r *GetHotelsRequest) QueryParams() *GetHotelsQueryParams

func (*GetHotelsRequest) RequestBody

func (r *GetHotelsRequest) RequestBody() *GetHotelsRequestBody

func (*GetHotelsRequest) SetMethod

func (r *GetHotelsRequest) SetMethod(method string)

func (*GetHotelsRequest) SetRequestBody

func (r *GetHotelsRequest) SetRequestBody(body GetHotelsRequestBody)

func (*GetHotelsRequest) URL

func (r *GetHotelsRequest) URL() url.URL

type GetHotelsRequestBody

type GetHotelsRequestBody struct {
}

type GetHotelsResponseBody

type GetHotelsResponseBody struct {
	Success bool   `json:"success"`
	Count   int    `json:"count"`
	Total   int    `json:"total"`
	Message string `json:"message"`
	Data    []struct {
		PropertyID          string `json:"propertyID"`
		PropertyName        string `json:"propertyName"`
		PropertyImage       string `json:"propertyImage"`
		PropertyDescription string `json:"propertyDescription"`
		PropertyTimezone    string `json:"propertyTimezone"`
		PropertyCurrency    struct {
			CurrencyCode     string `json:"currencyCode"`
			CurrencySymbol   string `json:"currencySymbol"`
			CurrencyPosition string `json:"currencyPosition"`
		} `json:"propertyCurrency"`
	} `json:"data"`
}

type GetPaymentsPathParams

type GetPaymentsPathParams struct {
}

func (*GetPaymentsPathParams) Params

func (p *GetPaymentsPathParams) Params() map[string]string

type GetPaymentsQueryParams

type GetPaymentsQueryParams struct {
	// ID for the reservation to be queried.
	ReservationID string `schema:"reservationID"`
	// ID for the house account to be queried.
	HouseAccountID int `schema:"houseAccountID"`
	// ID for the guest to be queried.
	GuestID int `schema:"guestID"`
	// Datetime (lower limit) to be queried. If not sent, and reservationID informed, will use reservation date. In other cases, current date -7 days is used.
	CreatedFrom DateTime `schema:"createdFrom,omitempty"`
	// Datetime (upper limit) to be queried. If not sent, and reservationID informed, will use check-out date. In other cases, current date is used.
	CreatedTo DateTime `schema:"createdTo,omitempty"`
	// Adds payment allocation to response, when available.
	// Standaard waarde: false
	IncludePaymentAllocation bool `schema:"includePaymentAllocation,omitempty"`
	// Page number
	// Standaard waarde: 1
	PageNumber int `schema:"pageNumber,omitempty"`
	// Page size
	// Standaard waarde: 100
	PageSize int `schema:"pageSize,omitempty"`
}

func (GetPaymentsQueryParams) ToURLValues

func (p GetPaymentsQueryParams) ToURLValues() (url.Values, error)

type GetPaymentsRequest

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

func (*GetPaymentsRequest) Do

func (*GetPaymentsRequest) Method

func (r *GetPaymentsRequest) Method() string

func (*GetPaymentsRequest) NewResponseBody

func (r *GetPaymentsRequest) NewResponseBody() *GetPaymentsResponseBody

func (*GetPaymentsRequest) PathParams

func (r *GetPaymentsRequest) PathParams() *GetPaymentsPathParams

func (*GetPaymentsRequest) QueryParams

func (r *GetPaymentsRequest) QueryParams() *GetPaymentsQueryParams

func (*GetPaymentsRequest) RequestBody

func (r *GetPaymentsRequest) RequestBody() *GetPaymentsRequestBody

func (*GetPaymentsRequest) SetMethod

func (r *GetPaymentsRequest) SetMethod(method string)

func (*GetPaymentsRequest) SetRequestBody

func (r *GetPaymentsRequest) SetRequestBody(body GetPaymentsRequestBody)

func (*GetPaymentsRequest) URL

func (r *GetPaymentsRequest) URL() url.URL

type GetPaymentsRequestBody

type GetPaymentsRequestBody struct {
}

type GetPaymentsResponseBody

type GetPaymentsResponseBody struct {
	Success bool   `json:"success"`
	Count   int    `json:"count"`
	Total   int    `json:"total"`
	Message string `json:"message"`
	Data    []struct {
	} `json:"data"`
}

type GetReservationsPathParams

type GetReservationsPathParams struct {
}

func (*GetReservationsPathParams) Params

func (p *GetReservationsPathParams) Params() map[string]string

type GetReservationsQueryParams

type GetReservationsQueryParams struct {
	// ID for the properties to be queried (comma-separated).  It can be omitted
	// if the API key is single-property, or to get results from all properties
	// on an association.
	PropertyID string `schema:"propertyID,omitempty"`
	// Filter by current reservation status
	// Toegestane waarden: "not_confirmed", "confirmed", "canceled",
	// "checked_in", "checked_out", "no_show"
	Status Status `schema:"status,omitempty"`
	// 	Inferior limit datetime, used to filter reservations, based on booking
	// 	date
	ResultsFrom DateTime `schema:"resultsFrom,omitempty"`
	// Superior limit datetime, used to filter reservations, based on booking date
	ResultsTo DateTime `schema:"resultsTo,omitempty"`
	// Inferior limit datetime, used to filter reservations, based on booking modification date
	ModifiedFrom DateTime `schema:"modifiedFrom,omitempty"`
	// Superior limit datetime, used to filter reservations, based on booking modification date
	ModifiedTo DateTime `schema:"modifiedTo,omitempty"`
	// Filters reservations result to return only reservations with check-in
	// date range starting on this date
	CheckinFrom DateTime `schema:"checkinFrom,omitempty"`
	// Filters reservations result to return only reservations with check-in
	// date range ending on this date
	CheckinTo DateTime `schema:"checkinTo,omitempty"`
	// Filters reservations result to return only reservations with check-out
	// date range starting on this date
	CheckoutFrom DateTime `schema:"checkoutFrom,omitempty"`
	// Filters reservations result to return only reservations with check-out
	// date range ending on this date
	CheckoutTo DateTime `schema:"checkoutTo,omitempty"`
	// Filters reservation with the supplied room ID. CheckIn/checkOut dates OR
	// status are required. If dates are provided and span more than one day,
	// more than one reservation can be returned. If roomID supplied, roomName
	// is ignored.
	RoomID string `schema:"roomID,omitempty"`
	// Filters reservation with the supplied room name (customizable by each
	// property). CheckIn/checkOut dates OR status are required. If dates are
	// provided and span more than one day, more than one reservation can be
	// returned.
	RoomName string `schema:"roomName,omitempty"`
	// If guests details should be included or not
	// Standaard waarde: false
	IncludeGuestsDetails Bool `schema:"includeGuestsDetails,omitempty"`
	// Sort response results by most recent action
	SortByRecent bool `schema:"sortByRecent,omitempty"`
	// Results page number
	// Standaard waarde: 1
	PageNumber int `schema:"pageNumber,omitempty"`
	// Results page size. Max = 100
	// Standaard waarde: 100
	PageSize int `schema:"pageSize,omitempty"`
}

func (GetReservationsQueryParams) ToURLValues

func (p GetReservationsQueryParams) ToURLValues() (url.Values, error)

type GetReservationsRequest

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

func (*GetReservationsRequest) All

func (*GetReservationsRequest) Do

func (*GetReservationsRequest) Method

func (r *GetReservationsRequest) Method() string

func (*GetReservationsRequest) NewResponseBody

func (*GetReservationsRequest) PathParams

func (*GetReservationsRequest) QueryParams

func (*GetReservationsRequest) RequestBody

func (*GetReservationsRequest) SetMethod

func (r *GetReservationsRequest) SetMethod(method string)

func (*GetReservationsRequest) SetRequestBody

func (r *GetReservationsRequest) SetRequestBody(body GetReservationsRequestBody)

func (*GetReservationsRequest) URL

func (r *GetReservationsRequest) URL() url.URL

type GetReservationsRequestBody

type GetReservationsRequestBody struct {
}

type GetReservationsResponseBody

type GetReservationsResponseBody struct {
	Success bool   `json:"success"`
	Count   int    `json:"count"`
	Total   int    `json:"total"`
	Message string `json:"message"`
	Data    []struct {
		PropertyID           string   `json:"propertyID"`    // Properties identifier
		ReservationID        string   `json:"reservationID"` // Reservation's unique identifier
		DateCreated          DateTime `json:"dateCreated"`
		DateModified         DateTime `json:"dateModified"`
		Status               Status   `json:"status"`
		GuestID              Int      `json:"guestID"`
		GuestName            string   `json:"guestName"`
		StartDate            Date     `json:"startDate"`
		EndDate              Date     `json:"endDate"`
		Adults               Int      `json:"adults"`
		Children             Int      `json:"children"`
		Balance              float64  `json:"balance"`
		SourceName           string   `json:"sourceName"` // Source of reservation
		ThirdPartyIdentifier string   `json:"thirdPartyIdentifier"`
		GuestList            map[string]struct {
			GuestID string `json:"guestID"` // ID of the guest

			GuestName                   string `json:"guestName"`
			GuestFirstName              string `json:"guestFirstName"`
			GuestLastName               string `json:"guestLastName"`
			Guestgender                 string `json:"guestGender"` // Toegestane waarden: "M", "F", "N/A"
			GuestEmail                  string `json:"guestEmail"`
			GuestPhone                  string `json:"guestPhone"`
			GuestCellPhone              string `json:"guestCellPhone"`
			GuestAddress                string `json:"guestAddress"`
			GuestAddress2               string `json:"guestAddress2"`
			GuestCity                   string `json:"guestCity"`
			GuestState                  string `json:"guestState"`
			GuestCountry                string `json:"guestCountry"`
			GuestZip                    string `json:"guestZip"`
			GuestBirthdate              Date   `json:"guestBirthdate"`
			GuestDocumentType           string `json:"guestDocumentType"`
			GuestDocumentNumber         string `json:"guestDocumentNumber"`
			GuestDocumentIssueDate      Date   `json:"guestDocumentIssueDate"`
			GuestDocumentIsseingCountry string `json:"guestDocumentIssuingCountry"`
			GuestDocumentExpirationDate Date   `json:"guestDocumentExpirationDate"`
			TaxID                       string `json:"taxID"`        //  Guest's tax ID
			CompanyTaxID                string `json:"companyTaxID"` // Guest's company tax ID
			CompanyName                 string `json:"companyName"`  // Guest's company name
			SubReservationID            string `json:"subReservationID"`
			StartDate                   Date   `json:"startDate"`
			EndDate                     Date   `json:"endDate"`
			AssignedRoom                bool   `json:"assignedRoom"` // Returns true if guest has roomed assigned, false if not
			RoomID                      string `json:"roomID"`       // Room ID where guest is assigned
			RoomName                    string `json:"roomName"`     // Room Name where guest is assigned
			RoomTypeName                string `json:"roomTypeName"` // Room Name where guest is assigned
			IsMainGuest                 bool   `json:"isMainGuest"`
			Rooms                       []struct {
				RoomID       string `json:"roomID"`       // Room ID where guest is assigned
				RoomName     string `json:"roomName"`     // Room Name where guest is assigned
				RoomTypeName string `json:"roomTypeName"` // Room Type Name where guest is assigned
			} // List of all rooms that guest is assigned to
			CustomFields []struct {
				CustomFieldName  string `json:"customFieldName"`  // Custom Field Name
				CustomFieldValue string `json:"customFieldValue"` // Custom Field Value
			} // `json:"customFields
			IsAnonymized bool `json:"isAnonymized"` //  Flag indicating the guest data was removed upon request
		} `json:"guestList"`
	} `json:"data"`
}

type GetTransactionsPathParams

type GetTransactionsPathParams struct {
}

func (*GetTransactionsPathParams) Params

func (p *GetTransactionsPathParams) Params() map[string]string

type GetTransactionsQueryParams

type GetTransactionsQueryParams struct {
	// ID for the properties to be queried (comma-separated).
	// It can be omitted if the API key is single-property, or to get results from
	// all properties on an association.
	PropertyID string `schema:"propertyID,omitempty"`
	// If the response should include debit transactions
	// Standaard waarde: true
	// Standaard waarde: true
	IncludeDebit bool `schema:"includeDebit,omitempty"`
	// If the response should include credit transactions
	IncludeCredit bool `schema:"includeCredit,omitempty"`
	// If the response should include deleted transactions
	// Standaard waarde: false
	IncludeDeleted bool `schema:"includeDeleted,omitempty"`
	// Reservation Unique Identifier, used to filter transactions result
	// If reservationID is informed, and dates are not, all transactions with the
	// reservationID will be returned.
	ReservationID string `schema:"reservationID,omitempty"`
	// Sub Reservation Identifier, used to filter transactions result
	SubReservationID string `schema:"subReservationID,omitempty"`
	// Room ID, used to filter transactions result
	RoomID string `schema:"roomID,omitempty"`
	// Guest ID, used to filter transactions result
	GuestID int `schema:"guestID,omitempty"`
	// House Account ID, used to filter transactions result
	HouseAccountID int `schema:"houseAccountID,omitempty"`
	// Inferior limit date, used to filter transactions result (posted transaction date)
	ResultsFrom Date `schema:"resultsFrom,omitempty"`
	// Superior limit date, used to filter transactions result (posted transaction date)
	ResultsTo Date `schema:"resultsTo,omitempty"`
	// Inferior limit date, used to filter transactions result
	ModifiedFrom Date `schema:"modifiedFrom,omitempty"`
	// Superior limit date, used to filter transactions result
	ModifiedTo Date `schema:"modifiedTo,omitempty"`
	// Inferior limit datetime, used to filter transactions result (creation date of the transaction).
	// If informed, all other dates are ignored (except createdTo).
	// If createdFrom is informed, but createdTo is not, the call will return all results since this datetime.
	// Necessary only if createdTo is sent.
	// If time portion not given, assumes 00:00:00.
	CreatedFrom DateTime `schema:"createdFrom,omitempty"`
	// Superior limit datetime, used to filter transactions result (creation date of the transaction).
	// If informed (together with createdFrom), all other dates are ignored.
	// If time portion not given, assumes 23:59:59.
	CreatedTo DateTime `schema:"createdTo,omitempty"`
	// transactionFilter optioneel	String
	// Transaction filter is used to filter transactions result
	// Standaard waarde: simple_transactions,adjustments,adjustments_voids,voids,refunds
	TransactionFilter TransactionFilter `schema:"transactionFilter,omitempty"`
	// Results page number
	// Standaard waarde: 1
	PageNumber int `schema:"pageNumber,omitempty"`
	// Results page size. Max = 100
	// Standaard waarde: 100
	PageSize int `schema:"pageSize,omitempty"`
	// Sort response results by field
	// Toegestane waarden: transactionDateTime, transactionModifiedDateTime, guestCheckIn, guestCheckOut
	SortBy string `schema:"sortBy,omitempty"`
	// Order response in DESCending or ASCending order, used together with sortBy
	// Standaard waarde: desc
	// Toegestane waarden: desc, asc
	OrderBy string `schema:"orderBy,omitempty"`
}

func (GetTransactionsQueryParams) ToURLValues

func (p GetTransactionsQueryParams) ToURLValues() (url.Values, error)

type GetTransactionsRequest

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

func (*GetTransactionsRequest) All

func (*GetTransactionsRequest) Do

func (*GetTransactionsRequest) Method

func (r *GetTransactionsRequest) Method() string

func (*GetTransactionsRequest) NewResponseBody

func (*GetTransactionsRequest) PathParams

func (*GetTransactionsRequest) QueryParams

func (*GetTransactionsRequest) RequestBody

func (*GetTransactionsRequest) SetMethod

func (r *GetTransactionsRequest) SetMethod(method string)

func (*GetTransactionsRequest) SetRequestBody

func (r *GetTransactionsRequest) SetRequestBody(body GetTransactionsRequestBody)

func (*GetTransactionsRequest) URL

func (r *GetTransactionsRequest) URL() url.URL

type GetTransactionsRequestBody

type GetTransactionsRequestBody struct {
}

type GetTransactionsResponseBody

type GetTransactionsResponseBody struct {
	Success bool   `json:"success"`
	Count   Int    `json:"count"`
	Total   Int    `json:"total"`
	Message string `json:"message"`
	Data    []struct {
		PropertyID                     Int      `json:"propertyID"`                     // Property ID
		ReservationID                  string   `json:"reservationID"`                  // Reservation ID
		SubReservationID               string   `json:"subReservationID"`               // Sub Reservation ID
		HouseAccountID                 int      `json:"houseAccountID"`                 // House Account ID
		HouseAccountName               string   `json:"houseAccountName"`               // House Account Name
		GuestID                        string   `json:"guestID"`                        // Guest ID
		PropertyName                   string   `json:"propertyName"`                   // Property Name
		TransactionDateTime            DateTime `json:"transactionDateTime"`            // DateTime that the transaction was stored
		TransactionDateTimeUTC         DateTime `json:"transactionDateTimeUTC"`         // DateTime that the transaction was stored, in UTC timezone
		TransactionModifiedDateTime    DateTime `json:"transactionModifiedDateTime"`    // DateTime that the transaction was last modified
		TransactionModifiedDateTimeUTC DateTime `json:"transactionModifiedDateTimeUTC"` // DateTime that the transaction was slast modified, in UTC timezone
		GuestCheckin                   Date     `json:"guestCheckin"`                   // Reservation Check-in date
		GuestCheckout                  Date     `json:"guestCheckout"`                  // Reservation Check-out date
		RoomTypeID                     string   `json:"roomTypeID"`                     // ID of the room type
		RoomTypeName                   string   `json:"roomTypeName"`                   // Name of the room type
		RoomName                       string   `json:"roomName"`                       // Name of the specific room. N/A means not applicable, and it is used if the transaction is not linked to a room.
		GuestName                      string   `json:"guestName"`                      // Name of the first guest of the reservation
		Description                    string   `json:"description"`                    // Description of the transaction
		Category                       string   `json:"category"`                       // Category of the transaction
		TransactionCode                string   `json:"transactionCode"`                // Transaction identifier that can be used, or left blank
		Notes                          string   `json:"notes"`                          // If any special information needs to be added to the transaction, it will be in this field
		Quantity                       Int      `json:"quantity"`                       // Consolidated amount on the transaction (Credit - Debit)
		Currency                       string   `json:"currency"`                       // Currency of the transaction
		Username                       string   `json:"userName"`                       // User responsible for creating the transaction
		TransactionType                string   `json:"transactionType"`                // Consolidated transaction type. Toegestane waarden: debit, credit
		TransactionCategory            string   `json:"transactionCategory"`            // Transaction category. Toegestane waarden: adjustment, addon, custom_item, fee, payment, product, rate, room_revenue, refund, tax, void
		TransactionID                  string   `json:"transactionID"`                  // Transaction identifier
		// Parent transaction identifier. Parent transaction is a transaction to which
		// this current transaction is strongly related to or derived from.
		// Example: Parent transaction to a room rate tax is a room rate.
		// This parent transaction ID will mostly be present on transactions that are
		// taxes, fees and voids. It will not be present on room rates, items, payments
		// and refunds.
		ParentTransactionID string  `json:"parentTransactionID"`
		CardType            string  `json:"cardType"` // Abbreviated name of credit card type
		IsDeleted           bool    `json:"isDeleted"`
		Amount              float64 `json:"amount"`
	} `json:"data"`
}

type Int

type Int int

func (Int) MarshalJSON

func (i Int) MarshalJSON() ([]byte, error)

func (*Int) UnmarshalJSON

func (i *Int) UnmarshalJSON(data []byte) error

type Message

type Message struct {
	MessageCode string `json:"message_code"`
	MessageType string `json:"message_type"`
	Message     string `json:"message"`
}

type Messages

type Messages []Message

func (Messages) Error

func (msgs Messages) Error() string

type Oauth2Config

type Oauth2Config struct {
	oauth2.Config
}

func NewOauth2Config

func NewOauth2Config() *Oauth2Config

func (*Oauth2Config) SetBaseURL

func (c *Oauth2Config) SetBaseURL(baseURL *url.URL)

type PathParams

type PathParams interface {
	Params() map[string]string
}

type RequestCompletionCallback

type RequestCompletionCallback func(*http.Request, *http.Response)

RequestCompletionCallback defines the type of the request callback function

type SchemaMarshaler

type SchemaMarshaler interface {
	MarshalSchema() string
}

type Status

type Status string

type ToURLValues

type ToURLValues interface {
	ToURLValues() (url.Values, error)
}

type TransactionFilter

type TransactionFilter string

type URL

type URL url.URL

func NewURL

func NewURL(s string) (*URL, error)

func (URL) MarshalJSON

func (u URL) MarshalJSON() ([]byte, error)

func (URL) String

func (u URL) String() string

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(data []byte) error

type UserinfoPathParams

type UserinfoPathParams struct {
}

func (*UserinfoPathParams) Params

func (p *UserinfoPathParams) Params() map[string]string

type UserinfoQueryParams

type UserinfoQueryParams struct {
}

func (UserinfoQueryParams) ToURLValues

func (p UserinfoQueryParams) ToURLValues() (url.Values, error)

type UserinfoRequest

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

func (*UserinfoRequest) Do

func (*UserinfoRequest) Method

func (r *UserinfoRequest) Method() string

func (*UserinfoRequest) NewResponseBody

func (r *UserinfoRequest) NewResponseBody() *UserinfoResponseBody

func (*UserinfoRequest) PathParams

func (r *UserinfoRequest) PathParams() *UserinfoPathParams

func (*UserinfoRequest) QueryParams

func (r *UserinfoRequest) QueryParams() *UserinfoQueryParams

func (*UserinfoRequest) RequestBody

func (r *UserinfoRequest) RequestBody() *UserinfoRequestBody

func (*UserinfoRequest) SetMethod

func (r *UserinfoRequest) SetMethod(method string)

func (*UserinfoRequest) SetRequestBody

func (r *UserinfoRequest) SetRequestBody(body UserinfoRequestBody)

func (*UserinfoRequest) URL

func (r *UserinfoRequest) URL() url.URL

type UserinfoRequestBody

type UserinfoRequestBody struct {
}

type UserinfoResponseBody

type UserinfoResponseBody struct {
	UserID    int    `json:"user_id"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
}

Jump to

Keyboard shortcuts

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