pyEscoAPI 0.0.30__tar.gz → 0.0.32__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyEscoAPI
3
- Version: 0.0.30
3
+ Version: 0.0.32
4
4
  Summary: Python client for Esco API (Esco bolsa)
5
5
  Author-email: Codetria <hola@codetria.com>
6
6
  License: MIT License
@@ -1124,6 +1124,7 @@ class EscoAPI:
1124
1124
  liquida_cta_bancaria: bool = False,
1125
1125
  moneda: str = "ARS",
1126
1126
  fecha_concertacion: date | None = None,
1127
+ fecha_acreditacion: date | None = None,
1127
1128
  incluye_creditos: bool = True,
1128
1129
  tp_cambio_moneda_pais = 1,
1129
1130
  canal: str = "CE",
@@ -1132,10 +1133,14 @@ class EscoAPI:
1132
1133
 
1133
1134
  if fecha_concertacion is None:
1134
1135
  fecha_concertacion = date.today()
1136
+
1137
+ if fecha_acreditacion is None:
1138
+ fecha_acreditacion = date.today()
1135
1139
 
1136
1140
  req_body = {
1137
1141
  "fondo": fondo,
1138
1142
  "fechaConcertacion": fecha_concertacion.strftime("%Y-%m-%d"),
1143
+ "fechaAcreditacion": fecha_acreditacion.strftime("%Y-%m-%d"),
1139
1144
  "moneda": moneda,
1140
1145
  "incluyeCreditos": incluye_creditos,
1141
1146
  "generarReciboDeCobro": generar_recibo_cobro,
@@ -1893,7 +1898,7 @@ class EscoAPI:
1893
1898
  self.__pre_connection()
1894
1899
  return self.__make_request(
1895
1900
  request_endpoint=f"/insert-cuenta-comitente",
1896
- request_body=asdict(comitente_data),
1901
+ request_body=asdict(comitente_data, dict_factory=lambda x: {k: v for k, v in x if v is not None}),
1897
1902
  request_method=HTTPMethod.POST
1898
1903
  )
1899
1904
 
@@ -2046,4 +2051,29 @@ class EscoAPI:
2046
2051
  request_endpoint="/get-grupos-aranceles-bursatiles",
2047
2052
  request_body={},
2048
2053
  request_method=HTTPMethod.GET
2054
+ )
2055
+
2056
+ def get_comprobante_pdf(
2057
+ self,
2058
+ formulario: str,
2059
+ id_comprobante: int,
2060
+ ):
2061
+ """
2062
+ Recupera un PDF de un comprobante específico utilizando su formulario e ID.
2063
+
2064
+ Se ejecuta el endpoint enviando el nombre del tipo de formulario y el código de la operación
2065
+ asociada.
2066
+
2067
+ Args:
2068
+ formulario (str): El identificador del formulario para el comprobante (FRMBOL para boleto).
2069
+ id_comprobante (int): El ID único del comprobante.
2070
+
2071
+ Returns:
2072
+ dict: La respuesta JSON de la API que contiene los datos del PDF en base64.
2073
+ """
2074
+ self.__pre_connection()
2075
+ return self.__make_request(
2076
+ request_endpoint=f"/get-comprobante-PDF-Sync?Formulario={formulario}&IDComprobante={id_comprobante}",
2077
+ request_body={},
2078
+ request_method=HTTPMethod.GET
2049
2079
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyEscoAPI
3
- Version: 0.0.30
3
+ Version: 0.0.32
4
4
  Summary: Python client for Esco API (Esco bolsa)
5
5
  Author-email: Codetria <hola@codetria.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = 'pyEscoAPI'
7
- version = "0.0.30"
7
+ version = "0.0.32"
8
8
  license = {text = "MIT License"}
9
9
  authors = [
10
10
  { name="Codetria", email="hola@codetria.com" },
@@ -227,6 +227,7 @@ def test_insert_solicitud_fci_simple(api_client):
227
227
  cuenta=cuenta,
228
228
  importe=1000,
229
229
  fecha_concertacion=date.today(),
230
+ fecha_acreditacion=date.today() + timedelta(days=2),
230
231
  tipo_operacion="SU",
231
232
  id_origen="121545583"
232
233
  )
@@ -337,4 +338,10 @@ def test_get_bancos(api_client):
337
338
  def test_get_grupo_aranceles_bursatiles(api_client):
338
339
  result = api_client.get_grupo_aranceles_bursatiles()
339
340
  assert isinstance(result, list)
340
- assert "codigo" in result[0]
341
+ assert "codigo" in result[0]
342
+
343
+ def test_get_comprobante_pdf(api_client):
344
+ mock_response = {"data": "base64encodedpdf"}
345
+ with patch.object(api_client,'_EscoAPI__make_request', return_value=mock_response):
346
+ result = api_client.get_comprobante_pdf("FRMBOL", 12345)
347
+ assert result == mock_response
File without changes
File without changes