'onInitTaxdooApiService', ]; } /** * @param ContainerInterface $container * * @throws KeyNotFoundException|ConfigurationMissingException * * @return TaxdooApiService */ public static function onInitTaxdooApiService(ContainerInterface $container) { $app = $container->get('LegacyApplication'); $token = $app->erp->GetKonfiguration('taxdoo_token'); if ($token === '') { throw new KeyNotFoundException(); } $land = $app->erp->GetKonfiguration('taxdoo_land'); if (strlen($land) !== 2) { throw new ConfigurationMissingException('Land muss ISO-2 sein'); } return new TaxdooApiService($token); } }