code: public function getCurrencyIdentifierByCode($code)
      {
          /**
           * @var EntityRepository $currencyRepository
           */
          $currencyRepository = $this->entityManager->getRepository(Currency::class);
  
          /**
           * @var null|Currency $currencyModel
           */
          $currencyModel = $currencyRepository->findOneBy(['currency' => $code]);
  
          if (null === $currencyModel) {
              throw new InvalidArgumentException('invalid currency code');
          }
  
          return $currencyModel->getId();
      }
docs: {@inheritdoc}