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