-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpvzlist-structs.go
69 lines (61 loc) · 2.35 KB
/
pvzlist-structs.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
package cdekapi
type Offices struct {
Offices []Office
}
type Office struct {
Code string `json:"code"`
Name string `json:"name"`
Location OfficeLocation `json:"location"`
AddressComment string `json:"address_comment"`
NearestStation string `json:"nearest_station"`
MetroStation string `json:"nearest_metro_station"`
WorkTime string `json:"work_time"`
Phones []PhoneDetail `json:"phones"`
Email string `json:"email"`
Note string `json:"note"`
Type string `json:"type"`
OwnerCode string `json:"owner_сode"`
TakeOnly bool `json:"take_only"`
IsDressingRoom bool `json:"is_dressing_room"`
HaveCashless bool `json:"have_cashless"`
HaveCash bool `json:"have_cash"`
AllowedCod bool `json:"allowed_cod"`
Site string `json:"site"`
OfficeImage []OfficeImage `json:"office_image_list"`
WorkTimeList []WorkTimeItem `json:"work_time_list"`
WorkTimeExceptions []WorkTimeExcept `json:"work_time_exceptions"`
WeightMin float64 `json:"weight_min"`
WeightMax float64 `json:"weight_max"`
Errors []ErrorApiV2
}
type OfficeLocation struct {
CountryCode string `json:"country_code"`
RegionCode int `json:"region_code"`
RegionName string `json:"region"`
CityCode int `json:"city_code"`
City string `json:"city"`
PostalCode string `json:"postal_сode"`
Longitude float64 `json:"longitude"`
Latitude float64 `json:"latitude"`
Address string `json:"address"`
AddressFull string `json:"address_full"`
}
// OfficeImage contains all photos of the office (except for a photo showing how to get to it)
type OfficeImage struct {
Number int `json:"number"`
URL string `json:"url"`
}
// WorkTimeItem opening hours for every day
type WorkTimeItem struct {
Day int `json:"day"`
Time string `json:"time"`
}
type WorkTimeExcept struct {
Date string `json:"date"`
Time string `json:"time"`
IsWorking bool `json:"is_working"`
}
type PhoneDetail struct {
Number string `json:"number"`
Additional string `json:"additional"`
}