using Nop.Core.Domain.Payments;

namespace Nop.Services.Payments;

/// <summary>
/// Refund payment result
/// </summary>
public partial class RefundPaymentResult
{
    public RefundPaymentResult()
    {
        Errors = new List<string>();
    }

    /// <summary>
    /// Gets a value indicating whether request has been completed successfully
    /// </summary>
    public bool Success => !Errors.Any();

    /// <summary>
    /// Add error
    /// </summary>
    /// <param name="error">Error</param>
    public void AddError(string error)
    {
        Errors.Add(error);
    }

    /// <summary>
    /// Errors
    /// </summary>
    public IList<string> Errors { get; set; }

    /// <summary>
    /// Gets or sets a payment status after processing
    /// </summary>
    public PaymentStatus NewPaymentStatus { get; set; } = PaymentStatus.Pending;
}