1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
|
4
|
|
|
namespace InvoiceNinjaModule\Model; |
5
|
|
|
|
6
|
|
|
use InvoiceNinjaModule\Model\Interfaces\ContactInterface; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class Contact |
10
|
|
|
* @codeCoverageIgnore |
11
|
|
|
*/ |
12
|
|
|
final class Contact extends Base implements ContactInterface |
13
|
|
|
{ |
14
|
|
|
private string $firstName = ''; |
15
|
|
|
private string $lastName = ''; |
16
|
|
|
private string $email = ''; |
17
|
|
|
private bool $isPrimary = false; |
18
|
|
|
private bool $isLocked = false; |
19
|
|
|
private string $phone = ''; |
20
|
|
|
private string $customValue1 = ''; |
21
|
|
|
private string $customValue2 = ''; |
22
|
|
|
private string $customValue3 = ''; |
23
|
|
|
private string $customValue4 = ''; |
24
|
|
|
private string $contactKey = ''; |
25
|
|
|
private bool $sendEmail = false; |
26
|
|
|
private int $lastLogin; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @return string |
30
|
|
|
*/ |
31
|
|
|
public function getFirstName() :string |
32
|
|
|
{ |
33
|
|
|
return $this->firstName; |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @param string $firstName |
38
|
|
|
*/ |
39
|
|
|
public function setFirstName(string $firstName) :void |
40
|
|
|
{ |
41
|
|
|
$this->firstName = $firstName; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return string |
46
|
|
|
*/ |
47
|
|
|
public function getLastName() :string |
48
|
|
|
{ |
49
|
|
|
return $this->lastName; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @param string $lastName |
54
|
|
|
*/ |
55
|
|
|
public function setLastName(string $lastName) :void |
56
|
|
|
{ |
57
|
|
|
$this->lastName = $lastName; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @return string |
62
|
|
|
*/ |
63
|
|
|
public function getEmail() :string |
64
|
|
|
{ |
65
|
|
|
return $this->email; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @param string $email |
70
|
|
|
*/ |
71
|
|
|
public function setEmail(string $email) :void |
72
|
|
|
{ |
73
|
|
|
$this->email = $email; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @return bool |
78
|
|
|
*/ |
79
|
|
|
public function isPrimary() :bool |
80
|
|
|
{ |
81
|
|
|
return $this->isPrimary; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @param bool $isPrimary |
86
|
|
|
*/ |
87
|
|
|
public function setPrimary(bool $isPrimary) :void |
88
|
|
|
{ |
89
|
|
|
$this->isPrimary = $isPrimary; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @return string |
94
|
|
|
*/ |
95
|
|
|
public function getPhone() :string |
96
|
|
|
{ |
97
|
|
|
return $this->phone; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @param string $phone |
102
|
|
|
*/ |
103
|
|
|
public function setPhone(string $phone) :void |
104
|
|
|
{ |
105
|
|
|
$this->phone = $phone; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @return int |
110
|
|
|
*/ |
111
|
|
|
public function getLastLogin() :int |
112
|
|
|
{ |
113
|
|
|
return $this->lastLogin; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @return bool |
118
|
|
|
*/ |
119
|
|
|
public function isLocked() : bool |
120
|
|
|
{ |
121
|
|
|
return $this->isLocked; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @param bool $isLocked |
126
|
|
|
*/ |
127
|
|
|
public function setIsLocked(bool $isLocked) : void |
128
|
|
|
{ |
129
|
|
|
$this->isLocked = $isLocked; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @return string |
134
|
|
|
*/ |
135
|
|
|
public function getCustomValue1() : string |
136
|
|
|
{ |
137
|
|
|
return $this->customValue1; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @param string $customValue1 |
142
|
|
|
*/ |
143
|
|
|
public function setCustomValue1(string $customValue1) : void |
144
|
|
|
{ |
145
|
|
|
$this->customValue1 = $customValue1; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @return string |
150
|
|
|
*/ |
151
|
|
|
public function getCustomValue2() : string |
152
|
|
|
{ |
153
|
|
|
return $this->customValue2; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @param string $customValue2 |
158
|
|
|
*/ |
159
|
|
|
public function setCustomValue2(string $customValue2) : void |
160
|
|
|
{ |
161
|
|
|
$this->customValue2 = $customValue2; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* @return string |
166
|
|
|
*/ |
167
|
|
|
public function getCustomValue3() : string |
168
|
|
|
{ |
169
|
|
|
return $this->customValue3; |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* @param string $customValue3 |
174
|
|
|
*/ |
175
|
|
|
public function setCustomValue3(string $customValue3) : void |
176
|
|
|
{ |
177
|
|
|
$this->customValue3 = $customValue3; |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* @return string |
182
|
|
|
*/ |
183
|
|
|
public function getCustomValue4() : string |
184
|
|
|
{ |
185
|
|
|
return $this->customValue4; |
186
|
|
|
} |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* @param string $customValue4 |
190
|
|
|
*/ |
191
|
|
|
public function setCustomValue4(string $customValue4) : void |
192
|
|
|
{ |
193
|
|
|
$this->customValue4 = $customValue4; |
194
|
|
|
} |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* @return string |
198
|
|
|
*/ |
199
|
|
|
public function getContactKey() : string |
200
|
|
|
{ |
201
|
|
|
return $this->contactKey; |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @param string $contactKey |
206
|
|
|
*/ |
207
|
|
|
public function setContactKey(string $contactKey) : void |
208
|
|
|
{ |
209
|
|
|
$this->contactKey = $contactKey; |
210
|
|
|
} |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* @return bool |
214
|
|
|
*/ |
215
|
|
|
public function isSendEmail() : bool |
216
|
|
|
{ |
217
|
|
|
return $this->sendEmail; |
218
|
|
|
} |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* @param bool $sendEmail |
222
|
|
|
*/ |
223
|
|
|
public function setSendEmail(bool $sendEmail) : void |
224
|
|
|
{ |
225
|
|
|
$this->sendEmail = $sendEmail; |
226
|
|
|
} |
227
|
|
|
} |
228
|
|
|
|