spei-python 0.18.0__tar.gz → 0.18.2__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.18.0 → spei_python-0.18.2}/PKG-INFO +2 -2
- {spei_python-0.18.0 → spei_python-0.18.2}/README.md +1 -1
- {spei_python-0.18.0 → spei_python-0.18.2}/pyproject.toml +2 -2
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/requests/orden.py +2 -2
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/resources/mensaje.py +9 -5
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/resources/orden.py +3 -3
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/utils.py +3 -3
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/README.md +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/__init__.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/client.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/errors.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/mappings.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/requests/__init__.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/requests/respuesta.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/resources/__init__.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/resources/respuesta.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/responses/__init__.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/responses/orden.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/responses/respuesta.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/types.py +0 -0
- {spei_python-0.18.0 → spei_python-0.18.2}/spei/validators.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: spei-python
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.2
|
|
4
4
|
Summary:
|
|
5
5
|
Author: tech
|
|
6
6
|
Author-email: tech@fondeadora.com
|
|
@@ -36,7 +36,7 @@ Use our client to send orders to SPEI.
|
|
|
36
36
|
from spei.client import BaseClient
|
|
37
37
|
|
|
38
38
|
client = BaseClient(
|
|
39
|
-
host='karpay-beta.intfondeadora.app',
|
|
39
|
+
host='http://karpay-beta.intfondeadora.app',
|
|
40
40
|
username='karpay',
|
|
41
41
|
password='password',
|
|
42
42
|
priv_key='private_key',
|
|
@@ -17,7 +17,7 @@ Use our client to send orders to SPEI.
|
|
|
17
17
|
from spei.client import BaseClient
|
|
18
18
|
|
|
19
19
|
client = BaseClient(
|
|
20
|
-
host='karpay-beta.intfondeadora.app',
|
|
20
|
+
host='http://karpay-beta.intfondeadora.app',
|
|
21
21
|
username='karpay',
|
|
22
22
|
password='password',
|
|
23
23
|
priv_key='private_key',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "spei-python"
|
|
3
|
-
version = "0.18.
|
|
3
|
+
version = "0.18.2"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["tech <tech@fondeadora.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.18.
|
|
35
|
+
version = "0.18.2"
|
|
36
36
|
tag_format = "v$version"
|
|
37
37
|
bump_message = "bump: Semantic Release Bot: Release Version: $new_version 🤖🚀 [skip ci]"
|
|
38
38
|
version_files = [
|
|
@@ -15,9 +15,9 @@ class OrdenPagoElement(object):
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class BodyElement(object):
|
|
18
|
-
def __new__(cls,
|
|
18
|
+
def __new__(cls, ordenpago):
|
|
19
19
|
body = etree.Element(etree.QName(SOAP_NS, 'Body'))
|
|
20
|
-
body.append(
|
|
20
|
+
body.append(ordenpago)
|
|
21
21
|
return body
|
|
22
22
|
|
|
23
23
|
|
|
@@ -8,7 +8,9 @@ from spei.types import CategoriaOrdenPago
|
|
|
8
8
|
|
|
9
9
|
class Mensaje(BaseModel):
|
|
10
10
|
categoria: Optional[CategoriaOrdenPago] = None
|
|
11
|
-
|
|
11
|
+
ordenpago: Optional[Any] = None
|
|
12
|
+
respuesta: Optional[Any] = None
|
|
13
|
+
ensesion: Optional[Any] = None
|
|
12
14
|
|
|
13
15
|
class Config: # noqa: WPS306, WPS431
|
|
14
16
|
extra = Extra.allow
|
|
@@ -24,17 +26,19 @@ class Mensaje(BaseModel):
|
|
|
24
26
|
ensesion = body.find('{http://www.praxis.com.mx/}ensesion')
|
|
25
27
|
|
|
26
28
|
if ordenpago is not None:
|
|
27
|
-
element = etree.fromstring(
|
|
29
|
+
element = etree.fromstring( # noqa: S320
|
|
30
|
+
bytes(ordenpago.text, encoding='cp850'),
|
|
31
|
+
)
|
|
28
32
|
categoria = element.attrib['categoria']
|
|
29
|
-
return cls(categoria=categoria,
|
|
33
|
+
return cls(categoria=categoria, ordenpago=element)
|
|
30
34
|
|
|
31
35
|
if respuesta is not None:
|
|
32
36
|
element = etree.fromstring( # noqa: S320
|
|
33
37
|
bytes(respuesta.text, encoding='cp850'),
|
|
34
38
|
)
|
|
35
39
|
categoria = element.attrib['categoria']
|
|
36
|
-
return cls(categoria=categoria,
|
|
40
|
+
return cls(categoria=categoria, respuesta=element)
|
|
37
41
|
|
|
38
42
|
return cls(
|
|
39
|
-
|
|
43
|
+
ensesion=ensesion,
|
|
40
44
|
)
|
|
@@ -111,7 +111,7 @@ class Orden(BaseModel):
|
|
|
111
111
|
|
|
112
112
|
def build_xml(self):
|
|
113
113
|
mensaje = etree.Element('mensaje', categoria=self.categoria)
|
|
114
|
-
|
|
114
|
+
ordenpago = etree.SubElement(mensaje, 'ordenpago', Id=str(self.id))
|
|
115
115
|
|
|
116
116
|
elements = self.dict(
|
|
117
117
|
exclude_none=True,
|
|
@@ -121,11 +121,11 @@ class Orden(BaseModel):
|
|
|
121
121
|
for element, value in elements.items(): # noqa: WPS110
|
|
122
122
|
if element in self.__fields__:
|
|
123
123
|
if element == 'op_firma_dig':
|
|
124
|
-
subelement = etree.SubElement(
|
|
124
|
+
subelement = etree.SubElement(ordenpago, 'opFirmaDig')
|
|
125
125
|
subelement.text = str(value)
|
|
126
126
|
continue
|
|
127
127
|
upper_camel_case_element = to_upper_camel_case(element)
|
|
128
|
-
subelement = etree.SubElement(
|
|
128
|
+
subelement = etree.SubElement(ordenpago, upper_camel_case_element)
|
|
129
129
|
subelement.text = str(value)
|
|
130
130
|
|
|
131
131
|
return mensaje
|
|
@@ -13,17 +13,17 @@ def format_data(message: Dict[AnyStr, Any]) -> bytes:
|
|
|
13
13
|
_monto_to_bytearray(message['op_monto']),
|
|
14
14
|
]
|
|
15
15
|
|
|
16
|
-
if 'op_cuenta_ord'
|
|
16
|
+
if message.get('op_cuenta_ord'):
|
|
17
17
|
message_data.append(
|
|
18
18
|
_to_byte_array(message['op_cuenta_ord'], add_zero_byte=True),
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
if 'op_cuenta_ben'
|
|
21
|
+
if message.get('op_cuenta_ben'):
|
|
22
22
|
message_data.append(
|
|
23
23
|
_to_byte_array(message['op_cuenta_ben'], add_zero_byte=True),
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
-
if 'op_cuenta_ben_2'
|
|
26
|
+
if message.get('op_cuenta_ben_2'):
|
|
27
27
|
message_data.append(
|
|
28
28
|
_to_byte_array(message['op_cuenta_ben_2'], add_zero_byte=True),
|
|
29
29
|
)
|
|
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
|