Plan::setIsSubscribed()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
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 42
    public function setId(string $id): void
76
    {
77 42
        $this->id = $id;
78 42
    }
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 41
    public function setName(string $name): void
92
    {
93 41
        $this->name = $name;
94 41
    }
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 40
    public function setPrice(float $price): void
108
    {
109 40
        $this->price = $price;
110 40
    }
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 39
    public function setCurrency(string $currency): void
124
    {
125 39
        $this->currency = $currency;
126 39
    }
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 38
    public function setFrequency(string $frequency): void
140
    {
141 38
        $this->frequency = $frequency;
142 38
    }
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 37
    public function setLegacyId(string $legacyId): void
156
    {
157 37
        $this->legacyId = $legacyId;
158 37
    }
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 36
    public function setIsSubscribed(bool $isSubscribed): void
172
    {
173 36
        $this->isSubscribed = $isSubscribed;
174 36
    }
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 35
    public function setCanSubscribe(bool $canSubscribe): void
188
    {
189 35
        $this->canSubscribe = $canSubscribe;
190 35
    }
191
}
192