-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathPostmarkBounceList.php
More file actions
47 lines (37 loc) · 1.02 KB
/
PostmarkBounceList.php
File metadata and controls
47 lines (37 loc) · 1.02 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
<?php
namespace Postmark\Models;
class PostmarkBounceList
{
public int $TotalCount;
public array $Bounces;
public function __construct(array $values)
{
$this->TotalCount = !empty($values['TotalCount']) ? $values['TotalCount'] : 0;
$tempBounce = [];
$bounces = $values['Bounces'] ?? [];
foreach ($bounces as $bounce) {
$obj = json_decode(json_encode($bounce));
$postmarkBounce = new PostmarkBounce((array) $obj);
$tempBounce[] = $postmarkBounce;
}
$this->Bounces = $tempBounce;
}
public function getTotalCount(): int
{
return $this->TotalCount;
}
public function setTotalCount(int $TotalCount): PostmarkBounceList
{
$this->TotalCount = $TotalCount;
return $this;
}
public function getBounces(): array
{
return $this->Bounces;
}
public function setBounces(array $Bounces): PostmarkBounceList
{
$this->Bounces = $Bounces;
return $this;
}
}