<?xml version="1.0"?>
<!--
/**
 * @copyright: Copyright © 2021 Firebear Studio. All rights reserved.
 * @author   : Firebear Studio <fbeardev@gmail.com>
 */
-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/ship/order/:orderId" method="POST">
        <service class="Firebear\PlatformSap\Api\ShipOrderInterface" method="execute"/>
        <resources>
            <resource ref="Magento_Sales::ship" />
        </resources>
    </route>
    <route url="/V1/refund/order/:orderId" method="POST">
        <service class="Firebear\PlatformSap\Api\RefundOrderInterface" method="execute"/>
        <resources>
            <resource ref="Magento_Sales::creditmemo" />
        </resources>
    </route>
    <route url="/V1/invoice/order/:orderId" method="POST">
        <service class="Firebear\PlatformSap\Api\InvoiceOrderInterface" method="execute"/>
        <resources>
            <resource ref="Magento_Sales::invoice" />
        </resources>
    </route>
    <route url="/V1/update/orders/" method="POST">
        <service class="Firebear\PlatformSap\Api\OrderRepositoryInterface" method="save"/>
        <resources>
            <resource ref="Magento_Sales::create" />
        </resources>
    </route>
    <route url="/V1/update/products/:sku" method="PUT">
        <service class="Firebear\PlatformSap\Api\ProductRepositoryInterface" method="save" />
        <resources>
            <resource ref="Magento_Catalog::products" />
        </resources>
    </route>
</routes>
