8000 [Librarian] Regenerated @ 6d6bd4543b2ef60947eac37b35d6a7454a9686c7 · githubib/twilio-python@6e45453 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e45453

Browse files
committed
[Librarian] Regenerated @ 6d6bd4543b2ef60947eac37b35d6a7454a9686c7
1 parent cad71c6 commit 6e45453

File tree

24 files changed

+1922
-113
lines changed

24 files changed

+1922
-113
lines changed

CHANGES.md

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

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

6+
[2021-04-07] Version 6.56.0
7+
---------------------------
8+
**Api**
9+
- Added `announcement` event to conference status callback events
10+
- Removed optional property `time_limit` in the call create request. **(breaking change)**
11+
12+
**Messaging**
13+
- Add rate_limits field to Messaging Services US App To Person API
14+
- Add usecase field in Service API for fetch, create, update, read
15+
- Add us app to person api and us app to person usecase api as dependents in service
16+
- Add us_app_to_person_registered field in service api for fetch, read, create, update
17+
- Add us app to person api
18+
- Add us app to person usecase api
19+
- Add A2P external campaign api
20+
- Add Usecases API
21+
22+
**Supersim**
23+
- Add Create endpoint to Sims resource
24+
25+
**Verify**
26+
- The `Binding` field is now returned when creating a `Factor`. This value won't be returned for other endpoints.
27+
28+
**Video**
29+
- [Rooms] max_concurrent_published_tracks has got GA maturity
30+
31+
**Twiml**
32+
- Add `announcement` event to `statusCallbackEvent` for `<Conference>`.
33+
34+
635
[2021-03-24] Version 6.55.0
736
---------------------------
837
**Api**

tests/integration/api/v2010/account/test_call.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,3 +636,51 @@ def test_posttwiml_response(self):
636636
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
637637

638638
self.assertIsNotNone(actual)
639+
640+
def test_updatetimelimit_response(self):
641+
self.holodeck.mock(Response(
642+
200,
643+
'''
644+
{
645+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
646+
"annotation": null,
647+
"answered_by": null,
648+
"api_version": "2010-04-01",
649+
"caller_name": null,
650+
"date_created": "Tue, 31 Aug 2010 20:36:28 +0000",
651+
"date_updated": "Tue, 31 Aug 2010 20:36:44 +0000",
652+
"direction": "inbound",
653+
"duration": "15",
654+
"end_time": "Tue, 31 Aug 2010 20:36:44 +0000",
655+
"forwarded_from": "+141586753093",
656+
"from": "+14158675308",
657+
"from_formatted": "(415) 867-5308",
658+
"group_sid": null,
659+
"parent_call_sid": null,
660+
"phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
661+
"price": "-0.03000",
662+
"price_unit": "USD",
663+
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
664+
"start_time": "Tue, 31 Aug 2010 20:36:29 +0000",
665+
"status": "canceled",
666+
"subresource_uris": {
667+
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
668+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
669+
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
670+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
671+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json",
672+
"events": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events.json"
673+
},
674+
"to": "+14158675309",
675+
"to_formatted": "(415) 867-5309",
676+
"trunk_sid": null,
677+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
678+
"queue_time": "1000"
679+
}
680+
'''
681+
))
682+
683+
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
684+
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
685+
686+
self.assertIsNotNone(actual)
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
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 import serialize
12+
from twilio.base.exceptions import TwilioException
13+
from twilio.http.response import Response
14+
15+
16+
class UsAppToPersonTestCase(IntegrationTestCase):
17+
18+
def test_create_request(self):
19+
self.holodeck.mock(Response(500, ''))
20+
21+
with self.assertRaises(TwilioException):
22+
self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23+
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
24+
25+
values = {
26+
'BrandRegistrationSid': "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
27+
'Description': "description",
28+
'MessageSamples': serialize.map(['message_samples'], lambda e: e),
29+
'UsAppToPersonUsecase': "us_app_to_person_usecase",
30+
'HasEmbeddedLinks': True,
31+
'HasEmbeddedPhone': True,
32+
}
33+
34+
self.holodeck.assert_has_request(Request(
35+
'post',
36+
'https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Compliance/Usa2p',
37+
data=values,
38+
))
39+
40+
def test_create_response(self):
41+
self.holodeck.mock(Response(
42+
201,
43+
'''
44+
{
45+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
46+
"brand_registration_sid": "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
47+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
48+
"description": "Send marketing messages about sales and offers to opted in customers.",
49+
"message_samples": [
50+
"EXPRESS: Denim Days Event is ON",
51+
"LAST CHANCE: Book your next flight for just 1 (ONE) EUR"
52+
],
53+
"us_app_to_person_usecase": "MARKETING",
54+
"has_embedded_links": true,
55+
"has_embedded_phone": false,
56+
"status": "PENDING",
57+
"campaign_id": "CXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
58+
"is_externally_registered": false,
59+
"rate_limits": {
60+
"att": {
61+
"mps": 600,
62+
"msg_class": "A"
63+
},
64+
"tmobile": {
65+
"brand_tier": "TOP"
66+
}
67+
},
68+
"date_created": "2021-02-18T14:48:52Z",
69+
"date_updated": "2021-02-18T14:48:52Z",
70+
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p"
71+
}
72+
'''
73+
))
74+
75+
actual = self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
76+
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
77+
78+
self.assertIsNotNone(actual)
79+
80+
def test_delete_request(self):
81+
self.holodeck.mock(Response(500, ''))
82+
83+
with self.assertRaises(TwilioException):
84+
self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
85+
.us_app_to_person.delete()
86+
87+
self.holodeck.assert_has_request(Request(
88+
'delete',
89+
'https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Compliance/Usa2p',
90+
))
91+
92+
def test_delete_response(self):
93+
self.holodeck.mock(Response(
94+
204,
95+
None,
96+
))
97+
98+
actual = self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
99+
.us_app_to_person.delete()
100+
101+
self.assertTrue(actual)
102+
103+
def test_fetch_request(self):
104+
self.holodeck.mock(Response(500, ''))
105+
106+
with self.assertRaises(TwilioException):
107+
self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
108+
.us_app_to_person.fetch()
109+
110+
self.holodeck.assert_has_request(Request(
111+
'get',
112+
'https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Compliance/Usa2p',
113+
))
114+
115+
def test_fetch_response(self):
116+
self.holodeck.mock(Response(
117+
200,
118+
'''
119+
{
120+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
121+
"brand_registration_sid": "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
122+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
123+
"description": "Send marketing messages about sales and offers to opted in customers.",
124+
"message_samples": [
125+
"EXPRESS: Denim Days Event is ON",
126+
"LAST CHANCE: Book your next flight for just 1 (ONE) EUR"
127+
],
128+
"us_app_to_person_usecase": "MARKETING",
129+
"has_embedded_links": true,
130+
"has_embedded_phone": false,
131+
"status": "PENDING",
132+
"campaign_id": "CXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
133+
"is_externally_registered": false,
134+
"rate_limits": {
135+
"att": {
136+
"mps": 600,
137+
"msg_class": "A"
138+
},
139+
"tmobile": {
140+
"brand_tier": "TOP"
141+
}
142+
},
143+
"date_created": "2021-02-18T14:48:52Z",
144+
"date_updated": "2021-02-18T14:48:52Z",
145+
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p"
146+
}
147+
'''
148+
))
149+
150+
actual = self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
151+
.us_app_to_person.fetch()
152+
153+
self.assertIsNotNone(actual)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 UsAppToPersonUsecaseTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.us_app_to_person_usecases.fetch()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Compliance/Usa2p/Usecases',
27+
))
28+
29+
def test_fetch_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"us_app_to_person_usecases": [
35+
{
36+
"code": "MARKETING",
37+
"name": "Marketing",
38+
"description": "Send marketing messages about sales and offers to opted in customers."
39+
},
40+
{
41+
"code": "DELIVERY_NOTIFICATION",
42+
"name": "Delivery Notification",
43+
"description": "Information about the status of the delivery of a product or service."
44+
}
45+
]
46+
}
47+
'''
48+
))
49+
50+
actual = self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
51+
.us_app_to_person_usecases.fetch()
52+
53+
self.assertIsNotNone(actual)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 ExternalCampaignTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.messaging.v1.external_campaign.create(campaign_id="campaign_id", messaging_service_sid="MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
22+
23+
values = {'CampaignId': "campaign_id", 'MessagingServiceSid': "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", }
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://messaging.twilio.com/v1/Services/PreregisteredUsa2p',
28+
data=values,
29+
))
30+
31+
def test_create_response(self):
32+
self.holodeck.mock(Response(
33+
201,
34+
'''
35+
{
36+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"campaign_id": "CMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39+
"date_created": "2021-03-21T21:31:00Z"
40+
}
41+
'''
42+
))
43+
44+
actual = self.client.messaging.v1.external_campaign.create(campaign_id="campaign_id", messaging_service_sid="MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
45+
46+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0