Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
NotificationReceived
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace LambdaTwelve\OneRecord\Server\Event;
6
7use LambdaTwelve\OneRecord\Api\Notification;
8use LambdaTwelve\OneRecord\Server\Spi\Agent;
9
10/**
11 * A partner told us about one of its objects or the status of a request we
12 * made. The server stores nothing; the host reacts (fetch the object, update
13 * its records).
14 */
15final readonly class NotificationReceived
16{
17    /**
18     * @param ?string $idempotencyKey the sender's Idempotency-Key header when it sent one; the same
19     *                                value on a later delivery means a retry of this notification
20     */
21    public function __construct(
22        public Notification $notification,
23        public Agent $sentBy,
24        public ?string $idempotencyKey = null,
25    ) {}
26}