-
Notifications
You must be signed in to change notification settings - Fork 1
/
book_rq.go
90 lines (75 loc) · 1.78 KB
/
book_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
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
package s7_api_sdk
import (
"encoding/xml"
)
type OrderCreateRQ struct {
XMLName xml.Name `xml:"http://www.iata.org/IATA/EDIST OrderCreateRQ"`
Version string `xml:"Version,attr"`
Document *Document
Party *Party
Query *Query
}
type Query struct {
Passengers *Passengers
OrderItems *OrderItems
TicketDocQuantity int `xml:",omitempty"`
TicketDocInfo []*TicketDocInfo `xml:",omitempty"`
DataLists *DataLists
Reshop *Reshop `xml:",omitempty"`
}
type ShoppingResponse struct {
Owner string
ResponseID string
Offers *Offers
}
type Offers struct {
Offer []*Offer
}
type Offer struct {
OfferID *OfferID
OfferItems *OfferItems
}
type OfferItems struct {
OfferItem []*OfferItem
ApplicableFlight *ApplicableFlight
}
type OfferItem struct {
OfferItemID *OfferID `xml:",omitempty"`
Passengers *Passengers `xml:",omitempty"`
OfferItemType *OfferItemType `xml:",omitempty"`
ApplicableFlight *ApplicableFlight `xml:",omitempty"`
}
type InstructionsList struct {
Instruction []*Instruction
}
type Instruction struct {
ListKey string `xml:",attr,omitempty"`
SpecialBookingInstruction *SpecialBookingInstruction
}
type SpecialBookingInstruction struct {
Code string `xml:",omitempty"`
Definition string `xml:",omitempty"`
}
type OfferItemType struct {
DetailedFlightItem *DetailedFlightItem
}
type DetailedFlightItem struct {
OriginDestination []*OriginDestinationFlight
}
func MakeSessionBookRQ() (request *Envelope) {
request = &Envelope{
Header: new(Header),
Body: &Body{
OrderCreateRQ: &OrderCreateRQ{
Document: &Document{
Name: "1.0",
},
Party: &Party{
Sender: new(Sender),
},
Query: new(Query),
},
},
}
return
}