public function getAdjustments($type = null)
    {
        if (null !== $type) {
            AdjustmentTypes::isValidType($type);

            return $this
                ->adjustments
                ->filter(function (AdjustmentInterface $a) use ($type) {
                    return $a->getType() === $type;
                });
        }

        return $this->adjustments;
    }
public function getAdjustments($type = null)
    {
        if (null !== $type) {
            AdjustmentTypes::isValidType($type);

            return $this
                ->adjustments
                ->filter(function (AdjustmentInterface $a) use ($type) {
                    return $a->getType() === $type;
                });
        }

        return $this->adjustments;
    }
Returns the adjustments, optionally filtered by type.

@param string $type

@return ArrayCollection|AdjustmentInterface[]