-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathUpdateContactRequest.php
More file actions
343 lines (301 loc) · 7.53 KB
/
UpdateContactRequest.php
File metadata and controls
343 lines (301 loc) · 7.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<?php
namespace Intercom\Unstable\Contacts\Requests;
use Intercom\Core\Json\JsonSerializableType;
use Intercom\Core\Json\JsonProperty;
use Intercom\Core\Types\ArrayType;
class UpdateContactRequest extends JsonSerializableType
{
/**
* @var string $id id
*/
private string $id;
/**
* @var ?string $role The role of the contact.
*/
#[JsonProperty('role')]
private ?string $role;
/**
* @var ?string $externalId A unique identifier for the contact which is given to Intercom
*/
#[JsonProperty('external_id')]
private ?string $externalId;
/**
* @var ?string $email The contacts email
*/
#[JsonProperty('email')]
private ?string $email;
/**
* @var ?string $phone The contacts phone
*/
#[JsonProperty('phone')]
private ?string $phone;
/**
* @var ?string $name The contacts name
*/
#[JsonProperty('name')]
private ?string $name;
/**
* @var ?string $avatar An image URL containing the avatar of a contact
*/
#[JsonProperty('avatar')]
private ?string $avatar;
/**
* @var ?int $signedUpAt The time specified for when a contact signed up
*/
#[JsonProperty('signed_up_at')]
private ?int $signedUpAt;
/**
* @var ?int $lastSeenAt The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually)
*/
#[JsonProperty('last_seen_at')]
private ?int $lastSeenAt;
/**
* @var ?int $ownerId The id of an admin that has been assigned account ownership of the contact
*/
#[JsonProperty('owner_id')]
private ?int $ownerId;
/**
* @var ?bool $unsubscribedFromEmails Whether the contact is unsubscribed from emails
*/
#[JsonProperty('unsubscribed_from_emails')]
private ?bool $unsubscribedFromEmails;
/**
* @var ?string $languageOverride A preferred language setting for the contact, used by Intercom as the language of Fin and the Messenger even if their browser has a different setting. Supports ISO 639-1 two-letter language codes. If an unsupported code is supplied, the field will be set to null.
*/
#[JsonProperty('language_override')]
private ?string $languageOverride;
/**
* @var ?array<string, mixed> $customAttributes The custom attributes which are set for the contact
*/
#[JsonProperty('custom_attributes'), ArrayType(['string' => 'mixed'])]
private ?array $customAttributes;
/**
* @param array{
* id: string,
* role?: ?string,
* externalId?: ?string,
* email?: ?string,
* phone?: ?string,
* name?: ?string,
* avatar?: ?string,
* signedUpAt?: ?int,
* lastSeenAt?: ?int,
* ownerId?: ?int,
* unsubscribedFromEmails?: ?bool,
* languageOverride?: ?string,
* customAttributes?: ?array<string, mixed>,
* } $values
*/
public function __construct(
array $values,
) {
$this->id = $values['id'];
$this->role = $values['role'] ?? null;
$this->externalId = $values['externalId'] ?? null;
$this->email = $values['email'] ?? null;
$this->phone = $values['phone'] ?? null;
$this->name = $values['name'] ?? null;
$this->avatar = $values['avatar'] ?? null;
$this->signedUpAt = $values['signedUpAt'] ?? null;
$this->lastSeenAt = $values['lastSeenAt'] ?? null;
$this->ownerId = $values['ownerId'] ?? null;
$this->unsubscribedFromEmails = $values['unsubscribedFromEmails'] ?? null;
$this->languageOverride = $values['languageOverride'] ?? null;
$this->customAttributes = $values['customAttributes'] ?? null;
}
/**
* @return string
*/
public function getId(): string
{
return $this->id;
}
/**
* @param string $value
*/
public function setId(string $value): self
{
$this->id = $value;
return $this;
}
/**
* @return ?string
*/
public function getRole(): ?string
{
return $this->role;
}
/**
* @param ?string $value
*/
public function setRole(?string $value = null): self
{
$this->role = $value;
return $this;
}
/**
* @return ?string
*/
public function getExternalId(): ?string
{
return $this->externalId;
}
/**
* @param ?string $value
*/
public function setExternalId(?string $value = null): self
{
$this->externalId = $value;
return $this;
}
/**
* @return ?string
*/
public function getEmail(): ?string
{
return $this->email;
}
/**
* @param ?string $value
*/
public function setEmail(?string $value = null): self
{
$this->email = $value;
return $this;
}
/**
* @return ?string
*/
public function getPhone(): ?string
{
return $this->phone;
}
/**
* @param ?string $value
*/
public function setPhone(?string $value = null): self
{
$this->phone = $value;
return $this;
}
/**
* @return ?string
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param ?string $value
*/
public function setName(?string $value = null): self
{
$this->name = $value;
return $this;
}
/**
* @return ?string
*/
public function getAvatar(): ?string
{
return $this->avatar;
}
/**
* @param ?string $value
*/
public function setAvatar(?string $value = null): self
{
$this->avatar = $value;
return $this;
}
/**
* @return ?int
*/
public function getSignedUpAt(): ?int
{
return $this->signedUpAt;
}
/**
* @param ?int $value
*/
public function setSignedUpAt(?int $value = null): self
{
$this->signedUpAt = $value;
return $this;
}
/**
* @return ?int
*/
public function getLastSeenAt(): ?int
{
return $this->lastSeenAt;
}
/**
* @param ?int $value
*/
public function setLastSeenAt(?int $value = null): self
{
$this->lastSeenAt = $value;
return $this;
}
/**
* @return ?int
*/
public function getOwnerId(): ?int
{
return $this->ownerId;
}
/**
* @param ?int $value
*/
public function setOwnerId(?int $value = null): self
{
$this->ownerId = $value;
return $this;
}
/**
* @return ?bool
*/
public function getUnsubscribedFromEmails(): ?bool
{
return $this->unsubscribedFromEmails;
}
/**
* @param ?bool $value
*/
public function setUnsubscribedFromEmails(?bool $value = null): self
{
$this->unsubscribedFromEmails = $value;
return $this;
}
/**
* @return ?string
*/
public function getLanguageOverride(): ?string
{
return $this->languageOverride;
}
/**
* @param ?string $value
*/
public function setLanguageOverride(?string $value = null): self
{
$this->languageOverride = $value;
return $this;
}
/**
* @return ?array<string, mixed>
*/
public function getCustomAttributes(): ?array
{
return $this->customAttributes;
}
/**
* @param ?array<string, mixed> $value
*/
public function setCustomAttributes(?array $value = null): self
{
$this->customAttributes = $value;
return $this;
}
}