services:
    oro_promotion.api.compute_order_promotion_discounts:
        class: Oro\Bundle\PromotionBundle\Api\Processor\ComputeOrderPromotionDiscounts
        tags:
            - { name: oro.api.processor, action: customize_loaded_data, requestType: '!frontend', class: Oro\Bundle\OrderBundle\Entity\Order }

    oro_promotion.api.order_line_item_discount_provider:
        class: Oro\Bundle\PromotionBundle\Api\OrderLineItemDiscountProvider
        arguments:
            - '@oro_api.doctrine_helper'

    oro_promotion.api.add_order_promotion_discounts:
        class: Oro\Bundle\PromotionBundle\Api\Processor\AddOrderPromotionDiscounts
        arguments:
            - '@oro_api.doctrine_helper'
            - '@translator'
        tags:
            - { name: oro.api.processor, action: customize_loaded_data, requestType: frontend, collection: true, class: Oro\Bundle\OrderBundle\Entity\Order }

    oro_promotion.api.compute_order_line_item_discounts:
        class: Oro\Bundle\PromotionBundle\Api\Processor\ComputeOrderLineItemDiscounts
        arguments:
            - '@oro_promotion.api.order_line_item_discount_provider'
            - '@oro_tax.api.order_line_item_taxes_provider'
            - '@oro_api.value_transformer'
        tags:
            - { name: oro.api.processor, action: customize_loaded_data, requestType: frontend, collection: true, class: Oro\Bundle\OrderBundle\Entity\OrderLineItem }
