spei-python 0.18.2__tar.gz → 0.18.4__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.
Files changed (21) hide show
  1. {spei_python-0.18.2 → spei_python-0.18.4}/PKG-INFO +1 -1
  2. {spei_python-0.18.2 → spei_python-0.18.4}/pyproject.toml +2 -2
  3. {spei_python-0.18.2 → spei_python-0.18.4}/spei/README.md +12 -12
  4. {spei_python-0.18.2 → spei_python-0.18.4}/spei/resources/orden.py +5 -10
  5. {spei_python-0.18.2 → spei_python-0.18.4}/spei/utils.py +5 -5
  6. {spei_python-0.18.2 → spei_python-0.18.4}/README.md +0 -0
  7. {spei_python-0.18.2 → spei_python-0.18.4}/spei/__init__.py +0 -0
  8. {spei_python-0.18.2 → spei_python-0.18.4}/spei/client.py +0 -0
  9. {spei_python-0.18.2 → spei_python-0.18.4}/spei/errors.py +0 -0
  10. {spei_python-0.18.2 → spei_python-0.18.4}/spei/mappings.py +0 -0
  11. {spei_python-0.18.2 → spei_python-0.18.4}/spei/requests/__init__.py +0 -0
  12. {spei_python-0.18.2 → spei_python-0.18.4}/spei/requests/orden.py +0 -0
  13. {spei_python-0.18.2 → spei_python-0.18.4}/spei/requests/respuesta.py +0 -0
  14. {spei_python-0.18.2 → spei_python-0.18.4}/spei/resources/__init__.py +0 -0
  15. {spei_python-0.18.2 → spei_python-0.18.4}/spei/resources/mensaje.py +0 -0
  16. {spei_python-0.18.2 → spei_python-0.18.4}/spei/resources/respuesta.py +0 -0
  17. {spei_python-0.18.2 → spei_python-0.18.4}/spei/responses/__init__.py +0 -0
  18. {spei_python-0.18.2 → spei_python-0.18.4}/spei/responses/orden.py +0 -0
  19. {spei_python-0.18.2 → spei_python-0.18.4}/spei/responses/respuesta.py +0 -0
  20. {spei_python-0.18.2 → spei_python-0.18.4}/spei/types.py +0 -0
  21. {spei_python-0.18.2 → spei_python-0.18.4}/spei/validators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spei-python
3
- Version: 0.18.2
3
+ Version: 0.18.4
4
4
  Summary:
5
5
  Author: tech
6
6
  Author-email: tech@fondeadora.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "spei-python"
3
- version = "0.18.2"
3
+ version = "0.18.4"
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.2"
35
+ version = "0.18.4"
36
36
  tag_format = "v$version"
37
37
  bump_message = "bump: Semantic Release Bot: Release Version: $new_version 🤖🚀 [skip ci]"
38
38
  version_files = [
@@ -3,6 +3,8 @@ Create a new order in SPEI as XML based on [mensaje.xsd](https://drive.google.co
3
3
 
4
4
  **op_fecha_oper** - int **_required_** This should match karpay date of operation.
5
5
 
6
+ **op_ins_clave_ord** - digits(5, 5) **_required_** Origin account institution code.
7
+
6
8
  **op_folio** - str **_required_** This should be -1 when category is CARGAR_ODP.
7
9
 
8
10
  **op_monto** - str **_required_** Order amount as **string**.
@@ -23,23 +25,19 @@ Create a new order in SPEI as XML based on [mensaje.xsd](https://drive.google.co
23
25
 
24
26
  **op_usu_clave** - str **_required_** Username who generated the order and should be defined in karpay catalog.
25
27
 
26
- **op_ins_clave** - digits(5, 5) **_required_** Registered institution code, this is provided by BANXICO
27
-
28
28
  **op_fecha_cap** - int Order captured timestamp inside E-Karpay (yyyymmdd)
29
29
 
30
30
  Optional depending on order type
31
31
 
32
32
  **op_clave** - int Unique E-Karpay identifier
33
33
 
34
- **op_nom_ord** - str Payer full name.
34
+ **op_nom_ord** - str Origin full name.
35
35
 
36
- **op_ord_clave** - [int](/spei/types.py#81) Payer account institution code
36
+ **op_tc_clave_ord** - [int](/spei/types.py#36) Origin account type.
37
37
 
38
- **op_tc_clave_ord** - [int](/spei/types.py#36) Payer account type.
38
+ **op_cuenta_ord** - int Origin account number
39
39
 
40
- **op_cuenta_ord** - int Payer account number
41
-
42
- **op_rfc_curp_ord** - str Payer identification number
40
+ **op_rfc_curp_ord** - str Origin identification number
43
41
 
44
42
  **op_nom_ben** - str Beneficiary full name
45
43
 
@@ -49,6 +47,8 @@ Optional depending on order type
49
47
 
50
48
  **op_rfc_curp_ben** str Beneficiary identification number
51
49
 
50
+ **op_ins_clave_ben** - digits(5, 5) **_required_** Beneficiary account institution code.
51
+
52
52
  **op_nom_ben_2** - str Additional beneficiary name
53
53
 
54
54
  **op_tc_clave_ben_2** - [int](/spei/types.py#36) Additional beneficiary account type
@@ -117,9 +117,9 @@ Optional depending on order type
117
117
 
118
118
  <--- CODI --->
119
119
 
120
- **op_num_cel_ord** - int Payer phone number
120
+ **op_num_cel_ord** - int Origin phone number
121
121
 
122
- **op_digito_ver_ord** - int Payer verification digit number
122
+ **op_digito_ver_ord** - int Origin verification digit number
123
123
 
124
124
  **op_num_cel_ben** - int Beneficiary phone number
125
125
 
@@ -147,7 +147,7 @@ You must use one of our available order types.
147
147
  orden = client.registra_orden({
148
148
  'op_fecha_oper': 20230309,
149
149
  'op_folio': 1
150
- 'op_ins_clave': 90699,
150
+ 'op_ins_clave_ord': 90699,
151
151
  'op_monto': 1000,
152
152
  'op_tp_clave': 1,
153
153
  'op_cve_rastreo': 'TERCERO001',
@@ -157,7 +157,7 @@ orden = client.registra_orden({
157
157
  'op_me_clave': 2,
158
158
  'op_topologia': 'V'
159
159
  'op_usu_clave': 'ADMIN',
160
- 'op_ord_clave': '90699',
160
+ 'op_ins_clave_ord': '90699',
161
161
  'op_nom_ord': 'ORDENANTE',
162
162
  'op_tc_clave_ord': '40',
163
163
  'op_cuenta_ord': '646731258600008291',
@@ -14,12 +14,8 @@ PRAXIS_NS = 'http://www.praxis.com.mx/'
14
14
  class Orden(BaseModel):
15
15
  id: int
16
16
  categoria: types.CategoriaOrdenPago
17
-
18
- op_ord_clave: types.ClaveOrdenanteOrdenPago = types.ClaveOrdenanteOrdenPago.AMU
19
-
20
17
  op_fecha_oper: int
21
18
  op_folio: str
22
- op_ins_clave: digits(3, 5)
23
19
  op_monto: str
24
20
  op_tp_clave: types.TipoPagoOrdenPago
25
21
  op_cve_rastreo: str
@@ -38,11 +34,13 @@ class Orden(BaseModel):
38
34
  op_tc_clave_ord: types.TipoCuentaOrdenPago = None
39
35
  op_cuenta_ord: str = None
40
36
  op_rfc_curp_ord: str = None
37
+ op_ins_clave_ord: digits(3, 5) = types.ClaveOrdenanteOrdenPago.AMU
41
38
 
42
39
  op_nom_ben: str = None
43
40
  op_tc_clave_ben: types.TipoCuentaOrdenPago = None
44
41
  op_cuenta_ben: str = None
45
42
  op_rfc_curp_ben: str = None
43
+ op_ins_clave_ben: digits(3, 5) = None
46
44
 
47
45
  op_nom_ben_2: str = None
48
46
  op_tc_clave_ben_2: types.TipoCuentaOrdenPago = None
@@ -115,7 +113,7 @@ class Orden(BaseModel):
115
113
 
116
114
  elements = self.dict(
117
115
  exclude_none=True,
118
- exclude={'id', 'categoria', 'op_ord_clave'},
116
+ exclude={'id', 'categoria', 'op_ins_clave_ord'},
119
117
  )
120
118
 
121
119
  for element, value in elements.items(): # noqa: WPS110
@@ -143,6 +141,8 @@ class Orden(BaseModel):
143
141
  tag = to_snake_case(element.tag)
144
142
  if tag in cls.__fields__:
145
143
  orden_data[tag] = element.text
144
+ if tag == 'op_ins_clave':
145
+ orden_data['op_ins_clave_ben'] = element.text
146
146
 
147
147
  return cls(**orden_data)
148
148
 
@@ -261,11 +261,6 @@ class TerceroATerceroFSW(Orden):
261
261
  op_cuenta_ben: str = None
262
262
  op_rfc_curp_ben: str = None
263
263
 
264
- op_nom_ben_2: str = None
265
- op_tc_clave_ben_2: types.TipoCuentaOrdenPago = None
266
- op_cuenta_ben_2: str = None
267
- op_rfc_curp_ben_2: str = None
268
-
269
264
  op_concepto_pag_2: str
270
265
  op_iva: float = None
271
266
  op_ref_numerica: str
@@ -7,8 +7,8 @@ from typing import Any, AnyStr, Dict, List
7
7
  def format_data(message: Dict[AnyStr, Any]) -> bytes:
8
8
  message_data = [
9
9
  _fecha_to_bytearray(message['op_fecha_oper']),
10
- _clave_to_bytearray(message['op_ord_clave']),
11
- _clave_to_bytearray(message['op_ins_clave']),
10
+ _clave_to_bytearray(message['op_ins_clave_ord']),
11
+ _clave_to_bytearray(message['op_ins_clave_ben']),
12
12
  _to_byte_array(message['op_cve_rastreo'], add_zero_byte=True),
13
13
  _monto_to_bytearray(message['op_monto']),
14
14
  ]
@@ -35,10 +35,10 @@ def split_amount(amount):
35
35
  amount_as_cents = int(Decimal(str(amount)) * 100)
36
36
  high = 0
37
37
  low = amount_as_cents
38
- tens_of_millons = amount_as_cents // 10 ** 9
38
+ tens_of_millons = amount_as_cents // 10**9
39
39
  if tens_of_millons:
40
40
  high = tens_of_millons
41
- low = amount_as_cents - (tens_of_millons * 10 ** 9)
41
+ low = amount_as_cents - (tens_of_millons * 10**9)
42
42
  return high, low
43
43
 
44
44
 
@@ -62,7 +62,7 @@ def _monto_to_bytearray(amount: int) -> bytearray:
62
62
  return high + low
63
63
 
64
64
 
65
- def _to_byte_array(value: str, add_zero_byte: bool = False) -> bytearray: # noqa: WPS110, E501
65
+ def _to_byte_array(value: str, add_zero_byte: bool = False) -> bytearray:
66
66
  encoded = value.encode('utf-8')
67
67
  bytes_ = bytearray(encoded)
68
68
  if add_zero_byte:
File without changes
File without changes