RecordId   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 13
c 1
b 0
f 1
dl 0
loc 59
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
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\MiniRule;
24
25
/**
26
 * RecordId
27
 *
28
 * @package Amadeus\Client\Struct\MiniRule
29
 * @author Dieter Devlieghere <[email protected]>
30
 */
31
class RecordId
32
{
33
    /**
34
     * To retrieve minirules for ALL pricing references of the given type on a PNR.
35
     */
36
    const PRICING_ID_ALL = "ALL";
37
    /**
38
     * Offer element tattoo
39
     */
40
    const REFERENCE_TYPE_OFFER = "OF";
41
    /**
42
     * Transitional Stored Ticket
43
     */
44
    const REFERENCE_TYPE_TST = "TST";
45
    /**
46
     * Product Quotation Record Reference
47
     */
48
    const REFERENCE_TYPE_PROD_QUOTATION = "PQR";
49
    /**
50
     * Fare Recommendation Number
51
     */
52
    const REFERENCE_TYPE_FARE_RECOMMENDATION_NUMBER = "FRN";
53
    /**
54
     * Fare Upsell reco. Number
55
     */
56
    const REFERENCE_TYPE_FARE_UPSELL_RECOMMENDATION_NUMBER = "FUN";
57
    /**
58
     * Record Locator
59
     */
60
    const REFERENCE_TYPE_RECORD_LOCATOR = "PNR";
61
    /**
62
     * Ticket Number
63
     */
64
    const REFERENCE_TYPE_TICKET_NUMBER = "TKT";
65
66
    /**
67
     * self::REFERENCE_TYPE_*
68
     *
69
     * @var string
70 25
     */
71
    public $referenceType;
72 25
73 25
    /**
74 25
     * Identification number or self::PRICING_ID_ALL for all
75
     *
76
     * @var int|string
77
     */
78
    public $uniqueReference;
79
80
    /**
81
     * RecordId constructor.
82
     *
83
     * @param int|string $pricingId a reference or self::PRICING_ID_ALL
84
     * @param string $pricingType
85
     */
86
    public function __construct($pricingId, $pricingType)
87
    {
88
        $this->referenceType = $pricingType;
89
        $this->uniqueReference = $pricingId;
90
    }
91
}
92