feat: add Plaid transaction handling and async queue processing
- introduced new migration to add Cursor column to AccountMetadata. - updated AppDbContext model snapshot to reflect changes in the database schema. - implemented async queue processing with ChannelAsyncQueue and AsyncQueueHostedService. - created Plaid transaction handlers for added, modified, and removed transactions. - developed PlaidTransactionService and PlaidTransactionSyncer for syncing transactions. - added SyncUpdatesProcessor to handle sync updates from Plaid. - updated tests to accommodate changes in institution and account metadata handling.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using FiscalOS.Core.Transactions;
|
||||
|
||||
namespace FiscalOS.Core.Accounts;
|
||||
|
||||
public sealed class Account : Entity
|
||||
@@ -11,6 +13,9 @@ public sealed class Account : Entity
|
||||
private readonly List<Balance> _balances = [];
|
||||
public IEnumerable<Balance> Balances => _balances;
|
||||
|
||||
private readonly List<Transaction> _transactions = [];
|
||||
public IEnumerable<Transaction> Transactions => _transactions;
|
||||
|
||||
public static Account From(Guid institutionId, string name, AccountMetadata accountMetadata)
|
||||
{
|
||||
return new()
|
||||
@@ -27,4 +32,11 @@ public sealed class Account : Entity
|
||||
|
||||
_balances.Add(balance);
|
||||
}
|
||||
|
||||
public void AddTransaction(Transaction transaction)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(transaction);
|
||||
|
||||
_transactions.Add(transaction);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user