Files
fewo-stommer/app/Communication/IncomingMessage.php
T

26 lines
798 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Communication;
use App\Enums\Medium;
use Carbon\CarbonImmutable;
/**
* A message as the medium adapters hand it over (V2.1): raw data only. {@see $verifiedBookingId} is set by the adapter
* itself from a reference it issued and can verify (signed token, reply to one of our mails) – a claim in the text is
* never enough. {@see $consentGiven} is likewise the adapter's statement.
*/
final readonly class IncomingMessage
{
public function __construct(
public Medium $medium,
public string $sender,
public string $text,
public CarbonImmutable $receivedAt,
public string $externalId,
public ?int $verifiedBookingId = null,
public bool $consentGiven = false,
public ?string $senderName = null,
) {}
}