|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* amadeus-ws-client |
|
4
|
|
|
* |
|
5
|
|
|
* Copyright 2015 Amadeus Benelux NV |
|
6
|
|
|
* |
|
7
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
8
|
|
|
* you may not use this file except in compliance with the License. |
|
9
|
|
|
* You may obtain a copy of the License at |
|
10
|
|
|
* |
|
11
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
|
12
|
|
|
* |
|
13
|
|
|
* Unless required by applicable law or agreed to in writing, software |
|
14
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
15
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
16
|
|
|
* See the License for the specific language governing permissions and |
|
17
|
|
|
* limitations under the License. |
|
18
|
|
|
* |
|
19
|
|
|
* @package Amadeus |
|
20
|
|
|
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0 |
|
21
|
|
|
*/ |
|
22
|
|
|
|
|
23
|
|
|
namespace Amadeus\Client\ResponseHandler\Air; |
|
24
|
|
|
|
|
25
|
|
|
use Amadeus\Client\Exception; |
|
26
|
|
|
use Amadeus\Client\ResponseHandler\MessageResponseHandler; |
|
27
|
|
|
use Amadeus\Client\Result; |
|
28
|
|
|
use Amadeus\Client\Session\Handler\SendResult; |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* Utility class to get proper error messages from an Air_RetrieveSeatMapReply message |
|
32
|
|
|
* |
|
33
|
|
|
* @package Amadeus\Client\ResponseHandler\Air |
|
34
|
|
|
* @author Dieter Devlieghere <[email protected]> |
|
35
|
|
|
*/ |
|
36
|
|
|
class HandlerRetrieveSeatMap implements MessageResponseHandler |
|
37
|
|
|
{ |
|
38
|
|
|
public function analyze(SendResult $response) |
|
39
|
|
|
{ |
|
40
|
|
|
// TODO: Implement analyze() method. |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* Find the error message for a given error code |
|
45
|
|
|
* |
|
46
|
|
|
* @param string $code |
|
47
|
|
|
* @return string|null |
|
48
|
|
|
*/ |
|
49
|
3 |
|
public static function findMessage($code) |
|
50
|
|
|
{ |
|
51
|
3 |
|
$message = null; |
|
52
|
|
|
|
|
53
|
3 |
|
if (array_key_exists($code, self::$errorList)) { |
|
54
|
3 |
|
$message = self::$errorList[$code]; |
|
55
|
3 |
|
} |
|
56
|
|
|
|
|
57
|
3 |
|
return $message; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* Decode error processing level code |
|
62
|
|
|
* |
|
63
|
|
|
* @param int|string $level |
|
64
|
|
|
* @return string|null |
|
65
|
|
|
*/ |
|
66
|
5 |
|
public static function decodeProcessingLevel($level) |
|
67
|
|
|
{ |
|
68
|
5 |
|
$decoded = null; |
|
69
|
|
|
|
|
70
|
|
|
$map = [ |
|
71
|
5 |
|
0 => 'system', |
|
72
|
|
|
1 => 'application' |
|
73
|
5 |
|
]; |
|
74
|
|
|
|
|
75
|
5 |
|
if (array_key_exists($level, $map)) { |
|
76
|
5 |
|
$decoded = $map[$level]; |
|
77
|
5 |
|
} |
|
78
|
|
|
|
|
79
|
5 |
|
return $decoded; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* @var array |
|
84
|
|
|
*/ |
|
85
|
|
|
public static $errorList = [ |
|
86
|
|
|
'1' => 'Passenger surname not found', |
|
87
|
|
|
'10' => 'Location of arrival is invalid', |
|
88
|
|
|
'100' => 'Seat map not available, request seat at check-in', |
|
89
|
|
|
'101' => 'Seat map contains conditional seats, it may be subject to reseating', |
|
90
|
|
|
'102' => 'Unable to process', |
|
91
|
|
|
'103' => 'Segment/Passenger does not qualify for advanced seating', |
|
92
|
|
|
'11' => 'Departure/Arrival city pair is invalid', |
|
93
|
|
|
'12' => 'Unique name not found', |
|
94
|
|
|
'13' => 'Invalid seat number', |
|
95
|
|
|
'14' => 'Airline code and/or flight number invalid', |
|
96
|
|
|
'15' => 'Flight cancelled', |
|
97
|
|
|
'16' => 'Flight check-in held or suspended temporarily', |
|
98
|
|
|
'17' => 'Passenger surname already checked in', |
|
99
|
|
|
'18' => 'Seating conflict - request contradicts the facility rules', |
|
100
|
|
|
'185' => 'Use airline name', |
|
101
|
|
|
'186' => 'Use passenger status', |
|
102
|
|
|
'187' => 'Flight changes from smoking to non smoking', |
|
103
|
|
|
'188' => 'Flight changes from non smoking to smoking', |
|
104
|
|
|
'189' => 'Pax has pre-reserved exit seat unable to C/I', |
|
105
|
|
|
'19' => 'Baggage weight is required', |
|
106
|
|
|
'190' => 'Pax cannot be seated together', |
|
107
|
|
|
'191' => 'Generic seat change not supported', |
|
108
|
|
|
'192' => 'Seat change-request in row change not supported', |
|
109
|
|
|
'193' => 'API pax data required', |
|
110
|
|
|
'194' => 'Passenger surname not checked in', |
|
111
|
|
|
'195' => 'Change of equipment on this flight', |
|
112
|
|
|
'196' => 'Time out occured on host 3', |
|
113
|
|
|
'197' => 'Error in frequent flyer number', |
|
114
|
|
|
'198' => 'Class code required', |
|
115
|
|
|
'199' => 'Check-in separately', |
|
116
|
|
|
'2' => 'Seat not available on the requested class/zone', |
|
117
|
|
|
'20' => 'Bag count conflict - weight update for non-existing bag', |
|
118
|
|
|
'200' => 'FQTV number not accepted', |
|
119
|
|
|
'201' => 'FQTV number already present', |
|
120
|
|
|
'202' => 'Baggage details not updated', |
|
121
|
|
|
'203' => 'SSR details not updated', |
|
122
|
|
|
'204' => 'Row invalid', |
|
123
|
|
|
'205' => 'Short connection baggage', |
|
124
|
|
|
'206' => 'Seat change only supported for single passenger', |
|
125
|
|
|
'207' => 'Use generic seating only', |
|
126
|
|
|
'208' => 'Update separately', |
|
127
|
|
|
'209' => 'Flight changes from seating to openseating (freeseating)', |
|
128
|
|
|
'21' => 'Seats not available for passenger type', |
|
129
|
|
|
'210' => 'Flight changes from openseating (freeseating) to seating', |
|
130
|
|
|
'211' => 'Unable to through-check - complexing/COG/codeshare flight', |
|
131
|
|
|
'212' => 'API pax data not supported', |
|
132
|
|
|
'213' => 'Time invalid - max/min connecting time for though checkin', |
|
133
|
|
|
'214' => 'API date of birth required', |
|
134
|
|
|
'215' => 'API passport number required', |
|
135
|
|
|
'217' => 'API pax first name required', |
|
136
|
|
|
'218' => 'API pax gender required', |
|
137
|
|
|
'22' => 'Too many connections - need manual tags', |
|
138
|
|
|
'223' => 'API infant data required', |
|
139
|
|
|
'224' => 'Passenger holds advance boarding pass', |
|
140
|
|
|
'225' => 'Seat Map not available as flight operated by another carrier', |
|
141
|
|
|
'226' => 'Seat Request not available as flight operated by another carrier', |
|
142
|
|
|
'227' => 'Seat change not possible/seats limited in this area', |
|
143
|
|
|
'228' => 'Exchange advanced boarding pass - new data', |
|
144
|
|
|
'229' => 'Change not performed on subsequent flight(s)', |
|
145
|
|
|
'23' => 'Invalid bag destination - need manual tags', |
|
146
|
|
|
'230' => 'Unable to seat change - complexing/COG/codeshare flight', |
|
147
|
|
|
'231' => 'Passenger not E.T. type', |
|
148
|
|
|
'232' => 'Passenger is E.T. type - needs E.T. indicator', |
|
149
|
|
|
'233' => 'Passenger is E.T. type - needs E.T. number', |
|
150
|
|
|
'234' => 'Unable to through check - E.T. passenger', |
|
151
|
|
|
'235' => 'Tier level not accepted', |
|
152
|
|
|
'236' => 'Unable to process - codeshare flight', |
|
153
|
|
|
'237' => 'Forward seat due connection - no seat change allowed', |
|
154
|
|
|
'238' => 'Australian Visa required - use TIETAC entry each pax', |
|
155
|
|
|
'239' => 'Advice of handcarry baggage allowance', |
|
156
|
|
|
'24' => 'Passenger actual weight required for this flight', |
|
157
|
|
|
'240' => 'Emergency contact information required for U.S. citizen', |
|
158
|
|
|
'244' => 'Epass passenger - number differs', |
|
159
|
|
|
'245' => 'Epass passenger - not authorized', |
|
160
|
|
|
'246' => 'Epass passenger - possible status discrepency', |
|
161
|
|
|
'247' => 'Message limit exceed', |
|
162
|
|
|
'248' => 'Insufficient upgrade balance', |
|
163
|
|
|
'249' => 'Reissue bag tags to correct destination', |
|
164
|
|
|
'25' => 'Hand baggage details required', |
|
165
|
|
|
'250' => 'Add API data - retry Check in', |
|
166
|
|
|
'251' => 'Advise visa and/or documentation status', |
|
167
|
|
|
'252' => 'Passenger is E.T. type - ticket/reservation conflict', |
|
168
|
|
|
'253' => 'Passenger is E.T. type - ticket record not accessible', |
|
169
|
|
|
'254' => 'Cascaded query timed out', |
|
170
|
|
|
'255' => 'Unable to check-in - Security profile restriction', |
|
171
|
|
|
'256' => 'Passport number printed on boarding pass required', |
|
172
|
|
|
'26' => 'No seat selection on this flight', |
|
173
|
|
|
'264' => 'API pax data not required', |
|
174
|
|
|
'265' => 'Missing or invalid airport check-in identification (FOID)', |
|
175
|
|
|
'27' => 'Location of departure is invalid', |
|
176
|
|
|
'28' => 'Flight rescheduled - through check-in no longer allowed', |
|
177
|
|
|
'29' => 'Flight full in the requested class', |
|
178
|
|
|
'3' => 'Invalid seat request', |
|
179
|
|
|
'30' => 'Passenger surname off-loaded', |
|
180
|
|
|
'300' => 'Seat Map not available for unticketed passengers', |
|
181
|
|
|
'31' => 'Passenger surname deleted/cancelled from the flight', |
|
182
|
|
|
'32' => 'Bag tag number invalid', |
|
183
|
|
|
'33' => 'Flight gated - through check-in is not allowed', |
|
184
|
|
|
'34' => 'Time invalid - minimum connecting time for check-in violated', |
|
185
|
|
|
'35' => 'Flight closed', |
|
186
|
|
|
'36' => 'Passenger not accessible in the system (error/protection)', |
|
187
|
|
|
'37' => 'Unique reference for passenger is invalid', |
|
188
|
|
|
'38' => 'Passenger party reference is invalid', |
|
189
|
|
|
'39' => 'Booking/Ticketing class conflict', |
|
190
|
|
|
'4' => 'Bag tag number details required', |
|
191
|
|
|
'40' => 'Status conflict - status does not exist', |
|
192
|
|
|
'41' => 'Frequent flyer number is invalid', |
|
193
|
|
|
'42' => 'Booking/Ticketing class invalid', |
|
194
|
|
|
'43' => 'Passenger type conflicts with seats held', |
|
195
|
|
|
'44' => 'Too many passengers', |
|
196
|
|
|
'45' => 'Unable - group names', |
|
197
|
|
|
'46' => 'Unable to check-in partial party', |
|
198
|
|
|
'47' => 'Passenger status conflict', |
|
199
|
|
|
'48' => 'PNR locator unknown in the receiving system', |
|
200
|
|
|
'49' => 'Ticket number invalid', |
|
201
|
|
|
'5' => 'Invalid flight/Date', |
|
202
|
|
|
'50' => 'Pool airline invalid', |
|
203
|
|
|
'51' => 'Operating airline invalid', |
|
204
|
|
|
'52' => 'Not authorized - company level', |
|
205
|
|
|
'53' => 'Not authorized - station level', |
|
206
|
|
|
'54' => 'Not authorized - data level', |
|
207
|
|
|
'55' => 'Passenger regraded', |
|
208
|
|
|
'56' => 'Passenger seated elsewhere than requested', |
|
209
|
|
|
'57' => 'Seat not available in the requested class', |
|
210
|
|
|
'58' => 'Seat not available in the requested zone', |
|
211
|
|
|
'59' => 'Specific seat not available', |
|
212
|
|
|
'6' => 'Too many passengers with the same Surname', |
|
213
|
|
|
'60' => 'Free seating in the requested flight', |
|
214
|
|
|
'61' => 'Too many infants', |
|
215
|
|
|
'62' => 'Smoking zone unavailable', |
|
216
|
|
|
'63' => 'Non-smoking zone unavailable', |
|
217
|
|
|
'64' => 'Indifferent zone unavailable', |
|
218
|
|
|
'65' => 'Check visa and/or documentation', |
|
219
|
|
|
'66' => 'No baggage update required for this flight', |
|
220
|
|
|
'67' => 'Gender weight is required', |
|
221
|
|
|
'68' => 'Item conflict', |
|
222
|
|
|
'69' => 'Item weight is required', |
|
223
|
|
|
'7' => 'Passenger type or gender conflict', |
|
224
|
|
|
'70' => 'Modification not possible', |
|
225
|
|
|
'700' => 'Item/data not found - data not existing in processing host', |
|
226
|
|
|
'701' => 'Invalid format - data does not match EDIFACT rules', |
|
227
|
|
|
'702' => 'No action - Processing host can not support the function', |
|
228
|
|
|
'71' => 'No common itinerary', |
|
229
|
|
|
'72' => 'Unable to give seat', |
|
230
|
|
|
'73' => 'Passenger needs initial', |
|
231
|
|
|
'74' => 'Passenger needs first name', |
|
232
|
|
|
'75' => 'Collect second flight name', |
|
233
|
|
|
'76' => 'Check smallpox vaccination', |
|
234
|
|
|
'77' => 'Check yellow fever vaccination', |
|
235
|
|
|
'78' => 'Check cholera vaccination', |
|
236
|
|
|
'79' => 'Passenger has pre-reserved seat', |
|
237
|
|
|
'8' => 'More precise gender is required', |
|
238
|
|
|
'80' => 'Flight initialised - retry check in', |
|
239
|
|
|
'81' => 'Bag through labeling not allowed beyond this station', |
|
240
|
|
|
'82' => 'Too many bags', |
|
241
|
|
|
'83' => 'Flight operated as', |
|
242
|
|
|
'84' => 'Function not supported', |
|
243
|
|
|
'85' => 'Invalid reservations booking modifier', |
|
244
|
|
|
'86' => 'Invalid compartment designator code', |
|
245
|
|
|
'87' => 'Invalid country code', |
|
246
|
|
|
'88' => 'Invalid source of business', |
|
247
|
|
|
'89' => 'Invalid agent\'s code', |
|
248
|
|
|
'9' => 'Flight is not open for through check-in', |
|
249
|
|
|
'90' => 'Requester identification required', |
|
250
|
|
|
'91' => 'Seat Map Display request is outside system date range', |
|
251
|
|
|
'92' => 'Flight does not operate due to weather, mechanical or other operational conditions', |
|
252
|
|
|
'93' => 'Flight does not operate on date requested', |
|
253
|
|
|
'94' => 'Flight does not operate between requested cities', |
|
254
|
|
|
'95' => 'Schedule change in progress', |
|
255
|
|
|
'96' => 'Repeat request updating in progress', |
|
256
|
|
|
'97' => 'Flight has departed', |
|
257
|
|
|
'98' => 'Seating closed due flight under departure control', |
|
258
|
|
|
'99' => 'Seat map not available for requested zone, seat may be requested', |
|
259
|
|
|
]; |
|
260
|
|
|
} |
|
261
|
|
|
|