File tree Expand file tree Collapse file tree 6 files changed +68
-1
lines changed
Expand file tree Collapse file tree 6 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 4545 'TermsOfService' ,
4646 'UserTOSAgreement' ,
4747 'PostalCodes' ,
48+ 'ExistPhone' ,
4849]
4950
5051from . import http
6465 CurpValidation ,
6566 Deposit ,
6667 Endpoint ,
68+ ExistPhone ,
6769 File ,
6870 FileBatch ,
6971 Identity ,
Original file line number Diff line number Diff line change 1616 'Endpoint' ,
1717 'File' ,
1818 'FileBatch' ,
19+ 'ExistPhone' ,
1920 'Identity' ,
2021 'IdentityEvent' ,
2122 'KYCValidation' ,
5859from .curp_validations import CurpValidation
5960from .deposits import Deposit
6061from .endpoints import Endpoint
62+ from .exist_phone import ExistPhone
6163from .file_batches import FileBatch
6264from .files import File
6365from .identities import Identity
Original file line number Diff line number Diff line change 1+ from typing import ClassVar
2+
3+ from pydantic_extra_types .phone_numbers import PhoneNumber
4+
5+ from .base import Retrievable
6+
7+
8+ class ExistPhone (Retrievable ):
9+ _resource : ClassVar = 'exist_phone'
10+
11+ id : PhoneNumber
12+ exist : bool
Original file line number Diff line number Diff line change 1- __version__ = '2.1.6 '
1+ __version__ = '2.1.7 '
22CLIENT_VERSION = __version__
33API_VERSION = '2020-03-19'
Original file line number Diff line number Diff line change 1+ interactions :
2+ - request :
3+ body : null
4+ headers :
5+ User-Agent :
6+ - cuenca-python/2.1.7.dev1
7+ X-Cuenca-Api-Version :
8+ - ' 2020-03-19'
9+ method : GET
10+ uri : https://sandbox.cuenca.com/exist_phone/+527331256958
11+ response :
12+ body :
13+ string : ' {"id":"+527331256958","exist":true}'
14+ headers :
15+ Connection :
16+ - keep-alive
17+ Content-Length :
18+ - ' 35'
19+ Content-Type :
20+ - application/json
21+ Date :
22+ - Thu, 17 Jul 2025 18:34:19 GMT
23+ X-Request-Time :
24+ - ' value: 0.041'
25+ x-amz-apigw-id :
26+ - N3dG4EzACYcEofg=
27+ x-amzn-Remapped-Connection :
28+ - keep-alive
29+ x-amzn-Remapped-Content-Length :
30+ - ' 35'
31+ x-amzn-Remapped-Date :
32+ - Thu, 17 Jul 2025 18:34:19 GMT
33+ x-amzn-Remapped-Server :
34+ - nginx/1.28.0
35+ x-amzn-RequestId :
36+ - 51d8507c-c023-4b91-aa52-a6bdc499df89
37+ status :
38+ code : 200
39+ message : OK
40+ version : 1
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+ from cuenca import ExistPhone
4+
5+
6+ @pytest .mark .vcr
7+ def test_exist_phone_retrieve ():
8+ phone_number = '+527331256958'
9+ exist_phone : ExistPhone = ExistPhone .retrieve (phone_number )
10+ assert exist_phone .id == phone_number
11+ assert exist_phone .exist
You can’t perform that action at this time.
0 commit comments