public LedgerTransaction CreateLedgerTransaction(LedgerEntryLine reconciliation, LedgerEntry ledgerEntry,
decimal amount, string narrative)
{
if (reconciliation == null)
{
throw new ArgumentNullException(nameof(reconciliation));
}
if (ledgerEntry == null)
{
throw new ArgumentNullException(nameof(ledgerEntry));
}
if (narrative == null)
{
throw new ArgumentNullException(nameof(narrative));
}
LedgerTransaction newTransaction = new CreditLedgerTransaction();
newTransaction.WithAmount(amount).WithNarrative(narrative);
newTransaction.Date = reconciliation.Date;
ledgerEntry.AddTransaction(newTransaction);
return newTransaction;
}