<?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/mstore/customers/me/address" method="PUT">
        <service class="Mstore\Customer\Api\AddressRepositoryInterface" method="save"/>
        <resources>
            <resource ref="self"/>
        </resources>
        <data>
            <parameter name="customerId" force="true">%customer_id%</parameter>
        </data>
    </route>
    <route url="/V1/mstore/customers/me/address/:addressId" method="DELETE">
        <service class="Mstore\Customer\Api\AddressRepositoryInterface" method="deleteById"/>
        <resources>
            <resource ref="self"/>
        </resources>
        <data>
            <parameter name="customerId" force="true">%customer_id%</parameter>
        </data>
    </route>
    <route url="/V1/mstore/customers/me/address/:addressId" method="GET">
        <service class="Mstore\Customer\Api\AddressRepositoryInterface" method="getById"/>
        <resources>
            <resource ref="self"/>
        </resources>
        <data>
            <parameter name="customerId" force="true">%customer_id%</parameter>
        </data>
    </route>
    <route url="/V1/mstore/customers/me/address/search" method="GET">
        <service class="Mstore\Customer\Api\AddressRepositoryInterface" method="getList"/>
        <resources>
            <resource ref="self"/>
        </resources>
        <data>
            <parameter name="customerId" force="true">%customer_id%</parameter>
        </data>
    </route>
    <route url="/V1/mstore/customers/me/changeEmail" method="POST">
        <service class="Mstore\Customer\Api\AccountManagementInterface" method="changeEmail"/>
        <resources>
            <resource ref="self"/>
        </resources>
        <data>
            <parameter name="customerId" force="true">%customer_id%</parameter>
        </data>
    </route>
    <route url="/V1/mstore/customers/me/changePassword" method="POST">
        <service class="Mstore\Customer\Api\AccountManagementInterface" method="changePasswordById"/>
        <resources>
            <resource ref="self"/>
        </resources>
        <data>
            <parameter name="customerId" force="true">%customer_id%</parameter>
        </data>
    </route>
</routes>
