Ssr   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 106
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 106
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 2
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
use Amadeus\Client\RequestOptions\Pnr\Element\ServiceRequest as ServiceRequestOptions;
26
27
/**
28
 * Ssr
29
 *
30
 * @package Amadeus\Client\Struct\Pnr\AddMultiElements
31
 */
32
class Ssr
33
{
34
    /**
35
     * Holds confirmed
36
     */
37
    const STATUS_HOLD_CONFIRMED = "HK";
38
    /**
39
     * Sold (on free sales basis)
40
     */
41
    const STATUS_SOLD_FREE_SALES = "FS";
42
    /**
43
     * Sold
44
     */
45
    const STATUS_SOLD = "SS";
46
    /**
47
     * Have requested
48
     */
49
    const STATUS_REQUESTED = "HN";
50
    /**
51
     * Confirming
52
     */
53
    const STATUS_CONFIRMING = "KK";
54
    /**
55
     * Need. Reply required indicating action taken using appropriate code
56
     */
57
    const STATUS_NEED = "NN";
58
59
    /**
60
     * OTHS / DOCS / ....
61
     *
62
     * @var string
63
     */
64
    public $type;
65
66
    /**
67
     * self::STATUS_*
68
     *
69
     * @var string
70
     */
71
    public $status;
72
73
    /**
74
     * Amount
75
     *
76
     * @var int
77
     */
78
    public $quantity;
79
80
    /**
81
     * Airline or other provider code.
82
     *
83
     * @var string
84
     */
85
    public $companyId;
86
87
    /**
88
     *
89
     * B Boarding pass may not be issued until
90
     * ICS Informational segment for codeshare
91
     * N No action required
92
     * NB No a boarding pass may not be issued
93
     * P01 Explosion indicator for SSR input
94
     * P02 Validated indicator of Frequent Flyer SSR
95
     * Y Yes a boarding pass may be issued
96
     *
97
     * @var string
98
     */
99
    public $indicator;
100
101
    /**
102
     * @var string
103
     */
104
    public $boardpoint;
105
106
    /**
107
     * @var string
108
     */
109
    public $offpoint;
110
111
    /**
112
     * Max 2 elements
113
     *
114
     * @var string[]
115
     */
116
    public $freetext = [];
117
118
119
    /**
120
     * Ssr constructor.
121
     *
122
     * @param ServiceRequestOptions|null $options
123
     */
124
    public function __construct(ServiceRequestOptions $options = null)
125
    {
126
        if (!is_null($options)) {
127
            $this->status = $options->status;
128
            $this->type = $options->type;
129
            $this->quantity = $options->quantity;
130
            $this->companyId = $options->company;
131
            $this->indicator = $options->indicator;
132
            $this->boardpoint = $options->boardPoint;
133
            $this->offpoint = $options->offPoint;
134
            $this->freetext = $options->freeText;
135
        }
136
    }
137
}
138