Skip to content

Commit 74fa117

Browse files
committed
[Librarian] Regenerated @ ae8fd19a8acd5fda03e9e23a40e1cf739255de74
1 parent e2df36a commit 74fa117

File tree

9 files changed

+183
-40
lines changed

9 files changed

+183
-40
lines changed

CHANGES.md

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

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

6+
[2021-09-22] Version 7.0.0
7+
--------------------------
8+
**Note:** This release contains breaking changes, check our [upgrade guide](./UPGRADE.md#2021-09-22-6xx-to-7xx) for detailed migration notes.
9+
10+
**Library - Fix**
11+
- [PR #560](https://github.com/twilio/twilio-python/pull/560): update code and tests for pyjwt>=2.0.0. Thanks to [@karls](https://github.com/karls)! **(breaking change)**
12+
13+
**Library - Docs**
14+
- [PR #570](https://github.com/twilio/twilio-python/pull/570): Add upgrade guide for dropping python 2.7, 3.4 & 3.5. Thanks to [@JenniferMah](https://github.com/JenniferMah)!
15+
16+
**Events**
17+
- Add segment sink
18+
19+
**Messaging**
20+
- Add post_approval_required attribute in GET us_app_to_person_usecase api response
21+
- Add Identity Status, Russell 3000, Tax Exempt Status and Should Skip SecVet fields for Brand Registrations
22+
- Add Should Skip Secondary Vetting optional flag parameter to create Brand API
23+
24+
625
[2021-09-08] Version 6.63.2
726
---------------------------
827
**Api**

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name="twilio",
16-
version="6.63.2",
16+
version="7.0.0",
1717
description="Twilio API client and TwiML generator",
1818
author="Twilio",
1919
author_email="help@twilio.com",

tests/integration/events/v1/test_sink.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,33 @@ def test_create_response(self):
102102

103103
self.assertIsNotNone(actual)
104104

105+
def test_create_segment_response(self):
106+
self.holodeck.mock(Response(
107+
201,
108+
'''
109+
{
110+
"status": "initialized",
111+
"sink_configuration": {
112+
"write_key": "MY_WRITEKEY"
113+
},
114+
"description": "My segment Sink",
115+
"sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
116+
"date_created": "2015-07-30T20:00:00Z",
117+
"sink_type": "segment",
118+
"date_updated": "2015-07-30T20:00:00Z",
119+
"url": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
120+
"links": {
121+
"sink_test": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Test",
122+
"sink_validate": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Validate"
123+
}
124+
}
125+
'''
126+
))
127+
128+
actual = self.client.events.v1.sinks.create(description="description", sink_configuration={}, sink_type="kinesis")
129+
130+
self.assertIsNotNone(actual)
131+
105132
def test_delete_request(self):
106133
self.holodeck.mock(Response(500, ''))
107134

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

Lines changed: 72 additions & 36 deletions
Large diffs are not rendered by default.

tests/integration/messaging/v1/test_brand_registration.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ def test_fetch_response(self):
4242
"failure_reason": "Registration error",
4343
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
4444
"brand_score": 42,
45+
"identity_status": "VERIFIED",
46+
"russell_3000": true,
47+
"tax_exempt_status": "501c3",
48+
"skip_automatic_sec_vet": false,
4549
"mock": false
4650
}
4751
'''
@@ -90,6 +94,10 @@ def test_read_response(self):
9094
"failure_reason": "Registration error",
9195
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
9296
"brand_score": 42,
97+
"identity_status": "VERIFIED",
98+
"russell_3000": true,
99+
"tax_exempt_status": "501c3",
100+
"skip_automatic_sec_vet": false,
93101
"mock": false
94102
}
95103
]
@@ -135,6 +143,10 @@ def test_create_response(self):
135143
"failure_reason": "Registration error",
136144
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
137145
"brand_score": 42,
146+
"identity_status": "VERIFIED",
147+
"russell_3000": true,
148+
"tax_exempt_status": "501c3",
149+
"skip_automatic_sec_vet": false,
138150
"mock": false
139151
}
140152
'''

twilio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
__version_info__ = ('6', '63', '2')
2+
__version_info__ = ('7', '0', '0')
33
__version__ = '.'.join(__version_info__)

twilio/rest/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88

99
import os
1010
import platform
11-
from urllib.parse import urlparse,urlunparse
1211
from twilio import __version__
1312
from twilio.base.exceptions import TwilioException
1413
from twilio.base.obsolete import obsolete_client
1514
from twilio.http.http_client import TwilioHttpClient
15+
from urllib.parse import (
16+
urlparse,
17+
urlunparse,
18+
)
1619

1720

1821
class Client(object):

twilio/rest/events/v1/sink/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ class Status(object):
328328
class SinkType(object):
329329
KINESIS = "kinesis"
330330
WEBHOOK = "webhook"
331+
SEGMENT = "segment"
331332

332333
def __init__(self, version, payload, sid=None):
333334
"""

twilio/rest/messaging/v1/brand_registration.py

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,16 @@ def get_page(self, target_url):
111111
return BrandRegistrationPage(self._version, response, self._solution)
112112

113113
def create(self, customer_profile_bundle_sid, a2p_profile_bundle_sid,
114-
brand_type=values.unset, mock=values.unset):
114+
brand_type=values.unset, mock=values.unset,
115+
skip_automatic_sec_vet=values.unset):
115116
"""
116117
Create the BrandRegistrationInstance
117118
118119
:param unicode customer_profile_bundle_sid: Customer Profile Bundle Sid
119120
:param unicode a2p_profile_bundle_sid: A2P Messaging Profile Bundle Sid
120121
:param unicode brand_type: Type of brand being created. One of: "STANDARD", "STARTER".
121122
:param bool mock: A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
123+
:param bool skip_automatic_sec_vet: Skip Automatic Secondary Vetting
122124
123125
:returns: The created BrandRegistrationInstance
124126
:rtype: twilio.rest.messaging.v1.brand_registration.BrandRegistrationInstance
@@ -128,6 +130,7 @@ def create(self, customer_profile_bundle_sid, a2p_profile_bundle_sid,
128130
'A2PProfileBundleSid': a2p_profile_bundle_sid,
129131
'BrandType': brand_type,
130132
'Mock': mock,
133+
'SkipAutomaticSecVet': skip_automatic_sec_vet,
131134
})
132135

133136
payload = self._version.create(method='POST', uri=self._uri, data=data, )
@@ -257,6 +260,12 @@ class Status(object):
257260
APPROVED = "APPROVED"
258261
FAILED = "FAILED"
259262

263+
class IdentityStatus(object):
264+
SELF_DECLARED = "SELF_DECLARED"
265+
UNVERIFIED = "UNVERIFIED"
266+
VERIFIED = "VERIFIED"
267+
VETTED_VERIFIED = "VETTED_VERIFIED"
268+
260269
def __init__(self, version, payload, sid=None):
261270
"""
262271
Initialize the BrandRegistrationInstance
@@ -280,6 +289,10 @@ def __init__(self, version, payload, sid=None):
280289
'failure_reason': payload.get('failure_reason'),
281290
'url': payload.get('url'),
282291
'brand_score': deserialize.integer(payload.get('brand_score')),
292+
'identity_status': payload.get('identity_status'),
293+
'russell_3000': payload.get('russell_3000'),
294+
'tax_exempt_status': payload.get('tax_exempt_status'),
295+
'skip_automatic_sec_vet': payload.get('skip_automatic_sec_vet'),
283296
'mock': payload.get('mock'),
284297
}
285298

@@ -396,6 +409,38 @@ def brand_score(self):
396409
"""
397410
return self._properties['brand_score']
398411

412+
@property
413+
def identity_status(self):
414+
"""
415+
:returns: Identity Status
416+
:rtype: BrandRegistrationInstance.IdentityStatus
417+
"""
418+
return self._properties['identity_status']
419+
420+
@property
421+
def russell_3000(self):
422+
"""
423+
:returns: Russell 3000
424+
:rtype: bool
425+
"""
426+
return self._properties['russell_3000']
427+
428+
@property
429+
def tax_exempt_status(self):
430+
"""
431+
:returns: Tax Exempt Status
432+
:rtype: unicode
433+
"""
434+
return self._properties['tax_exempt_status']
435+
436+
@property
437+
def skip_automatic_sec_vet(self):
438+
"""
439+
:returns: Skip Automatic Secondary Vetting
440+
:rtype: bool
441+
"""
442+
return self._properties['skip_automatic_sec_vet']
443+
399444
@property
400445
def mock(self):
401446
"""

0 commit comments

Comments
 (0)