-
Notifications
You must be signed in to change notification settings - Fork 3
/
tracking.go
98 lines (80 loc) · 3.36 KB
/
tracking.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
package dpd
const trackingNamespace = "http://dpd.ru/ws/tracing/2011-11-18"
type operationGetStatesByClient struct {
GetStatesByClient *getStatesByClient `xml:"getStatesByClient,omitempty"`
}
type getStatesByClient struct {
Request *getStatesByClientRequest `xml:"request,omitempty"`
}
type getStatesByClientRequest struct {
Auth *Auth `xml:"auth,omitempty"`
}
type operationGetStatesByClientResponse struct {
GetStatesByClientResponse *getStatesByClientResponse `xml:"getStatesByClientResponse,omitempty"`
}
type getStatesByClientResponse struct {
Return *ParcelsStates `xml:"return,omitempty"`
}
type ParcelsStates struct {
DocID *int64 `xml:"docId,omitempty"`
DocDate *string `xml:"docDate,omitempty"`
ClientNumber *int64 `xml:"clientNumber,omitempty"`
ResultComplete *bool `xml:"resultComplete,omitempty"`
States []*ParcelState `xml:"states,omitempty"`
}
type ParcelState struct {
ClientOrderNr *string `xml:"clientOrderNr,omitempty"`
ClientParcelNr *string `xml:"clientParcelNr,omitempty"`
DpdOrderNr *string `xml:"dpdOrderNr,omitempty"`
DpdParcelNr *string `xml:"dpdParcelNr,omitempty"`
PickupDate *string `xml:"pickupDate,omitempty"`
DpdOrderReNr *string `xml:"dpdOrderReNr,omitempty"`
DpdParcelReNr *string `xml:"dpdParcelReNr,omitempty"`
IsReturn *bool `xml:"isReturn,omitempty"`
PlanDeliveryDate *string `xml:"planDeliveryDate,omitempty"`
NewState *string `xml:"newState,omitempty"`
TransitionTime *string `xml:"transitionTime,omitempty"`
TerminalCode *string `xml:"terminalCode,omitempty"`
TerminalCity *string `xml:"terminalCity,omitempty"`
IncidentCode *string `xml:"incidentCode,omitempty"`
IncidentName *string `xml:"incidentName,omitempty"`
Consignee *string `xml:"consignee,omitempty"`
}
type operationGetStatesByClientOrder struct {
GetStatesByClientOrder *getStatesByClientOrder `xml:"getStatesByClientOrder,omitempty"`
}
type getStatesByClientOrder struct {
Request *TrackByClientOrderRequest `xml:"request,omitempty"`
}
//TrackByClientOrderRequest GetStatesByClientOrder request body
type TrackByClientOrderRequest struct {
Auth *Auth `xml:"auth,omitempty"`
ClientOrderNr *string `xml:"clientOrderNr,omitempty"`
PickupDate *string `xml:"pickupDate,omitempty"`
}
type operationGetStatesByClientOrderResponse struct {
GetStatesByClientOrderResponse *getStatesByClientOrderResponse `xml:"getStatesByClientOrderResponse,omitempty"`
}
type getStatesByClientOrderResponse struct {
Return *ParcelsStates `xml:"return,omitempty"`
}
type operationGetStatesByDPDOrder struct {
GetStatesByDPDOrder *getStatesByDPDOrder `xml:"getStatesByDPDOrder,omitempty"`
}
type getStatesByDPDOrder struct {
Namespace string `xml:"xmlns,attr"`
Request *TrackByDPDOrderRequest `xml:"request,omitempty"`
}
//TrackByDPDOrderRequest GetStatesByDPDOrder request body
type TrackByDPDOrderRequest struct {
Namespace string `xml:"xmlns,attr"`
Auth *Auth `xml:"auth,omitempty"`
DpdOrderNr *string `xml:"dpdOrderNr,omitempty"`
PickupYear *int `xml:"pickupYear,omitempty"`
}
type operationGetStatesByDPDOrderResponse struct {
GetStatesByDPDOrderResponse *getStatesByDPDOrderResponse `xml:"getStatesByDPDOrderResponse,omitempty"`
}
type getStatesByDPDOrderResponse struct {
Return *ParcelsStates `xml:"return,omitempty"`
}