Remove GoCardless fallback from /accounts endpoints

- Remove GoCardless API calls from /api/v1/accounts and /api/v1/accounts/{account_id}
- Accounts endpoints now rely exclusively on database data
- Return 404 for accounts not found in database
- Update tests to mock database service instead of GoCardless API
- Remove unused GoCardless imports from transactions routes
- Preserve GoCardless usage in sync process and /banks endpoints
- Fix code formatting and remove unused imports
This commit is contained in:
Elisiário Couto
2025-09-08 19:37:49 +01:00
committed by Elisiário Couto
parent abacfd78c8
commit 6c8b8ed3cc
6 changed files with 357 additions and 131 deletions

View File

@@ -55,6 +55,10 @@ class SyncService:
account_id
)
# Persist account details to database
if account_details:
await self.database.persist_account_details(account_details)
# Get and save balances
balances = await self.gocardless.get_account_balances(account_id)
if balances: