1 | <?php |
||
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'>") |
||
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'>") |
||
59 | * @JMS\SerializedName("NEXT_EVENT") |
||
60 | */ |
||
61 | protected $nextEvent; |
||
62 | |||
63 | /** |
||
64 | * The subscription cancellation date. |
||
65 | * |
||
66 | * @var \DateTime |
||
67 | * |
||
68 | * @JMS\Type("DateTime<'Y-m-d H:i:s'>") |
||
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'>") |
||
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'>") |
||
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 | 3 | public function getSubscriptionId() |
|
203 | { |
||
204 | 3 | return $this->subscriptionId; |
|
205 | } |
||
206 | |||
207 | /** |
||
208 | * Set the subscription ID. |
||
209 | * |
||
210 | * @param integer $subscriptionId The subscription ID. |
||
211 | * @return $this |
||
212 | */ |
||
213 | 9 | public function setSubscriptionId($subscriptionId) |
|
219 | |||
220 | /** |
||
221 | * Get the customer ID. |
||
222 | * |
||
223 | * @return integer |
||
224 | */ |
||
225 | public function getCustomerId() |
||
229 | |||
230 | /** |
||
231 | * Set the customer ID. |
||
232 | * |
||
233 | * @param integer $customerId The ID of the customer. |
||
234 | * @return $this |
||
235 | */ |
||
236 | 15 | public function setCustomerId($customerId) |
|
242 | |||
243 | /** |
||
244 | * Get the external subscription ID. |
||
245 | * |
||
246 | * @return string |
||
247 | */ |
||
248 | public function getSubscriptionExternalId() |
||
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) |
||
265 | |||
266 | /** |
||
267 | * Get the subscription title. |
||
268 | * |
||
269 | * @return string |
||
270 | */ |
||
271 | public function getSubscriptionTitle() |
||
275 | |||
276 | /** |
||
277 | * Set the subscription title. |
||
278 | * |
||
279 | * @param string $subscriptionTitle The title. |
||
280 | * @return $this |
||
281 | */ |
||
282 | 6 | public function setSubscriptionTitle($subscriptionTitle) |
|
288 | |||
289 | /** |
||
290 | * Get the subscription start. |
||
291 | * |
||
292 | * @return \DateTime |
||
293 | */ |
||
294 | public function getSubscriptionStart() |
||
298 | |||
299 | /** |
||
300 | * Set the subscription start. |
||
301 | * |
||
302 | * @param \DateTime $subscriptionStart |
||
303 | * @return $this |
||
304 | */ |
||
305 | 6 | public function setSubscriptionStart($subscriptionStart) |
|
306 | { |
||
307 | 6 | $this->subscriptionStart = $subscriptionStart; |
|
308 | |||
309 | 6 | return $this; |
|
310 | } |
||
311 | |||
312 | /** |
||
313 | * @return \DateTime |
||
314 | */ |
||
315 | public function getNextEvent() |
||
319 | |||
320 | /** |
||
321 | * @param \DateTime $nextEvent |
||
322 | * @return $this |
||
323 | */ |
||
324 | 6 | public function setNextEvent($nextEvent) |
|
325 | { |
||
326 | 6 | $this->nextEvent = $nextEvent; |
|
327 | |||
328 | 6 | return $this; |
|
329 | } |
||
330 | |||
331 | /** |
||
332 | * Get the cancellation date and time. |
||
333 | * |
||
334 | * @return \DateTime |
||
335 | */ |
||
336 | public function getCancellationDate() |
||
340 | |||
341 | /** |
||
342 | * Set the cancellation date and time. |
||
343 | * |
||
344 | * @param \DateTime $cancellationDate The cancellation date and time. |
||
345 | * @return $this |
||
346 | */ |
||
347 | 9 | public function setCancellationDate($cancellationDate) |
|
348 | { |
||
349 | 9 | $this->cancellationDate = $cancellationDate; |
|
350 | |||
351 | 9 | return $this; |
|
352 | } |
||
353 | |||
354 | /** |
||
355 | * Get the subscription status. |
||
356 | * |
||
357 | * @return string |
||
358 | */ |
||
359 | 18 | public function getStatus() |
|
360 | { |
||
361 | 18 | return $this->status; |
|
362 | } |
||
363 | |||
364 | /** |
||
365 | * Set the subscription status. |
||
366 | * |
||
367 | * @param string $status The subscription status. |
||
368 | * @return $this |
||
369 | */ |
||
370 | 18 | public function setStatus($status) |
|
371 | { |
||
372 | 18 | $this->status = $status; |
|
373 | |||
374 | 18 | return $this; |
|
375 | } |
||
376 | |||
377 | /** |
||
378 | * Get the hash. |
||
379 | * |
||
380 | * @return string |
||
381 | */ |
||
382 | public function getHash() |
||
386 | |||
387 | /** |
||
388 | * Set the hash. |
||
389 | * |
||
390 | * @param string $hash The hash. |
||
391 | * @return $this |
||
392 | */ |
||
393 | public function setHash($hash) |
||
399 | |||
400 | /** |
||
401 | * @return array |
||
402 | */ |
||
403 | public function getXAttributes() |
||
407 | |||
408 | /** |
||
409 | * @param array $xAttributes |
||
410 | * @return $this |
||
411 | */ |
||
412 | public function setXAttributes(array $xAttributes) |
||
418 | |||
419 | /** |
||
420 | * @return int |
||
421 | */ |
||
422 | public function getArticleNumber() |
||
426 | |||
427 | /** |
||
428 | * Set the article number. |
||
429 | * |
||
430 | * @param string $articleNumber The article number. |
||
431 | * @return $this |
||
432 | */ |
||
433 | 9 | public function setArticleNumber($articleNumber) |
|
439 | |||
440 | /** |
||
441 | * @return integer |
||
442 | */ |
||
443 | public function getQuantity() |
||
447 | |||
448 | /** |
||
449 | * Set the quantity. |
||
450 | * |
||
451 | * @param integer $quantity The quantity. |
||
452 | * @return $this |
||
453 | */ |
||
454 | public function setQuantity($quantity) |
||
460 | |||
461 | /** |
||
462 | * @return SubscriptionPlanObject |
||
463 | */ |
||
464 | public function getPlan() |
||
468 | |||
469 | /** |
||
470 | * @param SubscriptionPlanObject $plan |
||
471 | * @return $this |
||
472 | */ |
||
473 | public function setPlan($plan) |
||
479 | |||
480 | /** |
||
481 | * @return string |
||
482 | */ |
||
483 | public function getInvoiceTitle() |
||
487 | |||
488 | /** |
||
489 | * @param string $invoiceTitle |
||
490 | * @return $this |
||
491 | */ |
||
492 | public function setInvoiceTitle($invoiceTitle) |
||
498 | |||
499 | /** |
||
500 | * @return mixed |
||
501 | */ |
||
502 | public function getLastEvent() |
||
506 | |||
507 | /** |
||
508 | * @param mixed $lastEvent |
||
509 | * @return $this |
||
510 | */ |
||
511 | public function setLastEvent($lastEvent) |
||
517 | |||
518 | /** |
||
519 | * @return array |
||
520 | */ |
||
521 | public function getAddons() |
||
525 | |||
526 | /** |
||
527 | * @param array $addons |
||
528 | * @return $this |
||
529 | */ |
||
530 | public function setAddons($addons) |
||
536 | |||
537 | /** |
||
538 | * @return \DateTime |
||
539 | */ |
||
540 | public function getExpirationDate() |
||
544 | |||
545 | /** |
||
546 | * @param \DateTime $expirationDate |
||
547 | * @return $this |
||
548 | */ |
||
549 | public function setExpirationDate($expirationDate) |
||
555 | |||
556 | /** |
||
557 | * @return SubscriptionPlanObject |
||
558 | */ |
||
559 | public function getPlanUpcoming() |
||
563 | |||
564 | /** |
||
565 | * @param SubscriptionPlanObject $planUpcoming |
||
566 | * @return $this |
||
567 | */ |
||
568 | public function setPlanUpcoming($planUpcoming) |
||
574 | |||
575 | /** |
||
576 | * Get the cancellation note. |
||
577 | * |
||
578 | * @return string |
||
579 | */ |
||
580 | public function getCancellationNote() |
||
584 | |||
585 | /** |
||
586 | * Set the cancellation note. |
||
587 | * |
||
588 | * @param string $cancellationNote The cancellation note. |
||
589 | * @return $this |
||
590 | */ |
||
591 | public function setCancellationNote($cancellationNote) |
||
597 | } |
||
598 |