spei-python 0.18.2__py3-none-any.whl → 0.18.4__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/README.md
CHANGED
|
@@ -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
|
|
34
|
+
**op_nom_ord** - str Origin full name.
|
|
35
35
|
|
|
36
|
-
**
|
|
36
|
+
**op_tc_clave_ord** - [int](/spei/types.py#36) Origin account type.
|
|
37
37
|
|
|
38
|
-
**
|
|
38
|
+
**op_cuenta_ord** - int Origin account number
|
|
39
39
|
|
|
40
|
-
**
|
|
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
|
|
120
|
+
**op_num_cel_ord** - int Origin phone number
|
|
121
121
|
|
|
122
|
-
**op_digito_ver_ord** - int
|
|
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
|
-
'
|
|
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
|
-
'
|
|
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',
|
spei/resources/orden.py
CHANGED
|
@@ -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', '
|
|
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
|
spei/utils.py
CHANGED
|
@@ -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['
|
|
11
|
-
_clave_to_bytearray(message['
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
spei/README.md,sha256=
|
|
1
|
+
spei/README.md,sha256=x84-BfUpzfQ7Jllj3P0WcJ6-xeiQCh89mwUT_bVUeMc,5577
|
|
2
2
|
spei/__init__.py,sha256=UmjWrUFyb4o1Qmg7LZHdzPe05J1rwApDVYcrOelBEYo,49
|
|
3
3
|
spei/client.py,sha256=xjoHRklmceQ1Ckx7ZlZsZXzZ0YSf_KKpjjxolm9pRAQ,2143
|
|
4
4
|
spei/errors.py,sha256=ne3Qg5ciRo_4TkiR4xJOSK7WQ-teeG6I9-dxqykUH-0,16065
|
|
@@ -8,14 +8,14 @@ spei/requests/orden.py,sha256=8EpYx2FCr-rWVuJwmI9entNduFRrqcifzmHqzFKFZ1s,1241
|
|
|
8
8
|
spei/requests/respuesta.py,sha256=aD2JxKlQHDVqMj5N0mcRzR6xx77-62lR0C97qNHd2Us,1176
|
|
9
9
|
spei/resources/__init__.py,sha256=RixAVNm2K3H245HX7BFX_wu6P2UHRKqsYrdKUb-9j4w,131
|
|
10
10
|
spei/resources/mensaje.py,sha256=oTCqpP7GQFlnPSF8MJQJwqLjpPJxBn6yhf5W5sWO-8g,1426
|
|
11
|
-
spei/resources/orden.py,sha256=
|
|
11
|
+
spei/resources/orden.py,sha256=P37bVYCnlbgRKjMQvveWk0Z9dsEaRNGaf4xVi-Fbd3o,12575
|
|
12
12
|
spei/resources/respuesta.py,sha256=8oNb2yIFe5DwwZryx-djA_cIAYkPPHB5T3AicSIopGc,1449
|
|
13
13
|
spei/responses/__init__.py,sha256=o8BnmqDo9QLZBuUCzZ_xkpM3cbShrcTJ_Wzr6_dbH7E,175
|
|
14
14
|
spei/responses/orden.py,sha256=S3HSp_I-q1TNfcmZp3GWw_uMB7dc84l784mZuDE9riY,780
|
|
15
15
|
spei/responses/respuesta.py,sha256=Z7au9tsJ5yMdeymLz9h-NffwzFL1QA1sGOx-Iaj6lto,814
|
|
16
16
|
spei/types.py,sha256=DywBwAu0F3JUR2kGJRJSdoqbUFPuZkG89M2r1bcOk9s,3037
|
|
17
|
-
spei/utils.py,sha256=
|
|
17
|
+
spei/utils.py,sha256=N4a8pYwUXZtbUxHwnJ4MVd2jTmz1iPl6K_0BvVMJT_Q,2571
|
|
18
18
|
spei/validators.py,sha256=1b-brOmNesdiUi2X0LV0-Km4Sh6RGNeKNeAxshQXtOs,742
|
|
19
|
-
spei_python-0.18.
|
|
20
|
-
spei_python-0.18.
|
|
21
|
-
spei_python-0.18.
|
|
19
|
+
spei_python-0.18.4.dist-info/METADATA,sha256=HGXFF8vju2Fs2Z5l2PiWX2qgs_mvmYY3GGbY4O4lxXA,3023
|
|
20
|
+
spei_python-0.18.4.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
21
|
+
spei_python-0.18.4.dist-info/RECORD,,
|
|
File without changes
|