-
Notifications
You must be signed in to change notification settings - Fork 1
/
reprice_rq.go
55 lines (47 loc) · 981 Bytes
/
reprice_rq.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
package s7_api_sdk
import (
"encoding/xml"
)
const ActionTypeContextDiscount = "discount"
type ItinReshopRQ struct {
XMLName xml.Name `xml:"http://www.iata.org/IATA/EDIST ItinReshopRQ"`
Version string `xml:"Version,attr"`
Document *Document
Party *Party
Query *Query
}
type Reshop struct {
Actions *Actions
}
type Actions struct {
ActionType *ActionType
OrderItems *OrderItems
Passengers *Passengers
Qualifiers *Qualifiers `xml:",omitempty"`
}
type ActionType struct {
Context string `xml:",attr,omitempty"`
Value string `xml:",chardata"`
}
func MakeItinReshopRQ(actionType *ActionType) (request *Envelope) {
request = &Envelope{
Header: new(Header),
Body: &Body{
ItinReshopRQ: &ItinReshopRQ{
Version: "1.0",
Document: new(Document),
Party: &Party{
Sender: new(Sender),
},
Query: &Query{
Reshop: &Reshop{
Actions: &Actions{
ActionType: actionType,
},
},
},
},
},
}
return
}