ElementManagementData   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 139
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 139
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 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
     * @var Reference
144
     */
145
    public $reference;
146
147
    /**
148
     * [PNR segment or element name, coded codesets (Ref: 110P 1A 98.98.2)]
149
     *
150
     * @var string
151
     */
152
    public $segmentName;
153
154
    /**
155
     * Create new ElementManagementData
156
     *
157
     * @param string|null $segmentName one of the constants SEGNAME_* defined in this class
158
     * @param int|null $tattoo Optional tattoo nr to reference this element
159
     */
160
    public function __construct($segmentName = null, $tattoo = null)
161
    {
162
        if (!is_null($segmentName)) {
163
            $this->segmentName = $segmentName;
164
        }
165
        if (!is_null($tattoo) && is_int($tattoo)) {
166
            $this->reference = new Reference(Reference::QUAL_OTHER, $tattoo);
167
        }
168
    }
169
}
170