spei-python 1.0.8__py3-none-any.whl → 1.0.10__py3-none-any.whl

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/signature/payload.py CHANGED
@@ -38,7 +38,10 @@ class SignaturePayloadBuilder(object):
38
38
  return bytearray(day + month + year)
39
39
 
40
40
  def _clave_to_bytearray(self, clave: Optional[str]) -> bytearray:
41
- clave = clave or ''
41
+ # Falsy (None, '', or the literal string 'None' from an unguarded str()
42
+ # at a call site) means "no institution clave" — e.g. a card destination,
43
+ # which has no CLABE institution code. Encode that as 0, not a crash.
44
+ clave = clave if clave and clave != 'None' else 0
42
45
 
43
46
  return bytearray(int.to_bytes(int(clave), 4, 'big'))
44
47
 
spei/signature/types.py CHANGED
@@ -5,6 +5,9 @@ PAYMENT_TYPES_WITH_DEFAULT_FIELDS = (
5
5
  TipoPagoOrdenPago.devolucion_extemporanea_no_acreditada,
6
6
  TipoPagoOrdenPago.participante_a_participante,
7
7
  TipoPagoOrdenPago.devolucion_acreditada,
8
+ # Retorno especial orders do not include op_cuenta_ord in the SPEI XML,
9
+ # so the signature is computed with default fields only.
10
+ TipoPagoOrdenPago.devolucion_especial_acreditada,
8
11
  )
9
12
 
10
13
  PAYMENT_TYPES_WITH_ORIGIN_ACCOUNT = (
@@ -12,7 +15,6 @@ PAYMENT_TYPES_WITH_ORIGIN_ACCOUNT = (
12
15
  TipoPagoOrdenPago.tercero_a_participante,
13
16
  TipoPagoOrdenPago.devolucion_extemporanea_acreditada,
14
17
  TipoPagoOrdenPago.devolucion_extemporanea_especial_acreditada,
15
- TipoPagoOrdenPago.devolucion_especial_acreditada,
16
18
  )
17
19
 
18
20
  PAYMENT_TYPES_WITH_BENEFICIARY_ACCOUNT = (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spei-python
3
- Version: 1.0.8
3
+ Version: 1.0.10
4
4
  Summary:
5
5
  Author: tech
6
6
  Author-email: tech@fondeadora.com
@@ -10,8 +10,8 @@ Classifier: Programming Language :: Python :: 3.11
10
10
  Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
12
  Classifier: Programming Language :: Python :: 3.14
13
- Requires-Dist: cryptography (>=3.0,<44.1)
14
- Requires-Dist: lxml (>=5.0.0,<6.0.0)
13
+ Requires-Dist: cryptography (>=50.0.0)
14
+ Requires-Dist: lxml (>=6.1.0)
15
15
  Requires-Dist: pydantic (>=1.10.17,<3)
16
16
  Requires-Dist: requests (>=2.32.2,<3.0.0)
17
17
  Requires-Dist: unidecode (>=1.3.8,<2.0.0)
@@ -31,13 +31,13 @@ spei/responses/respuesta.py,sha256=diufoshWUn7ZJV21tKnxrzs8vP-SHBNsgWsfucFKa5Y,2
31
31
  spei/sice.py,sha256=uNWzbDc9hM351cqG-yJ9exbGeZooAXSSS1VWXlV5m_4,1691
32
32
  spei/signature/__init__.py,sha256=laPhfbP0GusqtJU2f4BQMOssySo-3P712w1BoNx7sNk,2763
33
33
  spei/signature/factory.py,sha256=FXO97y5pr9QzMdMiAM0yZVMkqFOYO9Noslr15q0BWlY,2233
34
- spei/signature/payload.py,sha256=vKskwRP3NfBhmWzhhaZyns-9xEIl_zo2QDxc2nesDOQ,8894
35
- spei/signature/types.py,sha256=mjWO1GSqAIBu_nGahhz60iwxYJ_CW7_MuNWFW5E2X4w,2273
34
+ spei/signature/payload.py,sha256=JjB4t8bASqPz98Pd915kL0MJqZi8vxEDqXHOLYeKcjI,9166
35
+ spei/signature/types.py,sha256=i7biH2L1hRQ5H5QhaUAF9Psl9xPaMvB0ouf7nIH31gU,2410
36
36
  spei/types/__init__.py,sha256=U_4HiFBZ5rsaV5UkD60YArQhaENj_sh1HBGAeuI7ytA,686
37
37
  spei/types/common.py,sha256=TfqIOXH1UbNA0nplji521LFiWR76l2quv-RaUj542OY,551
38
38
  spei/types/sice.py,sha256=xFSoiLklRNWXoWwZXpSN8-SdkliNK23_MZbhcOc7a9s,222
39
39
  spei/types/spei.py,sha256=NW6glbYd52d1cbYQ3j-FC7bjpr0Z4u9jbmFvQhzY8lw,4718
40
40
  spei/utils.py,sha256=DtJAWf3tUvjRFC2G-L3ylm7ogBGwugNaBZtJI52jDME,455
41
- spei_python-1.0.8.dist-info/METADATA,sha256=FsRen0FEIDUFA10fQ7c3945vIIzP6R3JiLu1gk_W2BE,3883
42
- spei_python-1.0.8.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
43
- spei_python-1.0.8.dist-info/RECORD,,
41
+ spei_python-1.0.10.dist-info/METADATA,sha256=Vww10LGImROe0CUlsC2jF1k3MiF3rJCiJpIuJwl21yU,3874
42
+ spei_python-1.0.10.dist-info/WHEEL,sha256=eY7nduwzv-ldUxpzbRlxwvC693Hg6PX8bWDjEHjZ_dk,88
43
+ spei_python-1.0.10.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.1
2
+ Generator: poetry-core 2.4.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any