public function AvataxLib::__construct in Drupal Commerce Connector for AvaTax 8
Constructs a new AvataxLib object.
Parameters
\Drupal\commerce_order\AdjustmentTypeManager $adjustment_type_manager: The adjustment type manager.
\Drupal\commerce_avatax\Resolver\ChainTaxCodeResolverInterface $chain_tax_code_resolver: The chain tax code resolver.
\Drupal\commerce_avatax\ClientFactory $client_factory: The client.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.
\Psr\Log\LoggerInterface $logger: The logger.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.
File
- src/
AvataxLib.php, line 105
Class
- AvataxLib
- The AvaTax integration library.
Namespace
Drupal\commerce_avataxCode
public function __construct(AdjustmentTypeManager $adjustment_type_manager, ChainTaxCodeResolverInterface $chain_tax_code_resolver, ClientFactory $client_factory, ConfigFactoryInterface $config_factory, EventDispatcherInterface $event_dispatcher, LoggerInterface $logger, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend) {
$this->adjustmentTypeManager = $adjustment_type_manager;
$this->chainTaxCodeResolver = $chain_tax_code_resolver;
$this->config = $config_factory
->get('commerce_avatax.settings');
$this->client = $client_factory
->createInstance($this->config
->get());
$this->eventDispatcher = $event_dispatcher;
$this->logger = $logger;
$this->moduleHandler = $module_handler;
$this->cache = $cache_backend;
}