Completed
Push — master ( 7535f2...730d3e )
by Dragos
03:30
created

SubscriptionTrait::getPlanUpcoming()   A

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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
/**
8
 * Trait for subscription data.
9
 */
10
trait SubscriptionTrait
11
{
12
13
    /**
14
     * The subscription ID.
15
     *
16
     * @var integer
17
     *
18
     * @JMS\Type("integer")
19
     * @JMS\SerializedName("SUBSCRIPTION_ID")
20
     */
21
    protected $subscriptionId;
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 title.
35
     *
36
     * @var string
37
     *
38
     * @JMS\Type("string")
39
     * @JMS\SerializedName("SUBSCRIPTION_TITLE")
40
     */
41
    protected $subscriptionTitle;
42
43
    /**
44
     * The subscription start.
45
     *
46
     * @var \DateTime
47
     *
48
     * @JMS\Type("DateTime<'Y-m-d H:i:s', 'UTC'>")
49
     * @JMS\SerializedName("START")
50
     */
51
    protected $subscriptionStart;
52
53
    /**
54
     * The subscription next event.
55
     *
56
     * @var \DateTime
57
     *
58
     * @JMS\Type("DateTime<'Y-m-d H:i:s', 'UTC'>")
59
     * @JMS\SerializedName("NEXT_EVENT")
60
     */
61
    protected $nextEvent;
62
63
    /**
64
     * The subscription cancellation date.
65
     *
66
     * @var \DateTime
67
     *
68
     * @JMS\Type("string")
69
     * @JMS\SerializedName("CANCELLATION_DATE")
70
     */
71
    protected $cancellationDate;
72
73
    /**
74
     * The subscription status.
75
     *
76
     * @var string
77
     *
78
     * @JMS\Type("string")
79
     * @JMS\SerializedName("STATUS")
80
     */
81
    protected $status;
82
83
    /**
84
     * The subscription hash.
85
     *
86
     * @var string
87
     *
88
     * @JMS\Type("string")
89
     * @JMS\SerializedName("HASH")
90
     */
91
    protected $hash;
92
93
    /**
94
     * The subscription X-Attribute.
95
     *
96
     * @var array
97
     *
98
     * @JMS\Type("array")
99
     * @JMS\SerializedName("X_ATTRIBUTES")
100
     */
101
    protected $xAttributes = array();
102
103
    /**
104
     * The subscription article number.
105
     *
106
     * @var string
107
     *
108
     * @JMS\Type("string")
109
     * @JMS\SerializedName("ARTICLE_NUMBER")
110
     */
111
    protected $articleNumber;
112
113
    /**
114
     * The subscription quantity.
115
     *
116
     * @var integer
117
     *
118
     * @JMS\Type("integer")
119
     * @JMS\SerializedName("QUANTITY")
120
     */
121
    protected $quantity;
122
123
    /**
124
     * @var SubscriptionPlanObject
125
     *
126
     * @JMS\Type("Speicher210\Fastbill\Api\Model\SubscriptionPlanObject")
127
     * @JMS\SerializedName("PLAN")
128
     */
129
    protected $plan;
130
131
    /**
132
     * The external subscription ID.
133
     *
134
     * @var string
135
     *
136
     * @JMS\Type("string")
137
     * @JMS\SerializedName("SUBSCRIPTION_EXT_UID")
138
     */
139
    protected $subscriptionExternalId;
140
141
    /**
142
     * The invoice title.
143
     *
144
     * @var string
145
     *
146
     * @JMS\Type("string")
147
     * @JMS\SerializedName("INVOICE_TITLE")
148
     */
149
    protected $invoiceTitle;
150
151
    /**
152
     * The last event date and time.
153
     *
154
     * @var \DateTime
155
     *
156
     * @JMS\Type("DateTime<'Y-m-d H:i:s', 'UTC'>")
157
     * @JMS\SerializedName("LAST_EVENT")
158
     */
159
    protected $lastEvent;
160
161
    /**
162
     * The reason for cancellation of a subscription.
163
     *
164
     * @var string
165
     *
166
     * @JMS\Type("string")
167
     * @JMS\SerializedName("CANCELLATION_NOTE")
168
     */
169
    protected $cancellationNote;
170
171
    /**
172
     * @var array
173
     *
174
     * @JMS\Type("array")
175
     * @JMS\SerializedName("ADDONS")
176
     */
177
    protected $addons;
178
179
    /**
180
     * Date and time when the subscription expires.
181
     *
182
     * @var \DateTime
183
     *
184
     * @JMS\Type("DateTime<'Y-m-d H:i:s', 'UTC'>")
185
     * @JMS\SerializedName("EXPIRATION_DATE")
186
     */
187
    protected $expirationDate;
188
189
    /**
190
     * @var SubscriptionPlanObject
191
     *
192
     * @JMS\Type("Speicher210\Fastbill\Api\Model\SubscriptionPlanObject")
193
     * @JMS\SerializedName("PLAN_UPCOMING")
194
     */
195
    protected $planUpcoming;
196
197
    /**
198
     * Get the subscription ID.
199
     *
200
     * @return integer
201
     */
202
    public function getSubscriptionId()
203
    {
204
        return $this->subscriptionId;
205
    }
206
207
    /**
208
     * Set the subscription ID.
209
     *
210
     * @param integer $subscriptionId The subscription ID.
211
     * @return $this
212
     */
213 6
    public function setSubscriptionId($subscriptionId)
214
    {
215 6
        $this->subscriptionId = $subscriptionId;
216
217 6
        return $this;
218
    }
219
220
    /**
221
     * Get the customer ID.
222
     *
223
     * @return integer
224
     */
225
    public function getCustomerId()
226
    {
227
        return $this->customerId;
228
    }
229
230
    /**
231
     * Set the customer ID.
232
     *
233
     * @param integer $customerId The ID of the customer.
234
     * @return $this
235
     */
236 9
    public function setCustomerId($customerId)
237
    {
238 9
        $this->customerId = $customerId;
239
240 9
        return $this;
241
    }
242
243
    /**
244
     * Get the external subscription ID.
245
     *
246
     * @return string
247
     */
248
    public function getSubscriptionExternalId()
249
    {
250
        return $this->subscriptionExternalId;
251
    }
252
253
    /**
254
     * Set the external subscription ID.
255
     *
256
     * @param string $subscriptionExternalId The external subscription ID.
257
     * @return $this
258
     */
259
    public function setSubscriptionExternalId($subscriptionExternalId)
260
    {
261
        $this->subscriptionExternalId = $subscriptionExternalId;
262
263
        return $this;
264
    }
265
266
    /**
267
     * Get the subscription title.
268
     *
269
     * @return string
270
     */
271
    public function getSubscriptionTitle()
272
    {
273
        return $this->subscriptionTitle;
274
    }
275
276
    /**
277
     * Set the subscription title.
278
     *
279
     * @param string $subscriptionTitle The title.
280
     * @return $this
281
     */
282 6
    public function setSubscriptionTitle($subscriptionTitle)
283
    {
284 6
        $this->subscriptionTitle = $subscriptionTitle;
285
286 6
        return $this;
287
    }
288
289
    /**
290
     * Get the subscription start.
291
     *
292
     * @return \DateTime
293
     */
294
    public function getSubscriptionStart()
295
    {
296
        return $this->subscriptionStart;
297
    }
298
299
    /**
300
     * Set the subscription start.
301
     *
302
     * @param \DateTime $subscriptionStart
303
     * @return $this
304
     */
305
    public function setSubscriptionStart($subscriptionStart)
306
    {
307
        $this->subscriptionStart = $subscriptionStart;
308
309
        return $this;
310
    }
311
312
    /**
313
     * @return \DateTime
314
     */
315
    public function getNextEvent()
316
    {
317
        return $this->nextEvent;
318
    }
319
320
    /**
321
     * @param \DateTime $nextEvent
322
     * @return $this
323
     */
324
    public function setNextEvent($nextEvent)
325
    {
326
        $this->nextEvent = $nextEvent;
327
328
        return $this;
329
    }
330
331
    /**
332
     * Get the cancellation date and time.
333
     *
334
     * @return \DateTime
335
     */
336 6
    public function getCancellationDate()
337
    {
338 6
        return $this->cancellationDate;
339
    }
340
341
    /**
342
     * Set the cancellation date and time.
343
     *
344
     * @param \DateTime $cancellationDate The cancellation date and time.
345
     * @return $this
346
     */
347 6
    public function setCancellationDate($cancellationDate)
348
    {
349 6
        $this->cancellationDate = $cancellationDate;
350
351 6
        return $this;
352
    }
353
354
    /**
355
     * Get the subscription status.
356
     *
357
     * @return string
358
     */
359 12
    public function getStatus()
360
    {
361 12
        return $this->status;
362
    }
363
364
    /**
365
     * Set the subscription status.
366
     *
367
     * @param string $status The subscription status.
368
     * @return $this
369
     */
370 12
    public function setStatus($status)
371
    {
372 12
        $this->status = $status;
373
374 12
        return $this;
375
    }
376
377
    /**
378
     * Get the hash.
379
     *
380
     * @return string
381
     */
382
    public function getHash()
383
    {
384
        return $this->hash;
385
    }
386
387
    /**
388
     * Set the hash.
389
     *
390
     * @param string $hash The hash.
391
     * @return $this
392
     */
393
    public function setHash($hash)
394
    {
395
        $this->hash = $hash;
396
397
        return $this;
398
    }
399
400
    /**
401
     * @return array
402
     */
403
    public function getXAttributes()
404
    {
405
        return $this->xAttributes;
406
    }
407
408
    /**
409
     * @param array $xAttributes
410
     * @return $this
411
     */
412
    public function setXAttributes(array $xAttributes)
413
    {
414
        $this->xAttributes = $xAttributes;
415
416
        return $this;
417
    }
418
419
    /**
420
     * @return int
421
     */
422
    public function getArticleNumber()
423
    {
424
        return $this->articleNumber;
425
    }
426
427
    /**
428
     * Set the article number.
429
     *
430
     * @param string $articleNumber The article number.
431
     * @return $this
432
     */
433 3
    public function setArticleNumber($articleNumber)
434
    {
435 3
        $this->articleNumber = $articleNumber;
436
437 3
        return $this;
438
    }
439
440
    /**
441
     * @return integer
442
     */
443
    public function getQuantity()
444
    {
445
        return $this->quantity;
446
    }
447
448
    /**
449
     * Set the quantity.
450
     *
451
     * @param integer $quantity The quantity.
452
     * @return $this
453
     */
454
    public function setQuantity($quantity)
455
    {
456
        $this->quantity = $quantity;
457
458
        return $this;
459
    }
460
461
    /**
462
     * @return SubscriptionPlanObject
463
     */
464
    public function getPlan()
465
    {
466
        return $this->plan;
467
    }
468
469
    /**
470
     * @param SubscriptionPlanObject $plan
471
     * @return $this
472
     */
473
    public function setPlan($plan)
474
    {
475
        $this->plan = $plan;
476
477
        return $this;
478
    }
479
480
    /**
481
     * @return string
482
     */
483
    public function getInvoiceTitle()
484
    {
485
        return $this->invoiceTitle;
486
    }
487
488
    /**
489
     * @param string $invoiceTitle
490
     * @return $this
491
     */
492
    public function setInvoiceTitle($invoiceTitle)
493
    {
494
        $this->invoiceTitle = $invoiceTitle;
495
496
        return $this;
497
    }
498
499
    /**
500
     * @return mixed
501
     */
502
    public function getLastEvent()
503
    {
504
        return $this->lastEvent;
505
    }
506
507
    /**
508
     * @param mixed $lastEvent
509
     * @return $this
510
     */
511
    public function setLastEvent($lastEvent)
512
    {
513
        $this->lastEvent = $lastEvent;
514
515
        return $this;
516
    }
517
518
    /**
519
     * @return array
520
     */
521
    public function getAddons()
522
    {
523
        return $this->addons;
524
    }
525
526
    /**
527
     * @param array $addons
528
     * @return $this
529
     */
530
    public function setAddons($addons)
531
    {
532
        $this->addons = $addons;
533
534
        return $this;
535
    }
536
537
    /**
538
     * @return \DateTime
539
     */
540
    public function getExpirationDate()
541
    {
542
        return $this->expirationDate;
543
    }
544
545
    /**
546
     * @param \DateTime $expirationDate
547
     * @return $this
548
     */
549
    public function setExpirationDate($expirationDate)
550
    {
551
        $this->expirationDate = $expirationDate;
552
553
        return $this;
554
    }
555
556
    /**
557
     * @return SubscriptionPlanObject
558
     */
559
    public function getPlanUpcoming()
560
    {
561
        return $this->planUpcoming;
562
    }
563
564
    /**
565
     * @param SubscriptionPlanObject $planUpcoming
566
     * @return $this
567
     */
568
    public function setPlanUpcoming($planUpcoming)
569
    {
570
        $this->planUpcoming = $planUpcoming;
571
572
        return $this;
573
    }
574
575
    /**
576
     * Get the cancellation note.
577
     *
578
     * @return string
579
     */
580
    public function getCancellationNote()
581
    {
582
        return $this->cancellationNote;
583
    }
584
585
    /**
586
     * Set the cancellation note.
587
     *
588
     * @param string $cancellationNote The cancellation note.
589
     * @return $this
590
     */
591
    public function setCancellationNote($cancellationNote)
592
    {
593
        $this->cancellationNote = $cancellationNote;
594
595
        return $this;
596
    }
597
}
598