|
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\Struct\Pnr\AddMultiElements; |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* PnrActions - Structure class for the pnrActions message part for PNR_AddMultiElements messages |
|
27
|
|
|
* |
|
28
|
|
|
* @package Amadeus\Client\Struct\Pnr\AddMultiElements |
|
29
|
|
|
* @author Dieter Devlieghere <[email protected]> |
|
30
|
|
|
*/ |
|
31
|
|
|
class PnrActions |
|
32
|
|
|
{ |
|
33
|
|
|
/** |
|
34
|
|
|
* PNR action option: no special processing |
|
35
|
|
|
* |
|
36
|
|
|
* @var int |
|
37
|
|
|
*/ |
|
38
|
|
|
const ACTIONOPTION_NO_SPECIAL_PROCESSING = 0; |
|
39
|
|
|
/** |
|
40
|
|
|
* PNR action option: End Transact |
|
41
|
|
|
* |
|
42
|
|
|
* @var int |
|
43
|
|
|
*/ |
|
44
|
|
|
const ACTIONOPTION_END_TRANSACT = 10; |
|
45
|
|
|
/** |
|
46
|
|
|
* PNR action option: End transact with retrieve |
|
47
|
|
|
* |
|
48
|
|
|
* @var int |
|
49
|
|
|
*/ |
|
50
|
|
|
const ACTIONOPTION_END_TRANSACT_W_RETRIEVE = 11; |
|
51
|
|
|
/** |
|
52
|
|
|
* PNR Action Option: Ignore PNR |
|
53
|
|
|
* |
|
54
|
|
|
* @var int |
|
55
|
|
|
*/ |
|
56
|
|
|
const ACTIONOPTION_IGNORE = 20; |
|
57
|
|
|
/** |
|
58
|
|
|
* PNR Action Option: Ignore PNR and retrieve |
|
59
|
|
|
* |
|
60
|
|
|
* @var int |
|
61
|
|
|
*/ |
|
62
|
|
|
const ACTIONOPTION_IGNORE_W_RETRIEVE = 21; |
|
63
|
|
|
|
|
64
|
|
|
const ACTIONOPTION_END_TRANSACT_CHANGE_ADV_CODES = 12; |
|
65
|
|
|
|
|
66
|
|
|
const ACTIONOPTION_END_TRANSACT_RETRIEVE_CHANGE_ADV_CODES = 13; |
|
67
|
|
|
|
|
68
|
|
|
const ACTIONOPTION_END_TRANSACT_SPLIT = 14; |
|
69
|
|
|
|
|
70
|
|
|
const ACTIONOPTION_CANCEL_ITIN_END_TRANSACT = 15; |
|
71
|
|
|
|
|
72
|
|
|
const ACTIONOPTION_CANCEL_ITIN_END_TRANSACT_RETRIEVE = 16; |
|
73
|
|
|
|
|
74
|
|
|
const ACTIONOPTION_IGNORE_RETRIEVE = 21; |
|
75
|
|
|
|
|
76
|
|
|
const ACTIONOPTION_STOP_EOT_ON_SELL_ERROR = 267; |
|
77
|
|
|
|
|
78
|
|
|
const ACTIONOPTION_WARNING_AT_EOT = 30; |
|
79
|
|
|
|
|
80
|
|
|
const ACTIONOPTION_REPLY_SHORT_MESSAGE = 50; |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* PNR_AddMultiElements/pnrActions/optionCode |
|
84
|
|
|
* |
|
85
|
|
|
* 0 No special processing |
|
86
|
|
|
* 10 End transact (ET) |
|
87
|
|
|
* 11 End transact with retrieve (ER) |
|
88
|
|
|
* 12 End transact and change advice codes (ETK) |
|
89
|
|
|
* 13 End transact with retrieve and change advice codes (ERK) |
|
90
|
|
|
* 14 End transact split PNR (EF) |
|
91
|
|
|
* 15 Cancel the itinerary for all PNRs connected by the AXR and end transact (ETX) |
|
92
|
|
|
* 16 Cancel the itinerary for all PNRs connected by the AXR and end transact with retrieve (ERX) |
|
93
|
|
|
* 20 Ignore (IG) |
|
94
|
|
|
* 21 Ignore and retrieve (IR) |
|
95
|
|
|
* 267 Stop EOT if segment sell error |
|
96
|
|
|
* 30 Show warnings at first EOT |
|
97
|
|
|
* 50 Reply with short message |
|
98
|
|
|
* |
|
99
|
|
|
* @see https://webservices.amadeus.com/extranet/structures/viewMessageStructure.do?id=5313&serviceVersionId=4268 |
|
100
|
|
|
* |
|
101
|
|
|
* @var int[] |
|
102
|
|
|
*/ |
|
103
|
|
|
public $optionCode = []; |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* @param int|int[] $actionCode self::ACTIONOPTION_* or one of the defined option codes |
|
107
|
|
|
*/ |
|
108
|
250 |
|
public function __construct($actionCode = self::ACTIONOPTION_NO_SPECIAL_PROCESSING) |
|
109
|
|
|
{ |
|
110
|
250 |
|
if (is_int($actionCode)) { |
|
111
|
245 |
|
$this->optionCode[] = $actionCode; |
|
112
|
103 |
|
} elseif (is_array($actionCode)) { |
|
|
|
|
|
|
113
|
5 |
|
$this->optionCode = $actionCode; |
|
114
|
2 |
|
} |
|
115
|
250 |
|
} |
|
116
|
|
|
} |
|
117
|
|
|
|