-
Notifications
You must be signed in to change notification settings - Fork 2
/
supplierStructures.go
411 lines (391 loc) · 16.2 KB
/
supplierStructures.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
package aandaSdk
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 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 RoomComission struct {
Room MustFloat64 `json:"room"`
Meal MustFloat64 `json:"meal"`
Total MustFloat64 `json:"total"`
TotalMealfree MustFloat64 `json:"total_mealfree"`
}
type RoomPeriod struct {
PeriodStart string `json:"period_start"`
PeriodEnd string `json:"period_end"`
PeriodDays MustInt `json:"period_days"`
PeriodSummRoom MustInt `json:"period_summ_room"`
PeriodSummMeal interface{} `json:"period_summ_meal"`
PeriodSummTotal MustInt `json:"period_summ_total"`
}
type CountryListResponse struct {
CountryCode string `json:"country_code"`
CountryName string `json:"country_name"`
Cities string `json:"cities"`
}
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 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 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 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 CurrencyListResponse struct {
CurrencyCode string `json:"currency_code"`
CurrencyName string `json:"currency_name"`
}
type MealTypeResponse struct {
MealTypeCode string `json:"meal_type_code"`
MealTypeName string `json:"meal_type_name"`
}
type MealCategoryResponse struct {
MealCategoryCode string `json:"meal_category_code"`
MealCategoryName string `json:"meal_category_name"`
}
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 OrderRequestResponse struct {
Status string `json:"Status" validate:"required"`
OrderId string `json:"order_id" validate:"required"`
Time MustFloat64 `json:"Time" validate:"required"`
}
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 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 struct {
OrderCode string `json:"order_code"`
MessageCode string `json:"message_code"`
Created string `json:"created"`
From string `json:"from"`
Message string `json:"message"`
}
type SendOrderMessageResponse struct {
MessageCode string `json:"message_code"`
}
type ClientStatusResponse struct {
ClientStatusCode string `json:"client_status_code"`
ClientStatusName string `json:"client_status_name"`
ClientStatusExplanation string `json:"client_status_explanation"`
}
type ServiceTypeResponse struct {
ServiceCode string `json:"service_code"`
ServiceName string `json:"service_name"`
}
type HotelAmenitiesResponse struct {
HotelAmenitiesCode string `json:"hotel_amenities_code"`
HotelAmenitiesName string `json:"hotel_amenities_name"`
}
type RoomAmenitiesResponse struct {
RoomAmenitiesCode string `json:"room_amenities_code"`
RoomAmenitiesName string `json:"room_amenities_name"`
}