#nullable enable
using Baya.Application.Models.Common;
using Baya.Application.Models.Refunds;
using Mediator;

namespace Baya.Application.Features.Refunds.Commands.ConfirmRefundSettlement;

/// <summary>
/// Reconciliation confirmed the customer cash-back for a <c>processing</c> BNPL/manual refund: transitions it
/// <c>processing → succeeded</c>, stamps the settled instant, and posts the deferred
/// <c>refund_payable ↔ escrow_held</c> clearing in the same commit. Reached two ways — the admin
/// <c>confirm_settlement</c> action and the BNPL provider cash-back callback. Idempotent: a replay against an
/// already-succeeded refund is a no-op success (the clearing is never posted twice).
/// </summary>
public record ConfirmRefundSettlementCommand(long RefundId) : IRequest<OperationResult<RefundSettlementResult>>;
