GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Response::getUnitPrice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Speicher210\Monsum\Api\Service\Subscription\GetUsageData;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Monsum\Api\AbstractResponse;
7
8
/**
9
 * Response when getting usage data for a subscription.
10
 */
11
class Response extends AbstractResponse
12
{
13
    /**
14
     * The usage data ID.
15
     *
16
     * @var string
17
     *
18
     * @JMS\Type("string")
19
     * @JMS\SerializedName("USAGEDATA_ID")
20
     */
21
    protected $usageDataId;
22
23
    /**
24
     * The customer ID.
25
     *
26
     * @var integer
27
     *
28
     * @JMS\Type("integer")
29
     * @JMS\SerializedName("CUSTOMER_ID")
30
     */
31
    protected $customerId;
32
33
    /**
34
     * The subscription ID.
35
     *
36
     * @var integer
37
     *
38
     * @JMS\Type("integer")
39
     * @JMS\SerializedName("SUBSCRIPTION_ID")
40
     */
41
    protected $subscriptionId;
42
43
    /**
44
     * The article ID.
45
     *
46
     * @var integer
47
     *
48
     * @JMS\Type("integer")
49
     * @JMS\SerializedName("ARTICLE_ID")
50
     */
51
    protected $articleId;
52
53
    /**
54
     * The unit price.
55
     *
56
     * @var float
57
     *
58
     * @JMS\Type("float")
59
     * @JMS\SerializedName("UNIT_PRICE")
60
     */
61
    protected $unitPrice;
62
63
    /**
64
     * The description of the addon.
65
     *
66
     * @var string
67
     *
68
     * @JMS\Type("string")
69
     * @JMS\SerializedName("DESCRIPTION")
70
     */
71
    protected $description;
72
73
    /**
74
     * The currency code.
75
     *
76
     * @var string
77
     *
78
     * @JMS\Type("string")
79
     * @JMS\SerializedName("CURRENCY_CODE")
80
     */
81
    protected $currencyCode;
82
83
    /**
84
     * The usage date.
85
     *
86
     * @var \DateTime
87
     *
88
     * @JMS\Type("DateTime<'Y-m-d H:i:s'>")
89
     * @JMS\SerializedName("USAGE_DATE")
90
     */
91
    protected $usageDate;
92
93
    /**
94
     * Date of creation.
95
     *
96
     * @var \DateTime
97
     *
98
     * @JMS\Type("DateTime<'Y-m-d H:i:s'>")
99
     * @JMS\SerializedName("CREATED")
100
     */
101
    protected $created;
102
103
    /**
104
     * Quantity.
105
     *
106
     * @var integer
107
     *
108
     * @JMS\Type("integer")
109
     * @JMS\SerializedName("QUANTITY")
110
     */
111
    protected $quantity;
112
113
    /**
114
     * Get the usage data ID.
115
     *
116
     * @return string
117
     */
118
    public function getUsageDataId()
119
    {
120
        return $this->usageDataId;
121
    }
122
123
    /**
124
     * Set the usage data ID.
125
     *
126
     * @param string $usageDataId The usage data ID.
127
     * @return Response
128
     */
129
    public function setUsageDataId($usageDataId)
130
    {
131
        $this->usageDataId = $usageDataId;
132
133
        return $this;
134
    }
135
136
    /**
137
     * Get the customer ID.
138
     *
139
     * @return integer
140
     */
141
    public function getCustomerId()
142
    {
143
        return $this->customerId;
144
    }
145
146
    /**
147
     * Set the customer ID.
148
     *
149
     * @param integer $customerId The ID.
150
     * @return Response
151
     */
152
    public function setCustomerId($customerId)
153
    {
154
        $this->customerId = $customerId;
155
156
        return $this;
157
    }
158
159
    /**
160
     * Get the subscription ID.
161
     *
162
     * @return integer
163
     */
164
    public function getSubscriptionId()
165
    {
166
        return $this->subscriptionId;
167
    }
168
169
    /**
170
     * Set the subscription ID.
171
     *
172
     * @param integer $subscriptionId The subscription ID.
173
     * @return Response
174
     */
175
    public function setSubscriptionId($subscriptionId)
176
    {
177
        $this->subscriptionId = $subscriptionId;
178
179
        return $this;
180
    }
181
182
    /**
183
     * Get the article ID.
184
     *
185
     * @return integer
186
     */
187
    public function getArticleId()
188
    {
189
        return $this->articleId;
190
    }
191
192
    /**
193
     * Set the subscription ID.
194
     *
195
     * @param integer $articleId The article ID.
196
     * @return Response
197
     */
198
    public function setArticleId($articleId)
199
    {
200
        $this->articleId = $articleId;
201
202
        return $this;
203
    }
204
205
    /**
206
     * Get the unit price.
207
     *
208
     * @return float
209
     */
210
    public function getUnitPrice()
211
    {
212
        return $this->unitPrice;
213
    }
214
215
    /**
216
     * Set the unit price.
217
     *
218
     * @param float $unitPrice The price.
219
     * @return Response
220
     */
221
    public function setUnitPrice($unitPrice)
222
    {
223
        $this->unitPrice = $unitPrice;
224
225
        return $this;
226
    }
227
228
    /**
229
     * Get the description.
230
     *
231
     * @return string
232
     */
233
    public function getDescription()
234
    {
235
        return $this->description;
236
    }
237
238
    /**
239
     * Set the description.
240
     *
241
     * @param string $description The description.
242
     * @return Response
243
     */
244
    public function setDescription($description)
245
    {
246
        $this->description = $description;
247
248
        return $this;
249
    }
250
251
    /**
252
     * Get the currency code.
253
     *
254
     * @return string
255
     */
256
    public function getCurrencyCode()
257
    {
258
        return $this->currencyCode;
259
    }
260
261
    /**
262
     * Set the currency code.
263
     *
264
     * @param string $currencyCode The currency code.
265
     * @return Response
266
     */
267
    public function setCurrencyCode($currencyCode)
268
    {
269
        $this->currencyCode = $currencyCode;
270
271
        return $this;
272
    }
273
274
    /**
275
     * Get the usage date.
276
     *
277
     * @return \DateTime
278
     */
279
    public function getUsageDate()
280
    {
281
        return $this->usageDate;
282
    }
283
284
    /**
285
     * Set the usage date.
286
     *
287
     * @param \DateTime $usageDate The usage date.
288
     * @return Response
289
     */
290
    public function setUsageDate(\DateTime $usageDate)
291
    {
292
        $this->usageDate = $usageDate;
293
294
        return $this;
295
    }
296
297
    /**
298
     * Get the date and time when the user was created.
299
     *
300
     * @return \DateTime
301
     */
302
    public function getCreated()
303
    {
304
        return $this->created;
305
    }
306
307
    /**
308
     * Set the date and time when the user was created.
309
     *
310
     * @param \DateTime $created The creation date and time.
311
     * @return Response
312
     */
313
    public function setCreated(\DateTime $created)
314
    {
315
        $this->created = $created;
316
317
        return $this;
318
    }
319
320
    /**
321
     * Get the quantity.
322
     *
323
     * @return integer
324
     */
325
    public function getQuantity()
326
    {
327
        return $this->quantity;
328
    }
329
330
    /**
331
     * Set the quantity.
332
     *
333
     * @param integer $quantity The quantity.
334
     * @return Response
335
     */
336
    public function setQuantity($quantity)
337
    {
338
        if ($quantity < 1) {
339
            throw new \InvalidArgumentException('Quantity must be bigger than 0.');
340
        }
341
        $this->quantity = $quantity;
342
343
        return $this;
344
    }
345
}
346