code: public function onUpdate(ResourceEventInterface $event)
      {
          $item = $this->getSupplierDeliveryItemFromEvent($event);
  
          if (null === $orderItem = $item->getOrderItem()) {
              throw new RuntimeException("OrderItem must be set.");
          }
  
          if ($this->persistenceHelper->isChanged($item, 'geocode')) {
              if (null !== $stockUnit = $orderItem->getStockUnit()) {
                  $gCs = $this->persistenceHelper->getChangeSet($item, 'geocode');
  
                  $stockUnit->removeGeocode($gCs[0]);
                  $stockUnit->addGeocode($gCs[1]);
  
                  $this->persistenceHelper->persistAndRecompute($stockUnit, false);
              } elseif ($orderItem->hasSubjectIdentity()) {
                  throw new RuntimeException("Failed to retrieve stock unit.");
              }
          }
  
          if ($this->persistenceHelper->isChanged($item, 'quantity')) {
              $this->handleQuantityChange($item);
  
              // Dispatch supplier order content change event
              if (null === $order = $orderItem->getOrder()) {
                  throw new RuntimeException("Order must be set.");
              }
              $this->scheduleSupplierOrderContentChangeEvent($order);
  
              // Remove item with zero quantity without event schedule
              if (0 == $item->getQuantity()) {
                  $this->persistenceHelper->remove($item, false);
              }
          }
      }
docs: Update event handler.
  
  @param ResourceEventInterface $event