1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the zibios/wrike-php-jmsserializer package. |
5
|
|
|
* |
6
|
|
|
* (c) Zbigniew Ślązak |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Zibios\WrikePhpJmsserializer\Model\Common; |
13
|
|
|
|
14
|
|
|
use JMS\Serializer\Annotation as SA; |
15
|
|
|
use Zibios\WrikePhpJmsserializer\Model\AbstractModel; |
16
|
|
|
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Subscription Model. |
20
|
|
|
*/ |
21
|
|
|
class SubscriptionModel extends AbstractModel implements ResourceModelInterface |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* Subscription type. |
25
|
|
|
* |
26
|
|
|
* Enum: Free, Premium, Business, CreativeBusiness, Enterprise, CreativeEnterprise |
27
|
|
|
* |
28
|
|
|
* @see \Zibios\WrikePhpLibrary\Enum\SubscriptionTypeEnum |
29
|
|
|
* |
30
|
|
|
* @SA\Type("string") |
31
|
|
|
* @SA\SerializedName("type") |
32
|
|
|
* |
33
|
|
|
* @var string|null |
34
|
|
|
*/ |
35
|
|
|
protected $type; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Subscription is paid (available only to account admins). |
39
|
|
|
* |
40
|
|
|
* @SA\Type("boolean") |
41
|
|
|
* @SA\SerializedName("paid") |
42
|
|
|
* |
43
|
|
|
* @var bool|null |
44
|
|
|
*/ |
45
|
|
|
protected $paid; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Limit of subscription users (available only to account admins). |
49
|
|
|
* |
50
|
|
|
* @SA\Type("integer") |
51
|
|
|
* @SA\SerializedName("userLimit") |
52
|
|
|
* |
53
|
|
|
* @var int|null |
54
|
|
|
*/ |
55
|
|
|
protected $userLimit; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @return null|string |
59
|
|
|
*/ |
60
|
1 |
|
public function getType() |
61
|
|
|
{ |
62
|
1 |
|
return $this->type; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @param null|string $type |
67
|
|
|
* |
68
|
|
|
* @return $this |
69
|
|
|
*/ |
70
|
1 |
|
public function setType($type) |
71
|
|
|
{ |
72
|
1 |
|
$this->type = $type; |
73
|
|
|
|
74
|
1 |
|
return $this; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return bool|null |
79
|
|
|
*/ |
80
|
1 |
|
public function getPaid() |
81
|
|
|
{ |
82
|
1 |
|
return $this->paid; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @param bool|null $paid |
87
|
|
|
* |
88
|
|
|
* @return $this |
89
|
|
|
*/ |
90
|
1 |
|
public function setPaid($paid) |
91
|
|
|
{ |
92
|
1 |
|
$this->paid = $paid; |
93
|
|
|
|
94
|
1 |
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return int|null |
99
|
|
|
*/ |
100
|
1 |
|
public function getUserLimit() |
101
|
|
|
{ |
102
|
1 |
|
return $this->userLimit; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @param int|null $userLimit |
107
|
|
|
* |
108
|
|
|
* @return $this |
109
|
|
|
*/ |
110
|
1 |
|
public function setUserLimit($userLimit) |
111
|
|
|
{ |
112
|
1 |
|
$this->userLimit = $userLimit; |
113
|
|
|
|
114
|
1 |
|
return $this; |
115
|
|
|
} |
116
|
|
|
} |
117
|
|
|
|