protected function getAccountingFromEvent(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof AccountingInterface) {
            throw new InvalidArgumentException('Expected instance of ' . AccountingInterface::class);
        }

        return $resource;
    }
protected function getAccountingFromEvent(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof AccountingInterface) {
            throw new InvalidArgumentException('Expected instance of ' . AccountingInterface::class);
        }

        return $resource;
    }
Returns the accounting from the event.

@param ResourceEventInterface $event

@return AccountingInterface
@throws InvalidArgumentException