8000 [Librarian] Regenerated @ 0d359fdcea150a7f3ec36771ffeb0bd2bf34ea1d · githubib/twilio-python@164fae5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 164fae5

Browse files
committed
[Librarian] Regenerated @ 0d359fdcea150a7f3ec36771ffeb0bd2bf34ea1d
1 parent 18bf374 commit 164fae5

File tree

9 files changed

+120
-11
lines changed

9 files changed

+120
-11
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+
[2020-02-05] Version 6.35.4
7+
---------------------------
8+
**Api**
9+
- Making content retention and address retention public
10+
- Update `status` enum for Messages to include 'partially_delivered'
11+
12+
**Authy**
13+
- Added support for push factors
14+
15+
**Autopilot**
16+
- Add one new property in Query i.e dialogue_sid
17+
18+
**Verify**
19+
- Add `SendCodeAttempts` to create verification response.
20+
21+
**Video**
22+
- Clarification in composition creation documentation: one source is mandatory, either `audio_sources` or `video_layout`, but on of them has to be provided
23+
24+
**Twiml**
25+
- Add Polly Neural voices.
26+
27+
628
[2020-01-22] Version 6.35.3
729
---------------------------
830
**Library - Docs**

tests/integration/api/v2010/account/conference/test_participant.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,34 @@ def test_create_with_sid_as_coach_response(self):
224224

225225
self.assertIsNotNone(actual)
226226

227+
def test_create_with_non_e164_number_response(self):
228+
self.holodeck.mock(Response(
229+
201,
230+
'''
231+
{
232+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
233+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
234+
"conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
235+
"date_created": "Fri, 18 Feb 2011 21:07:19 +0000",
236+
"date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
237+
"end_conference_on_exit": false,
238+
"muted": false,
239+
"hold": false,
240+
"status": "complete",
241+
"start_conference_on_enter": true,
242+
"coaching": false,
243+
"call_sid_to_coach": null,
244+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
245+
}
246+
'''
247+
))
248+
249+
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
250+
.conferences("CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
251+
.participants.create(from_="+15017122661", to="+15558675310")
252+
253+
self.assertIsNotNone(actual)
254+
227255
def test_delete_request(self):
228256
self.holodeck.mock(Response(500, ''))
229257

tests/integration/autopilot/v1/assistant/test_query.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def test_fetch_response(self):
5252
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queries/UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5353
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5454
"sid": "UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
55-
"source_channel": "voice"
55+
"source_channel": "voice",
56+
"dialogue_sid": "UKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
5657
}
5758
'''
5859
))
@@ -126,7 +127,8 @@ def test_read_full_response(self):
126127
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queries/UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
127128
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
128129
"sid": "UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
129-
"source_channel": null
130+
"source_channel": null,
131+
"dialogue_sid": "UKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
130132
}
131133
],
132134
"meta": {
@@ -188,7 +190,8 @@ def test_create_response(self):
188190
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queries/UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
189191
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
190192
"sid": "UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
191-
"source_channel": "voice"
193+
"source_channel": "voice",
194+
"dialogue_sid": null
192195
}
193196
'''
194197
))
@@ -236,7 +239,8 @@ def test_update_response(self):
236239
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queries/UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
237240
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
238241
"sid": "UHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
239-
"source_channel": "sms"
242+
"source_channel": "sms",
243+
"dialogue_sid": "UKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
240244
}
241245
'''
242246
))

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def test_create_verification_response(self):
5454
},
5555
"amount": null,
5656
"payee": null,
57+
"send_code_attempts": {
58+
"time": "2015-07-30T20:00:00Z",
59+
"channel": "SMS",
60+
"channel_id": null
61+
},
5762
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
5863
}
5964
'''
@@ -89,6 +94,11 @@ def test_create_verification_email_response(self):
8994
},
9095
"amount": null,
9196
"payee": null,
97+
"send_code_attempts": {
98+
"time": "2015-07-30T20:00:00Z",
99+
"channel": "EMAIL",
100+
"channel_id": null
101+
},
92102
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
93103
}
94104
'''
@@ -124,6 +134,11 @@ def test_create_verification_with_rate_limits_response(self):
124134
},
125135
"amount": null,
126136
"payee": null,
137+
"send_code_attempts": {
138+
"time": "2015-07-30T20:00:00Z",
139+
"channel": "SMS",
140+
"channel_id": null
141+
},
127142
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
128143
}
129144
'''
@@ -174,6 +189,11 @@ def test_update_verification_response(self):
174189
},
175190
"amount": null,
176191
"payee": null,
192+
"send_code_attempts": {
193+
"time": "2015-07-30T20:00:00Z",
194+
"channel": "SMS",
195+
"channel_id": null
196+
},
177197
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
178198
}
179199
'''
@@ -209,6 +229,11 @@ def test_approve_verification_with_pn_response(self):
209229
},
210230
"amount": null,
211231
"payee": null,
232+
"send_code_attempts": {
233+
"time": "2015-07-30T20:00:00Z",
234+
"channel": "SMS",
235+
"channel_id": null
236+
},
212237
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
213238
}
214239
'''
@@ -256,6 +281,11 @@ def test_fetch_verification_response(self):
256281
},
257282
"amount": null,
258283
"payee": null,
284+
"send_code_attempts": {
285+
"time": "2015-07-30T20:00:00Z",
286+
"channel": "SMS",
287+
"channel_id": null
288+
},
259289
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
260290
}
261291
'''

twilio/rest/api/v2010/account/message/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(self, version, account_sid):
3939
def create(self, to, status_callback=values.unset, application_sid=values.unset,
4040
max_price=values.unset, provide_feedback=values.unset,
4141
validity_period=values.unset, force_delivery=values.unset,
42+
content_retention=values.unset, address_retention=values.unset,
4243
smart_encoded=values.unset, persistent_action=values.unset,
4344
from_=values.unset, messaging_service_sid=values.unset,
4445
body=values.unset, media_url=values.unset):
@@ -52,6 +53,8 @@ def create(self, to, status_callback=values.unset, application_sid=values.unset,
5253
:param bool provide_feedback: Whether to confirm delivery of the message
5354
:param unicode validity_period: The number of seconds that the message can remain in our outgoing queue.
5455
:param bool force_delivery: Reserved
56+
:param MessageInstance.ContentRetention content_retention: Determines if the message content can be stored or redacted based on privacy settings
57+
:param MessageInstance.AddressRetention address_retention: Determines if the address can be stored or obfuscated based on privacy settings
5558
:param bool smart_encoded: Whether to detect Unicode characters that have a similar GSM-7 character and replace them
5659
:param unicode persistent_action: Rich actions for Channels Messages.
5760
:param unicode from_: The phone number that initiated the message
@@ -74,6 +77,8 @@ def create(self, to, status_callback=values.unset, application_sid=values.unset,
7477
'ProvideFeedback': provide_feedback,
7578
'ValidityPeriod': validity_period,
7679
'ForceDelivery': force_delivery,
80+
'ContentRetention': content_retention,
81+
'AddressRetention': address_retention,
7782
'SmartEncoded': smart_encoded,
7883
'PersistentAction': serialize.map(persistent_action, lambda e: e),
7984
})
@@ -403,6 +408,7 @@ class Status(object):
403408
ACCEPTED = "accepted"
404409
SCHEDULED = "scheduled"
405410
READ = "read"
411+
PARTIALLY_DELIVERED = "partially_delivered"
406412

407413
class Direction(object):
408414
INBOUND = "inbound"

twilio/rest/authy/v1/service/entity/factor/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def create(self, binding, friendly_name, factor_type,
4242
"""
4343
Create the FactorInstance
4444
45-
:param unicode binding: A unique binding for this Factor
45+
:param unicode binding: A unique binding for this Factor as a json string
4646
:param unicode friendly_name: The friendly name of this Factor
4747
:param FactorInstance.FactorTypes factor_type: The Type of this Factor
4848
:param unicode twilio_authy_sandbox_mode: The Twilio-Authy-Sandbox-Mode HTTP request header
@@ -364,6 +364,7 @@ class FactorTypes(object):
364364
APP_PUSH = "app-push"
365365
SMS = "sms"
366366
TOTP = "totp"
367+
PUSH = "push"
367368

368369
class FactorStrengths(object):
369370
UNKNOWN = "unknown"

twilio/rest/autopilot/v1/assistant/query.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ def __init__(self, version, payload, assistant_sid, sid=None):
342342
'status': payload.get('status'),
343343
'url': payload.get('url'),
344344
'source_channel': payload.get('source_channel'),
345+
'dialogue_sid': payload.get('dialogue_sid'),
345346
}
346347

347348
# Context
@@ -469,6 +470,14 @@ def source_channel(self):
469470
"""
470471
return self._properties['source_channel']
471472

473+
@property
474+
def dialogue_sid(self):
475+
"""
476+
:returns: The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
477+
:rtype: unicode
478+
"""
479+
return self._properties['dialogue_sid']
480+
472481
def fetch(self):
473482
"""
474483
Fetch the QueryInstance

twilio/rest/monitor/v1/alert.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def stream(self, log_level=values.unset, start_date=values.unset,
4242
The results are returned as a generator, so this operation is memory efficient.
4343
4444
:param unicode log_level: Only show alerts for this log-level
45-
:param date start_date: Only include alerts that occurred on or after this date
46-
:param date end_date: Only include alerts that occurred on or before this date
45+
:param date start_date: Only include alerts that occurred on or after this date and time
46+
:param date end_date: Only include alerts that occurred on or before this date and time
4747
:param int limit: Upper limit for the number of records to return. stream()
4848
guarantees to never return more than limit. Default is no limit
4949
:param int page_size: Number of records to fetch per request, when not set will use
@@ -73,8 +73,8 @@ def list(self, log_level=values.unset, start_date=values.unset,
7373
memory before returning.
7474
7575
:param unicode log_level: Only show alerts for this log-level
76-
:param date start_date: Only include alerts that occurred on or after this date
77-
:param date end_date: Only include alerts that occurred on or before this date
76+
:param date start_date: Only include alerts that occurred on or after this date and time
77+
:param date end_date: Only include alerts that occurred on or before this date and time
7878
:param int limit: Upper limit for the number of records to return. list() guarantees
7979
never to return more than limit. Default is no limit
8080
:param int page_size: Number of records to fetch per request, when not set will use
@@ -101,8 +101,8 @@ def page(self, log_level=values.unset, start_date=values.unset,
101101
Request is executed immediately
102102
103103
:param unicode log_level: Only show alerts for this log-level
104-
:param date start_date: Only include alerts that occurred on or after this date
105-
:param date end_date: Only include alerts that occurred on or before this date
104+
:param date start_date: Only include alerts that occurred on or after this date and time
105+
:param date end_date: Only include alerts that occurred on or before this date and time
106106
:param str page_token: PageToken provided by the API
107107
:param int page_number: Page Number, this value is simply for client state
108108
:param int page_size: Number of records to return, defaults to 50

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def __init__(self, version, payload, service_sid, sid=None):
247247
'lookup': payload.get('lookup'),
248248
'amount': payload.get('amount'),
249249
'payee': payload.get('payee'),
250+
'send_code_attempts': payload.get('send_code_attempts'),
250251
'date_created': deserialize.iso8601_datetime(payload.get('date_created')),
251252
'date_updated': deserialize.iso8601_datetime(payload.get('date_updated')),
252253
'url': payload.get('url'),
@@ -353,6 +354,14 @@ def payee(self):
353354
"""
354355
return self._properties['payee']
355356

357+
@property
358+ def send_code_attempts(self):
359+
"""
360+
:returns: An array of verification attempt objects.
361+
:rtype: dict
362+
"""
363+
return self._properties['send_code_attempts']
364+
356365
@property
357366
def date_created(self):
358367
"""

0 commit comments

Comments
 (0)
0