move action to SimbrellaClient integration

This commit is contained in:
2025-04-11 16:11:45 +01:00
parent 1a39afb216
commit 5214594fab
5 changed files with 44 additions and 16 deletions
+26
View File
@@ -0,0 +1,26 @@
import requests
from app.config import settings
from app.utils.auth import get_headers
from app.utils.logger import logger
from flask import jsonify
class SimbrellaClient:
BASE_URL = settings.BANK_CALL_BASE_URL
@staticmethod
def disbursement(data):
api_url = f"{SimbrellaClient.BASE_URL}/Disbursement"
logger.info(f"Calling disbursement endpoint with data: {data}")
response = requests.post(
api_url,
json=data,
headers=get_headers()
)
logger.info(f"Disbursement response: {response.json()}")
return jsonify(response.json()), response.status_code