-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathair_doc_void.go
54 lines (47 loc) · 1.07 KB
/
air_doc_void.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
package s7_api_sdk
import "encoding/xml"
type AirDocVoidRQ struct {
XMLName xml.Name `xml:"http://www.iata.org/IATA/EDIST AirDocVoidRQ"`
Version string `xml:"Version,attr"`
Document *Document
Party *Party
Query *QueryAirVoid
}
type QueryAirVoid struct {
TicketDocQuantity int
TicketDocument *TicketDocument
}
type AirDocVoidRS struct {
Version string `xml:"Version,attr"`
Document *Document
Success bool
Response *ResponseAirDocVoid
Errors *Errors
}
type ResponseAirDocVoid struct {
TicketDocument *TicketDocument
}
func MakeAirDocVoidRQ(agentSender *AgentUserSender, ticketNbr, ticketType string) (request *Envelope) {
request = &Envelope{
Header: new(Header),
Body: &Body{
AirDocVoidRQ: &AirDocVoidRQ{
Version: "1.0",
Document: new(Document),
Party: &Party{
Sender: &Sender{
AgentUserSender: agentSender,
},
},
Query: &QueryAirVoid{
TicketDocQuantity: 1,
TicketDocument: &TicketDocument{
TicketDocNbr: ticketNbr,
Type: &Type{Code: ticketType},
},
},
},
},
}
return
}