pyEscoAPI 0.0.40__tar.gz → 0.0.41__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/PKG-INFO +1 -1
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI/esco_api.py +41 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI.egg-info/PKG-INFO +1 -1
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyproject.toml +1 -1
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/tests/test_client.py +32 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/README.md +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI/__init__.py +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI/dataclasses.py +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI/exception.py +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI.egg-info/SOURCES.txt +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI.egg-info/dependency_links.txt +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI.egg-info/requires.txt +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/pyEscoAPI.egg-info/top_level.txt +0 -0
- {pyescoapi-0.0.40 → pyescoapi-0.0.41}/setup.cfg +0 -0
|
@@ -1414,6 +1414,47 @@ class EscoAPI:
|
|
|
1414
1414
|
request_method=HTTPMethod.POST
|
|
1415
1415
|
)
|
|
1416
1416
|
|
|
1417
|
+
def get_transferencia_titulos(
|
|
1418
|
+
self,
|
|
1419
|
+
cuentas: str | None = None,
|
|
1420
|
+
fecha_desde: date | None = None,
|
|
1421
|
+
fecha_hasta: date | None = None,
|
|
1422
|
+
cod_tp_transferencia_tit_mov: str | None = None,
|
|
1423
|
+
por_concertacion: bool = True,
|
|
1424
|
+
es_consolidado: bool = False,
|
|
1425
|
+
incluye_anulado: bool = False,
|
|
1426
|
+
):
|
|
1427
|
+
"""
|
|
1428
|
+
Devuelve las transferencias de títulos de las cuentas comitente solicitadas.
|
|
1429
|
+
:param cuentas: Lista de números de cuentas comitente. Se puede ingresar una sola cuenta o una lista separada por comas.
|
|
1430
|
+
:param fecha_desde: Fecha inicial de la consulta.
|
|
1431
|
+
:param fecha_hasta: Fecha final de la consulta.
|
|
1432
|
+
:param cod_tp_transferencia_tit_mov: Código del tipo de transferencia de títulos.
|
|
1433
|
+
:param por_concertacion: Indica si las transferencias se buscan por fecha de concertación.
|
|
1434
|
+
:param es_consolidado: Indica si se informan las transferencias de todas las cuentas vinculadas al usuario.
|
|
1435
|
+
:param incluye_anulado: Indica si se incluyen las transferencias anuladas.
|
|
1436
|
+
"""
|
|
1437
|
+
if fecha_desde is None:
|
|
1438
|
+
fecha_desde = date.today() - timedelta(days=30)
|
|
1439
|
+
if fecha_hasta is None:
|
|
1440
|
+
fecha_hasta = date.today()
|
|
1441
|
+
|
|
1442
|
+
req_body = {
|
|
1443
|
+
"cuentas": cuentas,
|
|
1444
|
+
"fechaDesde": fecha_desde.strftime("%Y-%m-%d"),
|
|
1445
|
+
"fechaHasta": fecha_hasta.strftime("%Y-%m-%d"),
|
|
1446
|
+
"codTpTransferenciaTitMov": cod_tp_transferencia_tit_mov,
|
|
1447
|
+
"porConcertacion": por_concertacion,
|
|
1448
|
+
"esConsolidado": es_consolidado,
|
|
1449
|
+
"incluyeAnulado": incluye_anulado,
|
|
1450
|
+
}
|
|
1451
|
+
self.__pre_connection()
|
|
1452
|
+
return self.__make_request(
|
|
1453
|
+
request_endpoint="/get-transferencia-titulos",
|
|
1454
|
+
request_body=req_body,
|
|
1455
|
+
request_method=HTTPMethod.POST,
|
|
1456
|
+
)
|
|
1457
|
+
|
|
1417
1458
|
def get_liquidaciones_fondos(
|
|
1418
1459
|
self,
|
|
1419
1460
|
cuentas: str = None,
|
|
@@ -516,4 +516,36 @@ def test_insert_movimiento_manual(mock_login, api_client):
|
|
|
516
516
|
}],
|
|
517
517
|
},
|
|
518
518
|
request_method=HTTPMethod.POST,
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
@patch("pyEscoAPI.esco_api.EscoAPI._EscoAPI__esco_login")
|
|
523
|
+
def test_get_transferencia_titulos(mock_login, api_client):
|
|
524
|
+
mock_response = [{"codTransferenciaTitMov": 10, "instrumentoAbrev": "GGAL"}]
|
|
525
|
+
with patch.object(api_client, "_EscoAPI__pre_connection"), patch.object(
|
|
526
|
+
api_client, "_EscoAPI__make_request", return_value=mock_response
|
|
527
|
+
) as mock_request:
|
|
528
|
+
result = api_client.get_transferencia_titulos(
|
|
529
|
+
cuentas="123,456",
|
|
530
|
+
fecha_desde=date(2026, 11, 4),
|
|
531
|
+
fecha_hasta=date(2026, 11, 4),
|
|
532
|
+
cod_tp_transferencia_tit_mov="TI",
|
|
533
|
+
por_concertacion=True,
|
|
534
|
+
es_consolidado=False,
|
|
535
|
+
incluye_anulado=False,
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
assert result == mock_response
|
|
539
|
+
mock_request.assert_called_once_with(
|
|
540
|
+
request_endpoint="/get-transferencia-titulos",
|
|
541
|
+
request_body={
|
|
542
|
+
"cuentas": "123,456",
|
|
543
|
+
"fechaDesde": "2026-11-04",
|
|
544
|
+
"fechaHasta": "2026-11-04",
|
|
545
|
+
"codTpTransferenciaTitMov": "TI",
|
|
546
|
+
"porConcertacion": True,
|
|
547
|
+
"esConsolidado": False,
|
|
548
|
+
"incluyeAnulado": False,
|
|
549
|
+
},
|
|
550
|
+
request_method=HTTPMethod.POST,
|
|
519
551
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|