Skip to content

Commit be42de0

Browse files
committed
[Librarian] Regenerated @ 34ebb06e9fb0c2e43854d225bef7d2c72269f37c
1 parent 74533ad commit be42de0

File tree

27 files changed

+871
-479
lines changed

27 files changed

+871
-479
lines changed

CHANGES.md

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

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

6+
[2019-03-01] Version 6.25.0
7+
----------------------------
8+
**Api**
9+
- Make conference participant preview parameters public
10+
11+
**Authy**
12+
- Added support for FactorType and FactorStrength for Factors and Challenges
13+
14+
**Iam**
15+
- First public release
16+
17+
**Verify**
18+
- Add endpoint to update/cancel a Verification **(breaking change)**
19+
20+
**Video**
21+
- [Composer] Make RoomSid mandatory **(breaking change)**
22+
- [Composer] Add `enqueued` state to Composition
23+
24+
**Twiml**
25+
- Update message body to not be required for TwiML `Dial` noun.
26+
27+
628
[2019-02-15] Version 6.24.1
729
----------------------------
830
**Api**

tests/integration/authy/v1/service/entity/factor/test_challenge.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_create_response(self):
4747
"responded_reason": "none",
4848
"details": "Hi! Mr. John Doe, would you like to sign up?",
4949
"hidden_details": "Hidden details about the sign up",
50+
"factor_strength": "low",
5051
"factor_type": "sms",
5152
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
5253
}
@@ -120,6 +121,7 @@ def test_fetch_sid_response(self):
120121
"responded_reason": "none",
121122
"details": "details",
122123
"hidden_details": "hidden_details",
124+
"factor_strength": "low",
123125
"factor_type": "sms",
124126
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
125127
}
@@ -152,6 +154,7 @@ def test_fetch_latest_response(self):
152154
"responded_reason": "none",
153155
"details": "details",
154156
"hidden_details": "hidden_details",
157+
"factor_strength": "low",
155158
"factor_type": "sms",
156159
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
157160
}
@@ -198,6 +201,7 @@ def test_verify_sid_response(self):
198201
"responded_reason": "none",
199202
"details": "Hi! Mr. John Doe, would you like to sign up?",
200203
"hidden_details": "Hidden details about the sign up",
204+
"factor_strength": "low",
201205
"factor_type": "sms",
202206
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
203207
}
@@ -230,6 +234,7 @@ def test_verify_latest_response(self):
230234
"responded_reason": "none",
231235
"details": "Hi! Mr. John Doe, would you like to sign up?",
232236
"hidden_details": "Hidden details about the sign up",
237+
"factor_strength": "low",
233238
"factor_type": "sms",
234239
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
235240
}

tests/integration/authy/v1/service/entity/test_factor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def test_create_response(self):
4444
"date_updated": "2015-07-30T20:00:00Z",
4545
"friendly_name": "friendly_name",
4646
"status": "unverified",
47+
"factor_strength": "low",
4748
"factor_type": "sms",
4849
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4950
"links": {
@@ -111,6 +112,7 @@ def test_fetch_response(self):
111112
"date_updated": "2015-07-30T20:00:00Z",
112113
"friendly_name": "friendly_name",
113114
"status": "unverified",
115+
"factor_strength": "low",
114116
"factor_type": "sms",
115117
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
116118
"links": {
@@ -180,6 +182,7 @@ def test_read_full_response(self):
180182
"date_updated": "2015-07-30T20:00:00Z",
181183
"friendly_name": "friendly_name",
182184
"status": "unverified",
185+
"factor_strength": "low",
183186
"factor_type": "sms",
184187
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
185188
"links": {
@@ -233,6 +236,7 @@ def test_verify_response(self):
233236
"date_updated": "2015-07-30T20:00:00Z",
234237
"friendly_name": "friendly_name",
235238
"status": "verified",
239+
"factor_strength": "low",
236240
"factor_type": "sms",
237241
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
238242
"links": {

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

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def test_create_verification_response(self):
5353
}
5454
},
5555
"amount": "$29.99",
56-
"payee": "Acme"
56+
"payee": "Acme",
57+
"url": "https://verify.twilio.com/v1/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
5758
}
5859
'''
5960
))
@@ -62,3 +63,100 @@ def test_create_verification_response(self):
6263
.verifications.create(to="to", channel="channel")
6364

6465
self.assertIsNotNone(actual)
66+
67+
def test_update_request(self):
68+
self.holodeck.mock(Response(500, ''))
69+
70+
with self.assertRaises(TwilioException):
71+
self.client.verify.v1.services(sid="VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
72+
.verifications(sid="sid").update(status="canceled")
73+
74+
values = {'Status': "canceled", }
75+
76+
self.holodeck.assert_has_request(Request(
77+
'post',
78+
'https://verify.twilio.com/v1/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications/sid',
79+
data=values,
80+
))
81+
82+
def test_update_verification_response(self):
83+
self.holodeck.mock(Response(
84+
200,
85+
'''
86+
{
87+
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
88+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
89+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
90+
"to": "+14159373912",
91+
"channel": "sms",
92+
"status": "canceled",
93+
"valid": null,
94+
"date_created": "2015-07-30T20:00:00Z",
95+
"date_updated": "2015-07-30T20:00:00Z",
96+
"lookup": {
97+
"carrier": {
98+
"error_code": null,
99+
"name": "Carrier Name",
100+
"mobile_country_code": "310",
101+
"mobile_network_code": "150",
102+
"type": "mobile"
103+
}
104+
},
105+
"amount": "$29.99",
106+
"payee": "Acme",
107+
"url": "https://verify.twilio.com/v1/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
108+
}
109+
'''
110+
))
111+
112+
actual = self.client.verify.v1.services(sid="VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
113+
.verifications(sid="sid").update(status="canceled")
114+
115+
self.assertIsNotNone(actual)
116+
117+
def test_fetch_request(self):
118+
self.holodeck.mock(Response(500, ''))
119+
120+
with self.assertRaises(TwilioException):
121+
self.client.verify.v1.services(sid="VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
122+
.verifications(sid="sid").fetch()
123+
124+
self.holodeck.assert_has_request(Request(
125+
'get',
126+
'https://verify.twilio.com/v1/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications/sid',
127+
))
128+
129+
def test_fetch_verification_response(self):
130+
self.holodeck.mock(Response(
131+
200,
132+
'''
133+
{
134+
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
135+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
136+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
137+
"to": "+14159373912",
138+
"channel": "sms",
139+
"status": "pending",
140+
"valid": null,
141+
"date_created": "2015-07-30T20:00:00Z",
142+
"date_updated": "2015-07-30T20:00:00Z",
143+
"lookup": {
144+
"carrier": {
145+
"error_code": null,
146+
"name": "Carrier Name",
147+
"mobile_country_code": "310",
148+
"mobile_network_code": "150",
149+
"type": "mobile"
150+
}
151+
},
152+
"amount": "$29.99",
153+
"payee": "Acme",
154+
"url": "https://verify.twilio.com/v1/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
155+
}
156+
'''
157+
))
158+
159+
actual = self.client.verify.v1.services(sid="VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
160+
.verifications(sid="sid").fetch()
161+
162+
self.assertIsNotNone(actual)

tests/integration/video/v1/test_composition.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,29 @@ def test_list_request(self):
109109
'https://video.twilio.com/v1/Compositions',
110110
))
111111

112+
def test_read_enqueued_response(self):
113+
self.holodeck.mock(Response(
114+
200,
115+
'''
116+
{
117+
"compositions": [],
118+
"meta": {
119+
"page": 0,
120+
"page_size": 50,
121+
"first_page_url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
122+
"previous_page_url": null,
123+
"url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
124+
"next_page_url": null,
125+
"key": "compositions"
126+
}
127+
}
128+
'''
129+
))
130+
131+
actual = self.client.video.v1.compositions.list()
132+
133+
self.assertIsNotNone(actual)
134+
112135
def test_read_empty_response(self):
113136
self.holodeck.mock(Response(
114137
200,
@@ -239,11 +262,14 @@ def test_create_request(self):
239262
self.holodeck.mock(Response(500, ''))
240263

241264
with self.assertRaises(TwilioException):
242-
self.client.video.v1.compositions.create()
265+
self.client.video.v1.compositions.create(room_sid="RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
266+
267+
values = {'RoomSid': "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", }
243268

244269
self.holodeck.assert_has_request(Request(
245270
'post',
246271
'https://video.twilio.com/v1/Compositions',
272+
data=values,
247273
))
248274

249275
def test_create_response(self):
@@ -303,6 +329,6 @@ def test_create_response(self):
303329
'''
304330
))
305331

306-
actual = self.client.video.v1.compositions.create()
332+
actual = self.client.video.v1.compositions.create(room_sid="RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
307333

308334
self.assertIsNotNone(actual)

twilio/rest/accounts/v1/credential/aws.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def create(self, credentials, friendly_name=values.unset,
118118
"""
119119
Create a new AwsInstance
120120
121-
:param unicode credentials: String containing AWS access credentials with format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>
122-
:param unicode friendly_name: A human readable description of this resource
121+
:param unicode credentials: A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>
122+
:param unicode friendly_name: A string to describe the resource
123123
:param unicode account_sid: The Subaccount this Credential should be associated with.
124124
125125
:returns: Newly created AwsInstance
@@ -143,7 +143,7 @@ def get(self, sid):
143143
"""
144144
Constructs a AwsContext
145145
146-
:param sid: Fetch by unique Credential Sid
146+
:param sid: The unique string that identifies the resource
147147
148148
:returns: twilio.rest.accounts.v1.credential.aws.AwsContext
149149
:rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
@@ -154,7 +154,7 @@ def __call__(self, sid):
154154
"""
155155
Constructs a AwsContext
156156
157-
:param sid: Fetch by unique Credential Sid
157+
:param sid: The unique string that identifies the resource
158158
159159
:returns: twilio.rest.accounts.v1.credential.aws.AwsContext
160160
:rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
@@ -218,7 +218,7 @@ def __init__(self, version, sid):
218218
Initialize the AwsContext
219219
220220
:param Version version: Version that contains the resource
221-
:param sid: Fetch by unique Credential Sid
221+
:param sid: The unique string that identifies the resource
222222
223223
:returns: twilio.rest.accounts.v1.credential.aws.AwsContext
224224
:rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
@@ -250,7 +250,7 @@ def update(self, friendly_name=values.unset):
250250
"""
251251
Update the AwsInstance
252252
253-
:param unicode friendly_name: A human readable description of this resource
253+
:param unicode friendly_name: A string to describe the resource
254254
255255
:returns: Updated AwsInstance
256256
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
@@ -327,39 +327,39 @@ def _proxy(self):
327327
@property
328328
def sid(self):
329329
"""
330-
:returns: A 34 character string that uniquely identifies this resource.
330+
:returns: The unique string that identifies the resource
331331
:rtype: unicode
332332
"""
333333
return self._properties['sid']
334334

335335
@property
336336
def account_sid(self):
337337
"""
338-
:returns: AccountSid the Credential resource belongs to
338+
:returns: The SID of the Account that created the resource
339339
:rtype: unicode
340340
"""
341341
return self._properties['account_sid']
342342

343343
@property
344344
def friendly_name(self):
345345
"""
346-
:returns: A human readable description of this resource
346+
:returns: The string that you assigned to describe the resource
347347
:rtype: unicode
348348
"""
349349
return self._properties['friendly_name']
350350

351351
@property
352352
def date_created(self):
353353
"""
354-
:returns: The date this resource was created
354+
:returns: The RFC 2822 date and time in GMT when the resource was created
355355
:rtype: datetime
356356
"""
357357
return self._properties['date_created']
358358

359359
@property
360360
def date_updated(self):
361361
"""
362-
:returns: The date this resource was last updated
362+
:returns: The RFC 2822 date and time in GMT when the resource was last updated
363363
:rtype: datetime
364364
"""
365365
return self._properties['date_updated']
@@ -385,7 +385,7 @@ def update(self, friendly_name=values.unset):
385385
"""
386386
Update the AwsInstance
387387
388-
:param unicode friendly_name: A human readable description of this resource
388+
:param unicode friendly_name: A string to describe the resource
389389
390390
:returns: Updated AwsInstance
391391
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance

0 commit comments

Comments
 (0)