<?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase, WordPress.Files.FileName.InvalidClassFileName
/**
 * Wholesale Discount Repository Interface.
 *
 * @package Autoship\Repositories
 * @since   2.13.0
 */

namespace Autoship\Repositories;

/**
 * Interface for reading and writing wholesale discount values.
 *
 * Wraps WordPress post meta access for the
 * `_autoship_schedule_order_wholesale_discount` meta key.
 *
 * @package Autoship\Repositories
 * @since   2.13.0
 */
interface WholesaleDiscountRepositoryInterface {

	/**
	 * Get the wholesale discount for a product.
	 *
	 * @param int $product_id The WooCommerce product ID.
	 *
	 * @return float|null The discount value, or null if not set.
	 */
	public function get_discount( int $product_id ): ?float;

	/**
	 * Set the wholesale discount for a product.
	 *
	 * @param int   $product_id The WooCommerce product ID.
	 * @param float $value      The discount value.
	 *
	 * @return bool True on success, false on failure.
	 */
	public function set_discount( int $product_id, float $value ): bool;
}
