services:
    oro_promotion.importexport.data_converter.coupon:
        class: Oro\Bundle\PromotionBundle\ImportExport\DataConverter\CouponDataConverter
        parent: oro_importexport.data_converter.configurable
        public: false
        arguments:
            - '@translator'

    # Export processor
    oro_promotion.importexport.processor.export.coupon:
        parent: oro_importexport.processor.export_abstract
        public: false
        calls:
             - [setDataConverter, ['@oro_promotion.importexport.data_converter.coupon']]
        tags:
            - name: oro_importexport.processor
              type: export
              entity: 'Oro\Bundle\PromotionBundle\Entity\Coupon'
              alias: oro_promotion_coupon_export

    oro_promotion.importexport.strategy.add_or_replace.coupon:
        parent: oro_importexport.strategy.configurable_add_or_replace
        public: false

    # Import processor
    oro_promotion.importexport.processor.import.coupon:
        parent: oro_importexport.processor.import_abstract
        public: false
        calls:
             - [setDataConverter, ['@oro_promotion.importexport.data_converter.coupon']]
             - [setStrategy, ['@oro_promotion.importexport.strategy.add_or_replace.coupon']]
        tags:
            - name: oro_importexport.processor
              type: import
              entity: 'Oro\Bundle\PromotionBundle\Entity\Coupon'
              alias: oro_promotion_coupon_import
            - name: oro_importexport.processor
              type: import_validation
              entity: 'Oro\Bundle\PromotionBundle\Entity\Coupon'
              alias: oro_promotion_coupon_import

    oro_promotion.importexport.template_fixture.coupon:
        class: Oro\Bundle\PromotionBundle\ImportExport\TemplateFixture\CouponFixture
        public: false
        tags:
            - { name: oro_importexport.template_fixture }

    oro_promotion.importexport.fixtures.data_converter:
        class: Oro\Bundle\PromotionBundle\ImportExport\DataConverter\CouponDataConverter
        parent: oro_importexport.data_converter.template_fixture.configurable
        public: false
        arguments:
            - '@translator'

    # Template Export processor
    oro_promotion.importexport.processor.export_template.coupon:
        parent: oro_importexport.processor.export_abstract
        public: false
        calls:
            - [setDataConverter, ['@oro_promotion.importexport.fixtures.data_converter']]
        tags:
            - name: oro_importexport.processor
              type: export_template
              entity: 'Oro\Bundle\PromotionBundle\Entity\Coupon'
              alias: oro_promotion_coupon_export_template

    oro_promotion.importexport.configuration_provider.coupon:
        class: 'Oro\Bundle\PromotionBundle\ImportExport\Configuration\CouponImportExportConfigurationProvider'
        tags:
            - { name: oro_importexport.configuration, alias: oro_coupon }
