ElementManagementData   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 165
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 28
c 0
b 0
f 0
dl 0
loc 165
ccs 8
cts 8
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 4
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
 * ElementManagementData
27
 *
28
 * @package Amadeus\Client\Struct\Pnr\AddMultiElements
29
 * @author Dieter Devlieghere <[email protected]>
30
 */
31
class ElementManagementData
32
{
33
    /**
34
     * Segment name "Receive From"
35
     *
36
     * See documentation Amadeus Core webservices
37
     * Functional documentation PNR_AddMultiElements
38
     * [PNR segment or element name, coded codesets (Ref: 110P 1A 98.98.2)]
39
     *
40
     * @var string
41
     */
42
    const SEGNAME_RECEIVE_FROM = "RF";
43
    /**
44
     * Segment name "General Remark"
45
     *
46
     * See documentation Amadeus Core webservices
47
     * Functional documentation PNR_AddMultiElements
48
     * [PNR segment or element name, coded codesets (Ref: 110P 1A 98.98.2)]
49
     *
50
     * @var string
51
     */
52
    const SEGNAME_GENERAL_REMARK = "RM";
53
    /**
54
     * Segment name "Form Of Payment"
55
     *
56
     * @var string
57
     */
58
    const SEGNAME_FORM_OF_PAYMENT = "FP";
59
    /**
60
     * Segment name "Ticketing Element"
61
     *
62
     * @var string
63
     */
64
    const SEGNAME_TICKETING_ELEMENT = "TK";
65
    /**
66
     * AP and related elements
67
     *
68
     * @var string
69
     */
70
    const SEGNAME_CONTACT_ELEMENT = "AP";
71
    /**
72
     * OSI - Other Service Information
73
     *
74
     * @var string
75
     */
76
    const SEGNAME_OTHER_SERVICE_INFORMATION = "OS";
77
    /**
78
     * AI - Accounting Information
79
     *
80
     * @var string
81
     */
82
    const SEGNAME_ACCOUNTING_INFORMATION = "AI";
83
    /**
84
     * SSR - Special Service Request
85
     *
86
     * @var string
87
     */
88
    const SEGNAME_SPECIAL_SERVICE_REQUEST = "SSR";
89
    /**
90
     * AB - Billing Address element
91
     *
92
     * @var string
93
     */
94
    const SEGNAME_ADDRESS_BILLING_STRUCTURED = "AB";
95
    /**
96
     * ABU - Unstructured Billing Address element
97
     *
98
     * @var string
99
     */
100
    const SEGNAME_ADDRESS_BILLING_UNSTRUCTURED = "ABU";
101
    /**
102
     * AM - Mailing address element
103
     *
104
     * @var string
105
     */
106
    const SEGNAME_ADDRESS_MAILING_STRUCTURED = "AM";
107
    /**
108
     * AMU - Unstructured Mailing Address Element
109
     *
110
     * @var string
111
     */
112
    const SEGNAME_ADDRESS_MAILING_UNSTRUCTURED = "AMU";
113
114
    /**
115
     * FT - Tour Code element
116
     *
117
     * @var string
118
     */
119
    const SEGNAME_TOUR_CODE = "FT";
120
121
    /**
122
     * FM - Manual Commission element
123
     *
124
     * @var string
125
     */
126
    const SEGNAME_COMMISSION = "FM";
127
128
    /**
129
     * STR - Seat Request
130
     *
131
     * @var string
132
     */
133
    const SEGNAME_SEAT_REQUEST = "STR";
134
135
    /**
136
     * FHE - Manual Document Registration element - with Eletronic Ticket number
137
     *
138
     * @var string
139
     */
140
    const SEGNAME_MANUAL_DOCUMENT_REGISTRATION_WITH_ET_NUMBER = "FHE";
141
142
    /**
143
     * FS - Miscellaneous Ticketing Information element
144
     *
145
     * @var string
146
     */
147
    const SEGNAME_MISC_TICKET_INFO = 'FS';
148
149
    /**
150
     * FE - Endorsements / Restrictions element
151
     */
152
    const SEGNAME_ENDORSEMENT = 'FE';
153
154
    /**
155
     * FZ - Miscellaneous Information element
156
     */
157
    const SEGNAME_MISC_INFO = 'FZ';
158
159
    /**
160 200
     * FK - shadow AIR office ID element
161
     */
162 200
    const SEGNAME_AIR_OFFICE_ID = 'FK';
163 200
164 80
    /**
165 200
     * Segment name "Individual Security"
166 200
     *
167 80
     * @var string
168 200
     */
169
    const SEGNAME_INDIVIDUAL_SECURITY = "ES";
170
    
171
    /**
172
     * @var Reference
173
     */
174
    public $reference;
175
176
    /**
177
     * [PNR segment or element name, coded codesets (Ref: 110P 1A 98.98.2)]
178
     *
179
     * @var string
180
     */
181
    public $segmentName;
182
183
    /**
184
     * Create new ElementManagementData
185
     *
186
     * @param string|null $segmentName one of the constants SEGNAME_* defined in this class
187
     * @param int|null $tattoo Optional tattoo nr to reference this element
188
     */
189
    public function __construct($segmentName = null, $tattoo = null)
190
    {
191
        if (!is_null($segmentName)) {
192
            $this->segmentName = $segmentName;
193
        }
194
        if (!is_null($tattoo) && is_int($tattoo)) {
195
            $this->reference = new Reference(Reference::QUAL_OTHER, $tattoo);
196
        }
197
    }
198
}
199