1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of the WrikePhpSdk package. |
4
|
|
|
* |
5
|
|
|
* (c) Zbigniew Ślązak |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please view the LICENSE |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Zibios\WrikePhpSdk\Documents\Invitation; |
12
|
|
|
|
13
|
|
|
use JMS\Serializer\Annotation as SA; |
14
|
|
|
use Zibios\WrikePhpSdk\Documents\ResourceDocumentAbstract; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Invitation Resource Document |
18
|
|
|
*/ |
19
|
|
|
class InvitationResourceDocument extends ResourceDocumentAbstract |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* Invitation ID |
23
|
|
|
* |
24
|
|
|
* Comment: Invitation ID |
25
|
|
|
* |
26
|
|
|
* @SA\Type("string") |
27
|
|
|
* @SA\SerializedName("id") |
28
|
|
|
* @var string|null |
29
|
|
|
*/ |
30
|
|
|
protected $id; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Account ID |
34
|
|
|
* |
35
|
|
|
* Comment: Account ID |
36
|
|
|
* |
37
|
|
|
* @SA\Type("string") |
38
|
|
|
* @SA\SerializedName("accountId") |
39
|
|
|
* @var string|null |
40
|
|
|
*/ |
41
|
|
|
protected $accountId; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* First name |
45
|
|
|
* |
46
|
|
|
* @SA\Type("string") |
47
|
|
|
* @SA\SerializedName("firstName") |
48
|
|
|
* @var string|null |
49
|
|
|
*/ |
50
|
|
|
protected $firstName; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* Last name |
54
|
|
|
* |
55
|
|
|
* @SA\Type("string") |
56
|
|
|
* @SA\SerializedName("lastName") |
57
|
|
|
* @var string|null |
58
|
|
|
*/ |
59
|
|
|
protected $lastName; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* Invitation Title |
63
|
|
|
* |
64
|
|
|
* @SA\Type("Email") |
65
|
|
|
* @SA\SerializedName("email") |
66
|
|
|
* @var string|null |
67
|
|
|
*/ |
68
|
|
|
protected $email; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Status |
72
|
|
|
* |
73
|
|
|
* Invitation status |
74
|
|
|
* Enum: Pending, Accepted, Declined, Cancelled |
75
|
|
|
* @see \Zibios\WrikePhpSdk\Enums\InvitationStatusEnum |
76
|
|
|
* |
77
|
|
|
* @SA\Type("string") |
78
|
|
|
* @SA\SerializedName("status") |
79
|
|
|
* @var string|null |
80
|
|
|
*/ |
81
|
|
|
protected $status; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* Inviter Contact ID |
85
|
|
|
* |
86
|
|
|
* Comment: Contact ID |
87
|
|
|
* |
88
|
|
|
* @SA\Type("string") |
89
|
|
|
* @SA\SerializedName("inviterUserId") |
90
|
|
|
* @var string|null |
91
|
|
|
*/ |
92
|
|
|
protected $inviterUserId; |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* Date when invitation was created |
96
|
|
|
* |
97
|
|
|
* Format: yyyy-MM-dd'T'HH:mm:ss'Z' |
98
|
|
|
* |
99
|
|
|
* @SA\Type("DateTime<'Y-m-d\TH:i:s\Z'>") |
100
|
|
|
* @SA\SerializedName("invitationDate") |
101
|
|
|
* @var string|null |
102
|
|
|
*/ |
103
|
|
|
protected $invitationDate; |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Date when the invitation was resolved |
107
|
|
|
* |
108
|
|
|
* Format: yyyy-MM-dd'T'HH:mm:ss'Z' |
109
|
|
|
* Comment: Optional |
110
|
|
|
* |
111
|
|
|
* @SA\Type("DateTime<'Y-m-d\TH:i:s\Z'>") |
112
|
|
|
* @SA\SerializedName("resolvedDate") |
113
|
|
|
* @var string|null |
114
|
|
|
*/ |
115
|
|
|
protected $resolvedDate; |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* Invited user role |
119
|
|
|
* |
120
|
|
|
* Enum: User, Collaborator |
121
|
|
|
* @see \Zibios\WrikePhpSdk\Enums\UserRoleEnum |
122
|
|
|
* |
123
|
|
|
* @SA\Type("string") |
124
|
|
|
* @SA\SerializedName("role") |
125
|
|
|
* @var string|null |
126
|
|
|
*/ |
127
|
|
|
protected $role; |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* Is user external |
131
|
|
|
* |
132
|
|
|
* @SA\Type("boolean") |
133
|
|
|
* @SA\SerializedName("external") |
134
|
|
|
* @var bool|null |
135
|
|
|
*/ |
136
|
|
|
protected $external; |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return null|string |
140
|
|
|
*/ |
141
|
4 |
|
public function getId() |
142
|
|
|
{ |
143
|
4 |
|
return $this->id; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @param null|string $id |
148
|
|
|
* |
149
|
|
|
* @return $this |
150
|
|
|
*/ |
151
|
|
|
public function setId($id) |
152
|
|
|
{ |
153
|
|
|
$this->id = $id; |
154
|
|
|
|
155
|
|
|
return $this; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @return null|string |
160
|
|
|
*/ |
161
|
|
|
public function getAccountId() |
162
|
|
|
{ |
163
|
|
|
return $this->accountId; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @param null|string $accountId |
168
|
|
|
* |
169
|
|
|
* @return $this |
170
|
|
|
*/ |
171
|
|
|
public function setAccountId($accountId) |
172
|
|
|
{ |
173
|
|
|
$this->accountId = $accountId; |
174
|
|
|
|
175
|
|
|
return $this; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @return null|string |
180
|
|
|
*/ |
181
|
|
|
public function getFirstName() |
182
|
|
|
{ |
183
|
|
|
return $this->firstName; |
184
|
|
|
} |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @param null|string $firstName |
188
|
|
|
* |
189
|
|
|
* @return $this |
190
|
|
|
*/ |
191
|
|
|
public function setFirstName($firstName) |
192
|
|
|
{ |
193
|
|
|
$this->firstName = $firstName; |
194
|
|
|
|
195
|
|
|
return $this; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @return null|string |
200
|
|
|
*/ |
201
|
|
|
public function getLastName() |
202
|
|
|
{ |
203
|
|
|
return $this->lastName; |
204
|
|
|
} |
205
|
|
|
|
206
|
|
|
/** |
207
|
|
|
* @param null|string $lastName |
208
|
|
|
* |
209
|
|
|
* @return $this |
210
|
|
|
*/ |
211
|
|
|
public function setLastName($lastName) |
212
|
|
|
{ |
213
|
|
|
$this->lastName = $lastName; |
214
|
|
|
|
215
|
|
|
return $this; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* @return null|string |
220
|
|
|
*/ |
221
|
|
|
public function getEmail() |
222
|
|
|
{ |
223
|
|
|
return $this->email; |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
/** |
227
|
|
|
* @param null|string $email |
228
|
|
|
* |
229
|
|
|
* @return $this |
230
|
|
|
*/ |
231
|
|
|
public function setEmail($email) |
232
|
|
|
{ |
233
|
|
|
$this->email = $email; |
234
|
|
|
|
235
|
|
|
return $this; |
236
|
|
|
} |
237
|
|
|
|
238
|
|
|
/** |
239
|
|
|
* @return null|string |
240
|
|
|
*/ |
241
|
|
|
public function getStatus() |
242
|
|
|
{ |
243
|
|
|
return $this->status; |
244
|
|
|
} |
245
|
|
|
|
246
|
|
|
/** |
247
|
|
|
* @param null|string $status |
248
|
|
|
* |
249
|
|
|
* @return $this |
250
|
|
|
*/ |
251
|
|
|
public function setStatus($status) |
252
|
|
|
{ |
253
|
|
|
$this->status = $status; |
254
|
|
|
|
255
|
|
|
return $this; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* @return null|string |
260
|
|
|
*/ |
261
|
|
|
public function getInviterUserId() |
262
|
|
|
{ |
263
|
|
|
return $this->inviterUserId; |
264
|
|
|
} |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* @param null|string $inviterUserId |
268
|
|
|
* |
269
|
|
|
* @return $this |
270
|
|
|
*/ |
271
|
|
|
public function setInviterUserId($inviterUserId) |
272
|
|
|
{ |
273
|
|
|
$this->inviterUserId = $inviterUserId; |
274
|
|
|
|
275
|
|
|
return $this; |
276
|
|
|
} |
277
|
|
|
|
278
|
|
|
/** |
279
|
|
|
* @return null|string |
280
|
|
|
*/ |
281
|
|
|
public function getInvitationDate() |
282
|
|
|
{ |
283
|
|
|
return $this->invitationDate; |
284
|
|
|
} |
285
|
|
|
|
286
|
|
|
/** |
287
|
|
|
* @param null|string $invitationDate |
288
|
|
|
* |
289
|
|
|
* @return $this |
290
|
|
|
*/ |
291
|
|
|
public function setInvitationDate($invitationDate) |
292
|
|
|
{ |
293
|
|
|
$this->invitationDate = $invitationDate; |
294
|
|
|
|
295
|
|
|
return $this; |
296
|
|
|
} |
297
|
|
|
|
298
|
|
|
/** |
299
|
|
|
* @return null|string |
300
|
|
|
*/ |
301
|
|
|
public function getResolvedDate() |
302
|
|
|
{ |
303
|
|
|
return $this->resolvedDate; |
304
|
|
|
} |
305
|
|
|
|
306
|
|
|
/** |
307
|
|
|
* @param null|string $resolvedDate |
308
|
|
|
* |
309
|
|
|
* @return $this |
310
|
|
|
*/ |
311
|
|
|
public function setResolvedDate($resolvedDate) |
312
|
|
|
{ |
313
|
|
|
$this->resolvedDate = $resolvedDate; |
314
|
|
|
|
315
|
|
|
return $this; |
316
|
|
|
} |
317
|
|
|
|
318
|
|
|
/** |
319
|
|
|
* @return null|string |
320
|
|
|
*/ |
321
|
|
|
public function getRole() |
322
|
|
|
{ |
323
|
|
|
return $this->role; |
324
|
|
|
} |
325
|
|
|
|
326
|
|
|
/** |
327
|
|
|
* @param null|string $role |
328
|
|
|
* |
329
|
|
|
* @return $this |
330
|
|
|
*/ |
331
|
|
|
public function setRole($role) |
332
|
|
|
{ |
333
|
|
|
$this->role = $role; |
334
|
|
|
|
335
|
|
|
return $this; |
336
|
|
|
} |
337
|
|
|
|
338
|
|
|
/** |
339
|
|
|
* @return bool|null |
340
|
|
|
*/ |
341
|
|
|
public function getExternal() |
342
|
|
|
{ |
343
|
|
|
return $this->external; |
344
|
|
|
} |
345
|
|
|
|
346
|
|
|
/** |
347
|
|
|
* @param bool|null $external |
348
|
|
|
* |
349
|
|
|
* @return $this |
350
|
|
|
*/ |
351
|
|
|
public function setExternal($external) |
352
|
|
|
{ |
353
|
|
|
$this->external = $external; |
354
|
|
|
|
355
|
|
|
return $this; |
356
|
|
|
} |
357
|
|
|
} |
358
|
|
|
|