pyEscoAPI 0.0.19__tar.gz → 0.0.21__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.19 → pyescoapi-0.0.21}/PKG-INFO +1 -1
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI/esco_api.py +14 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI.egg-info/PKG-INFO +1 -1
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyproject.toml +1 -1
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/tests/test_client.py +6 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/README.md +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI/__init__.py +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI/dataclasses.py +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI/exception.py +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI.egg-info/SOURCES.txt +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI.egg-info/dependency_links.txt +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI.egg-info/requires.txt +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/pyEscoAPI.egg-info/top_level.txt +0 -0
- {pyescoapi-0.0.19 → pyescoapi-0.0.21}/setup.cfg +0 -0
|
@@ -110,6 +110,7 @@ class EscoAPI:
|
|
|
110
110
|
|
|
111
111
|
def __pre_connection(self):
|
|
112
112
|
if datetime.now() > self.__expire_datetime:
|
|
113
|
+
self.__token = ""
|
|
113
114
|
self.__esco_login()
|
|
114
115
|
|
|
115
116
|
def __new__(cls, base_url: str, username: str, password: str, client_id: str, version: APIVersion):
|
|
@@ -1802,3 +1803,16 @@ class EscoAPI:
|
|
|
1802
1803
|
request_body=req_body,
|
|
1803
1804
|
request_method=HTTPMethod.POST
|
|
1804
1805
|
)
|
|
1806
|
+
|
|
1807
|
+
def get_domicilio_cuenta_comitente(self, cuenta: str, cod_tp_domicilio: str):
|
|
1808
|
+
"""
|
|
1809
|
+
Devuelve el domicilio de una cuenta comitente.
|
|
1810
|
+
:param cuenta: Cuenta a la que pertenece el domicilio a buscar.
|
|
1811
|
+
:param cod_tp_domicilio: Código del tipo de domicilio (PA: Particular, DO: Comercial).
|
|
1812
|
+
"""
|
|
1813
|
+
self.__pre_connection()
|
|
1814
|
+
return self.__make_request(
|
|
1815
|
+
request_endpoint=f"/domicilio-cuenta-comitente?Cuenta={cuenta}&CodTpDomicilio={cod_tp_domicilio}",
|
|
1816
|
+
request_body={},
|
|
1817
|
+
request_method=HTTPMethod.GET
|
|
1818
|
+
)
|
|
@@ -286,3 +286,9 @@ def test_preview_orden_compra(api_client):
|
|
|
286
286
|
assert "precio" in result
|
|
287
287
|
|
|
288
288
|
|
|
289
|
+
def test_get_domicilio_cuenta_comitente(api_client):
|
|
290
|
+
result = api_client.get_domicilio_cuenta_comitente(
|
|
291
|
+
cuenta="351011787",
|
|
292
|
+
cod_tp_domicilio="PA"
|
|
293
|
+
)
|
|
294
|
+
assert "codTpDomicilio" in result
|
|
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
|