using GB5Shared.DTO.Framework.Login; namespace GoodBooks.PAY.PAYBLL.Cashback { public interface ICashbackLedgerBLL { Task GetCashbackLedger(int cashbackLedgerId, LoginDTO login, CancellationToken ct); /// Unpaginated — one order's cashback rows are naturally few. Task GetCashbackLedgerByOrder(int payOrderId, LoginDTO login, CancellationToken ct); /// /// Fetches the next batch of up to 50 pending cashback rows whose ScheduledPayoutOn /// has passed and attempts to dispatch each payout according to its PayoutMode: /// 1 = CreditNote (Finance integration — Phase 1) /// 2 = GatewayPayout (Not implemented — Phase 2) /// 3 = Wallet (Not implemented — Phase 2) /// 4 = LoyaltyPoints (Converts cashback amount to points via ICustomerLoyaltyBLL) /// Each row is processed independently; failures increment RetryCount. /// Rows that exhaust MaxCashbackRetries are marked Abandoned (status 5). /// Task ProcessPendingPayoutsAsync(LoginDTO login, CancellationToken ct); } }