Skip to content

Commit fceaed5

Browse files
committed
added TicketCreateTSTFromPricing
1 parent a0156a0 commit fceaed5

File tree

3 files changed

+195
-0
lines changed

3 files changed

+195
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
package ticket_createtstfrompricing
2+
3+
import (
4+
"encoding/xml"
5+
6+
"github.com/kidem/amadeus-ws-go/formats"
7+
)
8+
9+
type TicketCreateTSTFromPricing struct {
10+
XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCQ_04_1_1A Ticket_CreateTSTFromPricing"`
11+
12+
// PNR record locator information for this transaction. This PNR record locator is used for tracing purpose, no internal retrieve.
13+
PnrLocatorData *ReservationControlInformationTypeI `xml:"pnrLocatorData,omitempty"`
14+
15+
PsaList *PsaList `xml:"psaList,omitempty"`
16+
}
17+
18+
type PsaList struct {
19+
20+
// Reference of the fare selected. A fare may have been calculated by Fare Quote for several passengers but there is still the possibility to create a TST only for a part of these passengers.
21+
ItemReference *ItemReferencesAndVersionsType `xml:"itemReference,omitempty"`
22+
23+
// Reference information on passengers.
24+
PaxReference *ReferenceInformationTypeI `xml:"paxReference,omitempty"`
25+
}
26+
27+
type ItemReferencesAndVersionsType struct {
28+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCQ_04_1_1A ItemReferencesAndVersionsType"`
29+
30+
// qualifies the type of the reference used. Code set to define
31+
ReferenceType formats.AlphaNumericString_Length1To3 `xml:"referenceType,omitempty"`
32+
33+
// Tattoo number : It is in fact the TST display number.
34+
UniqueReference formats.NumericInteger_Length1To5 `xml:"uniqueReference,omitempty"`
35+
}
36+
37+
type ReferenceInformationTypeI struct {
38+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCQ_04_1_1A ReferenceInformationTypeI"`
39+
40+
// Passenger/segment/TST/fare reference details
41+
RefDetails *ReferencingDetailsTypeI `xml:"refDetails,omitempty"`
42+
}
43+
44+
type ReferencingDetailsTypeI struct {
45+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCQ_04_1_1A ReferencingDetailsTypeI"`
46+
47+
// Qualifyer of the reference (Pax/Seg/Tst/Fare tattoo)
48+
RefQualifier formats.AlphaNumericString_Length1To3 `xml:"refQualifier,omitempty"`
49+
50+
// Passenger/segment/TST/fare tattoo reference number
51+
RefNumber formats.NumericInteger_Length1To5 `xml:"refNumber,omitempty"`
52+
}
53+
54+
type ReservationControlInformationDetailsTypeI struct {
55+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCQ_04_1_1A ReservationControlInformationDetailsTypeI"`
56+
57+
// Record locator.
58+
ControlNumber formats.AlphaNumericString_Length1To20 `xml:"controlNumber,omitempty"`
59+
}
60+
61+
type ReservationControlInformationTypeI struct {
62+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCQ_04_1_1A ReservationControlInformationTypeI"`
63+
64+
// Reservation control information
65+
ReservationInformation *ReservationControlInformationDetailsTypeI `xml:"reservationInformation,omitempty"`
66+
}

requests.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
ql "github.com/tmconsulting/amadeus-ws-go/reqstructs/queue_list"
1010
sa "github.com/tmconsulting/amadeus-ws-go/reqstructs/security_authenticate"
1111
ss "github.com/tmconsulting/amadeus-ws-go/reqstructs/security_signout"
12+
tctfp "github.com/tmconsulting/amadeus-ws-go/reqstructs/ticket_createtstfrompricing"
1213
tdt "github.com/tmconsulting/amadeus-ws-go/reqstructs/ticket_display_tst"
1314

1415
ccr "github.com/tmconsulting/amadeus-ws-go/respstructs/command_cryptic_reply"
@@ -19,6 +20,7 @@ import (
1920
qlr "github.com/tmconsulting/amadeus-ws-go/respstructs/queue_list_reply"
2021
sar "github.com/tmconsulting/amadeus-ws-go/respstructs/security_authenticate_reply"
2122
ssr "github.com/tmconsulting/amadeus-ws-go/respstructs/security_signout_reply"
23+
tctfpr "github.com/tmconsulting/amadeus-ws-go/respstructs/ticket_createtstfrompricing_reply"
2224
tdtr "github.com/tmconsulting/amadeus-ws-go/respstructs/ticket_display_tst_reply"
2325
)
2426

@@ -153,3 +155,16 @@ func (service *WebServicesPT) PNRCancel(request *pc.PNRCancel) (*prepl.PNRReply,
153155

154156
return response, nil
155157
}
158+
159+
func (service *WebServicesPT) TicketCreateTSTFromPricing(request *tctfp.TicketCreateTSTFromPricing) (*tctfpr.TicketCreateTSTFromPricingReply, error) {
160+
soapAction := "TAUTCQ_04_1_1A"
161+
162+
response := new(tctfpr.TicketCreateTSTFromPricingReply)
163+
session := new(Session)
164+
err := service.client.Call(url+"/"+service.wsap+"/"+soapAction, request, response, session)
165+
if err != nil {
166+
return nil, err
167+
}
168+
169+
return response, nil
170+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
package ticket_createtstfrompricing_reply
2+
3+
import (
4+
"encoding/xml"
5+
6+
"github.com/kidem/amadeus-ws-go/formats"
7+
)
8+
9+
type TicketCreateTSTFromPricingReply struct {
10+
XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A Ticket_CreateTSTFromPricingReply"`
11+
12+
ApplicationError *ApplicationError `xml:"applicationError,omitempty"`
13+
14+
// PNR record locator information for this transaction. This PNR record locator is used for tracing purpose.
15+
PnrLocatorData *ReservationControlInformationTypeI `xml:"pnrLocatorData,omitempty"`
16+
17+
TstList *TstList `xml:"tstList,omitempty"`
18+
}
19+
20+
type TstList struct {
21+
22+
// TST tattoo number created by the transaction.
23+
TstReference *ItemReferencesAndVersionsType `xml:"tstReference,omitempty"`
24+
25+
// Reference information on passengers.
26+
PaxInformation *ReferenceInformationTypeI `xml:"paxInformation,omitempty"`
27+
}
28+
29+
type ApplicationError struct {
30+
31+
// General error information returned by ticketing application
32+
ApplicationErrorInfo *ApplicationErrorInformationType `xml:"applicationErrorInfo,omitempty"`
33+
34+
// Description in free flow text of the error returned by ticketing application
35+
ErrorText *InteractiveFreeTextTypeI `xml:"errorText,omitempty"`
36+
}
37+
38+
type ApplicationErrorDetailType struct {
39+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A ApplicationErrorDetailType"`
40+
41+
// Code identifying the data validation error condition.
42+
ApplicationErrorCode formats.AlphaNumericString_Length1To5 `xml:"applicationErrorCode,omitempty"`
43+
44+
// Identification of a code list.
45+
CodeListQualifier formats.AlphaNumericString_Length1To3 `xml:"codeListQualifier,omitempty"`
46+
47+
// Code identifying the agency responsible for a code list.
48+
CodeListResponsibleAgency formats.AlphaNumericString_Length1To3 `xml:"codeListResponsibleAgency,omitempty"`
49+
}
50+
51+
type ApplicationErrorInformationType struct {
52+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A ApplicationErrorInformationType"`
53+
54+
// Application error details.
55+
ApplicationErrorDetail *ApplicationErrorDetailType `xml:"applicationErrorDetail,omitempty"`
56+
}
57+
58+
type InteractiveFreeTextTypeI struct {
59+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A InteractiveFreeTextTypeI"`
60+
61+
// Free flow text describing the error
62+
ErrorFreeText formats.AlphaNumericString_Length1To70 `xml:"errorFreeText,omitempty"`
63+
}
64+
65+
type ItemReferencesAndVersionsType struct {
66+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A ItemReferencesAndVersionsType"`
67+
68+
// qualifies the type of the reference used. Code set to define
69+
ReferenceType formats.AlphaNumericString_Length1To3 `xml:"referenceType,omitempty"`
70+
71+
// Tattoo number (It is in fact the Tst Display Number)
72+
UniqueReference formats.NumericInteger_Length1To5 `xml:"uniqueReference,omitempty"`
73+
74+
// Gives the TST ID number
75+
IDDescription *UniqueIdDescriptionType `xml:"iDDescription,omitempty"`
76+
}
77+
78+
type ReferenceInformationTypeI struct {
79+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A ReferenceInformationTypeI"`
80+
81+
// Passenger/segment/TST reference details
82+
RefDetails *ReferencingDetailsTypeI `xml:"refDetails,omitempty"`
83+
}
84+
85+
type ReferencingDetailsTypeI struct {
86+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A ReferencingDetailsTypeI"`
87+
88+
// Qualifyer of the reference (Pax/Seg/Tst)
89+
RefQualifier formats.AlphaNumericString_Length1To3 `xml:"refQualifier,omitempty"`
90+
91+
// Passenger/segment/TST reference number
92+
RefNumber formats.NumericInteger_Length1To5 `xml:"refNumber,omitempty"`
93+
}
94+
95+
type ReservationControlInformationDetailsTypeI struct {
96+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A ReservationControlInformationDetailsTypeI"`
97+
98+
// Record locator.
99+
ControlNumber formats.AlphaNumericString_Length1To20 `xml:"controlNumber,omitempty"`
100+
}
101+
102+
type ReservationControlInformationTypeI struct {
103+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A ReservationControlInformationTypeI"`
104+
105+
// Reservation control information
106+
ReservationInformation *ReservationControlInformationDetailsTypeI `xml:"reservationInformation,omitempty"`
107+
}
108+
109+
type UniqueIdDescriptionType struct {
110+
// XMLName xml.Name `xml:"http://xml.amadeus.com/TAUTCR_04_1_1A UniqueIdDescriptionType"`
111+
112+
// The TST Id Number : The Id number allows to determine a TST in the single manner.
113+
IDSequenceNumber formats.NumericInteger_Length1To11 `xml:"iDSequenceNumber,omitempty"`
114+
}

0 commit comments

Comments
 (0)