Skip to content

Commit

Permalink
[Librarian] Regenerated @ 4e75c7be2507558854a659be2e05b171bcf7512b
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Jun 30, 2021
1 parent cbf3103 commit 44620df
Show file tree
Hide file tree
Showing 13 changed files with 561 additions and 25 deletions.
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ twilio-python Changelog

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

[2021-06-30] Version 6.61.0
---------------------------
**Conversations**
- Read-only Conversation Email Binding property `binding`

**Supersim**
- Add Billing Period resource for the Super Sim Pilot
- Add List endpoint to Billing Period resource for Super Sim Pilot
- Add Fetch endpoint to Billing Period resource for Super Sim Pilot

**Taskrouter**
- Update `transcribe` & `transcription_configuration` form params in Reservation update endpoint to have private visibility **(breaking change)**
- Add `transcribe` & `transcription_configuration` form params to Reservation update endpoint

**Twiml**
- Add `modify` event to `statusCallbackEvent` for `<Conference>`.


[2021-06-16] Version 6.60.0
---------------------------
**Api**
Expand Down
44 changes: 39 additions & 5 deletions tests/integration/api/v2010/account/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,11 @@ def test_update_request(self):

with self.assertRaises(TwilioException):
self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(body="body")

values = {'Body': "body", }
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()

self.holodeck.assert_has_request(Request(
'post',
'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
data=values,
))

def test_redact_body_response(self):
Expand Down Expand Up @@ -517,6 +514,43 @@ def test_redact_body_response(self):
))

actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(body="body")
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()

self.assertIsNotNone(actual)

def test_cancel_message_response(self):
self.holodeck.mock(Response(
200,
'''
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"api_version": "2010-04-01",
"body": "",
"date_created": "Fri, 24 May 2019 17:18:27 +0000",
"date_sent": "Fri, 24 May 2019 17:18:28 +0000",
"date_updated": "Fri, 24 May 2019 17:18:28 +0000",
"direction": "outbound-api",
"error_code": 30007,
"error_message": "Carrier violation",
"from": "+12019235161",
"messaging_service_sid": "MGdeadbeefdeadbeefdeadbeefdeadbeef",
"num_media": "0",
"num_segments": "1",
"price": "-0.00750",
"price_unit": "USD",
"sid": "SMb7c0a2ce80504485a6f653a7110836f5",
"status": "canceled",
"subresource_uris": {
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5/Media.json",
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5/Feedback.json"
},
"to": "+18182008801",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5.json"
}
'''
))

actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.messages("MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()

self.assertIsNotNone(actual)
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_create_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -78,6 +79,7 @@ def test_create_no_timers_no_attributes_response(self):
"date_updated": "2020-07-01T22:18:37Z",
"state": "active",
"timers": {},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -126,6 +128,7 @@ def test_update_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -197,6 +200,7 @@ def test_fetch_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -245,6 +249,7 @@ def test_read_full_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/conversations/v1/test_conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def test_create_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -76,6 +77,7 @@ def test_create_no_timers_no_attributes_response(self):
"date_updated": "2020-07-01T22:18:37Z",
"state": "active",
"timers": {},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -122,6 +124,7 @@ def test_update_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -189,6 +192,7 @@ def test_fetch_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down Expand Up @@ -235,6 +239,7 @@ def test_read_full_response(self):
"date_inactive": "2015-12-16T22:19:38Z",
"date_closed": "2015-12-16T22:28:38Z"
},
"bindings": {},
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
Expand Down
8 changes: 8 additions & 0 deletions tests/integration/supersim/v1/sim/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""

121 changes: 121 additions & 0 deletions tests/integration/supersim/v1/sim/test_billing_period.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""

from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response


class BillingPeriodTestCase(IntegrationTestCase):

def test_list_request(self):
self.holodeck.mock(Response(500, ''))

with self.assertRaises(TwilioException):
self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.billing_periods.list()

self.holodeck.assert_has_request(Request(
'get',
'https://supersim.twilio.com/v1/Sims/HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/BillingPeriods',
))

def test_read_empty_response(self):
self.holodeck.mock(Response(
200,
'''
{
"billing_periods": [],
"meta": {
"page": 0,
"page_size": 50,
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
"previous_page_url": null,
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
"next_page_url": null,
"key": "billing_periods"
}
}
'''
))

actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.billing_periods.list()

self.assertIsNotNone(actual)

def test_read_full_active_period_response(self):
self.holodeck.mock(Response(
200,
'''
{
"billing_periods": [
{
"sid": "HBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"period_type": "active",
"start_time": "2021-06-09T13:18:15Z",
"end_time": "2021-07-09T13:18:15Z",
"date_created": "2021-06-09T13:18:16Z",
"date_updated": "2021-06-09T13:18:16Z"
}
],
"meta": {
"page": 0,
"page_size": 50,
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
"previous_page_url": null,
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
"next_page_url": null,
"key": "billing_periods"
}
}
'''
))

actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.billing_periods.list()

self.assertIsNotNone(actual)

def test_read_full_ready_period_response(self):
self.holodeck.mock(Response(
200,
'''
{
"billing_periods": [
{
"sid": "HBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"period_type": "ready",
"start_time": "2021-06-09T13:18:15Z",
"end_time": "2021-07-09T13:18:15Z",
"date_created": "2021-06-09T13:18:16Z",
"date_updated": "2021-06-09T13:18:16Z"
}
],
"meta": {
"page": 0,
"page_size": 50,
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
"previous_page_url": null,
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods?PageSize=50&Page=0",
"next_page_url": null,
"key": "billing_periods"
}
}
'''
))

actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.billing_periods.list()

self.assertIsNotNone(actual)
Loading

0 comments on commit 44620df

Please sign in to comment.