apaleo

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

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccountTypeRevenues           AccountType = "Revenues"
	AccountTypePayments           AccountType = "Payments"
	AccountTypeLiabilities        AccountType = "Liabilities"
	AccountTypeReceivables        AccountType = "Receivables"
	AccountTypeVat                AccountType = "Vat"
	AccountTypeHouse              AccountType = "House"
	AccountTypeAccountsReceivable AccountType = "AccountsReceivable"
	AccountTypeCityTaxes          AccountType = "CityTaxes"
	AccountTypeTransitoryItems    AccountType = "TransitoryItems"
	AccountTypeVatOnLiabilities   AccountType = "VatOnLiabilities"

	AccountingSchemaSimple   AccountingSchema = "Simple"
	AccountingSchemaExtended AccountingSchema = "Extended"
)
View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "api.apaleo.com",
		Path:   "",
	}
)

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.

Types

type AccountType

type AccountType string

type AccountingSchema

type AccountingSchema string

type AddressModel

type AddressModel struct {
	AddressLine1 string `json:"addressline1"`
	AddressLine2 string `json:"addressline2"`
	Postalcode   string `json:"postalcode"`
	City         string `json:"city"`
	CountryCode  string `json:"countryCode"`
}

type BankAccountModel

type BankAccountModel struct {
	IBAN string `json:"iban"`
	BIC  string `json:"bic"`
	Bank string `json:"bank"`
}

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) NewGetAccountsExportPathParams

func (c *Client) NewGetAccountsExportPathParams() *GetAccountsExportPathParams

func (*Client) NewGetAccountsExportQueryParams

func (c *Client) NewGetAccountsExportQueryParams() *GetAccountsExportQueryParams

func (*Client) NewGetAccountsExportRequest

func (c *Client) NewGetAccountsExportRequest() GetAccountsExportRequest

func (*Client) NewGetAccountsExportRequestBody

func (s *Client) NewGetAccountsExportRequestBody() GetAccountsExportRequestBody

func (*Client) NewGetInvoicesPathParams

func (c *Client) NewGetInvoicesPathParams() *GetInvoicesPathParams

func (*Client) NewGetInvoicesQueryParams

func (c *Client) NewGetInvoicesQueryParams() *GetInvoicesQueryParams

func (*Client) NewGetInvoicesRequest

func (c *Client) NewGetInvoicesRequest() GetInvoicesRequest

func (*Client) NewGetInvoicesRequestBody

func (s *Client) NewGetInvoicesRequestBody() GetInvoicesRequestBody

func (*Client) NewGetPropertiesPathParams

func (c *Client) NewGetPropertiesPathParams() *GetPropertiesPathParams

func (*Client) NewGetPropertiesQueryParams

func (c *Client) NewGetPropertiesQueryParams() *GetPropertiesQueryParams

func (*Client) NewGetPropertiesRequest

func (c *Client) NewGetPropertiesRequest() GetPropertiesRequest

func (*Client) NewGetPropertiesRequestBody

func (s *Client) NewGetPropertiesRequestBody() GetPropertiesRequestBody

func (*Client) NewGetPropertyPathParams

func (c *Client) NewGetPropertyPathParams() *GetPropertyPathParams

func (*Client) NewGetPropertyQueryParams

func (c *Client) NewGetPropertyQueryParams() *GetPropertyQueryParams

func (*Client) NewGetPropertyRequest

func (c *Client) NewGetPropertyRequest() GetPropertyRequest

func (*Client) NewGetPropertyRequestBody

func (s *Client) NewGetPropertyRequestBody() GetPropertyRequestBody

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) NewRequest

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

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) 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) 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 EmbeddedPropertyModel

type EmbeddedPropertyModel struct {
	// The property id
	ID string `json:"Id"`
	// The code for the property that can be shown in reports and table views
	Code string `json:"code"`
	// The name for the property
	Name string `json:"name"`
	// The description for the property
	Description string `json:"description"`
}

type EmbeddedRatePlanModel

type EmbeddedRatePlanModel struct {
	// The rate plan id
	ID string `json:"id"`
	// The code for the rate plan that can be shown in reports and table views
	Code string `json:"code"`
	// The name for the rate plan
	Name string `json:"name"`
	// The description for the rate plan
	Description string `json:"description"`
}

type EmbeddedUnitGroupModel

type EmbeddedUnitGroupModel struct {
	// The unit group id
	ID string `json:"id"`
	// The code for the unit group that can be shown in reports and table views
	Code string `json:"code"`
	// The name for the unit group
	Name string `json:"name"`
	// The description for the unit group
	Description string `json:"description"`
}

type EmbeddedUnitModel

type EmbeddedUnitModel struct {
	// The unit id
	ID string `json:"id"`
	// The name for the unit
	Name string `json:"name"`
	// The description for the unit
	Description string `json:"description"`
}

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 ExportTransactionItemModel

type ExportTransactionItemModel struct {
	// Timestamp with time zone information, when the booking was done
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004 ,
	Timestamp DateTime `json:"timestamp"`
	// The business date when the booking was done
	Date Date `json:"date"`
	// The account being debited (The 'from' in 'book x from account 1 to
	// account 2')
	DebitedAccountNumber string `json:"debitedAccountNumber"`
	// The parent account of the account being debited
	DebitedAccountParentNumber string `json:"debitedAccountParentNumber"`
	// The account being credited (The 'to' in 'book x from account 1 to account
	// 2')
	CreditedAccountNumber string `json:"creditedAccountNumber"`
	// The parent account of the account being credited
	CreditedAccountParentNumber string `json:"creditedAccountParentNumber"`
	// The type of business transaction which triggered the booking =
	// ['PostCharge', 'PostPayment', 'MoveLineItem', 'PostPrepayment',
	// 'PostToAccountsReceivables', 'PostPrepaymentVat', 'System']
	Command string `json:"command"`
	// The amount being booked
	Amount MonetaryValueModel `json:"amount"`
	// The receipt specifying type and number of the receipt for the business
	// transaction behind this entry. The receipt cannot be changed. It can be
	// identified by the combination of type and number
	Receipt ReceiptModel `json:"receipt"`
	// All transactions having the same number form one booking
	EntryNumber string `json:"entryNumber"`
	// The id of the reservation. Can be empty for transactions made on the
	// house account
	ReservationID string `json:"reservationId"`
}

type GetAccountsExportPathParams

type GetAccountsExportPathParams struct {
}

func (*GetAccountsExportPathParams) Params

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

type GetAccountsExportQueryParams

type GetAccountsExportQueryParams struct {
	// Specifies the property for which transactions will be exported
	PropertyID string `schema:"propertyId"`
	// The inclusive start time of the posting date. Either posting date or
	// business date interval should be specified.
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	From DateTime `schema:"from"`
	// The exclusive end time of the posting date. Either posting date or
	// business date interval should be specified.
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	To DateTime `schema:"to"`
	// Filter transactions by account number
	AccountNumber string `schema:"accountNumber,omitempty"`
	// Filter transactions by type
	AccountType AccountType `schema:"accountType,omitempty"`
	// Allows to override the default accounting schema. Only specify this, when
	// you know what you are doing.
	AccountingSchema AccountingSchema `schema:"accountingSchema,omitempty"`
	// Unique key for safely retrying requests without accidentally performing
	// the same operation twice. We'll always send back the same response for
	// requests made with the same key, and keys can't be reused with different
	// request parameters. Keys expire after 24 hours.
	IdempotencyKey string `schema:"Idempotency-Key,omitempty"`
}

func (GetAccountsExportQueryParams) ToURLValues

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

type GetAccountsExportRequest

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

func (*GetAccountsExportRequest) Do

func (*GetAccountsExportRequest) Method

func (r *GetAccountsExportRequest) Method() string

func (*GetAccountsExportRequest) NewResponseBody

func (*GetAccountsExportRequest) PathParams

func (*GetAccountsExportRequest) QueryParams

func (*GetAccountsExportRequest) RequestBody

func (*GetAccountsExportRequest) SetMethod

func (r *GetAccountsExportRequest) SetMethod(method string)

func (*GetAccountsExportRequest) SetRequestBody

func (*GetAccountsExportRequest) URL

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

type GetAccountsExportRequestBody

type GetAccountsExportRequestBody struct {
}

type GetAccountsExportResponseBody

type GetAccountsExportResponseBody struct {
	Transactions []ExportTransactionItemModel `json:"transactions"`
}

type GetInvoicesPathParams

type GetInvoicesPathParams struct {
}

func (*GetInvoicesPathParams) Params

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

type GetInvoicesQueryParams

type GetInvoicesQueryParams struct {
}

func (GetInvoicesQueryParams) ToURLValues

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

type GetInvoicesRequest

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

func (*GetInvoicesRequest) Do

func (*GetInvoicesRequest) Method

func (r *GetInvoicesRequest) Method() string

func (*GetInvoicesRequest) NewResponseBody

func (r *GetInvoicesRequest) NewResponseBody() *GetInvoicesResponseBody

func (*GetInvoicesRequest) PathParams

func (r *GetInvoicesRequest) PathParams() *GetInvoicesPathParams

func (*GetInvoicesRequest) QueryParams

func (r *GetInvoicesRequest) QueryParams() *GetInvoicesQueryParams

func (*GetInvoicesRequest) RequestBody

func (r *GetInvoicesRequest) RequestBody() *GetInvoicesRequestBody

func (*GetInvoicesRequest) SetMethod

func (r *GetInvoicesRequest) SetMethod(method string)

func (*GetInvoicesRequest) SetRequestBody

func (r *GetInvoicesRequest) SetRequestBody(body GetInvoicesRequestBody)

func (*GetInvoicesRequest) URL

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

type GetInvoicesRequestBody

type GetInvoicesRequestBody struct {
}

type GetInvoicesResponseBody

type GetInvoicesResponseBody struct {
}

type GetPropertiesPathParams

type GetPropertiesPathParams struct {
}

func (*GetPropertiesPathParams) Params

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

type GetPropertiesQueryParams

type GetPropertiesQueryParams struct {
}

func (GetPropertiesQueryParams) ToURLValues

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

type GetPropertiesRequest

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

func (*GetPropertiesRequest) Do

func (*GetPropertiesRequest) Method

func (r *GetPropertiesRequest) Method() string

func (*GetPropertiesRequest) NewResponseBody

func (r *GetPropertiesRequest) NewResponseBody() *GetPropertiesResponseBody

func (*GetPropertiesRequest) PathParams

func (*GetPropertiesRequest) QueryParams

func (*GetPropertiesRequest) RequestBody

func (*GetPropertiesRequest) SetMethod

func (r *GetPropertiesRequest) SetMethod(method string)

func (*GetPropertiesRequest) SetRequestBody

func (r *GetPropertiesRequest) SetRequestBody(body GetPropertiesRequestBody)

func (*GetPropertiesRequest) URL

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

type GetPropertiesRequestBody

type GetPropertiesRequestBody struct {
}

type GetPropertiesResponseBody

type GetPropertiesResponseBody struct {
	Count      int                 `json:"count"`
	Properties []PropertyItemModel `json:"properties"`
}

type GetPropertyPathParams

type GetPropertyPathParams struct {
	ID string
}

func (*GetPropertyPathParams) Params

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

type GetPropertyQueryParams

type GetPropertyQueryParams struct {
}

func (GetPropertyQueryParams) ToURLValues

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

type GetPropertyRequest

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

func (*GetPropertyRequest) Do

func (*GetPropertyRequest) Method

func (r *GetPropertyRequest) Method() string

func (*GetPropertyRequest) NewResponseBody

func (r *GetPropertyRequest) NewResponseBody() *GetPropertyResponseBody

func (*GetPropertyRequest) PathParams

func (r *GetPropertyRequest) PathParams() *GetPropertyPathParams

func (*GetPropertyRequest) QueryParams

func (r *GetPropertyRequest) QueryParams() *GetPropertyQueryParams

func (*GetPropertyRequest) RequestBody

func (r *GetPropertyRequest) RequestBody() *GetPropertyRequestBody

func (*GetPropertyRequest) SetMethod

func (r *GetPropertyRequest) SetMethod(method string)

func (*GetPropertyRequest) SetRequestBody

func (r *GetPropertyRequest) SetRequestBody(body GetPropertyRequestBody)

func (*GetPropertyRequest) URL

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

type GetPropertyRequestBody

type GetPropertyRequestBody struct {
	// 'all' or comma separated list of two-letter language codes (ISO Alpha-2)
	Languages []string `json:"languages"`
}

type GetPropertyResponseBody

type GetPropertyResponseBody struct {
	PropertyModel
}

type GetReservationsPathParams

type GetReservationsPathParams struct {
}

func (*GetReservationsPathParams) Params

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

type GetReservationsQueryParams

type GetReservationsQueryParams struct {
}

func (GetReservationsQueryParams) ToURLValues

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

type GetReservationsRequest

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

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 {
	Count        int                    `json:"count"`
	Reservations []ReservationItemModel `json:"reservations"`
}

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 MonetaryValueModel

type MonetaryValueModel struct {
	Amount   float64 `json:"amount"`
	Currency string  `json:"currency"`
}

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 PropertyItemModel

type PropertyItemModel struct {
	// The property id
	ID string `json:"id"`
	// The code for the property that can be shown in reports and table views
	Code string `json:"code"`
	// The name for the property
	Name string `json:"name"`
	// The description for the property
	Description string `json:"description"`
	// The location of the property
	Location AddressModel `json:"location"`
	// The time zone name of the property from the IANA Time Zone Database.
	// (see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
	TimeZone string `json:"timeZone"`
	// The currency a property works with.
	CurrencyCode string `json:"currencyCode"`
	// Date of creation
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	Created Date `json:"created"`
}

type PropertyModel

type PropertyModel struct {
	// The property id ,
	ID string `json:"id"`
	// The code for the property that can be shown in reports and table views
	Code string `json:"code"`
	// The name for the property
	Name map[string]string `json:"name"`
	// The description for the property
	Description map[string]string `json:"description"`
	// The legal name of the company running the property.
	CompanyName string `json:"companyName"`
	// The managing director(s) of the company, as they should appear on invoices
	ManagingDirectors string `json:"managingDirectors"`
	// The entry in the Commercial Reigster of the company running the property, as it should appear on invoices ,
	CommercialRegisterEntry string `json:"commercialRegisterEntry"`
	// The Tax-ID of the company running the property, as it should appear on invoices
	TaxID string `json:"taxId"`
	// The location of the property ,
	Location    AddressModel     `json:"location"`
	BankAccount BankAccountModel `json:"bankAccountModel"`
	// The payment terms used for all rate plans
	PaymentTerms map[string]string `json:"paymentTerms"`
	// The time zone name of the property from the IANA Time Zone Database. (see:
	// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
	TimeZone string `json:"timeZone"`
	// The currency a property works with.
	CurrencyCode string `json:"currencyCode"`
	// Date of creation
	// Specify a date and time (without fractional second part) in UTC or with UTC
	// offset as defined in the ISO8601:2004
	Created Date `json:"created"`
}

type ReceiptModel

type ReceiptModel struct {
	// The type of receipt. = ['Custom', 'Reservation', 'Invoice',
	// 'PspReference']
	Type   string `json:"type"`
	Number string `json:"number"`
}

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type ReservationItemModel

type ReservationItemModel struct {
	// Reservation id
	ID string `json:"id"`
	// Booking id
	BookingID string `json:"bookingId"`
	// Block id
	BlockID string `json:"blockId"`
	// Status of the reservation = ['Confirmed', 'InHouse', 'CheckedOut',
	// 'Canceled', 'NoShow'],
	Status string `json:"status"`
	// Time of check-in
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	CheckInTime DateTime `json:"checkInTime"`
	// Time of check-out
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	CheckOutTime DateTime `json:"checkOutTime"`
	// Time of cancellation, if the reservation was canceled
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	CancellationTime DateTime `json:"cancellationTime"`
	// Time of setting no-show reservation status
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	NoShowTime DateTime `json:"noShowTime"`
	// The property
	Property EmbeddedPropertyModel `json:"property"`
	// The rate plan
	RatePlan EmbeddedRatePlanModel `json:"ratePlan"`
	// The unit group
	UnitGroup EmbeddedUnitGroupModel `json:"unitGroup"`
	// The unit
	Unit EmbeddedUnitModel `json:"unit,omitempty"`
	// Total amount
	TotalGrossAmount MonetaryValueModel `json:"totalGrossAmount"`
	// Date of arrival
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	Arrival DateTime `json:"arrival"`
	// Date of departure
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	Departure DateTime `json:"departure"`
	// Date of creation
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	Created DateTime `json:"created"`
	// Date of last modification
	// Specify a date and time (without fractional second part) in UTC or with
	// UTC offset as defined in the ISO8601:2004
	Modified DateTime `json:"modified"`
	// Number of adults
	Adults int `json:"adults"`
	// The ages of the children
	ChildrenAges []int `json:"childrenAges"`
	// Additional information and comments
	Comment string `json:"comment`
	// Additional information and comment by the guest
	GuestComment string `json:"guestComment"`
	// Code in external system
	ExternalCode string `json:"externalCode"`
	// Channel code = ['Direct', 'BookingCom', 'Ibe', 'ChannelManager']
	ChannelCode string `json:"channelCode"`
	// Source of the reservation (e.g Hotels.com, Orbitz, etc.)
	Source string `json:"source"`
	// The primary guest of the reservation
	PrimaryGuest GuestModel `json:"primaryGuest"`
	// Additional guests of the reservation
	AdditionalGuests []GuestModel `json:"additionalGuests"`
	// The person who made the booking
	Booker BookerModel `json:"booker"`
	// Payment information
	PaymentAccount PaymentAccountModel `json:"paymentAccountModel"`
	// The strongest guarantee for the rate plans booked in this reservation =
	// ['PM6Hold', 'CreditCard', 'Prepayment', 'Company', 'Ota']
	GuaranteeType string `json:"guaranteeType"`
	// Details about the cancellation fee for this reservation<Paste>
	CancellationFee ReservationCancellationFeeModel `json:"cancellationFee"`
	// Details about the no-show fee for this reservation
	NoShowFee ReservationNoShowFeeModel `json:"noShowFee"`
	// The purpose of the trip, leisure or business = ['Business', 'Leisure']
	TravelPurpose string `json:"travelPurpose"`
	// The balance of this reservation
	Balance MonetaryValueModel `json:"balance"`
	// The list of units assigned to this reservation
	AssignedUnits []ReservationAssignedUnitModel `json:"assignedUnits"`
	// The list of time slices with the reserved units / unit groups for the
	// stay
	TimeSlices []TimeSliceModel `json:"timeSlices"`
	// The list of additional services (extras, add-ons) reserved for the stay -
	// DEPRECATED: Please use 'Services'. This field will be removed on
	// 31.03.2019
	ExtraServices []ReservationServiceModel `json:"extraServices"`
	// The list of additional services (extras, add-ons) reserved for the stay
	Services ReservationServiceItemModel `json:"services"`
	// Validation rules are applied to reservations during their lifetime. For
	// example a reservation that was created while the house or unit group is
	// already fully booked. Whenever a rule was or is currently violated, a
	// validation message will be added to this list. They can be deleted
	// whenever the hotel staff worked them off.
	ValidationMessages []ReservationValidationMessageModel `json:"validationMessages"`
	// The list of actions for this reservation
	Actions []ActionModel        `json:"actions"`
	Company EmbeddedCompanyModel `json:"company,omitempty"`
}

type SchemaMarshaler

type SchemaMarshaler interface {
	MarshalSchema() string
}

type ToURLValues

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

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

Jump to

Keyboard shortcuts

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