<?php

namespace Alsendo\AlsendoWrapper\Model\Error;

class ErrorMessage
{
    /** @var string|null Field path (null if error is not field-specific) */
    public ?string $field;

    /** @var string Error message */
    public string $message;

    public function __construct(string $message, ?string $field = null)
    {
        $this->message = $message;
        $this->field = $field;
    }
}
