books/backend/Books.Api/AiBookkeeper/StubAiBookkeeperClient.cs

23 lines
726 B
C#
Raw Normal View History

namespace Books.Api.AiBookkeeper;
/// <summary>
/// Stub implementation of IAiBookkeeperClient used when the API key is not configured.
/// Returns an error message indicating the service is unavailable.
/// </summary>
public class StubAiBookkeeperClient : IAiBookkeeperClient
{
public Task<AiBookkeeperResponse> ProcessDocumentAsync(
Stream document,
string fileName,
string contentType,
ChartOfAccountsDto chartOfAccounts,
CancellationToken cancellationToken = default)
{
return Task.FromResult(new AiBookkeeperResponse
{
Success = false,
ErrorMessage = "AI Bookkeeper er ikke konfigureret. Kontakt administrator."
});
}
}