-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathPostmarkInboundMessageList.php
More file actions
53 lines (43 loc) · 1.26 KB
/
PostmarkInboundMessageList.php
File metadata and controls
53 lines (43 loc) · 1.26 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 PostmarkInboundMessageList
{
public int $TotalCount;
public array $InboundMessages;
public function __construct(array $values)
{
$this->TotalCount = !empty($values['TotalCount']) ? $values['TotalCount'] : 0;
$tempInboundMessages = [];
$inboundMessages = $values['InboundMessages'] ?? [];
foreach ($inboundMessages as $message) {
$obj = json_decode(json_encode($message));
$postmarkMessage = new PostmarkInboundMessage((array) $obj);
$tempInboundMessages[] = $postmarkMessage;
}
$this->InboundMessages = $tempInboundMessages;
}
/**
* @return int|mixed
*/
public function getTotalCount(): mixed
{
return $this->TotalCount;
}
/**
* @param int|mixed $TotalCount
*/
public function setTotalCount(mixed $TotalCount): PostmarkInboundMessageList
{
$this->TotalCount = $TotalCount;
return $this;
}
public function getInboundMessages(): array
{
return $this->InboundMessages;
}
public function setInboundMessages(array $InboundMessages): PostmarkInboundMessageList
{
$this->InboundMessages = $InboundMessages;
return $this;
}
}