#
# Module services
#
# Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
# See https://www.x-cart.com/license-agreement.html for license details.
services:
  _defaults:
    autowire: true
    autoconfigure: true

  XC\CanadaPost\Core\EventListener:
    tags:
      - {name: kernel.event_listener, event: xcart.boot, method: onBoot}

  XC\CanadaPost\EntityCallback\DeliveryServiceCallback:
    tags:
      - {name: doctrine.orm.entity_listener, event: prePersist, entity: XC\CanadaPost\Model\DeliveryService}

  XC\CanadaPost\EntityCallback\ProductsReturnCallback:
    tags:
      - {name: doctrine.orm.entity_listener, event: prePersist, entity: XC\CanadaPost\Model\ProductsReturn}
      - {name: doctrine.orm.entity_listener, event: preUpdate, entity: XC\CanadaPost\Model\ProductsReturn}
