<?xml version="1.0"?>
<!--
/**
 * BSS Commerce Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://bsscommerce.com/Bss-Commerce-License.txt
 *
 * @category   BSS
 * @package    Bss_OrderAmount
 * @author     Extension Team
 * @copyright  Copyright (c) 2015-2019 BSS Commerce Co. ( http://bsscommerce.com )
 * @license    http://bsscommerce.com/Bss-Commerce-License.txt
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
	<type name="Magento\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage">
        <plugin name="minimumorderamout-customer-group-validate-message" type="Bss\OrderAmount\Plugin\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage" sortOrder="0"/>
    </type>

    <type name="Magento\Quote\Model\Quote">
        <plugin name="minimumorderamout-customer-group-validate-quote" type="Bss\OrderAmount\Plugin\Quote\Model\Quote" sortOrder="0"/>
    </type>

    <type name="Magento\Quote\Model\Quote\Address">
        <plugin name="minimumorderamout-customer-group-validate-quote-address" type="Bss\OrderAmount\Plugin\Quote\Model\Quote\Address" sortOrder="0"/>
    </type>

    <type name="Magento\Quote\Model\ShippingAddressManagement">
        <plugin name="minimumorderamout-remove-assign-adress-check-minimum-amount" type="Bss\OrderAmount\Plugin\Quote\Model\ShippingAddressManagement" sortOrder="0"/>
    </type>

    <type name="Magento\Quote\Model\Quote\TotalsCollector">
        <plugin name="minimumorderamout-save-shipping-address" type="Bss\OrderAmount\Plugin\Quote\Model\Quote\TotalsCollector" sortOrder="0"/>
    </type>

    <type name="Magento\Checkout\Model\DefaultConfigProvider">
        <plugin name="minimumorderamout-getbase-url" type="Bss\OrderAmount\Plugin\Model\DefaultConfigProvider" sortOrder="0"/>
    </type>
    <type name="Magento\Customer\Controller\Adminhtml\Index\Save">
        <plugin name="Customerattr_Plugin" type="Bss\OrderAmount\Plugin\CheckAttribute" sortOrder="10" disabled="false"  />
    </type>
    <!--    Api-->
    <preference for="Bss\OrderAmount\Api\OrderAmountInterface" type="Bss\OrderAmount\Model\SetOrderAmount" />
    <!--    End-->
    <type name="Magento\Multishipping\Model\Checkout\Type\Multishipping">
        <plugin name="Bss_validate_minimum_amount_for_address_items" type="Bss\OrderAmount\Plugin\Model\Checkout\Type\Multishipping" sortOrder="10" disabled="false"  />
    </type>
</config>
