-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathPostmarkOutboundMessageList.php
More file actions
53 lines (43 loc) · 1.16 KB
/
PostmarkOutboundMessageList.php
File metadata and controls
53 lines (43 loc) · 1.16 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
<?php
namespace Postmark\Models;
class PostmarkOutboundMessageList
{
public int $TotalCount;
public array $Messages;
public function __construct(array $values)
{
$this->TotalCount = !empty($values['TotalCount']) ? $values['TotalCount'] : 0;
$tempMessages = [];
$messages = $values['Messages'] ?? [];
foreach ($messages as $message) {
$obj = json_decode(json_encode($message));
$postmarkMessage = new PostmarkOutboundMessage((array) $obj);
$tempMessages[] = $postmarkMessage;
}
$this->Messages = $tempMessages;
}
/**
* @return int
*/
public function getTotalCount(): mixed
{
return $this->TotalCount;
}
/**
* @param int $TotalCount
*/
public function setTotalCount(mixed $TotalCount): PostmarkOutboundMessageList
{
$this->TotalCount = $TotalCount;
return $this;
}
public function getMessages(): array
{
return $this->Messages;
}
public function setMessages(array $Messages): PostmarkOutboundMessageList
{
$this->Messages = $Messages;
return $this;
}
}