using CareFusion.Mosaic.Converters.Wwks2.Types;
using CareFusion.Mosaic.Interfaces.Converters;
using CareFusion.Mosaic.Interfaces.Messages.Stock;
using System.Collections.Generic;

namespace StorageSystem.Simulator.Cores.StockUpdateHandler;

internal class AlwaysRejectHandler : StockUpdateHandlerBase
{
    private readonly string _reason;

    public AlwaysRejectHandler(string reason, List<IConverterStream> converterStreams) : base(converterStreams)
    {
        _reason = reason;
    }

    protected override void FillResponse(StockUpdateRequest request, StockUpdateResponse response)
    {
        response.Details = new Details
        {
            Status = "Rejected",
            Reason = _reason
        };
    }
}