Passed
Push — master ( 6348d2...e389d8 )
by Ross
02:39
created

Plan::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 2
crap 1
1
<?php
2
declare(strict_types = 1);
3
/**
4
 *
5
 * Copyright (C) 2018  Ross Mitchell
6
 *
7
 * This file is part of RossMitchell/UpdateCloudFlare.
8
 *
9
 * RossMitchell/UpdateCloudFlare is free software: you can redistribute
10
 * it and/or modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation, either version 3 of the
12
 * License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
 */
22
23
namespace RossMitchell\UpdateCloudFlare\Responses\Results;
24
25
/**
26
 * Class Plan
27
 * @package RossMitchell\UpdateCloudFlare\Responses\Results
28
 */
29
class Plan
30
{
31
    /**
32
     * @var string
33
     */
34
    private $id;
35
    /**
36
     * @var string
37
     */
38
    private $name;
39
    /**
40
     * @var float
41
     */
42
    private $price;
43
    /**
44
     * @var string
45
     */
46
    private $currency;
47
    /**
48
     * @var string
49
     */
50
    private $frequency;
51
    /**
52
     * @var string
53
     */
54
    private $legacyId;
55
    /**
56
     * @var bool
57
     */
58
    private $isSubscribed;
59
    /**
60
     * @var bool
61
     */
62
    private $canSubscribe;
63
64
    /**
65
     * @return string
66
     */
67 1
    public function getId(): string
68
    {
69 1
        return $this->id;
70
    }
71
72
    /**
73
     * @param string $id
74
     */
75 33
    public function setId(string $id)
76
    {
77 33
        $this->id = $id;
78 33
    }
79
80
    /**
81
     * @return string
82
     */
83 1
    public function getName(): string
84
    {
85 1
        return $this->name;
86
    }
87
88
    /**
89
     * @param string $name
90
     */
91 32
    public function setName(string $name)
92
    {
93 32
        $this->name = $name;
94 32
    }
95
96
    /**
97
     * @return float
98
     */
99 1
    public function getPrice(): float
100
    {
101 1
        return $this->price;
102
    }
103
104
    /**
105
     * @param float $price
106
     */
107 31
    public function setPrice(float $price)
108
    {
109 31
        $this->price = $price;
110 31
    }
111
112
    /**
113
     * @return string
114
     */
115 1
    public function getCurrency(): string
116
    {
117 1
        return $this->currency;
118
    }
119
120
    /**
121
     * @param string $currency
122
     */
123 30
    public function setCurrency(string $currency)
124
    {
125 30
        $this->currency = $currency;
126 30
    }
127
128
    /**
129
     * @return string
130
     */
131 1
    public function getFrequency(): string
132
    {
133 1
        return $this->frequency;
134
    }
135
136
    /**
137
     * @param string $frequency
138
     */
139 29
    public function setFrequency(string $frequency)
140
    {
141 29
        $this->frequency = $frequency;
142 29
    }
143
144
    /**
145
     * @return string
146
     */
147 1
    public function getLegacyId(): string
148
    {
149 1
        return $this->legacyId;
150
    }
151
152
    /**
153
     * @param string $legacyId
154
     */
155 28
    public function setLegacyId(string $legacyId)
156
    {
157 28
        $this->legacyId = $legacyId;
158 28
    }
159
160
    /**
161
     * @return bool
162
     */
163 1
    public function getIsSubscribed(): bool
164
    {
165 1
        return $this->isSubscribed;
166
    }
167
168
    /**
169
     * @param bool $isSubscribed
170
     */
171 27
    public function setIsSubscribed(bool $isSubscribed)
172
    {
173 27
        $this->isSubscribed = $isSubscribed;
174 27
    }
175
176
    /**
177
     * @return bool
178
     */
179 1
    public function getCanSubscribe(): bool
180
    {
181 1
        return $this->canSubscribe;
182
    }
183
184
    /**
185
     * @param bool $canSubscribe
186
     */
187 26
    public function setCanSubscribe(bool $canSubscribe)
188
    {
189 26
        $this->canSubscribe = $canSubscribe;
190 26
    }
191
}
192