private function validateDiscount(array $payload, ConstraintViolationList $violationList)
    {
        /** @var string $type */
        $type = $this->getValue($payload, 'type', '');

        /** @var float|null $value */
        $value = $this->getValue($payload, 'value', null);

        if ($value === null) {
            return;
        }

        if ($value < self::DISCOUNT_MIN_VALUE) {
            $violationList->add($this->buildViolation('Value must not be less than ' . self::DISCOUNT_MIN_VALUE, $value));
        }

        switch ($type) {
            case PromotionDiscountEntity::TYPE_PERCENTAGE:
                if ($value > self::DISCOUNT_PERCENTAGE_MAX_VALUE) {
                    $violationList->add($this->buildViolation('Absolute value must not greater than ' . self::DISCOUNT_PERCENTAGE_MAX_VALUE, $value));
                }
                break;
        }
    }