1 | <?php |
||
9 | class Notification |
||
10 | { |
||
11 | /** |
||
12 | * @var null|NotificationId |
||
13 | */ |
||
14 | protected $notificationId; |
||
15 | |||
16 | /** |
||
17 | * @var Destination |
||
18 | */ |
||
19 | protected $destination; |
||
20 | |||
21 | /** |
||
22 | * @var Subject |
||
23 | */ |
||
24 | protected $subject; |
||
25 | |||
26 | /** |
||
27 | * @var Body |
||
28 | */ |
||
29 | protected $body; |
||
30 | |||
31 | /** |
||
32 | * @var null|DeduplicationKey |
||
33 | */ |
||
34 | protected $deduplicationKey; |
||
35 | |||
36 | /** |
||
37 | * @var null|string |
||
38 | */ |
||
39 | protected $templateName; |
||
40 | |||
41 | /** |
||
42 | * @var array|null |
||
43 | */ |
||
44 | protected $templateVariables; |
||
45 | |||
46 | /** |
||
47 | * @var DateTimeImmutable |
||
48 | */ |
||
49 | protected $createdAt; |
||
50 | |||
51 | /** |
||
52 | * @var null|DateTimeImmutable |
||
53 | */ |
||
54 | protected $sentAt; |
||
55 | |||
56 | /** |
||
57 | * @param Destination $destination |
||
58 | * @param Subject $subject |
||
59 | * @param Body $body |
||
60 | * @param DeduplicationKey|null $deduplicationKey |
||
61 | * @param string|null $templateName |
||
62 | * @param array|null $templateVariables |
||
63 | */ |
||
64 | 8 | public function __construct( |
|
81 | |||
82 | /** |
||
83 | * @return null|NotificationId |
||
84 | */ |
||
85 | 1 | public function notificationId(): ?NotificationId |
|
89 | |||
90 | /** |
||
91 | * @return Destination |
||
92 | */ |
||
93 | 4 | public function destination(): Destination |
|
94 | { |
||
95 | 4 | return $this->destination; |
|
96 | } |
||
97 | |||
98 | /** |
||
99 | * @return Subject |
||
100 | */ |
||
101 | 3 | public function subject(): Subject |
|
105 | |||
106 | /** |
||
107 | * @return Body |
||
108 | */ |
||
109 | 3 | public function body(): Body |
|
113 | |||
114 | /** |
||
115 | * @return null|DeduplicationKey |
||
116 | */ |
||
117 | 4 | public function deduplicationKey(): ?DeduplicationKey |
|
121 | |||
122 | /** |
||
123 | * @return DateTimeImmutable |
||
124 | */ |
||
125 | 1 | public function createdAt(): DateTimeImmutable |
|
126 | { |
||
127 | 1 | return $this->createdAt; |
|
128 | } |
||
129 | |||
130 | /** |
||
131 | * @return DateTimeImmutable|null |
||
132 | */ |
||
133 | 2 | public function sentAt(): ?DateTimeImmutable |
|
137 | |||
138 | /** |
||
139 | * @return bool |
||
140 | */ |
||
141 | 2 | public function isSent(): bool |
|
145 | |||
146 | /** |
||
147 | * @return void |
||
148 | */ |
||
149 | 2 | public function markSent(): void |
|
156 | } |
||
157 | |||
158 | |||
159 |