code: protected function preventForbiddenChange(Model\InvoiceLineInterface $line)
      {
          if ($this->persistenceHelper->isChanged($line, 'type')) {
              list($old, $new) = $this->persistenceHelper->getChangeSet($line, 'type');
              if ($old !== $new) {
                  throw new Exception\RuntimeException("Changing the invoice line's type is not supported.");
              }
          }
      }
docs: Prevents some of the invoice line fields from changing.
  
  @param Model\InvoiceLineInterface $line