private function getResourceModel() : InventoryDataInterface
    {
        if ($this->resourceModel === null) {
            $resourceName = InventoryDataInterface::class;

            try {
                // Will try to fetch default implementation and fail in case of missing MSI modules or dependencies.
                $stockResolver = $this->config->getPreference(\Magento\InventorySalesApi\Api\StockResolverInterface::class);
                if (ltrim($stockResolver, '\\') === ltrim(\Magento\InventorySalesApi\Api\StockResolverInterface::class, '\\')) {
                    $resourceName = Deprecation::class;
                }
            } catch (\Exception $exception) {
                ; // Nothing to do, it's already kinda hacky to allow this deprecation fallback to happen.
            }

            $this->resourceModel = $this->objectManager->get($resourceName);
        }

        return $this->resourceModel;
    }