New IFxConverter.ConvertToChf(amount, fromCurrency) and FxConverter wrap the vendor IFxService and the FixerIo API key so callers stop threading the key through every conversion. ViewService drops IFxService and ISettingsService from its constructor and takes IFxConverter instead; GetAccountViewList and GetBalanceSheetView no longer read settingsService.GetSettings() per method. FxConverterTestShould locks in the target-currency + API-key routing. 40 tests total, all passing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
360 B
C#
11 lines
360 B
C#
namespace Schaad.Accounting.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Thin wrapper over the vendor <c>IFxService</c> that hides the FixerIo API key
|
|
/// and the base currency, so callers just ask "convert this amount to CHF".
|
|
/// </summary>
|
|
public interface IFxConverter
|
|
{
|
|
decimal ConvertToChf(decimal amount, string fromCurrency);
|
|
}
|
|
}
|