code: public function onUpdate(ResourceEventInterface $event)
      {
          $item = $this->getSaleItemFromEvent($event);
  
          $change = false;
  
          // Handle taxation update
          if ($this->persistenceHelper->isChanged($item, ['taxGroup'])) {
              $change = $this->updateTaxation($item);
          }
  
          // Handle discount update
          $discountFields = [
              'subjectIdentity.provider', 'subjectIdentity.identifier',
              'netPrice', 'quantity', 'compound', 'private'
          ];
          if ($this->persistenceHelper->isChanged($item, $discountFields)) {
              $this->updateDiscount($item);
              $change = true;
          }
  
          if ($change) {
              $this->persistenceHelper->persistAndRecompute($item);
  
              $this->scheduleSaleContentChangeEvent($item->getSale());
          }
      }
docs: Update event handler.
  
  @param ResourceEventInterface $event