1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace InvoiceNinjaModule\Model; |
6
|
|
|
|
7
|
|
|
use DateTime; |
8
|
|
|
use DateTimeInterface; |
9
|
|
|
use InvoiceNinjaModule\Model\Interfaces\InvitationInterface; |
10
|
|
|
|
11
|
|
|
class Invitation extends Base implements InvitationInterface |
12
|
|
|
{ |
13
|
|
|
private string $clientContactId = ''; |
14
|
|
|
private string $key = ''; |
15
|
|
|
private string $link = ''; |
16
|
|
|
private string $sentDate = ''; |
17
|
|
|
private string $viewedDate = ''; |
18
|
|
|
private string $openedDate = ''; |
19
|
|
|
private string $emailStatus = ''; |
20
|
|
|
private string $emailError = ''; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @return string |
24
|
|
|
*/ |
25
|
|
|
public function getClientContactId() : string |
26
|
|
|
{ |
27
|
|
|
return $this->clientContactId; |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @param string $clientContactId |
32
|
|
|
*/ |
33
|
|
|
public function setClientContactId(string $clientContactId) : void |
34
|
|
|
{ |
35
|
|
|
$this->clientContactId = $clientContactId; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @return string |
40
|
|
|
*/ |
41
|
|
|
public function getKey() : string |
42
|
|
|
{ |
43
|
|
|
return $this->key; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @param string $key |
48
|
|
|
*/ |
49
|
|
|
public function setKey(string $key) : void |
50
|
|
|
{ |
51
|
|
|
$this->key = $key; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return string |
56
|
|
|
*/ |
57
|
|
|
public function getLink() : string |
58
|
|
|
{ |
59
|
|
|
return $this->link; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @param string $link |
64
|
|
|
*/ |
65
|
|
|
public function setLink(string $link) : void |
66
|
|
|
{ |
67
|
|
|
$this->link = $link; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return DateTimeInterface |
72
|
|
|
*/ |
73
|
|
|
public function getSentDate() : DateTimeInterface |
74
|
|
|
{ |
75
|
|
|
return DateTime::createFromFormat('Y-m-d H:i:s', $this->sentDate); |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param DateTimeInterface $sentDate |
80
|
|
|
*/ |
81
|
|
|
public function setSentDate(DateTimeInterface $sentDate) : void |
82
|
|
|
{ |
83
|
|
|
$this->sentDate = $sentDate->format('Y-m-d H:i:s'); |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return DateTimeInterface |
88
|
|
|
*/ |
89
|
|
|
public function getViewedDate() : DateTimeInterface |
90
|
|
|
{ |
91
|
|
|
return DateTime::createFromFormat('Y-m-d H:i:s', $this->viewedDate); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param DateTimeInterface $viewedDate |
96
|
|
|
*/ |
97
|
|
|
public function setViewedDate(DateTimeInterface $viewedDate) : void |
98
|
|
|
{ |
99
|
|
|
$this->viewedDate = $viewedDate->format('Y-m-d H:i:s'); |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return DateTimeInterface |
104
|
|
|
*/ |
105
|
|
|
public function getOpenedDate() : DateTimeInterface |
106
|
|
|
{ |
107
|
|
|
return DateTime::createFromFormat('Y-m-d H:i:s', $this->openedDate); |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param DateTimeInterface $openedDate |
112
|
|
|
*/ |
113
|
|
|
public function setOpenedDate(DateTimeInterface $openedDate) : void |
114
|
|
|
{ |
115
|
|
|
$this->openedDate = $openedDate->format('Y-m-d H:i:s'); |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return string |
120
|
|
|
*/ |
121
|
|
|
public function getEmailStatus() : string |
122
|
|
|
{ |
123
|
|
|
return $this->emailStatus; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param string $emailStatus |
128
|
|
|
*/ |
129
|
|
|
public function setEmailStatus(string $emailStatus) : void |
130
|
|
|
{ |
131
|
|
|
$this->emailStatus = $emailStatus; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return string |
136
|
|
|
*/ |
137
|
|
|
public function getEmailError() : string |
138
|
|
|
{ |
139
|
|
|
return $this->emailError; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @param string $emailError |
144
|
|
|
*/ |
145
|
|
|
public function setEmailError(string $emailError) : void |
146
|
|
|
{ |
147
|
|
|
$this->emailError = $emailError; |
148
|
|
|
} |
149
|
|
|
} |