code: public function onInsert(ResourceEventInterface $event)
      {
          $line = $this->getInvoiceLineFromEvent($event);
  
          $this->stockUnitAssigner->assignInvoiceLine($line);
  
          $this->scheduleInvoiceContentChangeEvent($line->getInvoice());
      }
docs: Insert event handler.
  
  @param ResourceEventInterface $event