From 3c57cb300a25a6344cf12c354dfc3f3403c08120 Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Wed, 12 Mar 2025 13:51:46 -0600 Subject: [PATCH 01/10] levels and remove kyc_verification --- cuenca/__init__.py | 2 - cuenca/resources/__init__.py | 3 -- cuenca/resources/kyc_validations.py | 8 ++- cuenca/resources/kyc_verifications.py | 53 ------------------- requirements.txt | 2 +- .../test_kyc_verification_create.yaml | 50 ----------------- .../test_kyc_verification_retrieve.yaml | 46 ---------------- .../test_kyc_verification_update.yaml | 50 ----------------- tests/resources/test_kyc_verifications.py | 25 --------- 9 files changed, 8 insertions(+), 231 deletions(-) delete mode 100644 cuenca/resources/kyc_verifications.py delete mode 100644 tests/resources/cassettes/test_kyc_verification_create.yaml delete mode 100644 tests/resources/cassettes/test_kyc_verification_retrieve.yaml delete mode 100644 tests/resources/cassettes/test_kyc_verification_update.yaml delete mode 100644 tests/resources/test_kyc_verifications.py diff --git a/cuenca/__init__.py b/cuenca/__init__.py index 32950045..fa506d51 100644 --- a/cuenca/__init__.py +++ b/cuenca/__init__.py @@ -20,7 +20,6 @@ 'Identity', 'IdentityEvent', 'KYCValidation', - 'KYCVerification', 'LimitedWallet', 'LoginToken', 'Otp', @@ -68,7 +67,6 @@ IdentityEvent, JwtToken, KYCValidation, - KYCVerification, LimitedWallet, LoginToken, Otp, diff --git a/cuenca/resources/__init__.py b/cuenca/resources/__init__.py index 8daf3c7d..e74f07f9 100644 --- a/cuenca/resources/__init__.py +++ b/cuenca/resources/__init__.py @@ -19,7 +19,6 @@ 'Identity', 'IdentityEvent', 'KYCValidation', - 'KYCVerification', 'LimitedWallet', 'LoginToken', 'Otp', @@ -62,7 +61,6 @@ from .identity_events import IdentityEvent from .jwt_tokens import JwtToken from .kyc_validations import KYCValidation -from .kyc_verifications import KYCVerification from .limited_wallets import LimitedWallet from .login_tokens import LoginToken from .otps import Otp @@ -106,7 +104,6 @@ Identity, IdentityEvent, KYCValidation, - KYCVerification, LimitedWallet, LoginToken, Questionnaires, diff --git a/cuenca/resources/kyc_validations.py b/cuenca/resources/kyc_validations.py index c9ad95ea..0c3762fd 100644 --- a/cuenca/resources/kyc_validations.py +++ b/cuenca/resources/kyc_validations.py @@ -1,6 +1,10 @@ from typing import ClassVar, Optional -from cuenca_validations.types import KYCFile, KYCValidationRequest +from cuenca_validations.types import ( + KYCFile, + KYCValidationRequest, + KYCValidationType, +) from pydantic import ConfigDict from ..http import Session, session as global_session @@ -31,6 +35,7 @@ class KYCValidation(Creatable, Retrievable, Queryable): def create( cls, user_id: str, + validation_type: KYCValidationType, force: bool = False, documents: list[KYCFile] = [], session: Session = global_session, @@ -39,5 +44,6 @@ def create( user_id=user_id, force=force, documents=documents, + validation_type=validation_type, ) return cls._create(**req.model_dump(), session=session) diff --git a/cuenca/resources/kyc_verifications.py b/cuenca/resources/kyc_verifications.py deleted file mode 100644 index 13694135..00000000 --- a/cuenca/resources/kyc_verifications.py +++ /dev/null @@ -1,53 +0,0 @@ -import datetime as dt -from typing import ClassVar, Optional - -from cuenca_validations.types import ( - Address, - Curp, - KYCVerificationUpdateRequest, - Rfc, -) -from pydantic import ConfigDict - -from ..http import Session, session as global_session -from .base import Creatable, Retrievable, Updateable - - -class KYCVerification(Creatable, Retrievable, Updateable): - _resource: ClassVar = 'kyc_verifications' - - platform_id: str - created_at: dt.datetime - deactivated_at: Optional[dt.datetime] = None - verification_id: Optional[str] = None - curp: Optional[Curp] = None - rfc: Optional[Rfc] = None - address: Optional[Address] = None - - model_config = ConfigDict( - json_schema_extra={ - 'example': { - 'id': 'KVNEUInh69SuKXXmK95sROwQ', - 'updated_at': '2020-05-24T14:15:22Z', - 'platform_id': 'PT8UEv02zBTcymd4Kd3MO6pg', - 'created_at': '2020-05-24T14:15:22Z', - 'verification_id': 'string', - 'curp': 'GOCG650418HVZNML08', - 'rfc': 'GOCG650418123', - 'address': Address.schema().get('example'), - } - } - ) - - @classmethod - def create(cls, session: Session = global_session) -> 'KYCVerification': - return cls._create(session=session) - - @classmethod - def update( - cls, - kyc_id: str, - curp: Optional[Curp] = None, - ) -> 'KYCVerification': - req = KYCVerificationUpdateRequest(curp=curp) - return cls._update(id=kyc_id, **req.model_dump()) diff --git a/requirements.txt b/requirements.txt index 190cc68d..cc8d742a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ requests==2.32.3 -cuenca-validations==2.1.0 +cuenca-validations==2.1.4.dev1 pydantic-extra-types==2.10.2 diff --git a/tests/resources/cassettes/test_kyc_verification_create.yaml b/tests/resources/cassettes/test_kyc_verification_create.yaml deleted file mode 100644 index 7766b183..00000000 --- a/tests/resources/cassettes/test_kyc_verification_create.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: '{}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Authorization: - - DUMMY - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - User-Agent: - - cuenca-python/0.9.2 - X-Cuenca-Api-Version: - - '2020-03-19' - method: POST - uri: https://sandbox.cuenca.com/kyc_verifications - response: - body: - string: '{"id":"KYCY01","identity_id":null,"platform_id":"PT01","created_at":"2022-05-04T21:49:28.696688","updated_at":"2022-05-04T21:49:28.697159","deactivated_at":null,"verification_id":null,"curp":null,"rfc":null,"address":null}' - headers: - Connection: - - keep-alive - Content-Length: - - '246' - Content-Type: - - application/json - Date: - - Wed, 04 May 2022 21:49:28 GMT - x-amz-apigw-id: - - Rns0XHhNCYcFwdg= - x-amzn-Remapped-Connection: - - keep-alive - x-amzn-Remapped-Content-Length: - - '246' - x-amzn-Remapped-Date: - - Wed, 04 May 2022 21:49:28 GMT - x-amzn-Remapped-Server: - - nginx/1.20.2 - x-amzn-RequestId: - - d2c3bb25-34c1-4858-9de2-d1b4e60d2c81 - status: - code: 201 - message: Created -version: 1 diff --git a/tests/resources/cassettes/test_kyc_verification_retrieve.yaml b/tests/resources/cassettes/test_kyc_verification_retrieve.yaml deleted file mode 100644 index 426db1a8..00000000 --- a/tests/resources/cassettes/test_kyc_verification_retrieve.yaml +++ /dev/null @@ -1,46 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Authorization: - - DUMMY - Connection: - - keep-alive - User-Agent: - - cuenca-python/0.9.2 - X-Cuenca-Api-Version: - - '2020-03-19' - method: GET - uri: https://sandbox.cuenca.com/kyc_verifications/KYC01 - response: - body: - string: '{"id":"KYC01","identity_id":null,"platform_id":"PT01","created_at":"2022-05-04T21:27:15.954000","updated_at":"2022-05-04T21:27:15.954000","deactivated_at":null,"verification_id":null,"curp":null,"rfc":null,"address":null}' - headers: - Connection: - - keep-alive - Content-Length: - - '246' - Content-Type: - - application/json - Date: - - Wed, 04 May 2022 21:49:29 GMT - x-amz-apigw-id: - - Rns0cHpJiYcF_OQ= - x-amzn-Remapped-Connection: - - keep-alive - x-amzn-Remapped-Content-Length: - - '246' - x-amzn-Remapped-Date: - - Wed, 04 May 2022 21:49:29 GMT - x-amzn-Remapped-Server: - - nginx/1.20.2 - x-amzn-RequestId: - - 071182a0-b23e-47f0-bb92-68fdc35ec070 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/resources/cassettes/test_kyc_verification_update.yaml b/tests/resources/cassettes/test_kyc_verification_update.yaml deleted file mode 100644 index 90f8d411..00000000 --- a/tests/resources/cassettes/test_kyc_verification_update.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: '{"curp": "HEMA921130HNERNN05"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Authorization: - - DUMMY - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - application/json - User-Agent: - - cuenca-python/0.9.3 - X-Cuenca-Api-Version: - - '2020-03-19' - method: PATCH - uri: https://sandbox.cuenca.com/kyc_verifications/KYC01 - response: - body: - string: '{"id":"KYC01","identity_id":null,"platform_id":"PTSFitwBYWROu-dAziDnSr4Q","created_at":"2022-05-10T17:37:34.755000","updated_at":"2022-05-10T17:42:25.137555","deactivated_at":null,"verification_id":null,"curp":"HEMA921130HNERNN05","rfc":null,"address":null}' - headers: - Connection: - - keep-alive - Content-Length: - - '277' - Content-Type: - - application/json - Date: - - Tue, 10 May 2022 17:42:25 GMT - x-amz-apigw-id: - - R66QMF9FCYcFtlA= - x-amzn-Remapped-Connection: - - keep-alive - x-amzn-Remapped-Content-Length: - - '277' - x-amzn-Remapped-Date: - - Tue, 10 May 2022 17:42:25 GMT - x-amzn-Remapped-Server: - - nginx/1.20.2 - x-amzn-RequestId: - - 47ab8674-5cc2-478b-8a73-5815cda6e4f3 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/resources/test_kyc_verifications.py b/tests/resources/test_kyc_verifications.py deleted file mode 100644 index 49961074..00000000 --- a/tests/resources/test_kyc_verifications.py +++ /dev/null @@ -1,25 +0,0 @@ -import pytest - -from cuenca import KYCVerification - - -@pytest.mark.vcr -def test_kyc_verification_create(): - kyc_verification: KYCVerification = KYCVerification.create() - assert kyc_verification.id - - -@pytest.mark.vcr -def test_kyc_verification_retrieve(): - kyc_verification = KYCVerification.retrieve('KYC01') - assert kyc_verification.id - - -@pytest.mark.vcr -def test_kyc_verification_update(): - kyc_id = 'KYC01' - changes = dict(curp='HEMA921130HNERNN05') - kyc_verification = KYCVerification.update(kyc_id, **changes) - assert all( - item in kyc_verification.to_dict().items() for item in changes.items() - ) From 811b75794e6a4b44403ec413b90563951f28982a Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Wed, 12 Mar 2025 13:51:54 -0600 Subject: [PATCH 02/10] test --- tests/resources/test_kyc_validations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/resources/test_kyc_validations.py b/tests/resources/test_kyc_validations.py index 00e9e660..01324711 100644 --- a/tests/resources/test_kyc_validations.py +++ b/tests/resources/test_kyc_validations.py @@ -1,11 +1,15 @@ import pytest +from cuenca_validations.types import KYCValidationType from cuenca import KYCValidation @pytest.mark.vcr def test_validation_create(): - kyc_validation: KYCValidation = KYCValidation.create(user_id="USFOOBAR") + kyc_validation: KYCValidation = KYCValidation.create( + user_id="USFOOBAR", + validation_type=KYCValidationType.background, + ) assert kyc_validation.id assert kyc_validation.verification_id From f1619053096ef8b9687685b4ecacaa9a504976be Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Thu, 20 Mar 2025 12:31:10 -0600 Subject: [PATCH 03/10] final versions --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index cc8d742a..3104306c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ requests==2.32.3 -cuenca-validations==2.1.4.dev1 +cuenca-validations==2.1.4 pydantic-extra-types==2.10.2 diff --git a/setup.py b/setup.py index 4ba3904e..1b2d9e4a 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ python_requires='>=3.9', install_requires=[ 'requests>=2.32.0', - 'cuenca-validations>=2.1.0', + 'cuenca-validations>=2.1.4', 'pydantic-extra-types>=2.10.0', ], classifiers=[ From 161d3c2cdfaada8173add1d740882d482db0ac97 Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Thu, 20 Mar 2025 12:34:08 -0600 Subject: [PATCH 04/10] versions --- cuenca/version.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cuenca/version.py b/cuenca/version.py index 063421fa..679045d5 100644 --- a/cuenca/version.py +++ b/cuenca/version.py @@ -1,3 +1,3 @@ -__version__ = '2.1.2' +__version__ = '2.1.3' CLIENT_VERSION = __version__ API_VERSION = '2020-03-19' diff --git a/requirements.txt b/requirements.txt index 3104306c..cc8d742a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ requests==2.32.3 -cuenca-validations==2.1.4 +cuenca-validations==2.1.4.dev1 pydantic-extra-types==2.10.2 diff --git a/setup.py b/setup.py index 1b2d9e4a..7bb8734d 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ python_requires='>=3.9', install_requires=[ 'requests>=2.32.0', - 'cuenca-validations>=2.1.4', + 'cuenca-validations>=2.1.4.dev1', 'pydantic-extra-types>=2.10.0', ], classifiers=[ From ce0c3aebc1d15d13a1bfd101c4f700e991e2f59e Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Wed, 26 Mar 2025 17:10:00 -0600 Subject: [PATCH 05/10] names --- cuenca/resources/kyc_validations.py | 12 +++--------- cuenca/version.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- tests/resources/test_kyc_validations.py | 4 ++-- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/cuenca/resources/kyc_validations.py b/cuenca/resources/kyc_validations.py index 0c3762fd..a0107048 100644 --- a/cuenca/resources/kyc_validations.py +++ b/cuenca/resources/kyc_validations.py @@ -1,10 +1,6 @@ from typing import ClassVar, Optional -from cuenca_validations.types import ( - KYCFile, - KYCValidationRequest, - KYCValidationType, -) +from cuenca_validations.types import KYCValidationFlow, KYCValidationRequest from pydantic import ConfigDict from ..http import Session, session as global_session @@ -35,15 +31,13 @@ class KYCValidation(Creatable, Retrievable, Queryable): def create( cls, user_id: str, - validation_type: KYCValidationType, + validation_flow: KYCValidationFlow, force: bool = False, - documents: list[KYCFile] = [], session: Session = global_session, ) -> 'KYCValidation': req = KYCValidationRequest( user_id=user_id, force=force, - documents=documents, - validation_type=validation_type, + validation_flow=validation_flow, ) return cls._create(**req.model_dump(), session=session) diff --git a/cuenca/version.py b/cuenca/version.py index 679045d5..29d72e55 100644 --- a/cuenca/version.py +++ b/cuenca/version.py @@ -1,3 +1,3 @@ -__version__ = '2.1.3' +__version__ = '2.1.3.dev0' CLIENT_VERSION = __version__ API_VERSION = '2020-03-19' diff --git a/requirements.txt b/requirements.txt index cc8d742a..80e51f5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ requests==2.32.3 -cuenca-validations==2.1.4.dev1 +cuenca-validations==2.1.5.dev5 pydantic-extra-types==2.10.2 diff --git a/setup.py b/setup.py index 7bb8734d..d9fa2c2f 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ python_requires='>=3.9', install_requires=[ 'requests>=2.32.0', - 'cuenca-validations>=2.1.4.dev1', + 'cuenca-validations>=2.1.5.dev5', 'pydantic-extra-types>=2.10.0', ], classifiers=[ diff --git a/tests/resources/test_kyc_validations.py b/tests/resources/test_kyc_validations.py index 01324711..12951414 100644 --- a/tests/resources/test_kyc_validations.py +++ b/tests/resources/test_kyc_validations.py @@ -1,5 +1,5 @@ import pytest -from cuenca_validations.types import KYCValidationType +from cuenca_validations.types import KYCValidationFlow from cuenca import KYCValidation @@ -8,7 +8,7 @@ def test_validation_create(): kyc_validation: KYCValidation = KYCValidation.create( user_id="USFOOBAR", - validation_type=KYCValidationType.background, + validation_flow=KYCValidationFlow.server, ) assert kyc_validation.id assert kyc_validation.verification_id From e1b43a7244e4da1dc73386de8e1b37a955152ff1 Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Wed, 26 Mar 2025 17:12:37 -0600 Subject: [PATCH 06/10] version --- cuenca/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuenca/version.py b/cuenca/version.py index 29d72e55..d3af1515 100644 --- a/cuenca/version.py +++ b/cuenca/version.py @@ -1,3 +1,3 @@ -__version__ = '2.1.3.dev0' +__version__ = '2.1.3.dev1' CLIENT_VERSION = __version__ API_VERSION = '2020-03-19' From 41fd4cad17daa9ecc5c9844c69efffa40bb46f49 Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Thu, 27 Mar 2025 12:18:27 -0600 Subject: [PATCH 07/10] name --- cuenca/resources/kyc_validations.py | 6 +++--- cuenca/version.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- tests/resources/test_kyc_validations.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cuenca/resources/kyc_validations.py b/cuenca/resources/kyc_validations.py index a0107048..51fc4fb7 100644 --- a/cuenca/resources/kyc_validations.py +++ b/cuenca/resources/kyc_validations.py @@ -1,6 +1,6 @@ from typing import ClassVar, Optional -from cuenca_validations.types import KYCValidationFlow, KYCValidationRequest +from cuenca_validations.types import KYCValidationRequest, KYCValidationSource from pydantic import ConfigDict from ..http import Session, session as global_session @@ -31,13 +31,13 @@ class KYCValidation(Creatable, Retrievable, Queryable): def create( cls, user_id: str, - validation_flow: KYCValidationFlow, + source_type: KYCValidationSource, force: bool = False, session: Session = global_session, ) -> 'KYCValidation': req = KYCValidationRequest( user_id=user_id, force=force, - validation_flow=validation_flow, + source_type=KYCValidationSource, ) return cls._create(**req.model_dump(), session=session) diff --git a/cuenca/version.py b/cuenca/version.py index d3af1515..317041e0 100644 --- a/cuenca/version.py +++ b/cuenca/version.py @@ -1,3 +1,3 @@ -__version__ = '2.1.3.dev1' +__version__ = '2.1.3.dev2' CLIENT_VERSION = __version__ API_VERSION = '2020-03-19' diff --git a/requirements.txt b/requirements.txt index 80e51f5a..f848f5ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ requests==2.32.3 -cuenca-validations==2.1.5.dev5 +cuenca-validations==2.1.5.dev6 pydantic-extra-types==2.10.2 diff --git a/setup.py b/setup.py index d9fa2c2f..c4e232f7 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ python_requires='>=3.9', install_requires=[ 'requests>=2.32.0', - 'cuenca-validations>=2.1.5.dev5', + 'cuenca-validations>=2.1.5.dev6', 'pydantic-extra-types>=2.10.0', ], classifiers=[ diff --git a/tests/resources/test_kyc_validations.py b/tests/resources/test_kyc_validations.py index 12951414..d73b7432 100644 --- a/tests/resources/test_kyc_validations.py +++ b/tests/resources/test_kyc_validations.py @@ -1,5 +1,5 @@ import pytest -from cuenca_validations.types import KYCValidationFlow +from cuenca_validations.types import KYCValidationSource from cuenca import KYCValidation @@ -8,7 +8,7 @@ def test_validation_create(): kyc_validation: KYCValidation = KYCValidation.create( user_id="USFOOBAR", - validation_flow=KYCValidationFlow.server, + source_type=KYCValidationSource.server, ) assert kyc_validation.id assert kyc_validation.verification_id From d6c689fb5d7d512db233353b148dc62777a59a3b Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Thu, 27 Mar 2025 12:42:54 -0600 Subject: [PATCH 08/10] fix --- cuenca/resources/kyc_validations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuenca/resources/kyc_validations.py b/cuenca/resources/kyc_validations.py index 51fc4fb7..299fa796 100644 --- a/cuenca/resources/kyc_validations.py +++ b/cuenca/resources/kyc_validations.py @@ -38,6 +38,6 @@ def create( req = KYCValidationRequest( user_id=user_id, force=force, - source_type=KYCValidationSource, + source_type=source_type, ) return cls._create(**req.model_dump(), session=session) From 08c40144d8ba17d442c25a519542d17f4e867763 Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Thu, 27 Mar 2025 15:28:39 -0600 Subject: [PATCH 09/10] fields --- cuenca/resources/kyc_validations.py | 16 +++++++--- .../cassettes/test_validation_create.yaml | 31 ++++++++----------- .../cassettes/test_validation_retrieve.yaml | 24 ++++++-------- 3 files changed, 34 insertions(+), 37 deletions(-) diff --git a/cuenca/resources/kyc_validations.py b/cuenca/resources/kyc_validations.py index 299fa796..9784c304 100644 --- a/cuenca/resources/kyc_validations.py +++ b/cuenca/resources/kyc_validations.py @@ -10,19 +10,25 @@ class KYCValidation(Creatable, Retrievable, Queryable): _resource: ClassVar = 'kyc_validations' platform_id: str - attemps: Optional[int] = None - verification_id: Optional[str] = None + user_id: str + source_type: KYCValidationSource + flow_id: str files_uri: Optional[list[str]] = None + verification_id: Optional[str] = None + identity_id: Optional[str] = None model_config = ConfigDict( json_schema_extra={ 'example': { 'id': 'KVNEUInh69SuKXXmK95sROwQ', - 'platform_id': 'PT8UEv02zBTcymd4Kd3MO6pg', 'created_at': '2020-05-24T14:15:22Z', - 'verification_id': 'string', + 'platform_id': 'PT-1234567890', + 'user_id': 'US-1234567890', + 'source_type': 'server', + 'flow_id': '123e4567-e89b-12d3-a456-426614174000', 'files_uri': ['cuenca.com/files/id', 'cuenca.com/files/id2'], - 'attemps': '1', + 'verification_id': 'metamap-verification-id', + 'identity_id': 'metamap-identity-id', } } ) diff --git a/tests/resources/cassettes/test_validation_create.yaml b/tests/resources/cassettes/test_validation_create.yaml index ac329105..f8a7bbed 100644 --- a/tests/resources/cassettes/test_validation_create.yaml +++ b/tests/resources/cassettes/test_validation_create.yaml @@ -1,51 +1,46 @@ interactions: - request: - body: '{"user_id": "USFOOBAR"}' + body: '{"user_id": "USze_Bh1zhROKehtBOS7EHlw", "source_type": "server", "force": + false}' headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate Authorization: - DUMMY - Connection: - - keep-alive Content-Length: - - '39' + - '80' Content-Type: - application/json User-Agent: - - cuenca-python/0.14.7.dev6 + - cuenca-python/2.1.3.dev2 X-Cuenca-Api-Version: - '2020-03-19' method: POST uri: https://sandbox.cuenca.com/kyc_validations response: body: - string: '{"id":"KVWZUhh-t_RUOPvU3hOnhbsQ","created_at":"2022-09-26T23:14:28.686030","verification_id":"6332324ca3b3cd001c6bcbf9","platform_id":"PTS7Wx1-1KRCKHQRWXsqxbMQ","user_id":"USOiwY3bhaRO-Or9koIBaehg","files_uri":["''https://sandbox.cuenca.com/files/EFfX_JE_wES3KA5cuR075rVA","https://sandbox.cuenca.com/files/EFWUXd3zl6Q6Gmd1tD2S65fw","https://sandbox.cuenca.com/files/EF2_YXyrMLSba7wpz-DQGgsw"]}' + string: '{"id":"KVvwIQTxHdQvOq769mEnoJsQ","created_at":"2025-03-27T20:10:03.783000","platform_id":"PTk5BbZcExRq-1u2W3J9mZpw","files_uri":["https://stage.cuenca.com/files/EF5pRc5dO4Q8WE6_zGCYUX6A","https://stage.cuenca.com/files/EF-y7kGVwlRESVGZOT-twioQ","https://stage.cuenca.com/files/EFB-J1hALOTPuuETDY5dtJJA","https://stage.cuenca.com/files/EFTrtO44_7QRiuRB8uXQizaw"],"user_id":"USze_Bh1zhROKehtBOS7EHlw","verification_id":"67e5b09c05c3102617d622b0","identity_id":"67e5b09c05c3101df5d622ad","source_type":"server","flow_id":"63486ce1e94af4001c126ccf"}' headers: Connection: - keep-alive Content-Length: - - '393' + - '545' Content-Type: - application/json Date: - - Mon, 26 Sep 2022 23:14:28 GMT + - Thu, 27 Mar 2025 20:41:36 GMT X-Request-Time: - - 'value: 27.792' + - 'value: 0.544' x-amz-apigw-id: - - ZFzI7GHfoAMF4jQ= + - IGmwBF8BiYcEFLA= x-amzn-Remapped-Connection: - keep-alive x-amzn-Remapped-Content-Length: - - '393' + - '545' x-amzn-Remapped-Date: - - Mon, 26 Sep 2022 23:14:28 GMT + - Thu, 27 Mar 2025 20:41:36 GMT x-amzn-Remapped-Server: - - nginx/1.22.0 + - nginx/1.26.3 x-amzn-RequestId: - - 310039b7-a7dd-4980-bb0b-b5552c602d26 + - 4fd4b9c9-08cf-44bb-b191-b8f18f10004c status: code: 201 message: Created diff --git a/tests/resources/cassettes/test_validation_retrieve.yaml b/tests/resources/cassettes/test_validation_retrieve.yaml index 4860b738..a46c7a2f 100644 --- a/tests/resources/cassettes/test_validation_retrieve.yaml +++ b/tests/resources/cassettes/test_validation_retrieve.yaml @@ -2,46 +2,42 @@ interactions: - request: body: null headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate Authorization: - DUMMY Connection: - keep-alive User-Agent: - - cuenca-python/0.14.7.dev6 + - cuenca-python/2.1.3.dev2 X-Cuenca-Api-Version: - '2020-03-19' method: GET uri: https://sandbox.cuenca.com/kyc_validations/KVFOO response: body: - string: '{"id":"KVWZUhh-t_RUOPvU3hOnhbsQ","platform_id":"PTS7Wx1-1KRCKHQRWXsqxbMQ","created_at":"2022-09-26T23:14:28.686000","verification_id":"6332324ca3b3cd001c6bcbf9","govt_id":null,"proof_of_address":null,"proof_of_life":null}' + string: '{"id":"KVvwIQTxHdQvOq769mEnoJsQ","created_at":"2025-03-27T20:10:03.783000","platform_id":"PTk5BbZcExRq-1u2W3J9mZpw","files_uri":["https://stage.cuenca.com/files/EF5pRc5dO4Q8WE6_zGCYUX6A","https://stage.cuenca.com/files/EF-y7kGVwlRESVGZOT-twioQ","https://stage.cuenca.com/files/EFB-J1hALOTPuuETDY5dtJJA","https://stage.cuenca.com/files/EFTrtO44_7QRiuRB8uXQizaw"],"user_id":"USze_Bh1zhROKehtBOS7EHlw","verification_id":"67e5b09c05c3102617d622b0","identity_id":"67e5b09c05c3101df5d622ad","source_type":"server","flow_id":"63486ce1e94af4001c126ccf"}' headers: Connection: - keep-alive Content-Length: - - '221' + - '545' Content-Type: - application/json Date: - - Mon, 26 Sep 2022 23:15:11 GMT + - Thu, 27 Mar 2025 20:41:36 GMT X-Request-Time: - - 'value: 0.074' + - 'value: 0.544' x-amz-apigw-id: - - ZFzT4HnLIAMFe1w= + - IGmwBF8BiYcEFLA= x-amzn-Remapped-Connection: - keep-alive x-amzn-Remapped-Content-Length: - - '221' + - '545' x-amzn-Remapped-Date: - - Mon, 26 Sep 2022 23:15:11 GMT + - Thu, 27 Mar 2025 20:41:36 GMT x-amzn-Remapped-Server: - - nginx/1.22.0 + - nginx/1.26.3 x-amzn-RequestId: - - 54f8a828-94f3-4303-8c95-95e22472cbab + - 4fd4b9c9-08cf-44bb-b191-b8f18f10004c status: code: 200 message: OK From 77489a506e0afa661e9d0d838b65174f2ca35117 Mon Sep 17 00:00:00 2001 From: rogeliolopez Date: Tue, 1 Apr 2025 15:03:23 -0600 Subject: [PATCH 10/10] final versions --- cuenca/version.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cuenca/version.py b/cuenca/version.py index 317041e0..679045d5 100644 --- a/cuenca/version.py +++ b/cuenca/version.py @@ -1,3 +1,3 @@ -__version__ = '2.1.3.dev2' +__version__ = '2.1.3' CLIENT_VERSION = __version__ API_VERSION = '2020-03-19' diff --git a/requirements.txt b/requirements.txt index f848f5ce..50818af8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ requests==2.32.3 -cuenca-validations==2.1.5.dev6 +cuenca-validations==2.1.5 pydantic-extra-types==2.10.2 diff --git a/setup.py b/setup.py index c4e232f7..b0379330 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ python_requires='>=3.9', install_requires=[ 'requests>=2.32.0', - 'cuenca-validations>=2.1.5.dev6', + 'cuenca-validations>=2.1.5', 'pydantic-extra-types>=2.10.0', ], classifiers=[