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\Ticket; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* ItemReference |
27
|
|
|
* |
28
|
|
|
* @package Amadeus\Client\Struct\Ticket |
29
|
|
|
* @author Dieter Devlieghere <[email protected]> |
30
|
|
|
*/ |
31
|
|
|
class ItemReference |
32
|
|
|
{ |
33
|
|
|
/** |
34
|
|
|
* TST TST/fare reference number |
35
|
|
|
*/ |
36
|
|
|
const REFTYPE_TST = 'TST'; |
37
|
|
|
/** |
38
|
|
|
* TSM TSM/fare reference number |
39
|
|
|
*/ |
40
|
|
|
const REFTYPE_TSM = 'TSM'; |
41
|
|
|
/** |
42
|
|
|
* Passenger/traveller reference number |
43
|
|
|
*/ |
44
|
|
|
const REFTYPE_PASSENGER = "P"; |
45
|
|
|
/** |
46
|
|
|
* Segment/service reference number |
47
|
|
|
*/ |
48
|
|
|
const REFTYPE_SEGMENT = "S"; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* self::REFTYPE_* |
52
|
|
|
* |
53
|
|
|
* @var string |
54
|
|
|
*/ |
55
|
|
|
public $referenceType; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @var int |
59
|
|
|
*/ |
60
|
|
|
public $uniqueReference; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @var IdDescription |
64
|
|
|
*/ |
65
|
|
|
public $iDDescription; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* ItemReference constructor. |
69
|
|
|
* |
70
|
|
|
* @param int $reference |
71
|
|
|
* @param string $type |
72
|
|
|
* @param int|null $sequenceNr |
73
|
|
|
*/ |
74
|
65 |
|
public function __construct($reference, $type = self::REFTYPE_TST, $sequenceNr = null) |
75
|
|
|
{ |
76
|
65 |
|
$this->uniqueReference = $reference; |
77
|
65 |
|
$this->referenceType = $type; |
78
|
|
|
|
79
|
65 |
|
if (!is_null($sequenceNr)) { |
80
|
5 |
|
$this->iDDescription = new IdDescription($sequenceNr); |
81
|
2 |
|
} |
82
|
65 |
|
} |
83
|
|
|
} |
84
|
|
|
|