<?php

namespace Alma\Vendor\Alma\Plugin\Infrastructure\Adapter;

use Alma\Vendor\Alma\Client\Application\Exception\ParametersException;

interface FeePlanAdapterLocalConfigurationAwareInterface
{
    /**
     * Enable this fee plan.
     * @return void
     */
    public function enable(): void;

    /**
     * Check if this fee plan is:
     * - enabled by the merchant.
     * @return bool
     */
    public function isEnabled(): bool;

    /**
     * Get the minimum purchase amount allowed for this fee plan.
     *
     * @return int
     */
    public function getOverrideMinPurchaseAmount(): int;

    /**
     * Set a local override to the minimum purchase amount allowed for this fee plan.
     *
     * @param int $overrideMinPurchaseAmount Amount in cents
     *
     * @return void
     * @throws ParametersException
     */
    public function setOverrideMinPurchaseAmount( int $overrideMinPurchaseAmount ): void;

    /**
     * Get the maximum purchase amount allowed for this fee plan.
     *
     * @return int
     */
    public function getOverrideMaxPurchaseAmount(): int;

    /**
     * Set a local override to the maximum purchase amount allowed for this fee plan.
     *
     * @param int $overrideMaxPurchaseAmount Amount in cents
     *
     * @return void
     * @throws ParametersException
     */
    public function setOverrideMaxPurchaseAmount( int $overrideMaxPurchaseAmount ): void;

    /**
     * Reset the override min value to its default.
     * @return void
     */
    public function resetOverrideMinPurchaseAmount(): void;

    /**
     * Reset the override max value to its default.
     * @return void
     */
    public function resetOverrideMaxPurchaseAmount(): void;
}
