code: 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;
      }
docs: Returns the adjustments, optionally filtered by type.
  
  @param string $type
  
  @return ArrayCollection|AdjustmentInterface[]