Update payload

This commit is contained in:
2025-07-17 01:59:37 +07:00
parent 3bd22922c7
commit 4b18d43b3f
3 changed files with 45 additions and 29 deletions

View File

@@ -1,3 +1,5 @@
using Managing.Domain.Users;
namespace Managing.Application.Abstractions.Services;
public interface IKaigenService
@@ -5,16 +7,16 @@ public interface IKaigenService
/// <summary>
/// Debits user credits for a backtest operation
/// </summary>
/// <param name="userName">The username to debit</param>
/// <param name="user">The user to debit</param>
/// <param name="debitAmount">The amount to debit</param>
/// <returns>The request ID for tracking</returns>
Task<string> DebitUserCreditsAsync(string userName, decimal debitAmount);
Task<string> DebitUserCreditsAsync(User user, decimal debitAmount);
/// <summary>
/// Refunds user credits if debit operation fails
/// </summary>
/// <param name="requestId">The original request ID from debit operation</param>
/// <param name="userName">The username to refund</param>
/// <param name="user">The user to refund</param>
/// <returns>True if refund was successful</returns>
Task<bool> RefundUserCreditsAsync(string requestId, string userName);
Task<bool> RefundUserCreditsAsync(string requestId, User user);
}