code: public function onInsert(ResourceEventInterface $event)
      {
          $order = $this->getSupplierOrderFromEvent($event);
  
          $changed = $this->updateNumber($order);
  
          $changed |= $this->updateState($order);
  
          $changed |= $this->updateTotals($order);
  
          $changed |= $this->updateExchangeRate($order);
  
          if ($changed) {
              $this->persistenceHelper->persistAndRecompute($order);
          }
      }
docs: Insert event handler.
  
  @param ResourceEventInterface $event