spei-python 0.14.0__tar.gz → 0.15.0__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.
- {spei_python-0.14.0 → spei_python-0.15.0}/PKG-INFO +1 -1
- {spei_python-0.14.0 → spei_python-0.15.0}/pyproject.toml +2 -2
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/mappings.py +1 -2
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/resources/orden.py +6 -4
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/resources/respuesta.py +4 -5
- {spei_python-0.14.0 → spei_python-0.15.0}/README.md +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/README.md +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/__init__.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/client.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/errors.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/requests/__init__.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/requests/orden.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/requests/respuesta.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/resources/__init__.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/resources/mensaje.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/types/__init__.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/types/error.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/types/orden.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/utils.py +0 -0
- {spei_python-0.14.0 → spei_python-0.15.0}/spei/validators.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "spei-python"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.15.0"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["gonz <gonzasestopal@gmail.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -32,7 +32,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
32
32
|
|
|
33
33
|
[tool.commitizen]
|
|
34
34
|
name = "cz_conventional_commits"
|
|
35
|
-
version = "0.
|
|
35
|
+
version = "0.15.0"
|
|
36
36
|
tag_format = "v$version"
|
|
37
37
|
bump_message = "bump: Semantic Release Bot: Release Version: $new_version 🤖🚀 [skip ci]"
|
|
38
38
|
version_files = [
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from types import MappingProxyType
|
|
2
2
|
|
|
3
|
-
from spei.
|
|
4
|
-
from spei.types import CategoriaOrdenPago, TipoPagoOrdenPago
|
|
3
|
+
from spei.types import CategoriaOrdenPago, TipoPagoOrdenPago, orden
|
|
5
4
|
|
|
6
5
|
ORDER_RESPONSES = MappingProxyType({
|
|
7
6
|
CategoriaOrdenPago.cargar_odp: CategoriaOrdenPago.cargar_odp_respuesta, # noqa: E501
|
|
@@ -12,6 +12,7 @@ PRAXIS_NS = 'http://www.praxis.com.mx/'
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Orden(BaseModel):
|
|
15
|
+
id: int
|
|
15
16
|
categoria: types.CategoriaOrdenPago
|
|
16
17
|
|
|
17
18
|
op_ord_clave: types.ClaveOrdenanteOrdenPago = types.ClaveOrdenanteOrdenPago.AMU
|
|
@@ -122,14 +123,15 @@ class Orden(BaseModel):
|
|
|
122
123
|
return mensaje
|
|
123
124
|
|
|
124
125
|
@classmethod
|
|
125
|
-
def parse_xml(cls,
|
|
126
|
-
|
|
126
|
+
def parse_xml(cls, mensaje_xml):
|
|
127
|
+
orden_xml = mensaje_xml.find('ordenpago')
|
|
127
128
|
|
|
128
129
|
orden_data = {
|
|
129
|
-
'
|
|
130
|
+
'id': orden_xml.attrib['Id'],
|
|
131
|
+
'categoria': mensaje_xml.attrib['categoria'],
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
for element in
|
|
134
|
+
for element in orden_xml.getchildren():
|
|
133
135
|
tag = to_snake_case(element.tag)
|
|
134
136
|
if tag in cls.__fields__:
|
|
135
137
|
orden_data[tag] = element.text
|
|
@@ -6,12 +6,11 @@ from spei.utils import to_snake_case, to_upper_camel_case # noqa: WPS347
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Respuesta(BaseModel):
|
|
9
|
-
categoria: types.CategoriaOrdenPago
|
|
10
|
-
|
|
11
9
|
id: str
|
|
12
10
|
fecha_oper: int
|
|
13
11
|
err_codigo: types.CodigoError
|
|
14
12
|
err_descripcion: str
|
|
13
|
+
categoria: types.CategoriaOrdenPago
|
|
15
14
|
|
|
16
15
|
class Config: # noqa: WPS306, WPS431
|
|
17
16
|
use_enum_values = True
|
|
@@ -30,11 +29,11 @@ class Respuesta(BaseModel):
|
|
|
30
29
|
return mensaje
|
|
31
30
|
|
|
32
31
|
@classmethod
|
|
33
|
-
def parse_xml(cls,
|
|
34
|
-
respuesta =
|
|
32
|
+
def parse_xml(cls, mensaje_xml):
|
|
33
|
+
respuesta = mensaje_xml.find('respuesta')
|
|
35
34
|
|
|
36
35
|
respuesta_data = {
|
|
37
|
-
'categoria':
|
|
36
|
+
'categoria': mensaje_xml.attrib['categoria'],
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
for sub_element in respuesta.getchildren():
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|