bundles/VehicleIngestBundle/Message/IngestCampaignMessage.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace VehicleIngestBundle\Message;
  4. /**
  5.  * Async message dispatched by CampaignController onto the `vehicle_ingest` transport (routed in
  6.  * config/config.yaml). Consumed by IngestCampaignMessageHandler, which resolves $adId to a
  7.  * vehicle and applies $campaigns directly - see that handler's class docblock for the field
  8.  * mapping and its sandbox-unconfirmed points.
  9.  *
  10.  * $campaigns is the decoded JSON body: a list of {id,name,validFrom,validUntil} arrays (per the
  11.  * one real automedia sample payload we have, see CampaignController's docblock). An empty array
  12.  * is a valid, meaningful payload (see the handler's "empty = no-op" documentation) - not the
  13.  * same as "absent".
  14.  */
  15. final class IngestCampaignMessage
  16. {
  17.     public function __construct(
  18.         public readonly string $adId,
  19.         public readonly array $campaigns,
  20.     ) {
  21.     }
  22. }