@@ -47,6 +47,7 @@ class Payload implements \JsonSerializable
4747 const PAYLOAD_RELEVANCE_SCORE_KEY = 'relevance-score ' ;
4848 const PAYLOAD_STALE_DATE_KEY = 'stale-date ' ;
4949 const PAYLOAD_CONTENT_STATE_KEY = 'content-state ' ;
50+ const PAYLOAD_DISMISSAL_DATE_KEY = 'dismissal-date ' ;
5051 const PAYLOAD_ATTRIBUTES_TYPE_KEY = 'attributes-type ' ;
5152 const PAYLOAD_ATTRIBUTES_KEY = 'attributes ' ;
5253
@@ -185,6 +186,13 @@ class Payload implements \JsonSerializable
185186 */
186187 private $ attributes = [];
187188
189+ /**
190+ * Dismissal date
191+ *
192+ * @var int|null
193+ */
194+ private $ dismissalDate ;
195+
188196 protected function __construct ()
189197 {
190198 }
@@ -672,6 +680,18 @@ public function getAttributes(): array
672680 return $ this ->attributes ;
673681 }
674682
683+ public function setDismissalDate (int $ value ): Payload
684+ {
685+ $ this ->dismissalDate = $ value ;
686+
687+ return $ this ;
688+ }
689+
690+ public function getDismissalDate (): int |null
691+ {
692+ return $ this ->dismissalDate ;
693+ }
694+
675695 /**
676696 * Convert Payload to JSON.
677697 *
@@ -765,6 +785,10 @@ public function jsonSerialize(): array
765785 $ payload [self ::PAYLOAD_ROOT_KEY ]->{self ::PAYLOAD_RELEVANCE_SCORE_KEY } = $ this ->relevanceScore ;
766786 }
767787
788+ if ($ this ->dismissalDate ) {
789+ $ payload [self ::PAYLOAD_ROOT_KEY ]->{self ::PAYLOAD_DISMISSAL_DATE_KEY } = (int ) $ this ->getDismissalDate ();
790+ }
791+
768792 if ($ this ->attributesType ) {
769793 $ payload [self ::PAYLOAD_ROOT_KEY ]->{self ::PAYLOAD_ATTRIBUTES_TYPE_KEY } = $ this ->attributesType ;
770794 $ payload [self ::PAYLOAD_ROOT_KEY ]->{self ::PAYLOAD_ATTRIBUTES_KEY } = $ this ->attributes ;
0 commit comments