cuenca-validations 2.1.2.dev1__py3-none-any.whl → 2.1.3.dev1__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.
- cuenca_validations/types/requests.py +8 -2
- cuenca_validations/version.py +1 -1
- {cuenca_validations-2.1.2.dev1.dist-info → cuenca_validations-2.1.3.dev1.dist-info}/METADATA +1 -1
- {cuenca_validations-2.1.2.dev1.dist-info → cuenca_validations-2.1.3.dev1.dist-info}/RECORD +8 -8
- {cuenca_validations-2.1.2.dev1.dist-info → cuenca_validations-2.1.3.dev1.dist-info}/WHEEL +1 -1
- tests/test_types.py +21 -3
- {cuenca_validations-2.1.2.dev1.dist-info → cuenca_validations-2.1.3.dev1.dist-info}/LICENSE +0 -0
- {cuenca_validations-2.1.2.dev1.dist-info → cuenca_validations-2.1.3.dev1.dist-info}/top_level.txt +0 -0
|
@@ -631,6 +631,7 @@ class BankAccountValidationRequest(BaseModel):
|
|
|
631
631
|
|
|
632
632
|
class UserListsRequest(BaseModel):
|
|
633
633
|
curp: Optional[Curp] = Field(None, description='Curp to review on lists')
|
|
634
|
+
rfc: Optional[Rfc] = Field(None, description='Rfc to review on lists')
|
|
634
635
|
account_number: Optional[Union[Clabe, PaymentCardNumber]] = Field(
|
|
635
636
|
None, description='Account to review on lists'
|
|
636
637
|
)
|
|
@@ -648,8 +649,12 @@ class UserListsRequest(BaseModel):
|
|
|
648
649
|
@classmethod
|
|
649
650
|
def check_request(cls, values):
|
|
650
651
|
has_name = all(values.get(f) for f in ['names', 'first_surname'])
|
|
651
|
-
curp, account =
|
|
652
|
-
|
|
652
|
+
curp, account, rfc = (
|
|
653
|
+
values.get('curp'),
|
|
654
|
+
values.get('account_number'),
|
|
655
|
+
values.get('rfc'),
|
|
656
|
+
)
|
|
657
|
+
if not any([curp, account, rfc, has_name]):
|
|
653
658
|
raise ValueError("At least 1 param is required")
|
|
654
659
|
return values
|
|
655
660
|
|
|
@@ -658,6 +663,7 @@ class UserListsRequest(BaseModel):
|
|
|
658
663
|
json_schema_extra={
|
|
659
664
|
'example': {
|
|
660
665
|
'curp': 'GOCG650418HVZNML08',
|
|
666
|
+
'rfc': 'GOCG650418TJ1',
|
|
661
667
|
'account_number': '9203929392939292392',
|
|
662
668
|
'names': 'Pedrito',
|
|
663
669
|
'first_surname': 'Sola',
|
cuenca_validations/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '2.1.
|
|
1
|
+
__version__ = '2.1.3.dev1'
|
|
@@ -4,7 +4,7 @@ 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=wzwLnJ4wHggZvqp3mearbFkzvDERGeTNvJkuofQnuMc,1484
|
|
7
|
-
cuenca_validations/version.py,sha256=
|
|
7
|
+
cuenca_validations/version.py,sha256=P6qbWxLdSiR-eupsaovRuiklkIe1NAytqw3aOUNRFEQ,27
|
|
8
8
|
cuenca_validations/types/__init__.py,sha256=8fiuz26oYQT2DriQ7sbD740yFJergVhB1OYoUGETB5A,4783
|
|
9
9
|
cuenca_validations/types/card.py,sha256=UGzz8NTFAverUmdUKAK1oGHnOnjSNTpIRUm93vKSSGY,1295
|
|
10
10
|
cuenca_validations/types/enums.py,sha256=sK9ayp8wuu4D5-hjkFTV_-h9xdeVHFj_cZkGjLAzPGI,18853
|
|
@@ -14,15 +14,15 @@ cuenca_validations/types/helpers.py,sha256=6rHUhwoQ7jJZtGcW3LX-W5ZDl42PWE1RoBpGm
|
|
|
14
14
|
cuenca_validations/types/identities.py,sha256=-TWRDRpmIaCI4nE4hVy1FQtQtlxuErtmEtzJW1FBzec,4956
|
|
15
15
|
cuenca_validations/types/morals.py,sha256=m8kAedevmwfSPTA9GYe03l7pkgipynwYgKfejyVtnuI,1813
|
|
16
16
|
cuenca_validations/types/queries.py,sha256=KCRx0sPzWDtDDbZysmFGVgANgfqil17EITWaG7tGQ-A,4700
|
|
17
|
-
cuenca_validations/types/requests.py,sha256=
|
|
17
|
+
cuenca_validations/types/requests.py,sha256=cvdW0gPhgkwoOI_dHonncQgSZwjvVWxfc4MHISxJEb4,20748
|
|
18
18
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
tests/test_card.py,sha256=QAfRz7e11gWICPnFJZ2tiYgUsFV3C9TwzJXrDnDNXFw,1202
|
|
20
20
|
tests/test_errors.py,sha256=ixiIgEuBuzfsL5p4uCFdF32XqFRtTPF6EVhGJ0keOrI,930
|
|
21
21
|
tests/test_helpers.py,sha256=ubzpi1UXCryLQdgsT_Zm2IX-XE_4L0dnHnhLwH06xK8,748
|
|
22
22
|
tests/test_statement.py,sha256=IOE0rRRBgBZSJv_FLaETEyn5NzzXKMNTqgjv99GX-68,1436
|
|
23
|
-
tests/test_types.py,sha256=
|
|
24
|
-
cuenca_validations-2.1.
|
|
25
|
-
cuenca_validations-2.1.
|
|
26
|
-
cuenca_validations-2.1.
|
|
27
|
-
cuenca_validations-2.1.
|
|
28
|
-
cuenca_validations-2.1.
|
|
23
|
+
tests/test_types.py,sha256=sMcDFd_Ho4yAafPHpYAcS1YNmfiIyWxt0hoJZrc0N6Q,18260
|
|
24
|
+
cuenca_validations-2.1.3.dev1.dist-info/LICENSE,sha256=wR76FmxBbfnQpwELkkE5iMF8sFIafEMgXLTE4N4WPTc,1063
|
|
25
|
+
cuenca_validations-2.1.3.dev1.dist-info/METADATA,sha256=qaREo_8G8n1kR5maDW7bhAXUryC55Do5QAfN_W7QTYk,1577
|
|
26
|
+
cuenca_validations-2.1.3.dev1.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
|
|
27
|
+
cuenca_validations-2.1.3.dev1.dist-info/top_level.txt,sha256=4233xdOs2HtuT-GFRjcDcwK0IwdwvWdczOtk0fPB6Gw,25
|
|
28
|
+
cuenca_validations-2.1.3.dev1.dist-info/RECORD,,
|
tests/test_types.py
CHANGED
|
@@ -564,10 +564,28 @@ def test_bank_account_validation_clabe_request():
|
|
|
564
564
|
assert BankAccountValidationRequest(account_number='646180157098510917')
|
|
565
565
|
|
|
566
566
|
|
|
567
|
-
|
|
568
|
-
|
|
567
|
+
@pytest.mark.parametrize(
|
|
568
|
+
'input_data',
|
|
569
|
+
[
|
|
570
|
+
{'names': 'Pedro', 'first_surname': 'Paramo'},
|
|
571
|
+
{'curp': 'GOCG650418HVZNML08'},
|
|
572
|
+
{'rfc': 'GOCG650418TJ1'},
|
|
573
|
+
{'account_number': '646180157034181180'},
|
|
574
|
+
{
|
|
575
|
+
'curp': 'GOCG650418HVZNML08',
|
|
576
|
+
'rfc': 'GOCG650418TJ1',
|
|
577
|
+
'names': 'Pedro',
|
|
578
|
+
'first_surname': 'Paramo',
|
|
579
|
+
},
|
|
580
|
+
],
|
|
581
|
+
)
|
|
582
|
+
def test_user_lists_request_valid_params(input_data):
|
|
583
|
+
UserListsRequest(**input_data)
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
def test_user_lists_request_invalid_params():
|
|
569
587
|
with pytest.raises(ValueError):
|
|
570
|
-
UserListsRequest()
|
|
588
|
+
UserListsRequest(first_surname='Paramo', second_surname='Paramo')
|
|
571
589
|
|
|
572
590
|
|
|
573
591
|
class IntModel(BaseModel):
|
|
File without changes
|
{cuenca_validations-2.1.2.dev1.dist-info → cuenca_validations-2.1.3.dev1.dist-info}/top_level.txt
RENAMED
|
File without changes
|