<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    
    <route url="/V1/orders/:orderId/synchronized" method="POST">
        <service class="Yeboyebo\Sync\Api\Sales\Orders\SynchronizedInterface" method="setSynchronized"/>
        <resources>
            <resource ref="Magento_Sales::sales"/>
        </resources>
    </route>

    <route url="/V1/unsynchronized/orders" method="GET">
        <service class="Yeboyebo\Sync\Api\Sales\Orders\OrdersInterface" method="getList"/>
        <resources>
            <resource ref="Magento_Sales::sales"/>
        </resources>
    </route>

    <!-- new -->

    <route url="/V1/orders/setstate" method="POST">
        <service class="Yeboyebo\Sync\Api\Sales\Orders\SetStateInterface" method="setState"/>
        <resources>
            <resource ref="Magento_Sales::sales"/>
        </resources>
    </route>

    <route url="/V1/products/sku/:sku" method="GET">
        <service class="Yeboyebo\Sync\Api\Catalog\Products\GetProductsInterface" method="getProduct"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>

    <route url="/V1/products/page/:page" method="GET">
        <service class="Yeboyebo\Sync\Api\Catalog\Products\GetProductsInterface" method="getPage"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>

    <route url="/V1/refunds/generaterefundpaypal" method="POST">
        <service class="Yeboyebo\Sync\Api\Sales\Orders\GenerateRefundPaypalInterface" method="refund"/>
        <resources>
            <resource ref="Magento_Sales::sales"/>
        </resources>
    </route>

    <route url="/V1/order/generatepickupeci" method="POST">
        <service class="Yeboyebo\Sync\Api\Sales\Orders\GeneratePickupECIInterface" method="generateLabel"/>
        <resources>
            <resource ref="Magento_Sales::sales"/>
        </resources>
    </route>

    <route url="/V1/refunds/store" method="POST">
        <service class="Yeboyebo\Sync\Api\Sales\Orders\GenerateRefundStoreInterface" method="refund"/>
        <resources>
            <resource ref="Magento_Sales::sales"/>
        </resources>
    </route>

    <route url="/V1/products/stockIncremental" method="POST">
        <service class="Yeboyebo\Sync\Api\Catalog\Products\StockIncremental" method="updateStock"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>

    <route url="/V1/products/stockCanalVenta" method="POST">
        <service class="Yeboyebo\Sync\Api\Catalog\Products\StockCanalVenta" method="updateStock"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>

    <route url="/V1/rma/state" method="POST">
        <service class="Yeboyebo\Sync\Api\Rma\SetStateInterface" method="setState"/>
        <resources>
            <resource ref="Magento_Sales::sales"/>
        </resources>
    </route>
    <!-- end new -->

     <route url="/V1/products/related" method="POST">
        <service class="Yeboyebo\Sync\Api\Catalog\Products\AssignRelatedProducts" method="assign"/>
        <resources>
            <resource ref="Magento_Catalog::catalog"/>
        </resources>
    </route>

</routes>