Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba4416f

Browse files
committed
[Librarian] Regenerated @ 1b1f2bd0b89ec7e7ff86f1b6de8f94601143931e
1 parent 83cd864 commit ba4416f

File tree

31 files changed

+895
-556
lines changed

31 files changed

+895
-556
lines changed

CHANGES.md

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

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

6+
[2020-10-14] Version 6.46.0
7+
---------------------------
8+
**Library - Docs**
9+
- [PR #542](https://github.com/twilio/twilio-python/pull/542): add path limit error for windows. Thanks to [@hack3r-0m](https://github.com/hack3r-0m)!
10+
11+
**Ai**
12+
- Add `Annotation Project` and `Annotation Task` endpoints
13+
- Add `Primitives` endpoints
14+
- Add `meta.total` to the search endpoint
15+
16+
**Conversations**
17+
- Mutable Conversation Unique Names
18+
19+
**Insights**
20+
- Added `trust` to summary.
21+
22+
**Preview**
23+
- Simplified `Channels` resource. The path is now `/BrandedChannels/branded_channel_sid/Channels` **(breaking change)**
24+
25+
**Verify**
26+
- Changed parameters (`config` and `binding`) to use dot notation instead of JSON string (e.i. Before: `binding={"alg":"ES256", "public_key": "xxx..."}`, Now: `Binding.Alg="ES256"`, `Binding.PublicKey="xxx..."`). **(breaking change)**
27+
- Changed parameters (`details` and `hidden_details`) to use dot notation instead of JSON string (e.i. Before: `details={"message":"Test message", "fields": "[{\"label\": \"Action 1\", \"value\":\"value 1\"}]"}`, Now: `details.Message="Test message"`, `Details.Fields=["{\"label\": \"Action 1\", \"value\":\"value 1\"}"]`). **(breaking change)**
28+
- Removed `notify_service_sid` from `push` service configuration object. Add `Push.IncludeDate`, `Push.ApnCredentialSid` and `Push.FcmCredentialSid` service configuration parameters. **(breaking change)**
29+
30+
631
[2020-09-28] Version 6.45.4
732
---------------------------
833
**Library - Docs**
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class AuthTokenPromotionTestCase(IntegrationTestCase):
16+
17+
def test_update_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.accounts.v1.auth_token_promotion().update()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'post',
25+
'https://accounts.twilio.com/v1/AuthTokens/Promote',
26+
))
27+
28+
def test_update_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"auth_token": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
35+
"date_created": "2015-07-31T04:00:00Z",
36+
"date_updated": "2015-07-31T04:00:00Z",
37+
"url": "https://accounts.twilio.com/v1/AuthTokens/Promote"
38+
}
39+
'''
40+
))
41+
42+
actual = self.client.accounts.v1.auth_token_promotion().update()
43+
44+
self.assertIsNotNone(actual)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class SecondaryAuthTokenTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.accounts.v1.secondary_auth_token().create()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'post',
25+
'https://accounts.twilio.com/v1/AuthTokens/Secondary',
26+
))
27+
28+
def test_create_response(self):
29+
self.holodeck.mock(Response(
30+
201,
31+
'''
32+
{
33+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"date_created": "2015-07-31T04:00:00Z",
35+
"date_updated": "2015-07-31T04:00:00Z",
36+
"secondary_auth_token": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
37+
"url": "https://accounts.twilio.com/v1/AuthTokens/Secondary"
38+
}
39+
'''
40+
))
41+
42+
actual = self.client.accounts.v1.secondary_auth_token().create()
43+
44+
self.assertIsNotNone(actual)
45+
46+
def test_delete_request(self):
47+
self.holodeck.mock(Response(500, ''))
48+
49+
with self.assertRaises(TwilioException):
50+
self.client.accounts.v1.secondary_auth_token().delete()
51+
52+
self.holodeck.assert_has_request(Request(
53+
'delete',
54+
'https://accounts.twilio.com/v1/AuthTokens/Secondary',
55+
))
56+
57+
def test_delete_response(self):
58+
self.holodeck.mock(Response(
59+
204,
60+
None,
61+
))
62+
63+
actual = self.client.accounts.v1.secondary_auth_token().delete()
64+
65+
self.assertTrue(actual)

tests/integration/conversations/v1/service/test_conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_update_response(self):
117117
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
118118
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
119119
"friendly_name": "friendly_name",
120-
"unique_name": null,
120+
"unique_name": "unique_name",
121121
"attributes": "{ \\"topic\\": \\"feedback\\" }",
122122
"date_created": "2015-12-16T22:18:37Z",
123123
"date_updated": "2015-12-16T22:18:38Z",

tests/integration/conversations/v1/test_conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def test_update_response(self):
113113
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
114114
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
115115
"friendly_name": "friendly_name",
116-
"unique_name": null,
116+
"unique_name": "unique_name",
117117
"attributes": "{ \\"topic\\": \\"feedback\\" }",
118118
"date_created": "2015-12-16T22:18:37Z",
119119
"date_updated": "2015-12-16T22:18:38Z",

tests/integration/insights/v1/call/test_summary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_fetch_response(self):
5151
],
5252
"attributes": {},
5353
"properties": {},
54+
"trust": {},
5455
"url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"
5556
}
5657
'''
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ def test_create_request(self):
1818
self.holodeck.mock(Response(500, ''))
1919

2020
with self.assertRaises(TwilioException):
21-
self.client.preview.trusted_comms.businesses("BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22-
.brands("BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23-
.branded_channels("BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
21+
self.client.preview.trusted_comms.branded_channels("BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
2422
.channels.create(phone_number_sid="PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
2523

2624
values = {'PhoneNumberSid': "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", }
2725

2826
self.holodeck.assert_has_request(Request(
2927
'post',
30-
'https://preview.twilio.com/TrustedComms/Businesses/BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Brands/BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels',
28+
'https://preview.twilio.com/TrustedComms/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels',
3129
data=values,
3230
))
3331

@@ -42,14 +40,12 @@ def test_create_response(self):
4240
"branded_channel_sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4341
"phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4442
"phone_number": "+15000000000",
45-
"url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
43+
"url": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
4644
}
4745
'''
4846
))
4947

50-
actual = self.client.preview.trusted_comms.businesses("BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
51-
.brands("BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
52-
.branded_channels("BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
48+
actual = self.client.preview.trusted_comms.branded_channels("BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
5349
.channels.create(phone_number_sid="PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
5450

5551
self.assertIsNotNone(actual)

tests/integration/preview/trusted_comms/business/brand/branded_channel/__init__.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/integration/preview/trusted_comms/business/test_brand.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)