8000 [Librarian] Regenerated @ 1b1f2bd0b89ec7e7ff86f1b6de8f94601143931e · Atharva2011/twilio-python@ba4416f · GitHub
[go: up one dir, main page]

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.

tests/integration/preview/trusted_comms/business/brand/test_branded_channel.py renamed to tests/integration/preview/trusted_comms/test_branded_channel.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ def test_fetch_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").fetch()
21+
self.client.preview.trusted_comms.branded_channels("BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
2422

2523
self.holodeck.assert_has_request(Request(
2624
'get',
27-
'https://preview.twilio.com/TrustedComms/Businesses/BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Brands/BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
25+
'https://preview.twilio.com/TrustedComms/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
2826
))
2927

3028
def test_fetch_response(self):
@@ -37,15 +35,13 @@ def test_fetch_response(self):
3735
"brand_sid": "BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3836
"sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3937
"links": {
40-
"channels": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
38+
"channels": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
4139
},
42-
"url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
40+
"url": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
4341
}
4442
'''
4543
))
4644

47-
actual = self.client.preview.trusted_comms.businesses("BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
48-
.brands("BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
49-
.branded_channels("BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
45+
actual = self.client.preview.trusted_comms.branded_channels("BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
5046

5147
self.assertIsNotNone(actual)

tests/integration/preview/trusted_comms/test_business.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def test_fetch_response(self):
3434
"sid": "BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3535
"url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3636
"links": {
37-
"brands": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands",
3837
"insights": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Insights"
3938
}
4039
}

tests/integration/verify/v2/service/entity/test_challenge.py

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,19 @@ def test_create_response(self):
5353
"expiration_date": "2015-07-30T20:00:00Z",
5454
"status": "pending",
5555
"responded_reason": "none",
56-
"details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"date\\":\\"2020-07-01T12:13:14Z\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
57-
"hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
56+
"details": {
57+
"message": "Hi! Mr. John Doe, would you like to sign up?",
58+
"date": "2020-07-01T12:13:14Z",
59+
"fields": [
60+
{
61+
"label": "Action",
62+
"value": "Sign up in portal"
63+
}
64+
]
65+
},
66+
"hidden_details": {
67+
"ip": "172.168.1.234"
68+
},
5869
"factor_type": "push",
5970
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
6071
}
@@ -99,8 +110,19 @@ def test_fetch_sid_response(self):
99110
"expiration_date": "2015-07-30T20:00:00Z",
100111
"status": "pending",
101112
"responded_reason": "none",
102-
"details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
103-
"hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
113+
"details": {
114+
"message": "Hi! Mr. John Doe, would you like to sign up?",
115+
"date": "2020-07-01T12:13:14Z",
116+
"fields": [
117+
{
118+
"label": "Action",
119+
"value": "Sign up in portal"
120+
}
121+
]
122+
},
123+
"hidden_details": {
124+
"ip": "172.168.1.234"
125+
},
104126
"factor_type": "push",
105127
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
106128
}
@@ -172,8 +194,19 @@ def test_read_full_response(self):
172194
"expiration_date": "2015-07-30T20:00:00Z",
173195
"status": "pending",
174196
"responded_reason": "none",
175-
"details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
176-
"hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
197+
"details": {
198+
"message": "Hi! Mr. John Doe, would you like to sign up?",
199+
"date": "2020-07-01T12:13:14Z",
200+
"fields": [
201+
{
202+
"label": "Action",
203+
"value": "Sign up in portal"
204+
}
205+
]
206+
},
207+
"hidden_details": {
208+
"ip": "172.168.1.234"
209+
},
177210
"factor_type": "push",
178211
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
179212
}
@@ -229,8 +262,19 @@ def test_verify_sid_response(self):
229262
"expiration_date": "2015-07-30T20:00:00Z",
230263
"status": "approved",
231264
"responded_reason": "none",
232-
"details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
233-
"hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
265+
"details": {
266+
"message": "Hi! Mr. John Doe, would you like to sign up?",
267+
"date": "2020-07-01T12:13:14Z",
268+
"fields": [
269+
{
270+
"label": "Action",
271+
"value": "Sign up in portal"
272+
}
273+
]
274+
},
275+
"hidden_details": {
276+
"ip": "172.168.1.234"
277+
},
234278
"factor_type": "push",
235279
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
236280
}

0 commit comments

Comments
 (0)
0