Documentation
¶
Index ¶
- Constants
- type AandaError
- type AandaErrorMsg
- type Api
- func (self *Api) CityListRequest(ctx context.Context, countryCode int) (CityListResponse, error)
- func (self *Api) ClientStatusRequest(ctx context.Context) ([]ClientStatusResponse, error)
- func (self *Api) CountryListRequest(ctx context.Context) ([]CountryListResponse, error)
- func (self *Api) CurrencyListRequest(ctx context.Context) ([]CurrencyListResponse, error)
- func (self *Api) HotelAmenitiesRequest(ctx context.Context) ([]HotelAmenitiesResponse, error)
- func (self *Api) HotelDescriptionRequest(ctx context.Context, hotelCode int) (HotelDescriptionResponse, error)
- func (self *Api) HotelListRequest(ctx context.Context, cityCode int) ([]HotelListResponse, error)
- func (self *Api) HotelPricingRequest(ctx context.Context, priceReq HotelPricingRequest) (HotelPricingResponse, error)
- func (self *Api) HotelSearchRequest(ctx context.Context, searchReq HotelSearchRequest) ([]HotelSearchResponse, error)
- func (self *Api) MealCategoryRequest(ctx context.Context) ([]MealCategoryResponse, error)
- func (self *Api) MealTypeRequest(ctx context.Context) ([]MealTypeResponse, error)
- func (self *Api) OrderInfoRequest(ctx context.Context, orderId string) (OrderInfoResponse, error)
- func (self *Api) OrderListRequest(ctx context.Context, orderReq OrderListRequest) ([]OrderListResponse, error)
- func (self *Api) OrderMessagesRequest(ctx context.Context, orderId string) ([]OrderMessagesResponse, error)
- func (self *Api) OrderRequest(ctx context.Context, orderReq OrderRequest) (OrderRequestResponse, error)
- func (self *Api) RoomAmenitiesRequest(ctx context.Context) ([]RoomAmenitiesResponse, error)
- func (self *Api) SendOrderMessageRequest(ctx context.Context, somReq SendOrderMessageRequest) (SendOrderMessageResponse, error)
- func (self *Api) ServiceTypeRequest(ctx context.Context) ([]ServiceTypeResponse, error)
- type Auth
- type CityListResponse
- type ClientStatusResponse
- type CountryListResponse
- type CurrencyListResponse
- type EventHandler
- type EventListener
- type EventType
- type HotelAmenitiesResponse
- type HotelDescriptionResponse
- type HotelDescriptionRoom
- type HotelListResponse
- type HotelPricingRequest
- type HotelPricingResponse
- type HotelRooms
- type HotelSearchRequest
- type HotelSearchResponse
- type MealCategoryResponse
- type MealTypeResponse
- type MustFloat64
- type MustInt
- type MustString
- type OrderInfoRequest
- type OrderInfoResponse
- type OrderListRequest
- type OrderListResponse
- type OrderMessagesResponse
- type OrderRequest
- type OrderRequestResponse
- type Person
- type RoomAmenitiesResponse
- type RoomComission
- type RoomPeriod
- type SendOrderMessageRequest
- type SendOrderMessageResponse
- type ServiceTypeResponse
Constants ¶
View Source
const (
TestOrderId = "2213397"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AandaError ¶
type AandaError struct { Status string `json:"status" json:"Status"` Code MustString `json:"code" json:"Code"` Type string `json:"type" json:"Type"` Note string `json:"note" json:"Note"` }
func (*AandaError) Error ¶
func (o *AandaError) Error() string
func (*AandaError) IsEmpty ¶
func (o *AandaError) IsEmpty() bool
func (*AandaError) ToError ¶
func (o *AandaError) ToError() error
type AandaErrorMsg ¶
type AandaErrorMsg struct {
Err string `json:"error"`
}
func (*AandaErrorMsg) Error ¶
func (o *AandaErrorMsg) Error() string
func (*AandaErrorMsg) IsEmpty ¶
func (o *AandaErrorMsg) IsEmpty() bool
func (*AandaErrorMsg) ToError ¶
func (o *AandaErrorMsg) ToError() error
type Api ¶
type Api struct { EventListener BuyerId string UserId string Password string Language string // contains filtered or unexported fields }
func (*Api) CityListRequest ¶
func (*Api) ClientStatusRequest ¶
func (self *Api) ClientStatusRequest(ctx context.Context) ([]ClientStatusResponse, error)
func (*Api) CountryListRequest ¶
func (self *Api) CountryListRequest(ctx context.Context) ([]CountryListResponse, error)
func (*Api) CurrencyListRequest ¶
func (self *Api) CurrencyListRequest(ctx context.Context) ([]CurrencyListResponse, error)
func (*Api) HotelAmenitiesRequest ¶
func (self *Api) HotelAmenitiesRequest(ctx context.Context) ([]HotelAmenitiesResponse, error)
func (*Api) HotelDescriptionRequest ¶
func (*Api) HotelListRequest ¶
func (*Api) HotelPricingRequest ¶
func (self *Api) HotelPricingRequest(ctx context.Context, priceReq HotelPricingRequest) (HotelPricingResponse, error)
func (*Api) HotelSearchRequest ¶
func (self *Api) HotelSearchRequest(ctx context.Context, searchReq HotelSearchRequest) ([]HotelSearchResponse, error)
func (*Api) MealCategoryRequest ¶
func (self *Api) MealCategoryRequest(ctx context.Context) ([]MealCategoryResponse, error)
func (*Api) MealTypeRequest ¶
func (self *Api) MealTypeRequest(ctx context.Context) ([]MealTypeResponse, error)
func (*Api) OrderInfoRequest ¶
func (*Api) OrderListRequest ¶
func (self *Api) OrderListRequest(ctx context.Context, orderReq OrderListRequest) ([]OrderListResponse, error)
func (*Api) OrderMessagesRequest ¶
func (*Api) OrderRequest ¶
func (self *Api) OrderRequest(ctx context.Context, orderReq OrderRequest) (OrderRequestResponse, error)
func (*Api) RoomAmenitiesRequest ¶
func (self *Api) RoomAmenitiesRequest(ctx context.Context) ([]RoomAmenitiesResponse, error)
func (*Api) SendOrderMessageRequest ¶
func (self *Api) SendOrderMessageRequest(ctx context.Context, somReq SendOrderMessageRequest) (SendOrderMessageResponse, error)
func (*Api) ServiceTypeRequest ¶
func (self *Api) ServiceTypeRequest(ctx context.Context) ([]ServiceTypeResponse, error)
type CityListResponse ¶
type CityListResponse struct { Country struct { Id string `json:"id"` Name string `json:"name"` } `json:"country"` Cities []struct { CityCode string `json:"city_code"` CityName string `json:"city_name"` Region string `json:"region"` Hotels string `json:"hotels"` CityLatitude string `json:"city_latitude"` CityLongitude string `json:"city_longitude"` } `json:"cities"` }
type ClientStatusResponse ¶
type CountryListResponse ¶
type CurrencyListResponse ¶
type EventHandler ¶
type EventListener ¶
type EventListener struct {
// contains filtered or unexported fields
}
func (*EventListener) Init ¶
func (o *EventListener) Init()
func (*EventListener) RegisterEventHandler ¶
func (o *EventListener) RegisterEventHandler(et EventType, handler EventHandler) *EventListener
type HotelAmenitiesResponse ¶
type HotelDescriptionResponse ¶
type HotelDescriptionResponse struct { Status *string `json:"status,omitempty"` HotelCode MustString `json:"hotel_code"` HotelName string `json:"hotel_name"` Vat MustString `json:"vat"` Address string `json:"address"` Phone string `json:"phone"` Description string `json:"description"` FullDescription string `json:"full_description"` FullAddress struct { Zip MustString `json:"zip"` Region string `json:"region"` City string `json:"city"` Addinfo string `json:"addinfo"` Strtype string `json:"strtype"` Strname string `json:"strname"` Proptype string `json:"proptype"` Propnumber MustString `json:"propnumber"` Buildingattr string `json:"buildingattr"` Buildingnumber string `json:"buildingnumber"` Addinfo2 string `json:"addinfo2"` CityCode MustString `json:"city_code"` CityName string `json:"city_name"` CityLatitude MustString `json:"city_latitude"` CityLongitude MustString `json:"city_longitude"` HotelLatitude MustString `json:"hotel_latitude"` HotelLongitude MustString `json:"hotel_longitude"` CountryCode MustString `json:"country_code"` CountryName string `json:"country_name"` } `json:"full_address"` RatingCode MustString `json:"rating_code"` RatingName string `json:"rating_name"` StarsCode MustString `json:"stars_code"` StarsName MustString `json:"stars_name"` Images []struct { URL string `json:"Url"` Desc string `json:"desc"` } `json:"images"` CurrencyCode MustString `json:"currency_code"` CurrencyName string `json:"currency_name"` HotelAmenities []struct { Name string `json:"name"` Id MustString `json:"id"` } `json:"hotel_amenities"` Rooms []HotelDescriptionRoom `json:"rooms"` Conference []interface{} `json:"conference"` Group struct { Qty MustString `json:"qty"` Type MustString `json:"type"` Typename string `json:"typename"` Note string `json:"note"` Rule string `json:"rule"` } `json:"group"` }
type HotelDescriptionRoom ¶
type HotelDescriptionRoom struct { RoomCode MustString `json:"room_code"` RoomName string `json:"room_name"` NumberOfGuests MustString `json:"number_of_guests"` RoomDescription string `json:"room_description"` Images string `json:"images"` RoomAmenities []struct { Name string `json:"name"` Id MustString `json:"id"` } `json:"room_amenities"` }
type HotelListResponse ¶
type HotelListResponse struct { HotelCode string `json:"hotel_code"` Vat string `json:"vat"` HotelName string `json:"hotel_name"` Address string `json:"address"` Description string `json:"description"` ImageUrl string `json:"image_url"` HotelLatitude string `json:"hotel_latitude"` HotelLongitude string `json:"hotel_longitude"` RatingCode interface{} `json:"rating_code"` RatingName string `json:"rating_name"` StarsCode string `json:"stars_code"` StarsName string `json:"stars_name"` HotelAmenities []struct { Name string `json:"name"` Id string `json:"id"` } `json:"hotel_amenities"` }
type HotelPricingRequest ¶
type HotelPricingRequest struct { Auth Hotel string `json:"Hotel"` ProductCode string `json:"ProductCode"` Currency string `json:"Currency"` WhereToPay string `json:"WhereToPay"` ArrivalDate string `json:"ArrivalDate"` DepartureDate string `json:"DepartureDate"` ArrivalTime string `json:"ArrivalTime"` DepartureTime string `json:"DepartureTime"` NumberOfGuests string `json:"NumberOfGuests"` }
type HotelPricingResponse ¶
type HotelPricingResponse struct { HotelCode string `json:"hotel_code"` HotelName string `json:"hotel_name"` NumberOfGuests int `json:"number_of_guests"` CheckInTime string `json:"check-in_time"` CheckOutTime string `json:"check-out_time"` ArrivalDate string `json:"arrival_date"` DepartureDate string `json:"departure_date"` Vat int `json:"vat"` TimeZone string `json:"time_zone"` CountryCode string `json:"country_code"` CountryName string `json:"country_name"` CityCode string `json:"city_code"` CityName string `json:"city_name"` CityLatitude string `json:"city_latitude"` CityLongitude string `json:"city_longitude"` HotelLatitude string `json:"hotel_latitude"` HotelLongitude string `json:"hotel_longitude"` AllowEarlyCheckIn string `json:"allow_early_check-in"` AllowEarlyCheckOut string `json:"allow_early_check-out"` CurrencyCode string `json:"currency_code"` CurrencyName string `json:"currency_name"` Rooms []struct { RoomCode int `json:"room_code"` RoomName string `json:"room_name"` RateName string `json:"rate_name"` AllowEarlierCheckin bool `json:"allow_earlier_checkin"` AllowLateCheckout bool `json:"allow_late_checkout"` Checkins []interface{} `json:"checkins"` Checkouts []interface{} `json:"checkouts"` Price int `json:"price"` Rackrate int `json:"rackrate"` Comission struct { Room int `json:"room"` Meal int `json:"meal"` Total int `json:"total"` Checkin int `json:"checkin"` Checkout int `json:"checkout"` TotalMealfree int `json:"total_mealfree"` } `json:"comission"` PenaltySize struct { Room int `json:"room"` Total int `json:"total"` } `json:"penalty_size"` DeadlineDate string `json:"deadline_date"` DeadlineTime string `json:"deadline_time"` PenaltyInfo string `json:"penalty_info"` MaxGuests string `json:"max_guests"` MealTypeCode string `json:"meal_type_code"` MealTypeName string `json:"meal_type_name"` MealCategoryCode string `json:"meal_category_code"` MealCategoryName string `json:"meal_category_name"` MealName string `json:"meal_name"` MealPrice int `json:"meal_price"` MealIsIncludedCode int `json:"meal_is_included_code"` PaymentTermsCode string `json:"payment_terms_code"` PaymentTermsName string `json:"payment_terms_name"` AvailabilityCode int `json:"availability_code"` AvailabilityName string `json:"availability_name"` RoomsAvailable int `json:"rooms_available"` RoomAmenities []struct { Name string `json:"name"` ID string `json:"id"` } `json:"room_amenities"` } `json:"rooms"` Group struct { Qty string `json:"qty"` Type string `json:"type"` Typename string `json:"typename"` Note string `json:"note"` Rule string `json:"rule"` } `json:"group"` HotelAmenities []struct { Name string `json:"name"` Id string `json:"id"` } `json:"hotel_amenities"` }
type HotelRooms ¶
type HotelRooms struct { RoomCode MustString `json:"room_code"` RoomName string `json:"room_name"` NumberOfGuests MustString `json:"number_of_guests"` Price MustFloat64 `json:"price"` Rackrate MustFloat64 `json:"rackrate"` Comission MustFloat64 `json:"comission"` PenaltySize MustFloat64 `json:"penalty_size"` DeadlineDate string `json:"deadline_date"` DeadlineTime string `json:"deadline_time"` PenaltyInfo string `json:"penalty_info"` MealTypeCode MustString `json:"meal_type_code"` MealTypeName string `json:"meal_type_name"` MealCategoryCode MustString `json:"meal_category_code"` MealCategoryName string `json:"meal_category_name"` MealName string `json:"meal_name"` MealPrice MustInt `json:"meal_price"` MealIsIncludedCode MustInt `json:"meal_is_included_code"` MealIsIncludedName string `json:"meal_is_included_name"` AvailabilityCode MustInt `json:"availability_code"` AvailabilityName string `json:"availability_name"` PaymentTermsCode MustString `json:"payment_terms_code"` PaymentTermsName string `json:"payment_terms_name"` Amenities []struct { Name string `json:"name"` Id MustString `json:"id"` } `json:"room_amenities"` Periods []RoomPeriod `json:"periods"` }
type HotelSearchRequest ¶
type HotelSearchRequest struct { Auth City string `json:"City"` Lat string `json:"Lat"` Lng string `json:"Lng"` Radius string `json:"Radius"` ArrivalDate string `json:"ArrivalDate"` DepartureDate string `json:"DepartureDate"` PriceFrom string `json:"PriceFrom"` PriceTo string `json:"PriceTo"` NumberOfGuests string `json:"NumberOfGuests"` }
type HotelSearchResponse ¶
type HotelSearchResponse struct { HotelCode MustString `json:"hotel_code"` HotelName string `json:"hotel_name"` Address string `json:"address"` ImageUrl string `json:"image_url"` Vat MustInt `json:"vat"` Description string `json:"description"` Amenities []struct { Name string `json:"name"` Id MustString `json:"id"` } `json:"hotel_amenities"` CheckInTime string `json:"check-in_time"` CheckOutTime string `json:"check-out_time"` Timezone string `json:"timezone"` CityCode MustString `json:"city_code"` CityName string `json:"city_name"` HotelLatitude string `json:"hotel_latitude"` HotelLongitude string `json:"hotel_longitude"` CountryCode MustString `json:"country_code"` CountryName string `json:"country_name"` RatingCode MustString `json:"rating_code"` RatingName string `json:"rating_name"` StarsCode interface{} `json:"stars_code"` //Иногда тут пустая строка StarsName string `json:"stars_name"` CurrencyCode MustString `json:"currency_code"` CurrencyName string `json:"currency_name"` Rooms []HotelRooms `json:"rooms"` }
type MealCategoryResponse ¶
type MealTypeResponse ¶
type MustFloat64 ¶
type MustFloat64 float64
func (*MustFloat64) UnmarshalJSON ¶
func (o *MustFloat64) UnmarshalJSON(data []byte) error
type MustString ¶
type MustString string
func (*MustString) UnmarshalJSON ¶
func (o *MustString) UnmarshalJSON(data []byte) error
type OrderInfoRequest ¶
type OrderInfoResponse ¶
type OrderInfoResponse struct { OrderId string `json:"order_id"` ReferenceNumber string `json:"reference_number"` Created string `json:"created"` DeadlineDate string `json:"deadline_date"` DeadlineTime string `json:"deadline_time"` TotalPrice int `json:"total_price"` Comission string `json:"comission"` ArrivalDate string `json:"arrival_date"` DepartureDate string `json:"departure_date"` CurrencyCode string `json:"currency_code"` CurrencyName string `json:"currency_name"` PaymentTermsCode string `json:"payment_terms_code"` PaymentTermsName string `json:"payment_terms_name"` StatusCode string `json:"status_code"` StatusName string `json:"status_name"` ContactpersonName string `json:"contactperson_name"` PersonPhone string `json:"person_phone"` PersonFax string `json:"person_fax"` PersonEmail string `json:"person_email"` Rooms []struct { RoomCode string `json:"room_code"` ArrivalDate string `json:"arrival_date"` ArrivalTime string `json:"arrival_time"` DepartureDate string `json:"departure_date"` DepartureTime string `json:"departure_time"` NumberOfNights MustString `json:"number_of_nights"` NumberOfRooms string `json:"number_of_rooms"` NumberOfGuests string `json:"number_of_guests"` AdditionalInfo string `json:"additional_info"` SupplierInfo string `json:"supplier_info"` ConfirmationNumber string `json:"confirmation_number"` Price MustFloat64 `json:"price"` RoomPrice string `json:"room_price"` Commission MustFloat64 `json:"comission"` Penalty string `json:"penalty"` PenaltyNote string `json:"penalty_note"` DeadlineDate string `json:"deadline_date"` PossiblePenalty string `json:"possible_penalty"` CancelledCode string `json:"cancelled_code"` CancelledName string `json:"cancelled_name"` ChangeCode string `json:"change_code"` ChangeName string `json:"change_name"` HotelCode string `json:"hotel_code"` Vat string `json:"vat"` TimeZone string `json:"time_zone"` CountryCode string `json:"country_code"` CountryName string `json:"country_name"` CityCode string `json:"city_code"` CityName string `json:"city_name"` StatusCode string `json:"status_code"` StatusName string `json:"status_name"` AllowCancelCode int `json:"allow_cancel_code"` AllowCancelName string `json:"allow_cancel_name"` AllowChangeCode int `json:"allow_change_code"` AllowChangeName string `json:"allow_change_name"` RoomName string `json:"room_name"` MealCode int `json:"meal_code"` MealName string `json:"meal_name"` Persons []struct { Lastname string `json:"lastname"` Firstname string `json:"firstname"` } `json:"persons"` } `json:"rooms"` ServiceList []struct { Id string `json:"id"` Name string `json:"name"` Price string `json:"price"` ServiceType string `json:"service_type"` ServiceName string `json:"service_name"` StartDate string `json:"start_date"` EndDate string `json:"end_date"` InvoiceId interface{} `json:"invoice_id"` PersonId string `json:"person_id"` } `json:"service_list"` GroupInfo []interface{} `json:"group_info"` }
type OrderListRequest ¶
type OrderListRequest struct { Auth LastName string `json:"LastName"` //Доп параметры ArrivalDateFrom string `json:"ArrivalDateFrom"` ArrivalDateTo string `json:"ArrivalDateTo"` DepartureDateFrom string `json:"DepartureDateFrom"` DepartureDateTo string `json:"DepartureDateTo"` RegistrationDateFrom string `json:"RegistrationDateFrom"` RegistrationDateTo string `json:"RegistrationDateTo"` ChangeDateFrom string `json:"ChangeDateFrom"` ChangeDateTo string `json:"ChangeDateTo"` }
type OrderListResponse ¶
type OrderListResponse struct { OrderId string `json:"order_id"` ReferenceNumber string `json:"reference_number"` Created string `json:"created"` DeadlineDate string `json:"deadline_date"` TotalPrice string `json:"total_price"` Comission int `json:"comission"` Penalty string `json:"penalty"` ArrivalDate string `json:"arrival_date"` DepartureDate string `json:"departure_date"` CurrencyCode string `json:"currency_code"` CurrencyName string `json:"currency_name"` StatusCode string `json:"status_code"` StatusName string `json:"status_name"` ContactpersonName string `json:"contactperson_name"` PersonPhone string `json:"person_phone"` PersonFax string `json:"person_fax"` PersonEmail string `json:"person_email"` }
type OrderMessagesResponse ¶
type OrderRequest ¶
type OrderRequest struct { Auth OrderId string `json:"order_id"` ArrivalDate string `json:"arrival_date"` DepartureDate string `json:"departure_date"` AddInfo string `json:"add_info"` ChangeCode string `json:"change_code"` CancelCode string `json:"cancel_code"` HotelCode string `json:"hotel_code"` RoomCode string `json:"room_code"` Meal string `json:"Meal"` ArrivalTime string `json:"arrival_time"` DepartureTime string `json:"departure_time"` NumberOfGuests string `json:"NumberOfGuests"` Person []Person `json:"Person"` }
type OrderRequestResponse ¶
type OrderRequestResponse struct { Status string `json:"Status" validate:"required"` OrderId string `json:"order_id" validate:"required"` Time MustFloat64 `json:"Time" validate:"required"` }
type RoomAmenitiesResponse ¶
type RoomComission ¶
type RoomComission struct { Room MustFloat64 `json:"room"` Meal MustFloat64 `json:"meal"` Total MustFloat64 `json:"total"` TotalMealfree MustFloat64 `json:"total_mealfree"` }
type RoomPeriod ¶
type SendOrderMessageRequest ¶
type SendOrderMessageResponse ¶
type SendOrderMessageResponse struct {
MessageCode string `json:"message_code"`
}
type ServiceTypeResponse ¶
Click to show internal directories.
Click to hide internal directories.