8000 [Librarian] Regenerated @ e0df82c8ae69535c5e7ef760fd71e566608cfd97 · lorcorvel/twilio-python@bf4383d · GitHub
[go: up one dir, main page]

Skip to content

Commit bf4383d

Browse files
committed
[Librarian] Regenerated @ e0df82c8ae69535c5e7ef760fd71e566608cfd97
1 parent 868b69c commit bf4383d

File tree

15 files changed

+112
-49
lines changed

15 files changed

+112
-49
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+
[2021-11-03] Version 7.3.0
7+
--------------------------
8+
**Library - Chore**
9+
- [PR #577](https://github.com/twilio/twilio-python/pull/577): migrate from travis ci to gh actions. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
10+
11+
**Api**
12+
- Updated `media_url` property to be treated as PII
13+
14+
**Messaging**
15+
- Added a new enum for brand registration status named DELETED **(breaking change)**
16+
- Add a new K12_EDUCATION use case in us_app_to_person_usecase api transaction
17+
- Added a new enum for brand registration status named IN_REVIEW
18+
19+
**Serverless**
20+
- Add node14 as a valid Build runtime
21+
22+
**Verify**
23+
- Fix typos in Verify Push Factor documentation for the `config.notification_token` parameter.
24+
- Added `TemplateCustomSubstitutions` on verification creation
25+
- Make `TemplateSid` parameter public for Verification resource and `DefaultTemplateSid` parameter public for Service resource. **(breaking change)**
26+
27+
628
[2021-10-18] Version 7.2.0
729
--------------------------
830
**Library - Feature**

tests/integration/media/v1/test_media_processor.py

Expand all lines: tests/integration/media/v1/test_media_processor.py
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_create_response(self):
3636
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3737
"date_created": "2015-07-30T20:00:00Z",
3838
"date_updated": "2015-07-30T20:00:00Z",
39-
"extension": "video-composer-v1-preview",
39+
"extension": "video-composer-v1",
4040
"extension_context": "{}",
4141
"sid": "ZXdeadbeefdeadbeefdeadbeefdeadbeef",
4242
"status": "started",
@@ -71,7 +71,7 @@ def test_fetch_response(self):
7171
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7272
"date_created": "2015-07-30T20:00:00Z",
7373
"date_updated": "2015-07-30T20:00:00Z",
74-
"extension": "video-composer-v1-preview",
74+
"extension": "video-composer-v1",
7575
"extension_context": "{}",
7676
"sid": "ZXdeadbeefdeadbeefdeadbeefdeadbeef",
7777
"status": "started",
@@ -109,7 +109,7 @@ def test_update_ended_response(self):
109109
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
110110
"date_created": "2015-07-30T20:00:00Z",
111111
"date_updated": "2015-07-30T20:01:00Z",
112-
"extension": "video-composer-v1-preview",
112+
"extension": "video-composer-v1",
113113
"extension_context": "{}",
114114
"sid": "ZXdeadbeefdeadbeefdeadbeefdeadbeef",
115115
"status": "ended",
@@ -178,7 +178,7 @@ def test_read_items_response(self):
178178
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
179179
"date_created": "2015-07-30T20:00:00Z",
180180
"date_updated": "2015-07-30T20:01:00Z",
181-
"extension": "video-composer-v1-preview",
181+
"extension": "video-composer-v1",
182182
"extension_context": "{}",
183183
"sid": "ZXdeadbeefdeadbeefdeadbeefdeadbeef",
184184
"status": "ended",
@@ -215,7 +215,7 @@ def test_read_items_using_page_token_response(self):
215215
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
216216
"date_created": "2015-07-30T20:00:00Z",
217217
"date_updated": "2015-07-30T20:01:00Z",
218-
"extension": "video-composer-v1-preview",
218+
"extension": "video-composer-v1",
219219
"extension_context": "{}",
220220
"sid": "ZXdeadbeefdeadbeefdeadbeefdeadbeef",
221221
"status": "ended",
@@ -252,7 +252,7 @@ def test_read_items_page_larger_than_max_response(self):
252252
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
253253
"date_created": "2015-07-30T20:00:00Z",
254254
"date_updated": "2015-07-30T20:01:00Z",
255-
"extension": "video-composer-v1-preview",
255+
"extension": "video-composer-v1",
256256
"extension_context": "{}",
257257
"sid": "ZXdeadbeefdeadbeefdeadbeefdeadbeef",
258258
"status": "ended",

tests/integration/messaging/v1/brand_registration/test_brand_vetting.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def test_create_response(self):
3737
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
3838
"brand_sid": "BN0044409f7e067e279523808d267e2d85",
3939
"brand_vetting_sid": "VT12445353",
40-
"vetting_provider": "CAMPAIGN_VERIFY",
41-
"vetting_id": "cv|1.0|10DLC|NHDHBD",
40+
"vetting_provider": "campaign-verify",
41+
"vetting_id": "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY",
4242
"vetting_class": "POLITICAL",
43-
"vetting_status": "PENDING",
43+
"vetting_status": "IN_PROGRESS",
4444
"date_created": "2021-01-27T14:18:35Z",
4545
"date_updated": "2021-01-27T14:18:35Z",
4646
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings/VT12445353"
@@ -84,10 +84,10 @@ def test_read_response(self):
8484
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
8585
"brand_sid": "BN0044409f7e067e279523808d267e2d85",
8686
"brand_vetting_sid": "VT12445353",
87-
"vetting_provider": "CAMPAIGN_VERIFY",
88-
"vetting_id": "cv|1.0|10DLC|NHDHBD",
87+
"vetting_provider": "campaign-verify",
88+
"vetting_id": "cv|1.0|tcr|10dlc|9975c339-d46f-49b7-a399-EXAMPLETOKEN|GQ3EXAMPLETOKENAXXBUNBT2AgL-LdQuPveFhEyY",
8989
"vetting_class": "POLITICAL",
90-
"vetting_status": "PENDING",
90+
"vetting_status": "IN_PROGRESS",
9191
"date_created": "2021-01-27T14:18:35Z",
9292
"date_updated": "2021-01-27T14:18:35Z",
9393
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings/VT12445353"

tests/integration/messaging/v1/service/test_us_app_to_person_usecase.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def test_fetch_with_brand_registration_sid_response(self):
5757
"post_approval_required": false
5858
},
5959
{
60-
"code": "CONVERSATIONAL",
61-
"name": "Conversational Messaging",
60+
"code": "PROXY",
61+
"name": "Proxy",
6262
"description": "Peer-to-peer app-based group messaging with proxy/pooled numbers (For example: GroupMe)\\nSupporting personalized services and non-exposure of personal numbers for enterprise or A2P communications. (Examples include: Uber and AirBnb.)",
6363
"post_approval_required": true
6464
},
@@ -92,6 +92,12 @@ def test_fetch_with_brand_registration_sid_response(self):
9292
"description": "For campaigns created on behalf of Colleges or Universities and will also include School Districts etc that fall outside of any \\"free to the consumer\\" messaging model",
9393
"post_approval_required": false
9494
},
95+
{
96+
"code": "K12_EDUCATION",
97+
"name": "K-12 Education",
98+
"description": "Campaigns created for messaging platforms that support schools from grades K-12 and distance learning centers. This is not for Post-Secondary schools.",
99+
"post_approval_required": true
100+
},
95101
{
96102
"code": "LOW_VOLUME",
97103
"name": "Low Volume Mixed",
@@ -187,8 +193,8 @@ def test_fetch_without_brand_registration_sid_response(self):
187193
"post_approval_required": false
188194
},
189195
{
190-
"code": "CONVERSATIONAL",
191-
"name": "Conversational Messaging",
196+
"code": "PROXY",
197+
"name": "Proxy",
192198
"description": "Peer-to-peer app-based group messaging with proxy/pooled numbers (For example: GroupMe)\\nSupporting personalized services and non-exposure of personal numbers for enterprise or A2P communications. (Examples include: Uber and AirBnb.)",
193199
"post_approval_required": true
194200
},
@@ -222,6 +228,12 @@ def test_fetch_without_brand_registration_sid_response(self):
222228
"description": "For campaigns created on behalf of Colleges or Universities and will also include School Districts etc that fall outside of any \\"free to the consumer\\" messaging model",
223229
"post_approval_required": false
224230
},
231+
{
232+
"code": "K12_EDUCATION",
233+
"name": "K-12 Education",
234+
"description": "Campaigns created for messaging platforms that support schools from grades K-12 and distance learning centers. This is not for Post-Secondary schools.",
235+
"post_approval_required": true
236+
},
225237
{
226238
"code": "LOW_VOLUME",
227239
"name": "Low Volume Mixed",

tests/integration/serverless/v1/service/test_build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_fetch_response(self):
102102
"version": "1.0.1"
103103
}
104104
],
105-
"runtime": "node10",
105+
"runtime": "node14",
106106
"status": "building",
107107
"date_created": "2018-11-10T20:00:00Z",
108108
"date_updated": "2018-11-10T20:00:00Z",
@@ -194,7 +194,7 @@ def test_create_response(self):
194194
"version": "1.0.1"
195195
}
196196
],
197-
"runtime": "node10",
197+
"runtime": "node14",
198198
"status": "building",
199199
"date_created": "2018-11-10T20:00:00Z",
200200
"date_updated": "2018-11-10T20:00:00Z",

tests/integration/verify/v2/test_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def test_create_record_response(self):
5656
"code_length": 3,
5757
"skew": 2
5858
},
59+
"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5960
"date_created": "2015-07-30T20:00:00Z",
6061
"date_updated": "2015-07-30T20:00:00Z",
6162
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -115,6 +116,7 @@ def test_fetch_record_response(self):
115116
"code_length": null,
116117
"skew": null
117118
},
119+
"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
118120
"date_created": "2015-07-30T20:00:00Z",
119121
"date_updated": "2015-07-30T20:00:00Z",
120122
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -206,6 +208,7 @@ def test_read_all_response(self):
206208
"code_length": null,
207209
"skew": null
208210
},
211+
"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
209212
"date_created": "2015-07-30T20:00:00Z",
210213
"date_updated": "2015-07-30T20:00:00Z",
211214
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -267,6 +270,7 @@ def test_update_record_response(self):
267270
"code_length": 3,
268271
"skew": 2
269272
},
273+
"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
270274
"date_created": "2015-07-30T20:00:00Z",
271275
"date_updated": "2015-07-30T20:00:00Z",
272276
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",

tests/integration/verify/v2/test_template.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ def test_list_verification_templates_response(self):
3434
{
3535
"sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3636
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37-
"friendly_name": "Friendly Template",
37+
"friendly_name": "Base Verification Template 2 with do not share",
3838
"translations": {
3939
"en": {
40-
"text": "Hello, your code is {code}.",
41-
"locale": "en",
40+
"is_default_translation": true,
4241
"status": "approved",
43-
"date_created": "2021-07-26T22:30:13.003505841Z",
44-
"date_updated": "2021-07-26T22:31:08.750971289Z"
42+
"locale": "en",
43+
"text": "Your {{friendly_name}} verification code is: {{code}}. Do not share this code with anyone.",
44+
"date_updated": "2021-07-29T20:38:28.759979905Z",
45+
"date_created": "2021-07-29T20:38:28.165602325Z"
4546
}
4647
}
4748
}

twilio/rest/messaging/v1/brand_registration/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ class Status(object):
275275
PENDING = "PENDING"
276276
APPROVED = "APPROVED"
277277
FAILED = "FAILED"
278+
IN_REVIEW = "IN_REVIEW"
279+
DELETED = "DELETED"
278280

279281
class IdentityStatus(object):
280282
SELF_DECLARED = "SELF_DECLARED"
@@ -397,7 +399,7 @@ def brand_type(self):
397399
@property
398400
def status(self):
399401
"""
400-
:returns: Brand Registration status
402+
:returns: Brand Registration status.
401403
:rtype: BrandRegistrationInstance.Status
402404
"""
403405
return self._properties['status']

twilio/rest/serverless/v1/service/build/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ class Runtime(object):
299299
NODE8 = "node8"
300300
NODE10 = "node10"
301301
NODE12 = "node12"
302+
NODE14 = "node14"
302303

303304
def __init__(self, version, payload, service_sid, sid=None):
304305
"""

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def create(self, friendly_name, code_length=values.unset,
4646
push_apn_credential_sid=values.unset,
4747
push_fcm_credential_sid=values.unset, totp_issuer=values.unset,
4848
totp_time_step=values.unset, totp_code_length=values.unset,
49-
totp_skew=values.unset):
49+
totp_skew=values.unset, default_template_sid=values.unset):
5050
"""
5151
Create the ServiceInstance
5252
@@ -66,6 +66,7 @@ def create(self, friendly_name, code_length=values.unset,
6666
:param unicode totp_time_step: Optional. How often, in seconds, are TOTP codes generated
6767
:param unicode totp_code_length: Optional. Number of digits for generated TOTP codes
6868
:param unicode totp_skew: Optional. The number of past and future time-steps valid at a given time
69+
:param unicode default_template_sid: The verification template SMS messages.
6970
7071
:returns: The created ServiceInstance
7172
:rtype: twilio.rest.verify.v2.service.ServiceInstance
@@ -87,6 +88,7 @@ def create(self, friendly_name, code_length=values.unset,
8788
'Totp.TimeStep': totp_time_step,
8889
'Totp.CodeLength': totp_code_length,
8990
'Totp.Skew': totp_skew,
91+
'DefaultTemplateSid': default_template_sid,
9092
})
9193

9294
payload = self._version.create(method='POST', uri=self._uri, data=data, )
@@ -295,7 +297,7 @@ def update(self, friendly_name=values.unset, code_length=values.unset,
295297
push_apn_credential_sid=values.unset,
296298
push_fcm_credential_sid=values.unset, totp_issuer=values.unset,
297299
totp_time_step=values.unset, totp_code_length=values.unset,
298-
totp_skew=values.unset):
300+
totp_skew=values.unset, default_template_sid=values.unset):
299301
"""
300302
Update the ServiceInstance
301303
@@ -315,6 +317,7 @@ def update(self, friendly_name=values.unset, code_length=values.unset,
315317
:param unicode totp_time_step: Optional. How often, in seconds, are TOTP codes generated
316318
:param unicode totp_code_length: Optional. Number of digits for generated TOTP codes
317319
:param unicode totp_skew: Optional. The number of past and future time-steps valid at a given time
320+
:param unicode default_template_sid: The verification template SMS messages.
318321
319322
:returns: The updated ServiceInstance
320323
:rtype: twilio.rest.verify.v2.service.ServiceInstance
@@ -336,6 +339,7 @@ def update(self, friendly_name=values.unset, code_length=values.unset,
336339
'Totp.TimeStep': totp_time_step,
337340
'Totp.CodeLength': totp_code_length,
338341
'Totp.Skew': totp_skew,
342+
'DefaultTemplateSid': default_template_sid,
339343
})
340344

341345
payload = self._version.update(method='POST', uri=self._uri, data=data, )
@@ -466,6 +470,7 @@ def __init__(self, version, payload, sid=None):
466470
'custom_code_enabled': payload.get('custom_code_enabled'),
467471
'push': payload.get('push'),
468472
'totp': payload.get('totp'),
473+
'default_template_sid': payload.get('default_template_sid'),
469474
'date_created': deserialize.iso8601_datetime(payload.get('date_created')),
470475
'date_updated': deserialize.iso8601_datetime(payload.get('date_updated')),
471476
'url': payload.get('url'),
@@ -593,6 +598,14 @@ def totp(self):
593598
"""
594599
return self._properties['totp']
595600

601+
@property
602+
def default_template_sid(self):
603+
"""
604+
:returns: The default_template_sid
605+
:rtype: unicode
606+
"""
607+
return self._properties['default_template_sid']
608+
596609
@property
597610
def date_created(self):
598611
"""
@@ -651,7 +664,7 @@ def update(self, friendly_name=values.unset, code_length=values.unset,
651664
push_apn_credential_sid=values.unset,
652665
push_fcm_credential_sid=values.unset, totp_issuer=values.unset,
653666
totp_time_step=values.unset, totp_code_length=values.unset,
654-
totp_skew=values.unset):
667+
totp_skew=values.unset, default_template_sid=values.unset):
655668
"""
656669
Update the ServiceInstance
657670
@@ -671,6 +684,7 @@ def update(self, friendly_name=values.unset, code_length=values.unset,
671684
:param unicode totp_time_step: Optional. How often, in seconds, are TOTP codes generated
672685
:param unicode totp_code_length: Optional. Number of digits for generated TOTP codes
673686
:param unicode totp_skew: Optional. The number of past and future time-steps valid at a given time
687+
:param unicode default_template_sid: The verification template SMS messages.
674688
675689
:returns: The updated ServiceInstance
676690
:rtype: twilio.rest.verify.v2.service.ServiceInstance
@@ -692,6 +706,7 @@ def update(self, friendly_name=values.unset, code_length=values.unset,
692706
totp_time_step=totp_time_step,
693707
totp_code_length=totp_code_length,
694708
totp_skew=totp_skew,
709+
default_template_sid=default_template_sid,
695710
)
696711

697712
@property

0 commit comments

Comments
 (0)
0