8000 [Librarian] Regenerated @ cf36d99cec2b35d987298218e5c1f60159b81090 · anilktechie/twilio-python@d7cb131 · GitHub
[go: up one dir, main page]

Skip to content

Commit d7cb131

Browse files
committed
[Librarian] Regenerated @ cf36d99cec2b35d987298218e5c1f60159b81090
1 parent c7327d2 commit d7cb131

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6+
[2019-01-11] Version 6.23.1
7+
----------------------------
8+
**Verify**
9+
- Add `lookup` information in the response when creating a new verification (depends on the LookupEnabled flag being enabled at the service level)
10+
- Add `VerificationSid` optional parameter on Verification check.
11+
12+
613
[2019-01-10] Version 6.23.0
714
----------------------------
815
**Chat**

tests/integration/verify/v1/service/test_verification.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ def test_create_verification_response(self):
4242
"status": "pending",
4343
"valid": null,
4444
"date_created": "2015-07-30T20:00:00Z",
45-
"date_updated": "2015-07-30T20:00:00Z"
45+
"date_updated": "2015-07-30T20:00:00Z",
46+
"lookup": {
47+
"carrier": {
48+
"error_code": null,
49+
"name": "Carrier Name",
50+
"mobile_country_code": "310",
51+
"mobile_network_code": "150",
52+
"type": "mobile"
53+
}
54+
}
4655
}
4756
'''
4857
))

twilio/rest/verify/v1/service/verification.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def __init__(self, version, payload, service_sid):
143143
'channel': payload['channel'],
144144
'status': payload['status'],
145145
'valid': payload['valid'],
146+
'lookup': payload['lookup'],
146147
'date_created': deserialize.iso8601_datetime(payload['date_created']),
147148
'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
148149
}
@@ -207,6 +208,14 @@ def valid(self):
207208
"""
208209
return self._properties['valid']
209210

211+
@property
212+
def lookup(self):
213+
"""
214+
:returns: Info about the phone number
215+
:rtype: dict
216+
"""
217+
return self._properties['lookup']
218+
210219
@property
211220
def date_created(self):
212221
"""

twilio/rest/verify/v1/service/verification_check.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,18 @@ def __init__(self, version, service_sid):
3333
self._solution = {'service_sid': service_sid, }
3434
self._uri = '/Services/{service_sid}/VerificationCheck'.format(**self._solution)
3535

36-
def create(self, code, to=values.unset):
36+
def create(self, code, to=values.unset, verification_sid=values.unset):
3737
"""
3838
Create a new VerificationCheckInstance
3939
4040
:param unicode code: The verification string
41-
:param unicode to: To phonenumber
41+
:param unicode to: To phone number
42+
:param unicode verification_sid: A SID that uniquely identifies this Verification Check
4243
4344
:returns: Newly created VerificationCheckInstance
4445
:rtype: twilio.rest.verify.v1.service.verification_check.VerificationCheckInstance
4546
"""
46-
data = values.of({'Code': code, 'To': to, })
47+
data = values.of({'Code': code, 'To': to, 'VerificationSid': verification_sid, })
4748

4849
payload = self._version.create(
4950
'POST',
@@ -165,7 +166,7 @@ def account_sid(self):
165166
@property
166167
def to(self):
167168
"""
168-
:returns: To phonenumber
< 4B0D code>169+
:returns: To phone number
169170
:rtype: unicode
170171
"""
171172
return self._properties['to']

0 commit comments

Comments
 (0)
0