diff --git a/src/Model/Webhook/IndexResponse.php b/src/Model/Webhook/IndexResponse.php index a50a034f..7fb615ba 100644 --- a/src/Model/Webhook/IndexResponse.php +++ b/src/Model/Webhook/IndexResponse.php @@ -32,11 +32,16 @@ final class IndexResponse implements ApiResponse private $permanentFail = []; private $temporaryFail = []; private $unsubscribed = []; + private $accepted = []; private function __construct() { } + /** + * @param array $data + * @return self + */ public static function create(array $data): self { $model = new self(); @@ -58,77 +63,137 @@ public static function create(array $data): self $model->permanentFail = $data['permanent_fail']['urls'] ?? []; $model->temporaryFail = $data['temporary_fail']['urls'] ?? []; $model->unsubscribed = $data['unsubscribed']['urls'] ?? []; + $model->accepted = $data['accepted']['urls'] ?? []; return $model; } + /** + * @return string|null + */ public function getBounceUrl(): ?string { return $this->legacyBounce; } + /** + * @return string|null + */ public function getDeliverUrl(): ?string { return $this->legacyDeliver; } + /** + * @return string|null + */ public function getDropUrl(): ?string { return $this->legacyDrop; } + /** + * @return string|null + */ public function getSpamUrl(): ?string { return $this->legacySpam; } + /** + * @return string|null + */ public function getUnsubscribeUrl(): ?string { return $this->legacyUnsubscribe; } + /** + * @return string|null + */ public function getClickUrl(): ?string { return $this->legacyClick; } + /** + * @return string|null + */ public function getOpenUrl(): ?string { return $this->legacyOpen; } + /** + * @return array|null + */ public function getClickedUrls(): ?array { return $this->clicked; } + /** + * @return array|null + */ public function getComplainedUrls(): ?array { return $this->complained; } + /** + * @return array|null + */ public function getDeliveredUrls(): ?array { return $this->delivered; } + /** + * @return array|null + */ public function getOpenedUrls(): ?array { return $this->opened; } + /** + * @return array|null + */ public function getPermanentFailUrls(): ?array { return $this->permanentFail; } + /** + * @return array|null + */ public function getTemporaryFailUrls(): ?array { return $this->temporaryFail; } + /** + * @return array|null + */ public function getUnsubscribeUrls(): ?array { return $this->unsubscribed; } + + /** + * @return array|null + */ + public function getAccepted(): ?array + { + return $this->accepted; + } + + /** + * @param array|null $accepted + * @return void + */ + public function setAccepted(?array $accepted): void + { + $this->accepted = $accepted; + } }