code: protected function getSaleFromEvent(ResourceEventInterface $event)
      {
          $resource = $event->getResource();
  
          if (!$resource instanceof CartInterface) {
              throw new InvalidArgumentException("Expected instance of CartInterface");
          }
  
          return $resource;
      }
docs: @inheritdoc
  
  @return CartInterface