Skip to content

Commit 08c4014

Browse files
committed
fields
1 parent d6c689f commit 08c4014

File tree

3 files changed

+34
-37
lines changed

3 files changed

+34
-37
lines changed

cuenca/resources/kyc_validations.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,25 @@
1010
class KYCValidation(Creatable, Retrievable, Queryable):
1111
_resource: ClassVar = 'kyc_validations'
1212
platform_id: str
13-
attemps: Optional[int] = None
14-
verification_id: Optional[str] = None
13+
user_id: str
14+
source_type: KYCValidationSource
15+
flow_id: str
1516
files_uri: Optional[list[str]] = None
17+
verification_id: Optional[str] = None
18+
identity_id: Optional[str] = None
1619

1720
model_config = ConfigDict(
1821
json_schema_extra={
1922
'example': {
2023
'id': 'KVNEUInh69SuKXXmK95sROwQ',
21-
'platform_id': 'PT8UEv02zBTcymd4Kd3MO6pg',
2224
'created_at': '2020-05-24T14:15:22Z',
23-
'verification_id': 'string',
25+
'platform_id': 'PT-1234567890',
26+
'user_id': 'US-1234567890',
27+
'source_type': 'server',
28+
'flow_id': '123e4567-e89b-12d3-a456-426614174000',
2429
'files_uri': ['cuenca.com/files/id', 'cuenca.com/files/id2'],
25-
'attemps': '1',
30+
'verification_id': 'metamap-verification-id',
31+
'identity_id': 'metamap-identity-id',
2632
}
2733
}
2834
)

tests/resources/cassettes/test_validation_create.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,46 @@
11
interactions:
22
- request:
3-
body: '{"user_id": "USFOOBAR"}'
3+
body: '{"user_id": "USze_Bh1zhROKehtBOS7EHlw", "source_type": "server", "force":
4+
false}'
45
headers:
5-
Accept:
6-
- '*/*'
7-
Accept-Encoding:
8-
- gzip, deflate
96
Authorization:
107
- DUMMY
11-
Connection:
12-
- keep-alive
138
Content-Length:
14-
- '39'
9+
- '80'
1510
Content-Type:
1611
- application/json
1712
User-Agent:
18-
- cuenca-python/0.14.7.dev6
13+
- cuenca-python/2.1.3.dev2
1914
X-Cuenca-Api-Version:
2015
- '2020-03-19'
2116
method: POST
2217
uri: https://sandbox.cuenca.com/kyc_validations
2318
response:
2419
body:
25-
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"]}'
20+
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"}'
2621
headers:
2722
Connection:
2823
- keep-alive
2924
Content-Length:
30-
- '393'
25+
- '545'
3126
Content-Type:
3227
- application/json
3328
Date:
34-
- Mon, 26 Sep 2022 23:14:28 GMT
29+
- Thu, 27 Mar 2025 20:41:36 GMT
3530
X-Request-Time:
36-
- 'value: 27.792'
31+
- 'value: 0.544'
3732
x-amz-apigw-id:
38-
- ZFzI7GHfoAMF4jQ=
33+
- IGmwBF8BiYcEFLA=
3934
x-amzn-Remapped-Connection:
4035
- keep-alive
4136
x-amzn-Remapped-Content-Length:
42-
- '393'
37+
- '545'
4338
x-amzn-Remapped-Date:
44-
- Mon, 26 Sep 2022 23:14:28 GMT
39+
- Thu, 27 Mar 2025 20:41:36 GMT
4540
x-amzn-Remapped-Server:
46-
- nginx/1.22.0
41+
- nginx/1.26.3
4742
x-amzn-RequestId:
48-
- 310039b7-a7dd-4980-bb0b-b5552c602d26
43+
- 4fd4b9c9-08cf-44bb-b191-b8f18f10004c
4944
status:
5045
code: 201
5146
message: Created

tests/resources/cassettes/test_validation_retrieve.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,42 @@ interactions:
22
- request:
33
body: null
44
headers:
5-
Accept:
6-
- '*/*'
7-
Accept-Encoding:
8-
- gzip, deflate
95
Authorization:
106
- DUMMY
117
Connection:
128
- keep-alive
139
User-Agent:
14-
- cuenca-python/0.14.7.dev6
10+
- cuenca-python/2.1.3.dev2
1511
X-Cuenca-Api-Version:
1612
- '2020-03-19'
1713
method: GET
1814
uri: https://sandbox.cuenca.com/kyc_validations/KVFOO
1915
response:
2016
body:
21-
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}'
17+
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"}'
2218
headers:
2319
Connection:
2420
- keep-alive
2521
Content-Length:
26-
- '221'
22+
- '545'
2723
Content-Type:
2824
- application/json
2925
Date:
30-
- Mon, 26 Sep 2022 23:15:11 GMT
26+
- Thu, 27 Mar 2025 20:41:36 GMT
3127
X-Request-Time:
32-
- 'value: 0.074'
28+
- 'value: 0.544'
3329
x-amz-apigw-id:
34-
- ZFzT4HnLIAMFe1w=
30+
- IGmwBF8BiYcEFLA=
3531
x-amzn-Remapped-Connection:
3632
- keep-alive
3733
x-amzn-Remapped-Content-Length:
38-
- '221'
34+
- '545'
3935
x-amzn-Remapped-Date:
40-
- Mon, 26 Sep 2022 23:15:11 GMT
36+
- Thu, 27 Mar 2025 20:41:36 GMT
4137
x-amzn-Remapped-Server:
42-
- nginx/1.22.0
38+
- nginx/1.26.3
4339
x-amzn-RequestId:
44-
- 54f8a828-94f3-4303-8c95-95e22472cbab
40+
- 4fd4b9c9-08cf-44bb-b191-b8f18f10004c
4541
status:
4642
code: 200
4743
message: OK

0 commit comments

Comments
 (0)