<?xml version="1.0"?>
<!--
/**
 * Copyright © MageWorx. All rights reserved.
 * See LICENSE.txt for license details.
 */
-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <!-- Product Group Price -->
    <route url="/V1/products/mw-group-prices-information" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupPriceStorageInterface" method="get"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/products/mw-group-prices" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupPriceStorageInterface" method="update"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/products/mw-group-prices" method="PUT">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupPriceStorageInterface" method="replace"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/products/mw-group-prices-delete" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupPriceStorageInterface" method="delete"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>

    <!-- Product Group Special Price -->
    <route url="/V1/products/mw-group-special-prices-information" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupSpecialPriceStorageInterface" method="get"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/products/mw-group-special-prices" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupSpecialPriceStorageInterface" method="update"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/products/mw-group-special-prices" method="PUT">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupSpecialPriceStorageInterface" method="replace"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/products/mw-group-special-prices-delete" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\ProductGroupSpecialPriceStorageInterface" method="delete"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>

    <!-- Customer Group Price -->
    <route url="/V1/customerGroups/mw-group-prices-information" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\CustomerGroupPriceStorageInterface" method="get"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/customerGroups/mw-group-prices" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\CustomerGroupPriceStorageInterface" method="update"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/customerGroups/mw-group-prices" method="PUT">
        <service class="MageWorx\CustomerGroupPrices\Api\CustomerGroupPriceStorageInterface" method="replace"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
    <route url="/V1/customerGroups/mw-group-prices-delete" method="POST">
        <service class="MageWorx\CustomerGroupPrices\Api\CustomerGroupPriceStorageInterface" method="delete"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>
</routes>
