using System.Collections.Generic;
using CareFusion.Lib.StorageSystem.Output;
using CareFusion.Lib.StorageSystem.Wwks2.Types;
using StorageSystem.Stock;

namespace CareFusion.Lib.StorageSystem.Stock
{

    /// <summary>
    /// Interface which defines the methods and properties of a stock update
    /// </summary>
    public interface IStockUpdate
    {
        /// <summary>
        /// Adds a new criteria to the stock update which selects which articles and packs will be updated
        /// Make sure to add at least a single criteria to limit the scope of the update
        /// Adding multiple criteria acts as an OR filter
        /// </summary>
        /// <param name="articleId">Filter by article id</param>
        /// <param name="batchNumber">Filter by batch number</param>
        /// <param name="externalId">Filter by external id</param>
        /// <param name="packId">Filter by pack id</param>
        /// <param name="stockLocationId">Filter by stock location</param>
        /// <param name="machineLocation">Filter by machine location</param>
        /// <param name="serialNumber">Filter by serial number</param>
        void AddCriteria(string articleId = null,
            string batchNumber = null,
            string externalId = null,
            ulong? packId = null,
            string stockLocationId = null,
            string machineLocation = null,
            string serialNumber = null);

        /// <summary>
        /// The field update for the batch number
        /// setting this to null means no action
        /// </summary>
        FieldUpdate<string>? BatchNumber { get; set; }


        /// <summary>
        /// Applies the stock update to the storage system 
        /// </summary>
        /// <returns>true if successful, otherwise false</returns>
        StockUpdateResult Execute();

    }
}