<?php
/**
 * Amazon discount catalog contract.
 *
 * @package Affilun\Application\AmazonDiscount
 */

declare(strict_types=1);

namespace Affilun\Application\AmazonDiscount;

use Affilun\Domain\Provider\ProviderInterface;
use Affilun\Domain\Search\SearchResult;

/**
 * Extends the Amazon provider with category discount discovery.
 */
interface AmazonDiscountCatalog extends ProviderInterface {

	/**
	 * Search one Amazon category without keywords.
	 *
	 * @param string $searchIndex      Amazon SearchIndex.
	 * @param int    $minSavingPercent Minimum saving percentage.
	 * @param int    $page             One-based result page.
	 * @param int    $itemCount        Items requested per page.
	 */
	public function searchDiscountProducts(
		string $searchIndex,
		int $minSavingPercent,
		int $page,
		int $itemCount
	): SearchResult;

	/**
	 * Search discounted products for one brand across Amazon.
	 *
	 * @param string $brand            Amazon brand filter.
	 * @param int    $minSavingPercent Minimum saving percentage.
	 * @param int    $page             One-based result page.
	 * @param int    $itemCount        Items requested per page.
	 */
	public function searchBrandDiscountProducts(
		string $brand,
		int $minSavingPercent,
		int $page,
		int $itemCount
	): SearchResult;
}
