spei-python 0.14.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spei-python
3
- Version: 0.14.1
3
+ Version: 0.15.0
4
4
  Summary:
5
5
  Author: gonz
6
6
  Author-email: gonzasestopal@gmail.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "spei-python"
3
- version = "0.14.1"
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.14.1"
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 = [
@@ -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, orden_xml, category):
126
- orden = orden_xml.find('ordenpago')
126
+ def parse_xml(cls, mensaje_xml):
127
+ orden_xml = mensaje_xml.find('ordenpago')
127
128
 
128
129
  orden_data = {
129
- 'categoria': category,
130
+ 'id': orden_xml.attrib['Id'],
131
+ 'categoria': mensaje_xml.attrib['categoria'],
130
132
  }
131
133
 
132
- for element in orden.getchildren():
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, respuesta_xml, category):
34
- respuesta = respuesta_xml.find('respuesta')
32
+ def parse_xml(cls, mensaje_xml):
33
+ respuesta = mensaje_xml.find('respuesta')
35
34
 
36
35
  respuesta_data = {
37
- 'categoria': category,
36
+ 'categoria': mensaje_xml.attrib['categoria'],
38
37
  }
39
38
 
40
39
  for sub_element in respuesta.getchildren():
File without changes
File without changes