1 | <?php |
||
17 | class Campaign |
||
18 | { |
||
19 | const TEST = 'TEST'; |
||
20 | const ACTIVE = 'ACTIVE'; |
||
21 | const HOLD = 'HOLD'; |
||
22 | const DESIGN = 'DESIGN'; |
||
23 | |||
24 | /** |
||
25 | * @var string The name of the journey map. |
||
26 | */ |
||
27 | private $name; |
||
28 | |||
29 | /** |
||
30 | * @var string Possible values are Test, Active, Hold, Design. By default the value is set to Design. |
||
31 | */ |
||
32 | private $state; |
||
33 | |||
34 | /** |
||
35 | * @var integer The ID of the folder in which the journey map is created. |
||
36 | */ |
||
37 | private $folderId; |
||
38 | |||
39 | /** |
||
40 | * @var \DateTimeInterface This is the start date for the journey map. |
||
41 | */ |
||
42 | private $startDate; |
||
43 | |||
44 | /** |
||
45 | * @var string The description of the journey map as defined in the properties |
||
46 | */ |
||
47 | private $description; |
||
48 | |||
49 | /** |
||
50 | * @var string The category defined for the journey map, if any. |
||
51 | */ |
||
52 | private $maCategory; |
||
53 | |||
54 | /** |
||
55 | * @var integer The ID of the product defined for the journey map, if any. |
||
56 | */ |
||
57 | private $productId; |
||
58 | |||
59 | /** |
||
60 | * @var integer The ID of the marketing pressure plan to which the journey map is linked. |
||
61 | */ |
||
62 | private $clashPlanId; |
||
63 | |||
64 | /** |
||
65 | * @var Email[] |
||
66 | */ |
||
67 | private $emails; |
||
68 | |||
69 | /** |
||
70 | * |
||
71 | */ |
||
72 | 6 | public function __construct() |
|
78 | |||
79 | /** |
||
80 | * @param string $name The name of the journey map. |
||
81 | * @return self |
||
82 | */ |
||
83 | 1 | public function setName($name) |
|
89 | |||
90 | /** |
||
91 | * @return string The name of the journey map. |
||
92 | */ |
||
93 | 5 | public function getName() |
|
97 | |||
98 | /** |
||
99 | * @param string $state Possible values are Test, Active, Hold, Design. By default the value is set to Design. |
||
100 | * @return self |
||
101 | */ |
||
102 | 2 | public function setState($state) |
|
103 | { |
||
104 | $possible = array( |
||
105 | 2 | self::TEST, |
|
106 | 2 | self::ACTIVE, |
|
107 | 2 | self::HOLD, |
|
108 | 2 | self::DESIGN, |
|
109 | ); |
||
110 | |||
111 | 2 | if (in_array($state, $possible)) { |
|
112 | 1 | $this->state = $state; |
|
113 | } else { |
||
114 | 1 | throw new \InvalidArgumentException(); |
|
115 | } |
||
116 | |||
117 | 1 | return $this; |
|
118 | } |
||
119 | |||
120 | /** |
||
121 | * @return string Possible values are Test, Active, Hold, Design. By default the value is set to Design. |
||
122 | */ |
||
123 | 5 | public function getState() |
|
127 | |||
128 | /** |
||
129 | * @param integer $id The ID of the folder in which the journey map is created. |
||
130 | * @return self |
||
131 | */ |
||
132 | 1 | public function setFolderId($id) |
|
138 | |||
139 | /** |
||
140 | * @return integer The ID of the folder in which the journey map is created. |
||
141 | */ |
||
142 | 5 | public function getFolderId() |
|
146 | |||
147 | /** |
||
148 | * @param \DateTimeInterface $date This is the start date for the journey map. |
||
149 | * @return self |
||
150 | */ |
||
151 | 1 | public function setStartDate(\DateTimeInterface $date) |
|
157 | |||
158 | /** |
||
159 | * @return \DateTimeInterface This is the start date for the journey map. |
||
160 | */ |
||
161 | 2 | public function getStartDate() |
|
165 | |||
166 | /** |
||
167 | * @param string $description The description of the journey map as defined in the properties. |
||
168 | * @return self |
||
169 | */ |
||
170 | 1 | public function setDescription($description) |
|
176 | |||
177 | /** |
||
178 | * @return string The description of the journey map as defined in the properties. |
||
179 | */ |
||
180 | 5 | public function getDescription() |
|
184 | |||
185 | /** |
||
186 | * @param string $maCategory The category defined for the journey map, if any. |
||
187 | * @return self |
||
188 | */ |
||
189 | 1 | public function setMaCategory($maCategory) |
|
195 | |||
196 | /** |
||
197 | * @return string The category defined for the journey map, if any. |
||
198 | */ |
||
199 | 5 | public function getMaCategory() |
|
203 | |||
204 | /** |
||
205 | * @param integer $productId The ID of the product defined for the journey map, if any. |
||
206 | * @return self |
||
207 | */ |
||
208 | 1 | public function setProductId($productId) |
|
214 | |||
215 | /** |
||
216 | * @return integer The ID of the product defined for the journey map, if any. |
||
217 | */ |
||
218 | 5 | public function getProductId() |
|
222 | |||
223 | /** |
||
224 | * @param integer $clashPlanId The ID of the marketing pressure plan to which the journey map is linked. |
||
225 | * @return self |
||
226 | */ |
||
227 | 1 | public function setClashPlanId($clashPlanId) |
|
233 | |||
234 | /** |
||
235 | * @return integer The ID of the marketing pressure plan to which the journey map is linked. |
||
236 | */ |
||
237 | 5 | public function getClashPlanId() |
|
241 | |||
242 | /** |
||
243 | * @param Email $email |
||
244 | * @return self |
||
245 | */ |
||
246 | 2 | public function addEmail(Email $email) |
|
252 | |||
253 | /** |
||
254 | * @return Email[] |
||
255 | */ |
||
256 | 5 | public function getEmails() |
|
260 | } |
||
261 |