cuenca-validations 2.1.47__py3-none-any.whl → 2.1.48.dev0__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.
@@ -67,6 +67,7 @@ __all__ = [
67
67
  'LegalPersonRequest',
68
68
  'LegalPersonUpdateRequest',
69
69
  'OperatorLoginRequest',
70
+ 'OperatorLoginUpdateRequest',
70
71
  'OperatorQuery',
71
72
  'OperatorRequest',
72
73
  'OperatorRole',
@@ -272,6 +273,7 @@ from .requests import (
272
273
  LegalPersonUpdateRequest,
273
274
  LimitedWalletRequest,
274
275
  OperatorLoginRequest,
276
+ OperatorLoginUpdateRequest,
275
277
  OperatorRequest,
276
278
  OperatorUpdateRequest,
277
279
  PartnerRequest,
@@ -993,6 +993,16 @@ class OperatorLoginRequest(BaseRequest):
993
993
  return normalize_email(email)
994
994
 
995
995
 
996
+ class OperatorLoginUpdateRequest(BaseRequest):
997
+ """Complete operator login by verifying the emailed OTP code."""
998
+
999
+ code: StrictStr
1000
+
1001
+ model_config = ConfigDict(
1002
+ json_schema_extra={'example': {'code': '123456'}},
1003
+ )
1004
+
1005
+
996
1006
  class ReferencedClabeRequest(BaseRequest):
997
1007
  legal_person_id: str
998
1008
  allowed_curp_rfc: Union[Curp, Rfc]
@@ -1 +1 @@
1
- __version__ = '2.1.47'
1
+ __version__ = '2.1.48.dev0'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cuenca_validations
3
- Version: 2.1.47
3
+ Version: 2.1.48.dev0
4
4
  Summary: Cuenca common validations
5
5
  Home-page: https://github.com/cuenca-mx/cuenca-validations
6
6
  Author: Cuenca
@@ -4,8 +4,8 @@ cuenca_validations/errors.py,sha256=OtM8EgiKqYdz9Hn66AbBO96orL1or7efkyt0vh0Zxbs,
4
4
  cuenca_validations/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  cuenca_validations/typing.py,sha256=1QCu81IbVZZpyInjyeAuO-nF36gpT5Gi4o6V9PozuOU,204
6
6
  cuenca_validations/validators.py,sha256=zXSnU5-EMbQZBD-PfFXgP4Z6G7cm7KFDWXB7Nie6WUk,2682
7
- cuenca_validations/version.py,sha256=_z5jmr3WtUfkaQCUcSqjpAEN9iy6fx9Upyzrzab2LI0,23
8
- cuenca_validations/types/__init__.py,sha256=wX-juqnpmMlxfZMEfwBwOTRrp-_8_COP0x5qJxFRn7w,6705
7
+ cuenca_validations/version.py,sha256=sASQTkqyEonq314x5AyyyiBSthTdrHeFL3tD1aNL-yI,28
8
+ cuenca_validations/types/__init__.py,sha256=-xNuGHXmkzEcWsBK6Y48cnFYeLAACBrn6ZAYeQv3LzA,6771
9
9
  cuenca_validations/types/card.py,sha256=UGzz8NTFAverUmdUKAK1oGHnOnjSNTpIRUm93vKSSGY,1295
10
10
  cuenca_validations/types/enums.py,sha256=8PgHV_BAaaO_lwFggeAswuUupcjysPOWZnyNzYoR4Dc,21256
11
11
  cuenca_validations/types/files.py,sha256=2CszbwF9ytXV9suFFwyDjYG4XxY8UhCjRw3HttVXXNw,269
@@ -14,17 +14,17 @@ cuenca_validations/types/helpers.py,sha256=4veeLZbugHHqZk0ezSim978VhH6Vq8XTrEhe1
14
14
  cuenca_validations/types/identities.py,sha256=j2xxh3UYHJe6IbAwr9yNXJkebTth_-g3SUmHeiPez8M,5513
15
15
  cuenca_validations/types/morals.py,sha256=davabh5hAnFVQyM7-yCyDaT5ewXnm0cr1BtqDIwzkX8,1833
16
16
  cuenca_validations/types/queries.py,sha256=yJZGW3p6uWGaBm6mjDp7KBgg7oLh0CUlAJeeVLRzowk,6134
17
- cuenca_validations/types/requests.py,sha256=Gd6n9GLoLHE6BogWGaHa1o_TrlFXDvc_Jx-r463ZcWY,32317
18
- cuenca_validations-2.1.47.dist-info/licenses/LICENSE,sha256=wR76FmxBbfnQpwELkkE5iMF8sFIafEMgXLTE4N4WPTc,1063
17
+ cuenca_validations/types/requests.py,sha256=-1QE3tFwX5LhKyRXlNryZKQ2KTsu_QRQAcZiRrDEt7o,32553
18
+ cuenca_validations-2.1.48.dev0.dist-info/licenses/LICENSE,sha256=wR76FmxBbfnQpwELkkE5iMF8sFIafEMgXLTE4N4WPTc,1063
19
19
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  tests/test_card.py,sha256=QAfRz7e11gWICPnFJZ2tiYgUsFV3C9TwzJXrDnDNXFw,1202
21
21
  tests/test_errors.py,sha256=ixiIgEuBuzfsL5p4uCFdF32XqFRtTPF6EVhGJ0keOrI,930
22
22
  tests/test_helpers.py,sha256=fx2R7y6oQO8XeQzevJe826NuHkBgvtznZicomchB3Gg,899
23
- tests/test_requests.py,sha256=TXj7z7tLb2_ewoKZNEZzKb2aCr5Pto6Nlkd_Q-3HHJI,8197
23
+ tests/test_requests.py,sha256=mjH-VbU_jCdgjQPAalTcJo76iL6tSBnmyengiAY-M20,8671
24
24
  tests/test_statement.py,sha256=IOE0rRRBgBZSJv_FLaETEyn5NzzXKMNTqgjv99GX-68,1436
25
25
  tests/test_types.py,sha256=rPjqPGfPU73MSdbeJpoW_ai5TAO25hWSnQAt_H7ZIeI,23055
26
26
  tests/test_validators.py,sha256=Jjr9gWTT4cRntGiKvQK4fncqx3JkEuTWkKm1VqpRHTs,1829
27
- cuenca_validations-2.1.47.dist-info/METADATA,sha256=KJGeVPBI1Lcs_42rAzjsHAid9oouCY9pxsXJBMCHR_I,1595
28
- cuenca_validations-2.1.47.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
29
- cuenca_validations-2.1.47.dist-info/top_level.txt,sha256=4233xdOs2HtuT-GFRjcDcwK0IwdwvWdczOtk0fPB6Gw,25
30
- cuenca_validations-2.1.47.dist-info/RECORD,,
27
+ cuenca_validations-2.1.48.dev0.dist-info/METADATA,sha256=hefgQaOl2YwGK7Z3FBq5b0OPYBw8IEFay_KLV0r95XU,1600
28
+ cuenca_validations-2.1.48.dev0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
29
+ cuenca_validations-2.1.48.dev0.dist-info/top_level.txt,sha256=4233xdOs2HtuT-GFRjcDcwK0IwdwvWdczOtk0fPB6Gw,25
30
+ cuenca_validations-2.1.48.dev0.dist-info/RECORD,,
tests/test_requests.py CHANGED
@@ -11,6 +11,7 @@ from cuenca_validations.types.queries import OperatorQuery
11
11
  from cuenca_validations.types.requests import (
12
12
  MAX_TRANSFER_ORDER_BATCH_LINES,
13
13
  OperatorLoginRequest,
14
+ OperatorLoginUpdateRequest,
14
15
  OperatorRequest,
15
16
  OperatorUpdateRequest,
16
17
  PasswordResetRequest,
@@ -92,6 +93,19 @@ def test_operator_login_request_forbids_extra() -> None:
92
93
  assert 'Extra inputs are not permitted' in str(ex.value)
93
94
 
94
95
 
96
+ def test_operator_login_update_request_valid() -> None:
97
+ req = OperatorLoginUpdateRequest.model_validate({'code': '123456'})
98
+ assert req.code == '123456'
99
+
100
+
101
+ def test_operator_login_update_request_forbids_extra() -> None:
102
+ with pytest.raises(ValidationError) as ex:
103
+ OperatorLoginUpdateRequest.model_validate(
104
+ {'code': '123456', 'foo': 'bar'}
105
+ )
106
+ assert 'Extra inputs are not permitted' in str(ex.value)
107
+
108
+
95
109
  def test_operator_query_valid() -> None:
96
110
  query = OperatorQuery.model_validate({'email': 'maria.lopez@aceros.com'})
97
111
  assert str(query.email) == 'maria.lopez@aceros.com'