code: public function onInsert(ResourceEventInterface $event)
      {
          $item = $this->getSaleItemFromEvent($event);
  
          $change = $this->updateTaxation($item);
  
          $change |= $this->updateDiscount($item);
  
          if ($change) {
              $this->persistenceHelper->persistAndRecompute($item);
          }
  
          $this->scheduleSaleContentChangeEvent($item->getSale());
      }
docs: Insert event handler.
  
  @param ResourceEventInterface $event