You are here

commerce_avatax.services.yml in Drupal Commerce Connector for AvaTax 8

File

commerce_avatax.services.yml
View source
  1. services:
  2. cache.commerce_avatax_memory:
  3. class: Drupal\Core\Cache\MemoryCache\MemoryCache
  4. public: false
  5. cache.commerce_avatax:
  6. class: Drupal\Core\Cache\BackendChain
  7. calls:
  8. - [appendBackend, ['@cache.commerce_avatax_memory']]
  9. - [appendBackend, ['@cache.default']]
  10. tags: [{ name: cache.bin }]
  11. commerce_avatax.avatax_lib:
  12. class: Drupal\commerce_avatax\AvataxLib
  13. arguments: ['@plugin.manager.commerce_adjustment_type', '@commerce_avatax.chain_tax_code_resolver', '@commerce_avatax.client_factory', '@config.factory', '@event_dispatcher', '@logger.channel.commerce_avatax', '@module_handler', '@cache.commerce_avatax']
  14. commerce_avatax.client_factory:
  15. class: Drupal\commerce_avatax\ClientFactory
  16. arguments: ['@http_client_factory', '@extension.list.module']
  17. commerce_avatax.chain_tax_code_resolver:
  18. class: Drupal\commerce_avatax\Resolver\ChainTaxCodeResolver
  19. tags:
  20. - { name: service_collector, call: addResolver, tag: commerce_avatax.tax_code_resolver }
  21. commerce_avatax.product_variation_tax_code_resolver:
  22. class: Drupal\commerce_avatax\Resolver\ProductVariationTaxCodeResolver
  23. tags:
  24. - { name: commerce_avatax.tax_code_resolver, priority: 100 }
  25. commerce_avatax.order_subscriber:
  26. class: Drupal\commerce_avatax\EventSubscriber\OrderSubscriber
  27. arguments: ['@commerce_avatax.avatax_lib', '@config.factory']
  28. tags:
  29. - { name: event_subscriber }
  30. commerce_avatax.customer_profile_alter:
  31. class: Drupal\commerce_avatax\CustomerProfileAlter
  32. arguments: ['@config.factory', '@commerce_avatax.avatax_lib', '@csrf_token', '@datetime.time']
  33. logger.channel.commerce_avatax:
  34. class: Drupal\Core\Logger\LoggerChannel
  35. factory: logger.factory:get
  36. arguments: ['commerce_avatax']