Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ReceivedAt per documentation #150

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Postmark/Models/PostmarkClick.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class PostmarkClick
public string $Platform;
public ?PostmarkAgentInfo $Client;
public ?PostmarkAgentInfo $OS;
public string $ReceivedAt;

public function __construct(array $values)
{
Expand All @@ -21,6 +22,7 @@ public function __construct(array $values)
$this->Platform = !empty($values['Platform']) ? $values['Platform'] : '';
!empty($values['Client']) ? $this->setClient($values['Client']) : $this->setClient(null);
!empty($values['OS']) ? $this->setOS($values['OS']) : $this->setOS(null);
$this->ReceivedAt = !empty($values['ReceivedAt']) ? $values['ReceivedAt'] : '';
}

/**
Expand Down Expand Up @@ -151,4 +153,22 @@ public function setOS(mixed $OS): PostmarkClick

return $this;
}

/**
* @return mixed|string
*/
public function getReceivedAt(): string
{
return $this->ReceivedAt;
}

/**
* @param mixed|string $ReceivedAt
*/
public function setReceivedAt(string $ReceivedAt): PostmarkClick
{
$this->ReceivedAt = $ReceivedAt;

return $this;
}
}
14 changes: 14 additions & 0 deletions src/Postmark/Models/PostmarkOpen.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class PostmarkOpen
public ?PostmarkGeographyInfo $Geo;
public string $Platform;
public int $ReadSeconds;
public string $ReceivedAt;
public ?PostmarkAgentInfo $Client;
public ?PostmarkAgentInfo $OS;

Expand All @@ -21,6 +22,7 @@ public function __construct(array $values)
!empty($values['Geo']) ? $this->setGeo($values['Geo']) : $this->setGeo(null);
$this->Platform = !empty($values['Platform']) ? $values['Platform'] : '';
$this->ReadSeconds = !empty($values['ReadSeconds']) ? $values['ReadSeconds'] : 0;
$this->ReceivedAt = !empty($values['ReceivedAt']) ? $values['ReceivedAt'] : '';
!empty($values['Client']) ? $this->setClient($values['Client']) : $this->setClient(null);
!empty($values['OS']) ? $this->setOS($values['OS']) : $this->setOS(null);
}
Expand Down Expand Up @@ -100,6 +102,18 @@ public function setReadSeconds(int $ReadSeconds): PostmarkOpen
return $this;
}

public function getReceivedAt(): string
{
return $this->ReceivedAt;
}

public function setReceivedAt(string $ReceivedAt): PostmarkOpen
{
$this->ReceivedAt = $ReceivedAt;

return $this;
}

public function getClient(): PostmarkAgentInfo
{
return $this->Client;
Expand Down