From 6eb676ae719828460232aa22b1592e3bfd255cc0 Mon Sep 17 00:00:00 2001 From: Twilio Date: Thu, 4 Jan 2024 10:15:51 +0000 Subject: [PATCH 1/4] [Librarian] Regenerated @ 517c6276943255de674e1d20cdae01266b89160c dc7e93834d14ebcc1f96c25b9fbc8af35330f99a --- CHANGES.md | 6 + twilio/rest/__init__.py | 30 +-- twilio/rest/accounts/v1/credential/aws.py | 2 + .../rest/accounts/v1/credential/public_key.py | 2 + twilio/rest/accounts/v1/safelist.py | 2 + twilio/rest/api/v2010/account/__init__.py | 2 + .../api/v2010/account/address/__init__.py | 2 + twilio/rest/api/v2010/account/application.py | 2 + .../v2010/account/authorized_connect_app.py | 11 +- .../rest/api/v2010/account/call/__init__.py | 74 +----- .../v2010/account/call/feedback_summary.py | 4 +- twilio/rest/api/v2010/account/call/payment.py | 2 + .../rest/api/v2010/account/call/recording.py | 2 + twilio/rest/api/v2010/account/call/siprec.py | 2 + twilio/rest/api/v2010/account/call/stream.py | 2 + .../account/call/user_defined_message.py | 2 + .../call/user_defined_message_subscription.py | 2 + .../api/v2010/account/conference/__init__.py | 72 ------ .../v2010/account/conference/participant.py | 2 + .../account/incoming_phone_number/__init__.py | 2 + .../assigned_add_on/__init__.py | 2 + .../account/incoming_phone_number/local.py | 2 + .../account/incoming_phone_number/mobile.py | 2 + .../incoming_phone_number/toll_free.py | 2 + .../api/v2010/account/message/__init__.py | 48 +--- .../api/v2010/account/message/feedback.py | 2 + twilio/rest/api/v2010/account/new_key.py | 2 + .../rest/api/v2010/account/new_signing_key.py | 2 + .../rest/api/v2010/account/queue/__init__.py | 2 + .../account/sip/credential_list/__init__.py | 2 + .../account/sip/credential_list/credential.py | 2 + .../api/v2010/account/sip/domain/__init__.py | 2 + .../auth_calls_credential_list_mapping.py | 2 + ...th_calls_ip_access_control_list_mapping.py | 2 + ...h_registrations_credential_list_mapping.py | 2 + .../sip/domain/credential_list_mapping.py | 2 + .../domain/ip_access_control_list_mapping.py | 2 + .../sip/ip_access_control_list/__init__.py | 2 + .../sip/ip_access_control_list/ip_address.py | 2 + twilio/rest/api/v2010/account/token.py | 2 + .../rest/api/v2010/account/usage/trigger.py | 2 + .../api/v2010/account/validation_request.py | 2 + .../rest/autopilot/v1/assistant/__init__.py | 2 + .../v1/assistant/field_type/__init__.py | 2 + .../v1/assistant/field_type/field_value.py | 2 + .../autopilot/v1/assistant/model_build.py | 2 + twilio/rest/autopilot/v1/assistant/query.py | 2 + .../autopilot/v1/assistant/task/__init__.py | 2 + .../rest/autopilot/v1/assistant/task/field.py | 2 + .../autopilot/v1/assistant/task/sample.py | 2 + twilio/rest/autopilot/v1/assistant/webhook.py | 2 + .../v1/export/export_custom_job.py | 2 + twilio/rest/chat/v1/credential.py | 2 + twilio/rest/chat/v1/service/__init__.py | 2 + .../rest/chat/v1/service/channel/__init__.py | 2 + twilio/rest/chat/v1/service/channel/invite.py | 2 + twilio/rest/chat/v1/service/channel/member.py | 2 + .../rest/chat/v1/service/channel/message.py | 2 + twilio/rest/chat/v1/service/role.py | 2 + twilio/rest/chat/v1/service/user/__init__.py | 2 + twilio/rest/chat/v2/credential.py | 2 + twilio/rest/chat/v2/service/__init__.py | 2 + .../rest/chat/v2/service/channel/__init__.py | 2 + twilio/rest/chat/v2/service/channel/invite.py | 2 + twilio/rest/chat/v2/service/channel/member.py | 2 + .../rest/chat/v2/service/channel/message.py | 2 + .../rest/chat/v2/service/channel/webhook.py | 2 + twilio/rest/chat/v2/service/role.py | 2 + twilio/rest/chat/v2/service/user/__init__.py | 2 + twilio/rest/content/v1/content/__init__.py | 2 +- .../rest/content/v1/content_and_approvals.py | 2 +- twilio/rest/content/v1/legacy_content.py | 2 +- .../conversations/v1/address_configuration.py | 2 + .../conversations/v1/conversation/__init__.py | 2 + .../v1/conversation/message/__init__.py | 10 +- .../v1/conversation/participant.py | 2 + .../conversations/v1/conversation/webhook.py | 2 + twilio/rest/conversations/v1/credential.py | 2 + twilio/rest/conversations/v1/role.py | 2 + .../rest/conversations/v1/service/__init__.py | 2 + .../v1/service/conversation/__init__.py | 2 + .../service/conversation/message/__init__.py | 10 +- .../v1/service/conversation/participant.py | 2 + .../v1/service/conversation/webhook.py | 2 + twilio/rest/conversations/v1/service/role.py | 2 + .../conversations/v1/service/user/__init__.py | 2 + twilio/rest/conversations/v1/user/__init__.py | 2 + twilio/rest/events/v1/sink/__init__.py | 2 + twilio/rest/events/v1/sink/sink_validate.py | 2 + .../rest/events/v1/subscription/__init__.py | 2 + .../v1/subscription/subscribed_event.py | 16 +- twilio/rest/flex_api/v1/assessments.py | 2 + twilio/rest/flex_api/v1/channel.py | 2 + twilio/rest/flex_api/v1/configuration.py | 64 +++++- twilio/rest/flex_api/v1/flex_flow.py | 2 + .../v1/insights_assessments_comment.py | 2 + .../flex_api/v1/insights_conversations.py | 2 +- .../flex_api/v1/insights_questionnaires.py | 4 +- .../v1/insights_questionnaires_category.py | 2 + .../v1/insights_questionnaires_question.py | 2 + .../rest/flex_api/v1/interaction/__init__.py | 2 + .../interaction_channel_invite.py | 2 + .../interaction_channel_participant.py | 2 + twilio/rest/flex_api/v1/web_channel.py | 2 + twilio/rest/flex_api/v2/web_channels.py | 2 + twilio/rest/intelligence/v2/service.py | 16 +- .../intelligence/v2/transcript/__init__.py | 4 +- .../v2/transcript/operator_result.py | 2 +- twilio/rest/ip_messaging/v1/credential.py | 2 + .../rest/ip_messaging/v1/service/__init__.py | 2 + .../v1/service/channel/__init__.py | 2 + .../ip_messaging/v1/service/channel/invite.py | 2 + .../ip_messaging/v1/service/channel/member.py | 2 + .../v1/service/channel/message.py | 2 + twilio/rest/ip_messaging/v1/service/role.py | 2 + .../ip_messaging/v1/service/user/__init__.py | 2 + twilio/rest/ip_messaging/v2/credential.py | 2 + .../rest/ip_messaging/v2/service/__init__.py | 2 + .../v2/service/channel/__init__.py | 2 + .../ip_messaging/v2/service/channel/invite.py | 2 + .../ip_messaging/v2/service/channel/member.py | 2 + .../v2/service/channel/message.py | 2 + .../v2/service/channel/webhook.py | 2 + twilio/rest/ip_messaging/v2/service/role.py | 2 + .../ip_messaging/v2/service/user/__init__.py | 2 + twilio/rest/media/v1/media_processor.py | 2 + .../rest/media/v1/player_streamer/__init__.py | 2 + .../v1/brand_registration/__init__.py | 2 + .../v1/brand_registration/brand_vetting.py | 2 + twilio/rest/messaging/v1/external_campaign.py | 2 + twilio/rest/messaging/v1/service/__init__.py | 2 + .../rest/messaging/v1/service/alpha_sender.py | 2 + .../rest/messaging/v1/service/phone_number.py | 2 + .../rest/messaging/v1/service/short_code.py | 2 + .../messaging/v1/service/us_app_to_person.py | 4 +- .../v1/service/us_app_to_person_usecase.py | 2 +- .../messaging/v1/tollfree_verification.py | 2 + twilio/rest/messaging/v1/usecase.py | 2 +- twilio/rest/microvisor/v1/account_config.py | 2 + twilio/rest/microvisor/v1/account_secret.py | 2 + .../microvisor/v1/device/device_config.py | 2 + .../microvisor/v1/device/device_secret.py | 2 + twilio/rest/notify/v1/credential.py | 2 + twilio/rest/notify/v1/service/__init__.py | 16 +- twilio/rest/notify/v1/service/binding.py | 2 + twilio/rest/notify/v1/service/notification.py | 6 +- twilio/rest/numbers/v1/__init__.py | 16 +- twilio/rest/numbers/v1/bulk_eligibility.py | 34 ++- twilio/rest/numbers/v1/eligibility.py | 92 ++++++++ .../numbers/v1/porting_bulk_portability.py | 6 +- twilio/rest/numbers/v1/porting_port_in.py | 94 ++++++++ .../rest/numbers/v1/porting_port_in_fetch.py | 217 ------------------ .../v2/authorization_document/__init__.py | 2 + .../numbers/v2/bulk_hosted_number_order.py | 34 ++- twilio/rest/numbers/v2/hosted_number_order.py | 2 + .../regulatory_compliance/bundle/__init__.py | 38 +-- .../bundle/bundle_copy.py | 2 + .../bundle/evaluation.py | 2 +- .../bundle/item_assignment.py | 2 + .../bundle/replace_items.py | 2 + .../v2/regulatory_compliance/end_user.py | 2 + .../v2/regulatory_compliance/end_user_type.py | 2 +- .../supporting_document.py | 2 + .../supporting_document_type.py | 2 +- .../deployed_devices/fleet/__init__.py | 2 + .../deployed_devices/fleet/certificate.py | 2 + .../deployed_devices/fleet/deployment.py | 2 + .../preview/deployed_devices/fleet/device.py | 2 + .../preview/deployed_devices/fleet/key.py | 2 + .../authorization_document/__init__.py | 2 + .../hosted_numbers/hosted_number_order.py | 2 + .../marketplace/installed_add_on/__init__.py | 2 + twilio/rest/preview/sync/service/__init__.py | 2 + .../preview/sync/service/document/__init__.py | 2 + .../sync/service/sync_list/__init__.py | 2 + .../sync/service/sync_list/sync_list_item.py | 2 + .../preview/sync/service/sync_map/__init__.py | 2 + .../sync/service/sync_map/sync_map_item.py | 2 + .../preview/understand/assistant/__init__.py | 2 + .../assistant/field_type/__init__.py | 2 + .../assistant/field_type/field_value.py | 2 + .../understand/assistant/model_build.py | 2 + .../preview/understand/assistant/query.py | 2 + .../understand/assistant/task/__init__.py | 2 + .../understand/assistant/task/field.py | 2 + .../understand/assistant/task/sample.py | 2 + twilio/rest/preview/wireless/command.py | 2 + twilio/rest/preview/wireless/rate_plan.py | 2 + .../preview_messaging/PreviewMessagingBase.py | 6 +- twilio/rest/preview_messaging/v1/message.py | 39 +--- twilio/rest/proxy/v1/service/__init__.py | 2 + twilio/rest/proxy/v1/service/phone_number.py | 2 + .../rest/proxy/v1/service/session/__init__.py | 2 + .../service/session/participant/__init__.py | 2 + .../participant/message_interaction.py | 2 + twilio/rest/proxy/v1/service/short_code.py | 2 + twilio/rest/serverless/v1/service/__init__.py | 2 + .../serverless/v1/service/asset/__init__.py | 2 + .../serverless/v1/service/build/__init__.py | 10 +- .../v1/service/build/build_status.py | 2 +- .../v1/service/environment/__init__.py | 2 + .../v1/service/environment/deployment.py | 2 + .../v1/service/environment/variable.py | 2 + .../v1/service/function/__init__.py | 2 + .../studio/v1/flow/engagement/__init__.py | 2 + .../rest/studio/v1/flow/execution/__init__.py | 2 + twilio/rest/studio/v2/flow/__init__.py | 6 +- .../rest/studio/v2/flow/execution/__init__.py | 2 + twilio/rest/studio/v2/flow/flow_revision.py | 2 +- twilio/rest/supersim/v1/esim_profile.py | 16 +- twilio/rest/supersim/v1/fleet.py | 2 + twilio/rest/supersim/v1/ip_command.py | 2 + twilio/rest/supersim/v1/network.py | 2 +- .../v1/network_access_profile/__init__.py | 2 + .../network_access_profile_network.py | 4 +- twilio/rest/supersim/v1/settings_update.py | 2 +- twilio/rest/supersim/v1/sim/__init__.py | 2 + twilio/rest/supersim/v1/sms_command.py | 2 + twilio/rest/sync/v1/service/__init__.py | 2 + .../rest/sync/v1/service/document/__init__.py | 2 + .../sync/v1/service/sync_list/__init__.py | 2 + .../v1/service/sync_list/sync_list_item.py | 2 + .../rest/sync/v1/service/sync_map/__init__.py | 2 + .../sync/v1/service/sync_map/sync_map_item.py | 2 + .../sync/v1/service/sync_stream/__init__.py | 2 + .../v1/service/sync_stream/stream_message.py | 2 + .../rest/taskrouter/v1/workspace/__init__.py | 2 + .../rest/taskrouter/v1/workspace/activity.py | 2 + .../taskrouter/v1/workspace/task/__init__.py | 2 + .../v1/workspace/task/reservation.py | 12 - .../taskrouter/v1/workspace/task_channel.py | 2 + .../v1/workspace/task_queue/__init__.py | 19 ++ .../task_queue_bulk_real_time_statistics.py | 124 ++++++++++ .../task_queue_real_time_statistics.py | 2 +- .../v1/workspace/worker/__init__.py | 2 + .../v1/workspace/worker/reservation.py | 12 - .../worker/workers_cumulative_statistics.py | 2 +- .../worker/workers_real_time_statistics.py | 2 +- .../v1/workspace/workflow/__init__.py | 2 + .../workspace_real_time_statistics.py | 2 +- twilio/rest/trunking/v1/trunk/__init__.py | 2 + .../rest/trunking/v1/trunk/credential_list.py | 2 + .../v1/trunk/ip_access_control_list.py | 2 + .../rest/trunking/v1/trunk/origination_url.py | 2 + twilio/rest/trunking/v1/trunk/phone_number.py | 2 + .../rest/trusthub/v1/compliance_inquiries.py | 2 + .../v1/compliance_tollfree_inquiries.py | 142 +----------- .../trusthub/v1/customer_profiles/__init__.py | 2 + ...er_profiles_channel_endpoint_assignment.py | 2 + .../customer_profiles_entity_assignments.py | 2 + .../customer_profiles_evaluations.py | 4 +- twilio/rest/trusthub/v1/end_user.py | 2 + twilio/rest/trusthub/v1/end_user_type.py | 2 +- .../rest/trusthub/v1/supporting_document.py | 2 + .../trusthub/v1/supporting_document_type.py | 2 +- .../trusthub/v1/trust_products/__init__.py | 2 + ...st_products_channel_endpoint_assignment.py | 2 + .../trust_products_entity_assignments.py | 2 + .../trust_products_evaluations.py | 4 +- twilio/rest/verify/v2/safelist.py | 2 + twilio/rest/verify/v2/service/__init__.py | 24 +- twilio/rest/verify/v2/service/access_token.py | 2 + .../rest/verify/v2/service/entity/__init__.py | 2 + .../v2/service/entity/challenge/__init__.py | 2 + .../service/entity/challenge/notification.py | 2 + .../verify/v2/service/entity/new_factor.py | 2 + .../v2/service/messaging_configuration.py | 2 + .../verify/v2/service/rate_limit/__init__.py | 2 + .../verify/v2/service/rate_limit/bucket.py | 2 + twilio/rest/verify/v2/service/verification.py | 4 +- .../verify/v2/service/verification_check.py | 4 +- twilio/rest/verify/v2/service/webhook.py | 2 + twilio/rest/video/v1/composition.py | 2 + twilio/rest/video/v1/composition_hook.py | 2 + twilio/rest/video/v1/room/__init__.py | 2 + twilio/rest/voice/v1/byoc_trunk.py | 2 + .../voice/v1/connection_policy/__init__.py | 2 + .../connection_policy_target.py | 2 + .../bulk_country_update.py | 2 + twilio/rest/voice/v1/ip_record.py | 2 + twilio/rest/voice/v1/source_ip_mapping.py | 2 + twilio/rest/wireless/v1/command.py | 2 + twilio/rest/wireless/v1/rate_plan.py | 2 + 283 files changed, 1079 insertions(+), 761 deletions(-) create mode 100644 twilio/rest/numbers/v1/eligibility.py create mode 100644 twilio/rest/numbers/v1/porting_port_in.py delete mode 100644 twilio/rest/numbers/v1/porting_port_in_fetch.py create mode 100644 twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.py diff --git a/CHANGES.md b/CHANGES.md index 7289bdc50..622a86655 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,12 @@ twilio-python Changelog Here you can see the full list of changes between each twilio-python release. +[2024-01-04] Version 9.0.0-rc.1 +------------------------------- +**Library - Chore** +- [PR #743](https://github.com/twilio/twilio-python/pull/743): sync with main. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)! + + [2023-12-06] Version 9.0.0-rc.0 --------------------------- - Release Candidate preparation diff --git a/twilio/rest/__init__.py b/twilio/rest/__init__.py index 044537c41..3ff107039 100644 --- a/twilio/rest/__init__.py +++ b/twilio/rest/__init__.py @@ -28,13 +28,13 @@ from twilio.rest.ip_messaging import IpMessaging from twilio.rest.lookups import Lookups from twilio.rest.media import Media + from twilio.rest.preview_messaging import PreviewMessaging from twilio.rest.messaging import Messaging from twilio.rest.microvisor import Microvisor from twilio.rest.monitor import Monitor from twilio.rest.notify import Notify from twilio.rest.numbers import Numbers from twilio.rest.preview import Preview - from twilio.rest.preview_messaging import PreviewMessaging from twilio.rest.pricing import Pricing from twilio.rest.proxy import Proxy from twilio.rest.routes import Routes @@ -137,13 +137,13 @@ def __init__( self._ip_messaging: Optional["IpMessaging"] = None self._lookups: Optional["Lookups"] = None self._media: Optional["Media"] = None + self._preview_messaging: Optional["PreviewMessaging"] = None self._messaging: Optional["Messaging"] = None self._microvisor: Optional["Microvisor"] = None self._monitor: Optional["Monitor"] = None self._notify: Optional["Notify"] = None self._numbers: Optional["Numbers"] = None self._preview: Optional["Preview"] = None - self._preview_messaging: Optional["PreviewMessaging"] = None self._pricing: Optional["Pricing"] = None self._proxy: Optional["Proxy"] = None self._routes: Optional["Routes"] = None @@ -354,6 +354,19 @@ def media(self) -> "Media": self._media = Media(self) return self._media + @property + def preview_messaging(self) -> "PreviewMessaging": + """ + Access the PreviewMessaging Twilio Domain + + :returns: PreviewMessaging Twilio Domain + """ + if self._preview_messaging is None: + from twilio.rest.preview_messaging import PreviewMessaging + + self._preview_messaging = PreviewMessaging(self) + return self._preview_messaging + @property def messaging(self) -> "Messaging": """ @@ -432,19 +445,6 @@ def preview(self) -> "Preview": self._preview = Preview(self) return self._preview - @property - def preview_messaging(self) -> "PreviewMessaging": - """ - Access the Preview Messaging Twilio Domain - - :returns: Preview Messaging Twilio Domain - """ - if self._preview_messaging is None: - from twilio.rest.preview_messaging import PreviewMessaging - - self._preview_messaging = PreviewMessaging(self) - return self._preview_messaging - @property def pricing(self) -> "Pricing": """ diff --git a/twilio/rest/accounts/v1/credential/aws.py b/twilio/rest/accounts/v1/credential/aws.py index 0e17164ec..ae1efb6a1 100644 --- a/twilio/rest/accounts/v1/credential/aws.py +++ b/twilio/rest/accounts/v1/credential/aws.py @@ -321,6 +321,7 @@ def create( :returns: The created AwsInstance """ + data = values.of( { "Credentials": credentials, @@ -352,6 +353,7 @@ async def create_async( :returns: The created AwsInstance """ + data = values.of( { "Credentials": credentials, diff --git a/twilio/rest/accounts/v1/credential/public_key.py b/twilio/rest/accounts/v1/credential/public_key.py index f78a6728c..2177ebced 100644 --- a/twilio/rest/accounts/v1/credential/public_key.py +++ b/twilio/rest/accounts/v1/credential/public_key.py @@ -325,6 +325,7 @@ def create( :returns: The created PublicKeyInstance """ + data = values.of( { "PublicKey": public_key, @@ -356,6 +357,7 @@ async def create_async( :returns: The created PublicKeyInstance """ + data = values.of( { "PublicKey": public_key, diff --git a/twilio/rest/accounts/v1/safelist.py b/twilio/rest/accounts/v1/safelist.py index ce4f33eba..9ba12c1e9 100644 --- a/twilio/rest/accounts/v1/safelist.py +++ b/twilio/rest/accounts/v1/safelist.py @@ -64,6 +64,7 @@ def create(self, phone_number: str) -> SafelistInstance: :returns: The created SafelistInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -86,6 +87,7 @@ async def create_async(self, phone_number: str) -> SafelistInstance: :returns: The created SafelistInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/api/v2010/account/__init__.py b/twilio/rest/api/v2010/account/__init__.py index fafb4f573..d45ee8018 100644 --- a/twilio/rest/api/v2010/account/__init__.py +++ b/twilio/rest/api/v2010/account/__init__.py @@ -821,6 +821,7 @@ def create( :returns: The created AccountInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -845,6 +846,7 @@ async def create_async( :returns: The created AccountInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/api/v2010/account/address/__init__.py b/twilio/rest/api/v2010/account/address/__init__.py index 224601e27..2c52ef902 100644 --- a/twilio/rest/api/v2010/account/address/__init__.py +++ b/twilio/rest/api/v2010/account/address/__init__.py @@ -513,6 +513,7 @@ def create( :returns: The created AddressInstance """ + data = values.of( { "CustomerName": customer_name, @@ -567,6 +568,7 @@ async def create_async( :returns: The created AddressInstance """ + data = values.of( { "CustomerName": customer_name, diff --git a/twilio/rest/api/v2010/account/application.py b/twilio/rest/api/v2010/account/application.py index 5179d5d55..d11dc6f7c 100644 --- a/twilio/rest/api/v2010/account/application.py +++ b/twilio/rest/api/v2010/account/application.py @@ -602,6 +602,7 @@ def create( :returns: The created ApplicationInstance """ + data = values.of( { "ApiVersion": api_version, @@ -674,6 +675,7 @@ async def create_async( :returns: The created ApplicationInstance """ + data = values.of( { "ApiVersion": api_version, diff --git a/twilio/rest/api/v2010/account/authorized_connect_app.py b/twilio/rest/api/v2010/account/authorized_connect_app.py index a62da5a76..4d71766b6 100644 --- a/twilio/rest/api/v2010/account/authorized_connect_app.py +++ b/twilio/rest/api/v2010/account/authorized_connect_app.py @@ -13,8 +13,9 @@ """ +from datetime import datetime from typing import Any, Dict, List, Optional, Union, Iterator, AsyncIterator -from twilio.base import values +from twilio.base import deserialize, values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource @@ -34,6 +35,8 @@ class Permission(object): :ivar connect_app_friendly_name: The name of the Connect App. :ivar connect_app_homepage_url: The public URL for the Connect App. :ivar connect_app_sid: The SID that we assigned to the Connect App. + :ivar date_created: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + :ivar date_updated: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. :ivar permissions: The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`. :ivar uri: The URI of the resource, relative to `https://api.twilio.com`. """ @@ -61,6 +64,12 @@ def __init__( "connect_app_homepage_url" ) self.connect_app_sid: Optional[str] = payload.get("connect_app_sid") + self.date_created: Optional[datetime] = deserialize.rfc2822_datetime( + payload.get("date_created") + ) + self.date_updated: Optional[datetime] = deserialize.rfc2822_datetime( + payload.get("date_updated") + ) self.permissions: Optional[ List["AuthorizedConnectAppInstance.Permission"] ] = payload.get("permissions") diff --git a/twilio/rest/api/v2010/account/call/__init__.py b/twilio/rest/api/v2010/account/call/__init__.py index 7c969eff7..ad669dd72 100644 --- a/twilio/rest/api/v2010/account/call/__init__.py +++ b/twilio/rest/api/v2010/account/call/__init__.py @@ -785,6 +785,7 @@ def create( :returns: The created CallInstance """ + data = values.of( { "To": to, @@ -918,6 +919,7 @@ async def create_async( :returns: The created CallInstance """ + data = values.of( { "To": to, @@ -979,11 +981,7 @@ def stream( parent_call_sid: Union[str, object] = values.unset, status: Union["CallInstance.Status", object] = values.unset, start_time: Union[datetime, object] = values.unset, - start_time_before: Union[datetime, object] = values.unset, - start_time_after: Union[datetime, object] = values.unset, end_time: Union[datetime, object] = values.unset, - end_time_before: Union[datetime, object] = values.unset, - end_time_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> Iterator[CallInstance]: @@ -998,11 +996,7 @@ def stream( :param str parent_call_sid: Only include calls spawned by calls with this SID. :param "CallInstance.Status" status: The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. :param datetime start_time: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_before: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_after: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. :param datetime end_time: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_before: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_after: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -1019,11 +1013,7 @@ def stream( parent_call_sid=parent_call_sid, status=status, start_time=start_time, - start_time_before=start_time_before, - start_time_after=start_time_after, end_time=end_time, - end_time_before=end_time_before, - end_time_after=end_time_after, page_size=limits["page_size"], ) @@ -1036,11 +1026,7 @@ async def stream_async( parent_call_sid: Union[str, object] = values.unset, status: Union["CallInstance.Status", object] = values.unset, start_time: Union[datetime, object] = values.unset, - start_time_before: Union[datetime, object] = values.unset, - start_time_after: Union[datetime, object] = values.unset, end_time: Union[datetime, object] = values.unset, - end_time_before: Union[datetime, object] = values.unset, - end_time_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> AsyncIterator[CallInstance]: @@ -1055,11 +1041,7 @@ async def stream_async( :param str parent_call_sid: Only include calls spawned by calls with this SID. :param "CallInstance.Status" status: The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. :param datetime start_time: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_before: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_after: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. :param datetime end_time: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_before: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_after: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -1076,11 +1058,7 @@ async def stream_async( parent_call_sid=parent_call_sid, status=status, start_time=start_time, - start_time_before=start_time_before, - start_time_after=start_time_after, end_time=end_time, - end_time_before=end_time_before, - end_time_after=end_time_after, page_size=limits["page_size"], ) @@ -1093,11 +1071,7 @@ def list( parent_call_sid: Union[str, object] = values.unset, status: Union["CallInstance.Status", object] = values.unset, start_time: Union[datetime, object] = values.unset, - start_time_before: Union[datetime, object] = values.unset, - start_time_after: Union[datetime, object] = values.unset, end_time: Union[datetime, object] = values.unset, - end_time_before: Union[datetime, object] = values.unset, - end_time_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> List[CallInstance]: @@ -1111,11 +1085,7 @@ def list( :param str parent_call_sid: Only include calls spawned by calls with this SID. :param "CallInstance.Status" status: The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. :param datetime start_time: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_before: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_after: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. :param datetime end_time: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_before: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_after: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -1132,11 +1102,7 @@ def list( parent_call_sid=parent_call_sid, status=status, start_time=start_time, - start_time_before=start_time_before, - start_time_after=start_time_after, end_time=end_time, - end_time_before=end_time_before, - end_time_after=end_time_after, limit=limit, page_size=page_size, ) @@ -1149,11 +1115,7 @@ async def list_async( parent_call_sid: Union[str, object] = values.unset, status: Union["CallInstance.Status", object] = values.unset, start_time: Union[datetime, object] = values.unset, - start_time_before: Union[datetime, object] = values.unset, - start_time_after: Union[datetime, object] = values.unset, end_time: Union[datetime, object] = values.unset, - end_time_before: Union[datetime, object] = values.unset, - end_time_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> List[CallInstance]: @@ -1167,11 +1129,7 @@ async def list_async( :param str parent_call_sid: Only include calls spawned by calls with this SID. :param "CallInstance.Status" status: The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. :param datetime start_time: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_before: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param datetime start_time_after: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. :param datetime end_time: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_before: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param datetime end_time_after: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -1189,11 +1147,7 @@ async def list_async( parent_call_sid=parent_call_sid, status=status, start_time=start_time, - start_time_before=start_time_before, - start_time_after=start_time_after, end_time=end_time, - end_time_before=end_time_before, - end_time_after=end_time_after, limit=limit, page_size=page_size, ) @@ -1206,11 +1160,7 @@ def page( parent_call_sid: Union[str, object] = values.unset, status: Union["CallInstance.Status", object] = values.unset, start_time: Union[datetime, object] = values.unset, - start_time_before: Union[datetime, object] = values.unset, - start_time_after: Union[datetime, object] = values.unset, end_time: Union[datetime, object] = values.unset, - end_time_before: Union[datetime, object] = values.unset, - end_time_after: Union[datetime, object] = values.unset, page_token: Union[str, object] = values.unset, page_number: Union[int, object] = values.unset, page_size: Union[int, object] = values.unset, @@ -1224,11 +1174,7 @@ def page( :param parent_call_sid: Only include calls spawned by calls with this SID. :param status: The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. :param start_time: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param start_time_before: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param start_time_after: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. :param end_time: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param end_time_before: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param end_time_after: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state :param page_size: Number of records to return, defaults to 50 @@ -1242,11 +1188,7 @@ def page( "ParentCallSid": parent_call_sid, "Status": status, "StartTime": serialize.iso8601_datetime(start_time), - "StartTime<": serialize.iso8601_datetime(start_time_before), - "StartTime>": serialize.iso8601_datetime(start_time_after), "EndTime": serialize.iso8601_datetime(end_time), - "EndTime<": serialize.iso8601_datetime(end_time_before), - "EndTime>": serialize.iso8601_datetime(end_time_after), "PageToken": page_token, "Page": page_number, "PageSize": page_size, @@ -1263,11 +1205,7 @@ async def page_async( parent_call_sid: Union[str, object] = values.unset, status: Union["CallInstance.Status", object] = values.unset, start_time: Union[datetime, object] = values.unset, - start_time_before: Union[datetime, object] = values.unset, - start_time_after: Union[datetime, object] = values.unset, end_time: Union[datetime, object] = values.unset, - end_time_before: Union[datetime, object] = values.unset, - end_time_after: Union[datetime, object] = values.unset, page_token: Union[str, object] = values.unset, page_number: Union[int, object] = values.unset, page_size: Union[int, object] = values.unset, @@ -1281,11 +1219,7 @@ async def page_async( :param parent_call_sid: Only include calls spawned by calls with this SID. :param status: The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. :param start_time: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param start_time_before: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - :param start_time_after: Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. :param end_time: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param end_time_before: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - :param end_time_after: Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state :param page_size: Number of records to return, defaults to 50 @@ -1299,11 +1233,7 @@ async def page_async( "ParentCallSid": parent_call_sid, "Status": status, "StartTime": serialize.iso8601_datetime(start_time), - "StartTime<": serialize.iso8601_datetime(start_time_before), - "StartTime>": serialize.iso8601_datetime(start_time_after), "EndTime": serialize.iso8601_datetime(end_time), - "EndTime<": serialize.iso8601_datetime(end_time_before), - "EndTime>": serialize.iso8601_datetime(end_time_after), "PageToken": page_token, "Page": page_number, "PageSize": page_size, diff --git a/twilio/rest/api/v2010/account/call/feedback_summary.py b/twilio/rest/api/v2010/account/call/feedback_summary.py index fcfb4e0ab..a856fda5a 100644 --- a/twilio/rest/api/v2010/account/call/feedback_summary.py +++ b/twilio/rest/api/v2010/account/call/feedback_summary.py @@ -70,7 +70,7 @@ def __init__( payload.get("end_date") ) self.include_subaccounts: Optional[bool] = payload.get("include_subaccounts") - self.issues: Optional[List[object]] = payload.get("issues") + self.issues: Optional[List[Dict[str, object]]] = payload.get("issues") self.quality_score_average: Optional[float] = deserialize.decimal( payload.get("quality_score_average") ) @@ -286,6 +286,7 @@ def create( :returns: The created FeedbackSummaryInstance """ + data = values.of( { "StartDate": serialize.iso8601_date(start_date), @@ -325,6 +326,7 @@ async def create_async( :returns: The created FeedbackSummaryInstance """ + data = values.of( { "StartDate": serialize.iso8601_date(start_date), diff --git a/twilio/rest/api/v2010/account/call/payment.py b/twilio/rest/api/v2010/account/call/payment.py index 10d00441b..223397191 100644 --- a/twilio/rest/api/v2010/account/call/payment.py +++ b/twilio/rest/api/v2010/account/call/payment.py @@ -338,6 +338,7 @@ def create( :returns: The created PaymentInstance """ + data = values.of( { "IdempotencyKey": idempotency_key, @@ -415,6 +416,7 @@ async def create_async( :returns: The created PaymentInstance """ + data = values.of( { "IdempotencyKey": idempotency_key, diff --git a/twilio/rest/api/v2010/account/call/recording.py b/twilio/rest/api/v2010/account/call/recording.py index 7ca36f3e0..99ed688ea 100644 --- a/twilio/rest/api/v2010/account/call/recording.py +++ b/twilio/rest/api/v2010/account/call/recording.py @@ -438,6 +438,7 @@ def create( :returns: The created RecordingInstance """ + data = values.of( { "RecordingStatusCallbackEvent": serialize.map( @@ -485,6 +486,7 @@ async def create_async( :returns: The created RecordingInstance """ + data = values.of( { "RecordingStatusCallbackEvent": serialize.map( diff --git a/twilio/rest/api/v2010/account/call/siprec.py b/twilio/rest/api/v2010/account/call/siprec.py index 86bfd5c6b..23b8cfbe3 100644 --- a/twilio/rest/api/v2010/account/call/siprec.py +++ b/twilio/rest/api/v2010/account/call/siprec.py @@ -651,6 +651,7 @@ def create( :returns: The created SiprecInstance """ + data = values.of( { "Name": name, @@ -1287,6 +1288,7 @@ async def create_async( :returns: The created SiprecInstance """ + data = values.of( { "Name": name, diff --git a/twilio/rest/api/v2010/account/call/stream.py b/twilio/rest/api/v2010/account/call/stream.py index 1999e9379..949d6dc19 100644 --- a/twilio/rest/api/v2010/account/call/stream.py +++ b/twilio/rest/api/v2010/account/call/stream.py @@ -653,6 +653,7 @@ def create( :returns: The created StreamInstance """ + data = values.of( { "Url": url, @@ -1289,6 +1290,7 @@ async def create_async( :returns: The created StreamInstance """ + data = values.of( { "Url": url, diff --git a/twilio/rest/api/v2010/account/call/user_defined_message.py b/twilio/rest/api/v2010/account/call/user_defined_message.py index 0beef389d..2aef221eb 100644 --- a/twilio/rest/api/v2010/account/call/user_defined_message.py +++ b/twilio/rest/api/v2010/account/call/user_defined_message.py @@ -92,6 +92,7 @@ def create( :returns: The created UserDefinedMessageInstance """ + data = values.of( { "Content": content, @@ -123,6 +124,7 @@ async def create_async( :returns: The created UserDefinedMessageInstance """ + data = values.of( { "Content": content, diff --git a/twilio/rest/api/v2010/account/call/user_defined_message_subscription.py b/twilio/rest/api/v2010/account/call/user_defined_message_subscription.py index c34905dcd..8d90b7bf5 100644 --- a/twilio/rest/api/v2010/account/call/user_defined_message_subscription.py +++ b/twilio/rest/api/v2010/account/call/user_defined_message_subscription.py @@ -198,6 +198,7 @@ def create( :returns: The created UserDefinedMessageSubscriptionInstance """ + data = values.of( { "Callback": callback, @@ -234,6 +235,7 @@ async def create_async( :returns: The created UserDefinedMessageSubscriptionInstance """ + data = values.of( { "Callback": callback, diff --git a/twilio/rest/api/v2010/account/conference/__init__.py b/twilio/rest/api/v2010/account/conference/__init__.py index 062c7013e..776ee6c4a 100644 --- a/twilio/rest/api/v2010/account/conference/__init__.py +++ b/twilio/rest/api/v2010/account/conference/__init__.py @@ -409,11 +409,7 @@ def __init__(self, version: Version, account_sid: str): def stream( self, date_created: Union[date, object] = values.unset, - date_created_before: Union[date, object] = values.unset, - date_created_after: Union[date, object] = values.unset, date_updated: Union[date, object] = values.unset, - date_updated_before: Union[date, object] = values.unset, - date_updated_after: Union[date, object] = values.unset, friendly_name: Union[str, object] = values.unset, status: Union["ConferenceInstance.Status", object] = values.unset, limit: Optional[int] = None, @@ -426,11 +422,7 @@ def stream( The results are returned as a generator, so this operation is memory efficient. :param date date_created: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_before: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_after: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. :param date date_updated: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_before: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_after: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. :param str friendly_name: The string that identifies the Conference resources to read. :param "ConferenceInstance.Status" status: The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. :param limit: Upper limit for the number of records to return. stream() @@ -445,11 +437,7 @@ def stream( limits = self._version.read_limits(limit, page_size) page = self.page( date_created=date_created, - date_created_before=date_created_before, - date_created_after=date_created_after, date_updated=date_updated, - date_updated_before=date_updated_before, - date_updated_after=date_updated_after, friendly_name=friendly_name, status=status, page_size=limits["page_size"], @@ -460,11 +448,7 @@ def stream( async def stream_async( self, date_created: Union[date, object] = values.unset, - date_created_before: Union[date, object] = values.unset, - date_created_after: Union[date, object] = values.unset, date_updated: Union[date, object] = values.unset, - date_updated_before: Union[date, object] = values.unset, - date_updated_after: Union[date, object] = values.unset, friendly_name: Union[str, object] = values.unset, status: Union["ConferenceInstance.Status", object] = values.unset, limit: Optional[int] = None, @@ -477,11 +461,7 @@ async def stream_async( The results are returned as a generator, so this operation is memory efficient. :param date date_created: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_before: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_after: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. :param date date_updated: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_before: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_after: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. :param str friendly_name: The string that identifies the Conference resources to read. :param "ConferenceInstance.Status" status: The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. :param limit: Upper limit for the number of records to return. stream() @@ -496,11 +476,7 @@ async def stream_async( limits = self._version.read_limits(limit, page_size) page = await self.page_async( date_created=date_created, - date_created_before=date_created_before, - date_created_after=date_created_after, date_updated=date_updated, - date_updated_before=date_updated_before, - date_updated_after=date_updated_after, friendly_name=friendly_name, status=status, page_size=limits["page_size"], @@ -511,11 +487,7 @@ async def stream_async( def list( self, date_created: Union[date, object] = values.unset, - date_created_before: Union[date, object] = values.unset, - date_created_after: Union[date, object] = values.unset, date_updated: Union[date, object] = values.unset, - date_updated_before: Union[date, object] = values.unset, - date_updated_after: Union[date, object] = values.unset, friendly_name: Union[str, object] = values.unset, status: Union["ConferenceInstance.Status", object] = values.unset, limit: Optional[int] = None, @@ -527,11 +499,7 @@ def list( memory before returning. :param date date_created: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_before: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_after: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. :param date date_updated: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_before: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_after: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. :param str friendly_name: The string that identifies the Conference resources to read. :param "ConferenceInstance.Status" status: The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. :param limit: Upper limit for the number of records to return. list() guarantees @@ -546,11 +514,7 @@ def list( return list( self.stream( date_created=date_created, - date_created_before=date_created_before, - date_created_after=date_created_after, date_updated=date_updated, - date_updated_before=date_updated_before, - date_updated_after=date_updated_after, friendly_name=friendly_name, status=status, limit=limit, @@ -561,11 +525,7 @@ def list( async def list_async( self, date_created: Union[date, object] = values.unset, - date_created_before: Union[date, object] = values.unset, - date_created_after: Union[date, object] = values.unset, date_updated: Union[date, object] = values.unset, - date_updated_before: Union[date, object] = values.unset, - date_updated_after: Union[date, object] = values.unset, friendly_name: Union[str, object] = values.unset, status: Union["ConferenceInstance.Status", object] = values.unset, limit: Optional[int] = None, @@ -577,11 +537,7 @@ async def list_async( memory before returning. :param date date_created: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_before: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date date_created_after: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. :param date date_updated: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_before: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date date_updated_after: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. :param str friendly_name: The string that identifies the Conference resources to read. :param "ConferenceInstance.Status" status: The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. :param limit: Upper limit for the number of records to return. list() guarantees @@ -597,11 +553,7 @@ async def list_async( record async for record in await self.stream_async( date_created=date_created, - date_created_before=date_created_before, - date_created_after=date_created_after, date_updated=date_updated, - date_updated_before=date_updated_before, - date_updated_after=date_updated_after, friendly_name=friendly_name, status=status, limit=limit, @@ -612,11 +564,7 @@ async def list_async( def page( self, date_created: Union[date, object] = values.unset, - date_created_before: Union[date, object] = values.unset, - date_created_after: Union[date, object] = values.unset, date_updated: Union[date, object] = values.unset, - date_updated_before: Union[date, object] = values.unset, - date_updated_after: Union[date, object] = values.unset, friendly_name: Union[str, object] = values.unset, status: Union["ConferenceInstance.Status", object] = values.unset, page_token: Union[str, object] = values.unset, @@ -628,11 +576,7 @@ def page( Request is executed immediately :param date_created: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date_created_before: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date_created_after: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. :param date_updated: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date_updated_before: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date_updated_after: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. :param friendly_name: The string that identifies the Conference resources to read. :param status: The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. :param page_token: PageToken provided by the API @@ -644,11 +588,7 @@ def page( data = values.of( { "DateCreated": serialize.iso8601_date(date_created), - "DateCreated<": serialize.iso8601_date(date_created_before), - "DateCreated>": serialize.iso8601_date(date_created_after), "DateUpdated": serialize.iso8601_date(date_updated), - "DateUpdated<": serialize.iso8601_date(date_updated_before), - "DateUpdated>": serialize.iso8601_date(date_updated_after), "FriendlyName": friendly_name, "Status": status, "PageToken": page_token, @@ -663,11 +603,7 @@ def page( async def page_async( self, date_created: Union[date, object] = values.unset, - date_created_before: Union[date, object] = values.unset, - date_created_after: Union[date, object] = values.unset, date_updated: Union[date, object] = values.unset, - date_updated_before: Union[date, object] = values.unset, - date_updated_after: Union[date, object] = values.unset, friendly_name: Union[str, object] = values.unset, status: Union["ConferenceInstance.Status", object] = values.unset, page_token: Union[str, object] = values.unset, @@ -679,11 +615,7 @@ async def page_async( Request is executed immediately :param date_created: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date_created_before: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - :param date_created_after: The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. :param date_updated: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date_updated_before: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - :param date_updated_after: The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. :param friendly_name: The string that identifies the Conference resources to read. :param status: The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. :param page_token: PageToken provided by the API @@ -695,11 +627,7 @@ async def page_async( data = values.of( { "DateCreated": serialize.iso8601_date(date_created), - "DateCreated<": serialize.iso8601_date(date_created_before), - "DateCreated>": serialize.iso8601_date(date_created_after), "DateUpdated": serialize.iso8601_date(date_updated), - "DateUpdated<": serialize.iso8601_date(date_updated_before), - "DateUpdated>": serialize.iso8601_date(date_updated_after), "FriendlyName": friendly_name, "Status": status, "PageToken": page_token, diff --git a/twilio/rest/api/v2010/account/conference/participant.py b/twilio/rest/api/v2010/account/conference/participant.py index f1fa87fd8..c14ae1d5f 100644 --- a/twilio/rest/api/v2010/account/conference/participant.py +++ b/twilio/rest/api/v2010/account/conference/participant.py @@ -627,6 +627,7 @@ def create( :returns: The created ParticipantInstance """ + data = values.of( { "From": from_, @@ -808,6 +809,7 @@ async def create_async( :returns: The created ParticipantInstance """ + data = values.of( { "From": from_, diff --git a/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py b/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py index 121d2f03c..f26c7589b 100644 --- a/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py +++ b/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py @@ -807,6 +807,7 @@ def create( :returns: The created IncomingPhoneNumberInstance """ + data = values.of( { "ApiVersion": api_version, @@ -907,6 +908,7 @@ async def create_async( :returns: The created IncomingPhoneNumberInstance """ + data = values.of( { "ApiVersion": api_version, diff --git a/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py b/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py index 4b04d7525..645d0e846 100644 --- a/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py +++ b/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py @@ -313,6 +313,7 @@ def create(self, installed_add_on_sid: str) -> AssignedAddOnInstance: :returns: The created AssignedAddOnInstance """ + data = values.of( { "InstalledAddOnSid": installed_add_on_sid, @@ -340,6 +341,7 @@ async def create_async(self, installed_add_on_sid: str) -> AssignedAddOnInstance :returns: The created AssignedAddOnInstance """ + data = values.of( { "InstalledAddOnSid": installed_add_on_sid, diff --git a/twilio/rest/api/v2010/account/incoming_phone_number/local.py b/twilio/rest/api/v2010/account/incoming_phone_number/local.py index 4af79dcf8..eb69e05c0 100644 --- a/twilio/rest/api/v2010/account/incoming_phone_number/local.py +++ b/twilio/rest/api/v2010/account/incoming_phone_number/local.py @@ -247,6 +247,7 @@ def create( :returns: The created LocalInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -342,6 +343,7 @@ async def create_async( :returns: The created LocalInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/api/v2010/account/incoming_phone_number/mobile.py b/twilio/rest/api/v2010/account/incoming_phone_number/mobile.py index 2ab5a652c..7acd28c0f 100644 --- a/twilio/rest/api/v2010/account/incoming_phone_number/mobile.py +++ b/twilio/rest/api/v2010/account/incoming_phone_number/mobile.py @@ -249,6 +249,7 @@ def create( :returns: The created MobileInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -346,6 +347,7 @@ async def create_async( :returns: The created MobileInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/api/v2010/account/incoming_phone_number/toll_free.py b/twilio/rest/api/v2010/account/incoming_phone_number/toll_free.py index 3b995504a..7d8592e90 100644 --- a/twilio/rest/api/v2010/account/incoming_phone_number/toll_free.py +++ b/twilio/rest/api/v2010/account/incoming_phone_number/toll_free.py @@ -249,6 +249,7 @@ def create( :returns: The created TollFreeInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -346,6 +347,7 @@ async def create_async( :returns: The created TollFreeInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/api/v2010/account/message/__init__.py b/twilio/rest/api/v2010/account/message/__init__.py index c521973e9..ac76c085a 100644 --- a/twilio/rest/api/v2010/account/message/__init__.py +++ b/twilio/rest/api/v2010/account/message/__init__.py @@ -529,6 +529,7 @@ def create( :returns: The created MessageInstance """ + data = values.of( { "To": to, @@ -626,6 +627,7 @@ async def create_async( :returns: The created MessageInstance """ + data = values.of( { "To": to, @@ -669,8 +671,6 @@ def stream( to: Union[str, object] = values.unset, from_: Union[str, object] = values.unset, date_sent: Union[datetime, object] = values.unset, - date_sent_before: Union[datetime, object] = values.unset, - date_sent_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> Iterator[MessageInstance]: @@ -683,8 +683,6 @@ def stream( :param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` :param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` :param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -696,12 +694,7 @@ def stream( """ limits = self._version.read_limits(limit, page_size) page = self.page( - to=to, - from_=from_, - date_sent=date_sent, - date_sent_before=date_sent_before, - date_sent_after=date_sent_after, - page_size=limits["page_size"], + to=to, from_=from_, date_sent=date_sent, page_size=limits["page_size"] ) return self._version.stream(page, limits["limit"]) @@ -711,8 +704,6 @@ async def stream_async( to: Union[str, object] = values.unset, from_: Union[str, object] = values.unset, date_sent: Union[datetime, object] = values.unset, - date_sent_before: Union[datetime, object] = values.unset, - date_sent_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> AsyncIterator[MessageInstance]: @@ -725,8 +716,6 @@ async def stream_async( :param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` :param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` :param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -738,12 +727,7 @@ async def stream_async( """ limits = self._version.read_limits(limit, page_size) page = await self.page_async( - to=to, - from_=from_, - date_sent=date_sent, - date_sent_before=date_sent_before, - date_sent_after=date_sent_after, - page_size=limits["page_size"], + to=to, from_=from_, date_sent=date_sent, page_size=limits["page_size"] ) return self._version.stream_async(page, limits["limit"]) @@ -753,8 +737,6 @@ def list( to: Union[str, object] = values.unset, from_: Union[str, object] = values.unset, date_sent: Union[datetime, object] = values.unset, - date_sent_before: Union[datetime, object] = values.unset, - date_sent_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> List[MessageInstance]: @@ -766,8 +748,6 @@ def list( :param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` :param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` :param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -782,8 +762,6 @@ def list( to=to, from_=from_, date_sent=date_sent, - date_sent_before=date_sent_before, - date_sent_after=date_sent_after, limit=limit, page_size=page_size, ) @@ -794,8 +772,6 @@ async def list_async( to: Union[str, object] = values.unset, from_: Union[str, object] = values.unset, date_sent: Union[datetime, object] = values.unset, - date_sent_before: Union[datetime, object] = values.unset, - date_sent_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> List[MessageInstance]: @@ -807,8 +783,6 @@ async def list_async( :param str to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` :param str from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` :param datetime date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param datetime date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -824,8 +798,6 @@ async def list_async( to=to, from_=from_, date_sent=date_sent, - date_sent_before=date_sent_before, - date_sent_after=date_sent_after, limit=limit, page_size=page_size, ) @@ -836,8 +808,6 @@ def page( to: Union[str, object] = values.unset, from_: Union[str, object] = values.unset, date_sent: Union[datetime, object] = values.unset, - date_sent_before: Union[datetime, object] = values.unset, - date_sent_after: Union[datetime, object] = values.unset, page_token: Union[str, object] = values.unset, page_number: Union[int, object] = values.unset, page_size: Union[int, object] = values.unset, @@ -849,8 +819,6 @@ def page( :param to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` :param from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` :param date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state :param page_size: Number of records to return, defaults to 50 @@ -862,8 +830,6 @@ def page( "To": to, "From": from_, "DateSent": serialize.iso8601_datetime(date_sent), - "DateSent<": serialize.iso8601_datetime(date_sent_before), - "DateSent>": serialize.iso8601_datetime(date_sent_after), "PageToken": page_token, "Page": page_number, "PageSize": page_size, @@ -878,8 +844,6 @@ async def page_async( to: Union[str, object] = values.unset, from_: Union[str, object] = values.unset, date_sent: Union[datetime, object] = values.unset, - date_sent_before: Union[datetime, object] = values.unset, - date_sent_after: Union[datetime, object] = values.unset, page_token: Union[str, object] = values.unset, page_number: Union[int, object] = values.unset, page_size: Union[int, object] = values.unset, @@ -891,8 +855,6 @@ async def page_async( :param to: Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111` :param from_: Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999` :param date_sent: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param date_sent_before: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). - :param date_sent_after: Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state :param page_size: Number of records to return, defaults to 50 @@ -904,8 +866,6 @@ async def page_async( "To": to, "From": from_, "DateSent": serialize.iso8601_datetime(date_sent), - "DateSent<": serialize.iso8601_datetime(date_sent_before), - "DateSent>": serialize.iso8601_datetime(date_sent_after), "PageToken": page_token, "Page": page_number, "PageSize": page_size, diff --git a/twilio/rest/api/v2010/account/message/feedback.py b/twilio/rest/api/v2010/account/message/feedback.py index 7c371ee88..61a23207c 100644 --- a/twilio/rest/api/v2010/account/message/feedback.py +++ b/twilio/rest/api/v2010/account/message/feedback.py @@ -104,6 +104,7 @@ def create( :returns: The created FeedbackInstance """ + data = values.of( { "Outcome": outcome, @@ -133,6 +134,7 @@ async def create_async( :returns: The created FeedbackInstance """ + data = values.of( { "Outcome": outcome, diff --git a/twilio/rest/api/v2010/account/new_key.py b/twilio/rest/api/v2010/account/new_key.py index e7af236eb..2f1015cf0 100644 --- a/twilio/rest/api/v2010/account/new_key.py +++ b/twilio/rest/api/v2010/account/new_key.py @@ -86,6 +86,7 @@ def create( :returns: The created NewKeyInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -112,6 +113,7 @@ async def create_async( :returns: The created NewKeyInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/api/v2010/account/new_signing_key.py b/twilio/rest/api/v2010/account/new_signing_key.py index d24e833b8..45f32b50d 100644 --- a/twilio/rest/api/v2010/account/new_signing_key.py +++ b/twilio/rest/api/v2010/account/new_signing_key.py @@ -86,6 +86,7 @@ def create( :returns: The created NewSigningKeyInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -112,6 +113,7 @@ async def create_async( :returns: The created NewSigningKeyInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/api/v2010/account/queue/__init__.py b/twilio/rest/api/v2010/account/queue/__init__.py index 73589708f..0d4530a4b 100644 --- a/twilio/rest/api/v2010/account/queue/__init__.py +++ b/twilio/rest/api/v2010/account/queue/__init__.py @@ -397,6 +397,7 @@ def create( :returns: The created QueueInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -425,6 +426,7 @@ async def create_async( :returns: The created QueueInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/api/v2010/account/sip/credential_list/__init__.py b/twilio/rest/api/v2010/account/sip/credential_list/__init__.py index 08ac5bcfe..e026e652d 100644 --- a/twilio/rest/api/v2010/account/sip/credential_list/__init__.py +++ b/twilio/rest/api/v2010/account/sip/credential_list/__init__.py @@ -368,6 +368,7 @@ def create(self, friendly_name: str) -> CredentialListInstance: :returns: The created CredentialListInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -392,6 +393,7 @@ async def create_async(self, friendly_name: str) -> CredentialListInstance: :returns: The created CredentialListInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/api/v2010/account/sip/credential_list/credential.py b/twilio/rest/api/v2010/account/sip/credential_list/credential.py index 585950c25..e40caaa32 100644 --- a/twilio/rest/api/v2010/account/sip/credential_list/credential.py +++ b/twilio/rest/api/v2010/account/sip/credential_list/credential.py @@ -366,6 +366,7 @@ def create(self, username: str, password: str) -> CredentialInstance: :returns: The created CredentialInstance """ + data = values.of( { "Username": username, @@ -395,6 +396,7 @@ async def create_async(self, username: str, password: str) -> CredentialInstance :returns: The created CredentialInstance """ + data = values.of( { "Username": username, diff --git a/twilio/rest/api/v2010/account/sip/domain/__init__.py b/twilio/rest/api/v2010/account/sip/domain/__init__.py index 29a2aaeb2..71174f32b 100644 --- a/twilio/rest/api/v2010/account/sip/domain/__init__.py +++ b/twilio/rest/api/v2010/account/sip/domain/__init__.py @@ -633,6 +633,7 @@ def create( :returns: The created DomainInstance """ + data = values.of( { "DomainName": domain_name, @@ -696,6 +697,7 @@ async def create_async( :returns: The created DomainInstance """ + data = values.of( { "DomainName": domain_name, diff --git a/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.py b/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.py index c9cade64f..3ddec185c 100644 --- a/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.py +++ b/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.py @@ -281,6 +281,7 @@ def create( :returns: The created AuthCallsCredentialListMappingInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, @@ -310,6 +311,7 @@ async def create_async( :returns: The created AuthCallsCredentialListMappingInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, diff --git a/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.py b/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.py index f83393c37..c41010441 100644 --- a/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.py +++ b/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.py @@ -285,6 +285,7 @@ def create( :returns: The created AuthCallsIpAccessControlListMappingInstance """ + data = values.of( { "IpAccessControlListSid": ip_access_control_list_sid, @@ -314,6 +315,7 @@ async def create_async( :returns: The created AuthCallsIpAccessControlListMappingInstance """ + data = values.of( { "IpAccessControlListSid": ip_access_control_list_sid, diff --git a/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.py b/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.py index a63a6e329..37f05c758 100644 --- a/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.py +++ b/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.py @@ -281,6 +281,7 @@ def create( :returns: The created AuthRegistrationsCredentialListMappingInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, @@ -310,6 +311,7 @@ async def create_async( :returns: The created AuthRegistrationsCredentialListMappingInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, diff --git a/twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py b/twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py index 248e0ca37..81fb01281 100644 --- a/twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py +++ b/twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py @@ -277,6 +277,7 @@ def create(self, credential_list_sid: str) -> CredentialListMappingInstance: :returns: The created CredentialListMappingInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, @@ -306,6 +307,7 @@ async def create_async( :returns: The created CredentialListMappingInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, diff --git a/twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py b/twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py index cfe65e99d..bbea7ade3 100644 --- a/twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py +++ b/twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py @@ -283,6 +283,7 @@ def create( :returns: The created IpAccessControlListMappingInstance """ + data = values.of( { "IpAccessControlListSid": ip_access_control_list_sid, @@ -312,6 +313,7 @@ async def create_async( :returns: The created IpAccessControlListMappingInstance """ + data = values.of( { "IpAccessControlListSid": ip_access_control_list_sid, diff --git a/twilio/rest/api/v2010/account/sip/ip_access_control_list/__init__.py b/twilio/rest/api/v2010/account/sip/ip_access_control_list/__init__.py index fac56d857..33b219f39 100644 --- a/twilio/rest/api/v2010/account/sip/ip_access_control_list/__init__.py +++ b/twilio/rest/api/v2010/account/sip/ip_access_control_list/__init__.py @@ -372,6 +372,7 @@ def create(self, friendly_name: str) -> IpAccessControlListInstance: :returns: The created IpAccessControlListInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -396,6 +397,7 @@ async def create_async(self, friendly_name: str) -> IpAccessControlListInstance: :returns: The created IpAccessControlListInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/api/v2010/account/sip/ip_access_control_list/ip_address.py b/twilio/rest/api/v2010/account/sip/ip_access_control_list/ip_address.py index 2ce7f69f1..362b645fa 100644 --- a/twilio/rest/api/v2010/account/sip/ip_access_control_list/ip_address.py +++ b/twilio/rest/api/v2010/account/sip/ip_access_control_list/ip_address.py @@ -416,6 +416,7 @@ def create( :returns: The created IpAddressInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -452,6 +453,7 @@ async def create_async( :returns: The created IpAddressInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/api/v2010/account/token.py b/twilio/rest/api/v2010/account/token.py index 744bedd29..3d00c3cf0 100644 --- a/twilio/rest/api/v2010/account/token.py +++ b/twilio/rest/api/v2010/account/token.py @@ -88,6 +88,7 @@ def create(self, ttl: Union[int, object] = values.unset) -> TokenInstance: :returns: The created TokenInstance """ + data = values.of( { "Ttl": ttl, @@ -114,6 +115,7 @@ async def create_async( :returns: The created TokenInstance """ + data = values.of( { "Ttl": ttl, diff --git a/twilio/rest/api/v2010/account/usage/trigger.py b/twilio/rest/api/v2010/account/usage/trigger.py index bd165916e..67fd82f78 100644 --- a/twilio/rest/api/v2010/account/usage/trigger.py +++ b/twilio/rest/api/v2010/account/usage/trigger.py @@ -751,6 +751,7 @@ def create( :returns: The created TriggerInstance """ + data = values.of( { "CallbackUrl": callback_url, @@ -796,6 +797,7 @@ async def create_async( :returns: The created TriggerInstance """ + data = values.of( { "CallbackUrl": callback_url, diff --git a/twilio/rest/api/v2010/account/validation_request.py b/twilio/rest/api/v2010/account/validation_request.py index 84ef8ee25..d126cea26 100644 --- a/twilio/rest/api/v2010/account/validation_request.py +++ b/twilio/rest/api/v2010/account/validation_request.py @@ -94,6 +94,7 @@ def create( :returns: The created ValidationRequestInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -136,6 +137,7 @@ async def create_async( :returns: The created ValidationRequestInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/autopilot/v1/assistant/__init__.py b/twilio/rest/autopilot/v1/assistant/__init__.py index a25268fc4..0420e5a1d 100644 --- a/twilio/rest/autopilot/v1/assistant/__init__.py +++ b/twilio/rest/autopilot/v1/assistant/__init__.py @@ -608,6 +608,7 @@ def create( :returns: The created AssistantInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -651,6 +652,7 @@ async def create_async( :returns: The created AssistantInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/autopilot/v1/assistant/field_type/__init__.py b/twilio/rest/autopilot/v1/assistant/field_type/__init__.py index 4639a6e96..3dcee087b 100644 --- a/twilio/rest/autopilot/v1/assistant/field_type/__init__.py +++ b/twilio/rest/autopilot/v1/assistant/field_type/__init__.py @@ -395,6 +395,7 @@ def create( :returns: The created FieldTypeInstance """ + data = values.of( { "UniqueName": unique_name, @@ -423,6 +424,7 @@ async def create_async( :returns: The created FieldTypeInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/autopilot/v1/assistant/field_type/field_value.py b/twilio/rest/autopilot/v1/assistant/field_type/field_value.py index 38cb71161..ba38a9f3c 100644 --- a/twilio/rest/autopilot/v1/assistant/field_type/field_value.py +++ b/twilio/rest/autopilot/v1/assistant/field_type/field_value.py @@ -289,6 +289,7 @@ def create( :returns: The created FieldValueInstance """ + data = values.of( { "Language": language, @@ -322,6 +323,7 @@ async def create_async( :returns: The created FieldValueInstance """ + data = values.of( { "Language": language, diff --git a/twilio/rest/autopilot/v1/assistant/model_build.py b/twilio/rest/autopilot/v1/assistant/model_build.py index ccfb8a1c3..49db853f6 100644 --- a/twilio/rest/autopilot/v1/assistant/model_build.py +++ b/twilio/rest/autopilot/v1/assistant/model_build.py @@ -368,6 +368,7 @@ def create( :returns: The created ModelBuildInstance """ + data = values.of( { "StatusCallback": status_callback, @@ -398,6 +399,7 @@ async def create_async( :returns: The created ModelBuildInstance """ + data = values.of( { "StatusCallback": status_callback, diff --git a/twilio/rest/autopilot/v1/assistant/query.py b/twilio/rest/autopilot/v1/assistant/query.py index 500f6bb7f..0edad0924 100644 --- a/twilio/rest/autopilot/v1/assistant/query.py +++ b/twilio/rest/autopilot/v1/assistant/query.py @@ -386,6 +386,7 @@ def create( :returns: The created QueryInstance """ + data = values.of( { "Language": language, @@ -422,6 +423,7 @@ async def create_async( :returns: The created QueryInstance """ + data = values.of( { "Language": language, diff --git a/twilio/rest/autopilot/v1/assistant/task/__init__.py b/twilio/rest/autopilot/v1/assistant/task/__init__.py index c90b412ac..67c4f1792 100644 --- a/twilio/rest/autopilot/v1/assistant/task/__init__.py +++ b/twilio/rest/autopilot/v1/assistant/task/__init__.py @@ -491,6 +491,7 @@ def create( :returns: The created TaskInstance """ + data = values.of( { "UniqueName": unique_name, @@ -527,6 +528,7 @@ async def create_async( :returns: The created TaskInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/autopilot/v1/assistant/task/field.py b/twilio/rest/autopilot/v1/assistant/task/field.py index dc48c4465..b146201d5 100644 --- a/twilio/rest/autopilot/v1/assistant/task/field.py +++ b/twilio/rest/autopilot/v1/assistant/task/field.py @@ -282,6 +282,7 @@ def create(self, field_type: str, unique_name: str) -> FieldInstance: :returns: The created FieldInstance """ + data = values.of( { "FieldType": field_type, @@ -311,6 +312,7 @@ async def create_async(self, field_type: str, unique_name: str) -> FieldInstance :returns: The created FieldInstance """ + data = values.of( { "FieldType": field_type, diff --git a/twilio/rest/autopilot/v1/assistant/task/sample.py b/twilio/rest/autopilot/v1/assistant/task/sample.py index ce413aeaa..924ccb45d 100644 --- a/twilio/rest/autopilot/v1/assistant/task/sample.py +++ b/twilio/rest/autopilot/v1/assistant/task/sample.py @@ -406,6 +406,7 @@ def create( :returns: The created SampleInstance """ + data = values.of( { "Language": language, @@ -442,6 +443,7 @@ async def create_async( :returns: The created SampleInstance """ + data = values.of( { "Language": language, diff --git a/twilio/rest/autopilot/v1/assistant/webhook.py b/twilio/rest/autopilot/v1/assistant/webhook.py index 8a3e3da2f..02632d8aa 100644 --- a/twilio/rest/autopilot/v1/assistant/webhook.py +++ b/twilio/rest/autopilot/v1/assistant/webhook.py @@ -404,6 +404,7 @@ def create( :returns: The created WebhookInstance """ + data = values.of( { "UniqueName": unique_name, @@ -440,6 +441,7 @@ async def create_async( :returns: The created WebhookInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/bulkexports/v1/export/export_custom_job.py b/twilio/rest/bulkexports/v1/export/export_custom_job.py index 2c571489d..abb3015e4 100644 --- a/twilio/rest/bulkexports/v1/export/export_custom_job.py +++ b/twilio/rest/bulkexports/v1/export/export_custom_job.py @@ -127,6 +127,7 @@ def create( :returns: The created ExportCustomJobInstance """ + data = values.of( { "StartDay": start_day, @@ -169,6 +170,7 @@ async def create_async( :returns: The created ExportCustomJobInstance """ + data = values.of( { "StartDay": start_day, diff --git a/twilio/rest/chat/v1/credential.py b/twilio/rest/chat/v1/credential.py index ecdf1d58e..bf6350120 100644 --- a/twilio/rest/chat/v1/credential.py +++ b/twilio/rest/chat/v1/credential.py @@ -405,6 +405,7 @@ def create( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, @@ -448,6 +449,7 @@ async def create_async( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/chat/v1/service/__init__.py b/twilio/rest/chat/v1/service/__init__.py index f8a377057..be4e94681 100644 --- a/twilio/rest/chat/v1/service/__init__.py +++ b/twilio/rest/chat/v1/service/__init__.py @@ -1062,6 +1062,7 @@ def create(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -1084,6 +1085,7 @@ async def create_async(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/chat/v1/service/channel/__init__.py b/twilio/rest/chat/v1/service/channel/__init__.py index e04d95a43..46223702b 100644 --- a/twilio/rest/chat/v1/service/channel/__init__.py +++ b/twilio/rest/chat/v1/service/channel/__init__.py @@ -472,6 +472,7 @@ def create( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -508,6 +509,7 @@ async def create_async( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/chat/v1/service/channel/invite.py b/twilio/rest/chat/v1/service/channel/invite.py index e3dbbae07..3894abe54 100644 --- a/twilio/rest/chat/v1/service/channel/invite.py +++ b/twilio/rest/chat/v1/service/channel/invite.py @@ -288,6 +288,7 @@ def create( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, @@ -319,6 +320,7 @@ async def create_async( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/chat/v1/service/channel/member.py b/twilio/rest/chat/v1/service/channel/member.py index 62e3912bf..dc56780e7 100644 --- a/twilio/rest/chat/v1/service/channel/member.py +++ b/twilio/rest/chat/v1/service/channel/member.py @@ -398,6 +398,7 @@ def create( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, @@ -429,6 +430,7 @@ async def create_async( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/chat/v1/service/channel/message.py b/twilio/rest/chat/v1/service/channel/message.py index ad45b6eb5..6fea6a180 100644 --- a/twilio/rest/chat/v1/service/channel/message.py +++ b/twilio/rest/chat/v1/service/channel/message.py @@ -405,6 +405,7 @@ def create( :returns: The created MessageInstance """ + data = values.of( { "Body": body, @@ -441,6 +442,7 @@ async def create_async( :returns: The created MessageInstance """ + data = values.of( { "Body": body, diff --git a/twilio/rest/chat/v1/service/role.py b/twilio/rest/chat/v1/service/role.py index e1a5e5cd5..913969fa9 100644 --- a/twilio/rest/chat/v1/service/role.py +++ b/twilio/rest/chat/v1/service/role.py @@ -350,6 +350,7 @@ def create( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -380,6 +381,7 @@ async def create_async( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/chat/v1/service/user/__init__.py b/twilio/rest/chat/v1/service/user/__init__.py index fd6e9d6c4..316e773b0 100644 --- a/twilio/rest/chat/v1/service/user/__init__.py +++ b/twilio/rest/chat/v1/service/user/__init__.py @@ -423,6 +423,7 @@ def create( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, @@ -459,6 +460,7 @@ async def create_async( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/chat/v2/credential.py b/twilio/rest/chat/v2/credential.py index 4a3df30e9..1e49f78db 100644 --- a/twilio/rest/chat/v2/credential.py +++ b/twilio/rest/chat/v2/credential.py @@ -405,6 +405,7 @@ def create( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, @@ -448,6 +449,7 @@ async def create_async( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/chat/v2/service/__init__.py b/twilio/rest/chat/v2/service/__init__.py index 208805c7b..59d8b8a5f 100644 --- a/twilio/rest/chat/v2/service/__init__.py +++ b/twilio/rest/chat/v2/service/__init__.py @@ -823,6 +823,7 @@ def create(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -845,6 +846,7 @@ async def create_async(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/chat/v2/service/channel/__init__.py b/twilio/rest/chat/v2/service/channel/__init__.py index 14387550c..e78502079 100644 --- a/twilio/rest/chat/v2/service/channel/__init__.py +++ b/twilio/rest/chat/v2/service/channel/__init__.py @@ -604,6 +604,7 @@ def create( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -656,6 +657,7 @@ async def create_async( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/chat/v2/service/channel/invite.py b/twilio/rest/chat/v2/service/channel/invite.py index 3b89e94f8..bf4e7fbc5 100644 --- a/twilio/rest/chat/v2/service/channel/invite.py +++ b/twilio/rest/chat/v2/service/channel/invite.py @@ -288,6 +288,7 @@ def create( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, @@ -319,6 +320,7 @@ async def create_async( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/chat/v2/service/channel/member.py b/twilio/rest/chat/v2/service/channel/member.py index 0a43c7bd4..54e2aa407 100644 --- a/twilio/rest/chat/v2/service/channel/member.py +++ b/twilio/rest/chat/v2/service/channel/member.py @@ -531,6 +531,7 @@ def create( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, @@ -588,6 +589,7 @@ async def create_async( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/chat/v2/service/channel/message.py b/twilio/rest/chat/v2/service/channel/message.py index bda88dfab..3e1b289fd 100644 --- a/twilio/rest/chat/v2/service/channel/message.py +++ b/twilio/rest/chat/v2/service/channel/message.py @@ -535,6 +535,7 @@ def create( :returns: The created MessageInstance """ + data = values.of( { "From": from_, @@ -590,6 +591,7 @@ async def create_async( :returns: The created MessageInstance """ + data = values.of( { "From": from_, diff --git a/twilio/rest/chat/v2/service/channel/webhook.py b/twilio/rest/chat/v2/service/channel/webhook.py index 6e05e4174..e20ca2243 100644 --- a/twilio/rest/chat/v2/service/channel/webhook.py +++ b/twilio/rest/chat/v2/service/channel/webhook.py @@ -466,6 +466,7 @@ def create( :returns: The created WebhookInstance """ + data = values.of( { "Type": type, @@ -518,6 +519,7 @@ async def create_async( :returns: The created WebhookInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/chat/v2/service/role.py b/twilio/rest/chat/v2/service/role.py index 7f77ee6e4..4d636c71f 100644 --- a/twilio/rest/chat/v2/service/role.py +++ b/twilio/rest/chat/v2/service/role.py @@ -350,6 +350,7 @@ def create( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -380,6 +381,7 @@ async def create_async( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/chat/v2/service/user/__init__.py b/twilio/rest/chat/v2/service/user/__init__.py index 9e593863f..1c9e780d4 100644 --- a/twilio/rest/chat/v2/service/user/__init__.py +++ b/twilio/rest/chat/v2/service/user/__init__.py @@ -476,6 +476,7 @@ def create( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, @@ -519,6 +520,7 @@ async def create_async( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/content/v1/content/__init__.py b/twilio/rest/content/v1/content/__init__.py index 860d76fe3..b0eaaa0fa 100644 --- a/twilio/rest/content/v1/content/__init__.py +++ b/twilio/rest/content/v1/content/__init__.py @@ -34,7 +34,7 @@ class ContentInstance(InstanceResource): :ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient. :ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. :ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. - :ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. + :ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource. :ivar url: The URL of the resource, relative to `https://content.twilio.com`. :ivar links: A list of links related to the Content resource, such as approval_fetch and approval_create """ diff --git a/twilio/rest/content/v1/content_and_approvals.py b/twilio/rest/content/v1/content_and_approvals.py index f7bb8a53f..914376ea0 100644 --- a/twilio/rest/content/v1/content_and_approvals.py +++ b/twilio/rest/content/v1/content_and_approvals.py @@ -33,7 +33,7 @@ class ContentAndApprovalsInstance(InstanceResource): :ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient. :ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. :ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. - :ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. + :ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource. :ivar approval_requests: The submitted information and approval request status of the Content resource. """ diff --git a/twilio/rest/content/v1/legacy_content.py b/twilio/rest/content/v1/legacy_content.py index 73df90511..9a1370b98 100644 --- a/twilio/rest/content/v1/legacy_content.py +++ b/twilio/rest/content/v1/legacy_content.py @@ -33,7 +33,7 @@ class LegacyContentInstance(InstanceResource): :ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient. :ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. :ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. - :ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. + :ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource. :ivar legacy_template_name: The string name of the legacy content template associated with this Content resource, unique across all template names for its account. Only lowercase letters, numbers and underscores are allowed :ivar legacy_body: The string body field of the legacy content template associated with this Content resource :ivar url: The URL of the resource, relative to `https://content.twilio.com`. diff --git a/twilio/rest/conversations/v1/address_configuration.py b/twilio/rest/conversations/v1/address_configuration.py index ccaf87dee..5cfc0b9c8 100644 --- a/twilio/rest/conversations/v1/address_configuration.py +++ b/twilio/rest/conversations/v1/address_configuration.py @@ -498,6 +498,7 @@ def create( :returns: The created AddressConfigurationInstance """ + data = values.of( { "Type": type, @@ -562,6 +563,7 @@ async def create_async( :returns: The created AddressConfigurationInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/conversations/v1/conversation/__init__.py b/twilio/rest/conversations/v1/conversation/__init__.py index 88e12f1cc..e7ac784be 100644 --- a/twilio/rest/conversations/v1/conversation/__init__.py +++ b/twilio/rest/conversations/v1/conversation/__init__.py @@ -617,6 +617,7 @@ def create( :returns: The created ConversationInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -679,6 +680,7 @@ async def create_async( :returns: The created ConversationInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/conversations/v1/conversation/message/__init__.py b/twilio/rest/conversations/v1/conversation/message/__init__.py index 28b875e22..6ee1b8e49 100644 --- a/twilio/rest/conversations/v1/conversation/message/__init__.py +++ b/twilio/rest/conversations/v1/conversation/message/__init__.py @@ -50,7 +50,7 @@ class WebhookEnabledType(object): :ivar url: An absolute API resource API URL for this message. :ivar delivery: An object that contains the summary of delivery statuses for the message to non-chat participants. :ivar links: Contains an absolute API resource URL to access the delivery & read receipts of this message. - :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template. + :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template. """ def __init__( @@ -68,7 +68,7 @@ def __init__( self.index: Optional[int] = deserialize.integer(payload.get("index")) self.author: Optional[str] = payload.get("author") self.body: Optional[str] = payload.get("body") - self.media: Optional[List[object]] = payload.get("media") + self.media: Optional[List[Dict[str, object]]] = payload.get("media") self.attributes: Optional[str] = payload.get("attributes") self.participant_sid: Optional[str] = payload.get("participant_sid") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( @@ -540,12 +540,13 @@ def create( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. :returns: The created MessageInstance """ + data = values.of( { "Author": author, @@ -598,12 +599,13 @@ async def create_async( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. :returns: The created MessageInstance """ + data = values.of( { "Author": author, diff --git a/twilio/rest/conversations/v1/conversation/participant.py b/twilio/rest/conversations/v1/conversation/participant.py index 3f17d0a4e..a05f4085d 100644 --- a/twilio/rest/conversations/v1/conversation/participant.py +++ b/twilio/rest/conversations/v1/conversation/participant.py @@ -549,6 +549,7 @@ def create( :returns: The created ParticipantInstance """ + data = values.of( { "Identity": identity, @@ -604,6 +605,7 @@ async def create_async( :returns: The created ParticipantInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/conversations/v1/conversation/webhook.py b/twilio/rest/conversations/v1/conversation/webhook.py index 8b7493388..ddd49ede2 100644 --- a/twilio/rest/conversations/v1/conversation/webhook.py +++ b/twilio/rest/conversations/v1/conversation/webhook.py @@ -436,6 +436,7 @@ def create( :returns: The created WebhookInstance """ + data = values.of( { "Target": target, @@ -485,6 +486,7 @@ async def create_async( :returns: The created WebhookInstance """ + data = values.of( { "Target": target, diff --git a/twilio/rest/conversations/v1/credential.py b/twilio/rest/conversations/v1/credential.py index 0b6dfd828..c8b680a9c 100644 --- a/twilio/rest/conversations/v1/credential.py +++ b/twilio/rest/conversations/v1/credential.py @@ -417,6 +417,7 @@ def create( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, @@ -460,6 +461,7 @@ async def create_async( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/conversations/v1/role.py b/twilio/rest/conversations/v1/role.py index fb7626ce0..61e10ffec 100644 --- a/twilio/rest/conversations/v1/role.py +++ b/twilio/rest/conversations/v1/role.py @@ -323,6 +323,7 @@ def create( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -351,6 +352,7 @@ async def create_async( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/conversations/v1/service/__init__.py b/twilio/rest/conversations/v1/service/__init__.py index ad4066710..924df1fd2 100644 --- a/twilio/rest/conversations/v1/service/__init__.py +++ b/twilio/rest/conversations/v1/service/__init__.py @@ -373,6 +373,7 @@ def create(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -395,6 +396,7 @@ async def create_async(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/conversations/v1/service/conversation/__init__.py b/twilio/rest/conversations/v1/service/conversation/__init__.py index b3719682a..0fef1cffa 100644 --- a/twilio/rest/conversations/v1/service/conversation/__init__.py +++ b/twilio/rest/conversations/v1/service/conversation/__init__.py @@ -653,6 +653,7 @@ def create( :returns: The created ConversationInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -717,6 +718,7 @@ async def create_async( :returns: The created ConversationInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/conversations/v1/service/conversation/message/__init__.py b/twilio/rest/conversations/v1/service/conversation/message/__init__.py index a3cf06e06..06b72492c 100644 --- a/twilio/rest/conversations/v1/service/conversation/message/__init__.py +++ b/twilio/rest/conversations/v1/service/conversation/message/__init__.py @@ -51,7 +51,7 @@ class WebhookEnabledType(object): :ivar delivery: An object that contains the summary of delivery statuses for the message to non-chat participants. :ivar url: An absolute API resource URL for this message. :ivar links: Contains an absolute API resource URL to access the delivery & read receipts of this message. - :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template. + :ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template. """ def __init__( @@ -71,7 +71,7 @@ def __init__( self.index: Optional[int] = deserialize.integer(payload.get("index")) self.author: Optional[str] = payload.get("author") self.body: Optional[str] = payload.get("body") - self.media: Optional[List[object]] = payload.get("media") + self.media: Optional[List[Dict[str, object]]] = payload.get("media") self.attributes: Optional[str] = payload.get("attributes") self.participant_sid: Optional[str] = payload.get("participant_sid") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( @@ -559,12 +559,13 @@ def create( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. :returns: The created MessageInstance """ + data = values.of( { "Author": author, @@ -620,12 +621,13 @@ async def create_async( :param date_updated: The date that this resource was last updated. `null` if the message has not been edited. :param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. :param media_sid: The Media SID to be attached to the new Message. - :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. + :param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. :param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables. :param subject: The subject of the message, can be up to 256 characters long. :returns: The created MessageInstance """ + data = values.of( { "Author": author, diff --git a/twilio/rest/conversations/v1/service/conversation/participant.py b/twilio/rest/conversations/v1/service/conversation/participant.py index cf394affb..cf4fba5fa 100644 --- a/twilio/rest/conversations/v1/service/conversation/participant.py +++ b/twilio/rest/conversations/v1/service/conversation/participant.py @@ -567,6 +567,7 @@ def create( :returns: The created ParticipantInstance """ + data = values.of( { "Identity": identity, @@ -625,6 +626,7 @@ async def create_async( :returns: The created ParticipantInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/conversations/v1/service/conversation/webhook.py b/twilio/rest/conversations/v1/service/conversation/webhook.py index 88e848f35..5dace89d6 100644 --- a/twilio/rest/conversations/v1/service/conversation/webhook.py +++ b/twilio/rest/conversations/v1/service/conversation/webhook.py @@ -454,6 +454,7 @@ def create( :returns: The created WebhookInstance """ + data = values.of( { "Target": target, @@ -506,6 +507,7 @@ async def create_async( :returns: The created WebhookInstance """ + data = values.of( { "Target": target, diff --git a/twilio/rest/conversations/v1/service/role.py b/twilio/rest/conversations/v1/service/role.py index 2ae2c16fb..2adbfc131 100644 --- a/twilio/rest/conversations/v1/service/role.py +++ b/twilio/rest/conversations/v1/service/role.py @@ -350,6 +350,7 @@ def create( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -380,6 +381,7 @@ async def create_async( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/conversations/v1/service/user/__init__.py b/twilio/rest/conversations/v1/service/user/__init__.py index 01e0d3452..0f5e24b39 100644 --- a/twilio/rest/conversations/v1/service/user/__init__.py +++ b/twilio/rest/conversations/v1/service/user/__init__.py @@ -488,6 +488,7 @@ def create( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, @@ -531,6 +532,7 @@ async def create_async( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/conversations/v1/user/__init__.py b/twilio/rest/conversations/v1/user/__init__.py index 25eafb1c3..6b922afa7 100644 --- a/twilio/rest/conversations/v1/user/__init__.py +++ b/twilio/rest/conversations/v1/user/__init__.py @@ -458,6 +458,7 @@ def create( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, @@ -499,6 +500,7 @@ async def create_async( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/events/v1/sink/__init__.py b/twilio/rest/events/v1/sink/__init__.py index 5a7626ad8..89289ede3 100644 --- a/twilio/rest/events/v1/sink/__init__.py +++ b/twilio/rest/events/v1/sink/__init__.py @@ -378,6 +378,7 @@ def create( :returns: The created SinkInstance """ + data = values.of( { "Description": description, @@ -409,6 +410,7 @@ async def create_async( :returns: The created SinkInstance """ + data = values.of( { "Description": description, diff --git a/twilio/rest/events/v1/sink/sink_validate.py b/twilio/rest/events/v1/sink/sink_validate.py index 8539a1ef4..792d8c455 100644 --- a/twilio/rest/events/v1/sink/sink_validate.py +++ b/twilio/rest/events/v1/sink/sink_validate.py @@ -71,6 +71,7 @@ def create(self, test_id: str) -> SinkValidateInstance: :returns: The created SinkValidateInstance """ + data = values.of( { "TestId": test_id, @@ -93,6 +94,7 @@ async def create_async(self, test_id: str) -> SinkValidateInstance: :returns: The created SinkValidateInstance """ + data = values.of( { "TestId": test_id, diff --git a/twilio/rest/events/v1/subscription/__init__.py b/twilio/rest/events/v1/subscription/__init__.py index 458177d48..cbe79a985 100644 --- a/twilio/rest/events/v1/subscription/__init__.py +++ b/twilio/rest/events/v1/subscription/__init__.py @@ -364,6 +364,7 @@ def create( :returns: The created SubscriptionInstance """ + data = values.of( { "Description": description, @@ -392,6 +393,7 @@ async def create_async( :returns: The created SubscriptionInstance """ + data = values.of( { "Description": description, diff --git a/twilio/rest/events/v1/subscription/subscribed_event.py b/twilio/rest/events/v1/subscription/subscribed_event.py index 7cccb1cb8..4733b8e92 100644 --- a/twilio/rest/events/v1/subscription/subscribed_event.py +++ b/twilio/rest/events/v1/subscription/subscribed_event.py @@ -27,7 +27,7 @@ class SubscribedEventInstance(InstanceResource): """ :ivar account_sid: The unique SID identifier of the Account. :ivar type: Type of event being subscribed to. - :ivar schema_version: The schema version that the Subscription should use. + :ivar schema_version: The schema version that the subscription should use. :ivar subscription_sid: The unique SID identifier of the Subscription. :ivar url: The URL of this resource. """ @@ -113,7 +113,7 @@ def update( """ Update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -127,7 +127,7 @@ async def update_async( """ Asynchronous coroutine to update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -235,7 +235,7 @@ def update( """ Update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -264,7 +264,7 @@ async def update_async( """ Asynchronous coroutine to update the SubscribedEventInstance - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The updated SubscribedEventInstance """ @@ -343,10 +343,11 @@ def create( Create the SubscribedEventInstance :param type: Type of event being subscribed to. - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The created SubscribedEventInstance """ + data = values.of( { "Type": type, @@ -371,10 +372,11 @@ async def create_async( Asynchronously create the SubscribedEventInstance :param type: Type of event being subscribed to. - :param schema_version: The schema version that the Subscription should use. + :param schema_version: The schema version that the subscription should use. :returns: The created SubscribedEventInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/flex_api/v1/assessments.py b/twilio/rest/flex_api/v1/assessments.py index 036d0248c..b6b2e626a 100644 --- a/twilio/rest/flex_api/v1/assessments.py +++ b/twilio/rest/flex_api/v1/assessments.py @@ -307,6 +307,7 @@ def create( :returns: The created AssessmentsInstance """ + data = values.of( { "CategorySid": category_sid, @@ -364,6 +365,7 @@ async def create_async( :returns: The created AssessmentsInstance """ + data = values.of( { "CategorySid": category_sid, diff --git a/twilio/rest/flex_api/v1/channel.py b/twilio/rest/flex_api/v1/channel.py index cf2d76587..a9151604e 100644 --- a/twilio/rest/flex_api/v1/channel.py +++ b/twilio/rest/flex_api/v1/channel.py @@ -267,6 +267,7 @@ def create( :returns: The created ChannelInstance """ + data = values.of( { "FlexFlowSid": flex_flow_sid, @@ -319,6 +320,7 @@ async def create_async( :returns: The created ChannelInstance """ + data = values.of( { "FlexFlowSid": flex_flow_sid, diff --git a/twilio/rest/flex_api/v1/configuration.py b/twilio/rest/flex_api/v1/configuration.py index 24edb5eaa..c8ab6554b 100644 --- a/twilio/rest/flex_api/v1/configuration.py +++ b/twilio/rest/flex_api/v1/configuration.py @@ -100,10 +100,10 @@ def __init__(self, version: Version, payload: Dict[str, Any]): self.taskrouter_target_taskqueue_sid: Optional[str] = payload.get( "taskrouter_target_taskqueue_sid" ) - self.taskrouter_taskqueues: Optional[List[object]] = payload.get( + self.taskrouter_taskqueues: Optional[List[Dict[str, object]]] = payload.get( "taskrouter_taskqueues" ) - self.taskrouter_skills: Optional[List[object]] = payload.get( + self.taskrouter_skills: Optional[List[Dict[str, object]]] = payload.get( "taskrouter_skills" ) self.taskrouter_worker_channels: Optional[Dict[str, object]] = payload.get( @@ -152,7 +152,9 @@ def __init__(self, version: Version, payload: Dict[str, Any]): self.plugin_service_attributes: Optional[Dict[str, object]] = payload.get( "plugin_service_attributes" ) - self.integrations: Optional[List[object]] = payload.get("integrations") + self.integrations: Optional[List[Dict[str, object]]] = payload.get( + "integrations" + ) self.outbound_call_flows: Optional[Dict[str, object]] = payload.get( "outbound_call_flows" ) @@ -172,7 +174,9 @@ def __init__(self, version: Version, payload: Dict[str, Any]): "flex_insights_drilldown" ) self.flex_url: Optional[str] = payload.get("flex_url") - self.channel_configs: Optional[List[object]] = payload.get("channel_configs") + self.channel_configs: Optional[List[Dict[str, object]]] = payload.get( + "channel_configs" + ) self.debugger_integration: Optional[Dict[str, object]] = payload.get( "debugger_integration" ) @@ -231,6 +235,24 @@ async def fetch_async( ui_version=ui_version, ) + def update(self) -> "ConfigurationInstance": + """ + Update the ConfigurationInstance + + + :returns: The updated ConfigurationInstance + """ + return self._proxy.update() + + async def update_async(self) -> "ConfigurationInstance": + """ + Asynchronous coroutine to update the ConfigurationInstance + + + :returns: The updated ConfigurationInstance + """ + return await self._proxy.update_async() + def __repr__(self) -> str: """ Provide a friendly representation @@ -302,6 +324,40 @@ async def fetch_async( payload, ) + def update(self) -> ConfigurationInstance: + """ + Update the ConfigurationInstance + + + :returns: The updated ConfigurationInstance + """ + data = values.of({}) + + payload = self._version.update( + method="POST", + uri=self._uri, + data=data, + ) + + return ConfigurationInstance(self._version, payload) + + async def update_async(self) -> ConfigurationInstance: + """ + Asynchronous coroutine to update the ConfigurationInstance + + + :returns: The updated ConfigurationInstance + """ + data = values.of({}) + + payload = await self._version.update_async( + method="POST", + uri=self._uri, + data=data, + ) + + return ConfigurationInstance(self._version, payload) + def __repr__(self) -> str: """ Provide a friendly representation diff --git a/twilio/rest/flex_api/v1/flex_flow.py b/twilio/rest/flex_api/v1/flex_flow.py index 45402a43b..ba4dc4ec6 100644 --- a/twilio/rest/flex_api/v1/flex_flow.py +++ b/twilio/rest/flex_api/v1/flex_flow.py @@ -591,6 +591,7 @@ def create( :returns: The created FlexFlowInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -666,6 +667,7 @@ async def create_async( :returns: The created FlexFlowInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/flex_api/v1/insights_assessments_comment.py b/twilio/rest/flex_api/v1/insights_assessments_comment.py index 127774d57..2d5fd3a43 100644 --- a/twilio/rest/flex_api/v1/insights_assessments_comment.py +++ b/twilio/rest/flex_api/v1/insights_assessments_comment.py @@ -120,6 +120,7 @@ def create( :returns: The created InsightsAssessmentsCommentInstance """ + data = values.of( { "CategoryId": category_id, @@ -165,6 +166,7 @@ async def create_async( :returns: The created InsightsAssessmentsCommentInstance """ + data = values.of( { "CategoryId": category_id, diff --git a/twilio/rest/flex_api/v1/insights_conversations.py b/twilio/rest/flex_api/v1/insights_conversations.py index 204d9807f..205f43c39 100644 --- a/twilio/rest/flex_api/v1/insights_conversations.py +++ b/twilio/rest/flex_api/v1/insights_conversations.py @@ -39,7 +39,7 @@ def __init__(self, version: Version, payload: Dict[str, Any]): self.segment_count: Optional[int] = deserialize.integer( payload.get("segment_count") ) - self.segments: Optional[List[object]] = payload.get("segments") + self.segments: Optional[List[Dict[str, object]]] = payload.get("segments") def __repr__(self) -> str: """ diff --git a/twilio/rest/flex_api/v1/insights_questionnaires.py b/twilio/rest/flex_api/v1/insights_questionnaires.py index 978bf8807..f4fedcbe3 100644 --- a/twilio/rest/flex_api/v1/insights_questionnaires.py +++ b/twilio/rest/flex_api/v1/insights_questionnaires.py @@ -47,7 +47,7 @@ def __init__( self.name: Optional[str] = payload.get("name") self.description: Optional[str] = payload.get("description") self.active: Optional[bool] = payload.get("active") - self.questions: Optional[List[object]] = payload.get("questions") + self.questions: Optional[List[Dict[str, object]]] = payload.get("questions") self.url: Optional[str] = payload.get("url") self._solution = { @@ -441,6 +441,7 @@ def create( :returns: The created InsightsQuestionnairesInstance """ + data = values.of( { "Name": name, @@ -480,6 +481,7 @@ async def create_async( :returns: The created InsightsQuestionnairesInstance """ + data = values.of( { "Name": name, diff --git a/twilio/rest/flex_api/v1/insights_questionnaires_category.py b/twilio/rest/flex_api/v1/insights_questionnaires_category.py index 2659f277e..659e10ec6 100644 --- a/twilio/rest/flex_api/v1/insights_questionnaires_category.py +++ b/twilio/rest/flex_api/v1/insights_questionnaires_category.py @@ -303,6 +303,7 @@ def create( :returns: The created InsightsQuestionnairesCategoryInstance """ + data = values.of( { "Name": name, @@ -331,6 +332,7 @@ async def create_async( :returns: The created InsightsQuestionnairesCategoryInstance """ + data = values.of( { "Name": name, diff --git a/twilio/rest/flex_api/v1/insights_questionnaires_question.py b/twilio/rest/flex_api/v1/insights_questionnaires_question.py index 53405e772..b8d1fe425 100644 --- a/twilio/rest/flex_api/v1/insights_questionnaires_question.py +++ b/twilio/rest/flex_api/v1/insights_questionnaires_question.py @@ -381,6 +381,7 @@ def create( :returns: The created InsightsQuestionnairesQuestionInstance """ + data = values.of( { "CategorySid": category_sid, @@ -423,6 +424,7 @@ async def create_async( :returns: The created InsightsQuestionnairesQuestionInstance """ + data = values.of( { "CategorySid": category_sid, diff --git a/twilio/rest/flex_api/v1/interaction/__init__.py b/twilio/rest/flex_api/v1/interaction/__init__.py index 40fe054fd..7d81b3f01 100644 --- a/twilio/rest/flex_api/v1/interaction/__init__.py +++ b/twilio/rest/flex_api/v1/interaction/__init__.py @@ -210,6 +210,7 @@ def create( :returns: The created InteractionInstance """ + data = values.of( { "Channel": serialize.object(channel), @@ -241,6 +242,7 @@ async def create_async( :returns: The created InteractionInstance """ + data = values.of( { "Channel": serialize.object(channel), diff --git a/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.py b/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.py index b585176ec..899c78593 100644 --- a/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.py +++ b/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.py @@ -116,6 +116,7 @@ def create(self, routing: object) -> InteractionChannelInviteInstance: :returns: The created InteractionChannelInviteInstance """ + data = values.of( { "Routing": serialize.object(routing), @@ -143,6 +144,7 @@ async def create_async(self, routing: object) -> InteractionChannelInviteInstanc :returns: The created InteractionChannelInviteInstance """ + data = values.of( { "Routing": serialize.object(routing), diff --git a/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.py b/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.py index 761516f9f..6aa291d80 100644 --- a/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.py +++ b/twilio/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.py @@ -279,6 +279,7 @@ def create( :returns: The created InteractionChannelParticipantInstance """ + data = values.of( { "Type": type, @@ -312,6 +313,7 @@ async def create_async( :returns: The created InteractionChannelParticipantInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/flex_api/v1/web_channel.py b/twilio/rest/flex_api/v1/web_channel.py index 436c0be8b..79910f932 100644 --- a/twilio/rest/flex_api/v1/web_channel.py +++ b/twilio/rest/flex_api/v1/web_channel.py @@ -349,6 +349,7 @@ def create( :returns: The created WebChannelInstance """ + data = values.of( { "FlexFlowSid": flex_flow_sid, @@ -389,6 +390,7 @@ async def create_async( :returns: The created WebChannelInstance """ + data = values.of( { "FlexFlowSid": flex_flow_sid, diff --git a/twilio/rest/flex_api/v2/web_channels.py b/twilio/rest/flex_api/v2/web_channels.py index b8953bd65..56c0fc218 100644 --- a/twilio/rest/flex_api/v2/web_channels.py +++ b/twilio/rest/flex_api/v2/web_channels.py @@ -73,6 +73,7 @@ def create( :returns: The created WebChannelsInstance """ + data = values.of( { "AddressSid": address_sid, @@ -107,6 +108,7 @@ async def create_async( :returns: The created WebChannelsInstance """ + data = values.of( { "AddressSid": address_sid, diff --git a/twilio/rest/intelligence/v2/service.py b/twilio/rest/intelligence/v2/service.py index 8f7647ed4..3c870a548 100644 --- a/twilio/rest/intelligence/v2/service.py +++ b/twilio/rest/intelligence/v2/service.py @@ -34,7 +34,7 @@ class HttpMethod(object): :ivar auto_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service. :ivar media_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise. :ivar auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :ivar date_created: The date that this Service was created, given in ISO 8601 format. :ivar date_updated: The date that this Service was updated, given in ISO 8601 format. :ivar friendly_name: A human readable description of this resource, up to 64 characters. @@ -148,7 +148,7 @@ def update( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -190,7 +190,7 @@ async def update_async( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -320,7 +320,7 @@ def update( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -374,7 +374,7 @@ async def update_async( :param if_match: The If-Match HTTP request header :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. @@ -467,7 +467,7 @@ def create( :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param auto_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service. @@ -477,6 +477,7 @@ def create( :returns: The created ServiceInstance """ + data = values.of( { "UniqueName": unique_name, @@ -516,7 +517,7 @@ async def create_async( :param unique_name: Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID. :param auto_transcribe: Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. - :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :param data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :param friendly_name: A human readable description of this resource, up to 64 characters. :param language_code: The default language code of the audio. :param auto_redaction: Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service. @@ -526,6 +527,7 @@ async def create_async( :returns: The created ServiceInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/intelligence/v2/transcript/__init__.py b/twilio/rest/intelligence/v2/transcript/__init__.py index 72bb4bdc1..63de42b7b 100644 --- a/twilio/rest/intelligence/v2/transcript/__init__.py +++ b/twilio/rest/intelligence/v2/transcript/__init__.py @@ -42,7 +42,7 @@ class Status(object): :ivar date_updated: The date that this Transcript was updated, given in ISO 8601 format. :ivar status: :ivar channel: Media Channel describing Transcript Source and Participant Mapping - :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. + :ivar data_logging: Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. :ivar language_code: The default language code of the audio. :ivar customer_key: :ivar media_start_time: The date that this Transcript's media was started, given in ISO 8601 format. @@ -341,6 +341,7 @@ def create( :returns: The created TranscriptInstance """ + data = values.of( { "ServiceSid": service_sid, @@ -375,6 +376,7 @@ async def create_async( :returns: The created TranscriptInstance """ + data = values.of( { "ServiceSid": service_sid, diff --git a/twilio/rest/intelligence/v2/transcript/operator_result.py b/twilio/rest/intelligence/v2/transcript/operator_result.py index 40e4e5888..3a381333c 100644 --- a/twilio/rest/intelligence/v2/transcript/operator_result.py +++ b/twilio/rest/intelligence/v2/transcript/operator_result.py @@ -67,7 +67,7 @@ def __init__( payload.get("match_probability") ) self.normalized_result: Optional[str] = payload.get("normalized_result") - self.utterance_results: Optional[List[object]] = payload.get( + self.utterance_results: Optional[List[Dict[str, object]]] = payload.get( "utterance_results" ) self.utterance_match: Optional[bool] = payload.get("utterance_match") diff --git a/twilio/rest/ip_messaging/v1/credential.py b/twilio/rest/ip_messaging/v1/credential.py index 6a193aa1f..f13fd814f 100644 --- a/twilio/rest/ip_messaging/v1/credential.py +++ b/twilio/rest/ip_messaging/v1/credential.py @@ -405,6 +405,7 @@ def create( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, @@ -448,6 +449,7 @@ async def create_async( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/ip_messaging/v1/service/__init__.py b/twilio/rest/ip_messaging/v1/service/__init__.py index c07b4cc25..4a2d13939 100644 --- a/twilio/rest/ip_messaging/v1/service/__init__.py +++ b/twilio/rest/ip_messaging/v1/service/__init__.py @@ -1062,6 +1062,7 @@ def create(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -1084,6 +1085,7 @@ async def create_async(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/ip_messaging/v1/service/channel/__init__.py b/twilio/rest/ip_messaging/v1/service/channel/__init__.py index 32961bcff..c525b0806 100644 --- a/twilio/rest/ip_messaging/v1/service/channel/__init__.py +++ b/twilio/rest/ip_messaging/v1/service/channel/__init__.py @@ -472,6 +472,7 @@ def create( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -508,6 +509,7 @@ async def create_async( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/ip_messaging/v1/service/channel/invite.py b/twilio/rest/ip_messaging/v1/service/channel/invite.py index 476e89f4c..0ccb06dfe 100644 --- a/twilio/rest/ip_messaging/v1/service/channel/invite.py +++ b/twilio/rest/ip_messaging/v1/service/channel/invite.py @@ -288,6 +288,7 @@ def create( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, @@ -319,6 +320,7 @@ async def create_async( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/ip_messaging/v1/service/channel/member.py b/twilio/rest/ip_messaging/v1/service/channel/member.py index 2414e72c9..0c6742f68 100644 --- a/twilio/rest/ip_messaging/v1/service/channel/member.py +++ b/twilio/rest/ip_messaging/v1/service/channel/member.py @@ -398,6 +398,7 @@ def create( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, @@ -429,6 +430,7 @@ async def create_async( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/ip_messaging/v1/service/channel/message.py b/twilio/rest/ip_messaging/v1/service/channel/message.py index e562faafb..462cb94cf 100644 --- a/twilio/rest/ip_messaging/v1/service/channel/message.py +++ b/twilio/rest/ip_messaging/v1/service/channel/message.py @@ -405,6 +405,7 @@ def create( :returns: The created MessageInstance """ + data = values.of( { "Body": body, @@ -441,6 +442,7 @@ async def create_async( :returns: The created MessageInstance """ + data = values.of( { "Body": body, diff --git a/twilio/rest/ip_messaging/v1/service/role.py b/twilio/rest/ip_messaging/v1/service/role.py index e637e2c90..6767e2316 100644 --- a/twilio/rest/ip_messaging/v1/service/role.py +++ b/twilio/rest/ip_messaging/v1/service/role.py @@ -350,6 +350,7 @@ def create( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -380,6 +381,7 @@ async def create_async( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/ip_messaging/v1/service/user/__init__.py b/twilio/rest/ip_messaging/v1/service/user/__init__.py index e19eb82be..ffcd24e78 100644 --- a/twilio/rest/ip_messaging/v1/service/user/__init__.py +++ b/twilio/rest/ip_messaging/v1/service/user/__init__.py @@ -423,6 +423,7 @@ def create( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, @@ -459,6 +460,7 @@ async def create_async( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/ip_messaging/v2/credential.py b/twilio/rest/ip_messaging/v2/credential.py index 3d72b3a0d..ab21588e3 100644 --- a/twilio/rest/ip_messaging/v2/credential.py +++ b/twilio/rest/ip_messaging/v2/credential.py @@ -405,6 +405,7 @@ def create( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, @@ -448,6 +449,7 @@ async def create_async( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/ip_messaging/v2/service/__init__.py b/twilio/rest/ip_messaging/v2/service/__init__.py index b94def1fa..4e96b3b2d 100644 --- a/twilio/rest/ip_messaging/v2/service/__init__.py +++ b/twilio/rest/ip_messaging/v2/service/__init__.py @@ -823,6 +823,7 @@ def create(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -845,6 +846,7 @@ async def create_async(self, friendly_name: str) -> ServiceInstance: :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/ip_messaging/v2/service/channel/__init__.py b/twilio/rest/ip_messaging/v2/service/channel/__init__.py index 55c5b749a..6f306290f 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/__init__.py +++ b/twilio/rest/ip_messaging/v2/service/channel/__init__.py @@ -604,6 +604,7 @@ def create( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -656,6 +657,7 @@ async def create_async( :returns: The created ChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/ip_messaging/v2/service/channel/invite.py b/twilio/rest/ip_messaging/v2/service/channel/invite.py index aeb07b7b9..71ef25df6 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/invite.py +++ b/twilio/rest/ip_messaging/v2/service/channel/invite.py @@ -288,6 +288,7 @@ def create( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, @@ -319,6 +320,7 @@ async def create_async( :returns: The created InviteInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/ip_messaging/v2/service/channel/member.py b/twilio/rest/ip_messaging/v2/service/channel/member.py index b001bc1b4..6b3aa44f6 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/member.py +++ b/twilio/rest/ip_messaging/v2/service/channel/member.py @@ -531,6 +531,7 @@ def create( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, @@ -588,6 +589,7 @@ async def create_async( :returns: The created MemberInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/ip_messaging/v2/service/channel/message.py b/twilio/rest/ip_messaging/v2/service/channel/message.py index f55afedbc..64c4ba977 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/message.py +++ b/twilio/rest/ip_messaging/v2/service/channel/message.py @@ -535,6 +535,7 @@ def create( :returns: The created MessageInstance """ + data = values.of( { "From": from_, @@ -590,6 +591,7 @@ async def create_async( :returns: The created MessageInstance """ + data = values.of( { "From": from_, diff --git a/twilio/rest/ip_messaging/v2/service/channel/webhook.py b/twilio/rest/ip_messaging/v2/service/channel/webhook.py index 077bbfa8e..c5c2879b2 100644 --- a/twilio/rest/ip_messaging/v2/service/channel/webhook.py +++ b/twilio/rest/ip_messaging/v2/service/channel/webhook.py @@ -466,6 +466,7 @@ def create( :returns: The created WebhookInstance """ + data = values.of( { "Type": type, @@ -518,6 +519,7 @@ async def create_async( :returns: The created WebhookInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/ip_messaging/v2/service/role.py b/twilio/rest/ip_messaging/v2/service/role.py index c8e3b9561..2a39101b3 100644 --- a/twilio/rest/ip_messaging/v2/service/role.py +++ b/twilio/rest/ip_messaging/v2/service/role.py @@ -350,6 +350,7 @@ def create( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -380,6 +381,7 @@ async def create_async( :returns: The created RoleInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/ip_messaging/v2/service/user/__init__.py b/twilio/rest/ip_messaging/v2/service/user/__init__.py index 3acb88284..5b632c125 100644 --- a/twilio/rest/ip_messaging/v2/service/user/__init__.py +++ b/twilio/rest/ip_messaging/v2/service/user/__init__.py @@ -476,6 +476,7 @@ def create( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, @@ -519,6 +520,7 @@ async def create_async( :returns: The created UserInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/media/v1/media_processor.py b/twilio/rest/media/v1/media_processor.py index 16ac32aa2..da4a3b0c9 100644 --- a/twilio/rest/media/v1/media_processor.py +++ b/twilio/rest/media/v1/media_processor.py @@ -316,6 +316,7 @@ def create( :returns: The created MediaProcessorInstance """ + data = values.of( { "Extension": extension, @@ -356,6 +357,7 @@ async def create_async( :returns: The created MediaProcessorInstance """ + data = values.of( { "Extension": extension, diff --git a/twilio/rest/media/v1/player_streamer/__init__.py b/twilio/rest/media/v1/player_streamer/__init__.py index 6bc535cdf..1d91e86a4 100644 --- a/twilio/rest/media/v1/player_streamer/__init__.py +++ b/twilio/rest/media/v1/player_streamer/__init__.py @@ -343,6 +343,7 @@ def create( :returns: The created PlayerStreamerInstance """ + data = values.of( { "Video": video, @@ -377,6 +378,7 @@ async def create_async( :returns: The created PlayerStreamerInstance """ + data = values.of( { "Video": video, diff --git a/twilio/rest/messaging/v1/brand_registration/__init__.py b/twilio/rest/messaging/v1/brand_registration/__init__.py index 68a669e3c..de54a2f2a 100644 --- a/twilio/rest/messaging/v1/brand_registration/__init__.py +++ b/twilio/rest/messaging/v1/brand_registration/__init__.py @@ -373,6 +373,7 @@ def create( :returns: The created BrandRegistrationInstance """ + data = values.of( { "CustomerProfileBundleSid": customer_profile_bundle_sid, @@ -410,6 +411,7 @@ async def create_async( :returns: The created BrandRegistrationInstance """ + data = values.of( { "CustomerProfileBundleSid": customer_profile_bundle_sid, diff --git a/twilio/rest/messaging/v1/brand_registration/brand_vetting.py b/twilio/rest/messaging/v1/brand_registration/brand_vetting.py index 2fff9ebbe..cc00fbc9e 100644 --- a/twilio/rest/messaging/v1/brand_registration/brand_vetting.py +++ b/twilio/rest/messaging/v1/brand_registration/brand_vetting.py @@ -240,6 +240,7 @@ def create( :returns: The created BrandVettingInstance """ + data = values.of( { "VettingProvider": vetting_provider, @@ -270,6 +271,7 @@ async def create_async( :returns: The created BrandVettingInstance """ + data = values.of( { "VettingProvider": vetting_provider, diff --git a/twilio/rest/messaging/v1/external_campaign.py b/twilio/rest/messaging/v1/external_campaign.py index 53af9869d..ce232e9cf 100644 --- a/twilio/rest/messaging/v1/external_campaign.py +++ b/twilio/rest/messaging/v1/external_campaign.py @@ -76,6 +76,7 @@ def create( :returns: The created ExternalCampaignInstance """ + data = values.of( { "CampaignId": campaign_id, @@ -102,6 +103,7 @@ async def create_async( :returns: The created ExternalCampaignInstance """ + data = values.of( { "CampaignId": campaign_id, diff --git a/twilio/rest/messaging/v1/service/__init__.py b/twilio/rest/messaging/v1/service/__init__.py index d1772d7d7..4d2315588 100644 --- a/twilio/rest/messaging/v1/service/__init__.py +++ b/twilio/rest/messaging/v1/service/__init__.py @@ -724,6 +724,7 @@ def create( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -796,6 +797,7 @@ async def create_async( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/messaging/v1/service/alpha_sender.py b/twilio/rest/messaging/v1/service/alpha_sender.py index 92d81e9fc..9dca85f80 100644 --- a/twilio/rest/messaging/v1/service/alpha_sender.py +++ b/twilio/rest/messaging/v1/service/alpha_sender.py @@ -265,6 +265,7 @@ def create(self, alpha_sender: str) -> AlphaSenderInstance: :returns: The created AlphaSenderInstance """ + data = values.of( { "AlphaSender": alpha_sender, @@ -289,6 +290,7 @@ async def create_async(self, alpha_sender: str) -> AlphaSenderInstance: :returns: The created AlphaSenderInstance """ + data = values.of( { "AlphaSender": alpha_sender, diff --git a/twilio/rest/messaging/v1/service/phone_number.py b/twilio/rest/messaging/v1/service/phone_number.py index c01c76a3b..daafa6d78 100644 --- a/twilio/rest/messaging/v1/service/phone_number.py +++ b/twilio/rest/messaging/v1/service/phone_number.py @@ -267,6 +267,7 @@ def create(self, phone_number_sid: str) -> PhoneNumberInstance: :returns: The created PhoneNumberInstance """ + data = values.of( { "PhoneNumberSid": phone_number_sid, @@ -291,6 +292,7 @@ async def create_async(self, phone_number_sid: str) -> PhoneNumberInstance: :returns: The created PhoneNumberInstance """ + data = values.of( { "PhoneNumberSid": phone_number_sid, diff --git a/twilio/rest/messaging/v1/service/short_code.py b/twilio/rest/messaging/v1/service/short_code.py index 104f03f6e..dbc24cea3 100644 --- a/twilio/rest/messaging/v1/service/short_code.py +++ b/twilio/rest/messaging/v1/service/short_code.py @@ -265,6 +265,7 @@ def create(self, short_code_sid: str) -> ShortCodeInstance: :returns: The created ShortCodeInstance """ + data = values.of( { "ShortCodeSid": short_code_sid, @@ -289,6 +290,7 @@ async def create_async(self, short_code_sid: str) -> ShortCodeInstance: :returns: The created ShortCodeInstance """ + data = values.of( { "ShortCodeSid": short_code_sid, diff --git a/twilio/rest/messaging/v1/service/us_app_to_person.py b/twilio/rest/messaging/v1/service/us_app_to_person.py index 7ccb53431..5e89c8384 100644 --- a/twilio/rest/messaging/v1/service/us_app_to_person.py +++ b/twilio/rest/messaging/v1/service/us_app_to_person.py @@ -96,7 +96,7 @@ def __init__( ) self.url: Optional[str] = payload.get("url") self.mock: Optional[bool] = payload.get("mock") - self.errors: Optional[List[object]] = payload.get("errors") + self.errors: Optional[List[Dict[str, object]]] = payload.get("errors") self._solution = { "messaging_service_sid": messaging_service_sid, @@ -336,6 +336,7 @@ def create( :returns: The created UsAppToPersonInstance """ + data = values.of( { "BrandRegistrationSid": brand_registration_sid, @@ -401,6 +402,7 @@ async def create_async( :returns: The created UsAppToPersonInstance """ + data = values.of( { "BrandRegistrationSid": brand_registration_sid, diff --git a/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py b/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py index 41dbec787..60b875703 100644 --- a/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py +++ b/twilio/rest/messaging/v1/service/us_app_to_person_usecase.py @@ -32,7 +32,7 @@ def __init__( ): super().__init__(version) - self.us_app_to_person_usecases: Optional[List[object]] = payload.get( + self.us_app_to_person_usecases: Optional[List[Dict[str, object]]] = payload.get( "us_app_to_person_usecases" ) diff --git a/twilio/rest/messaging/v1/tollfree_verification.py b/twilio/rest/messaging/v1/tollfree_verification.py index 7efbbc78a..83c0df1a4 100644 --- a/twilio/rest/messaging/v1/tollfree_verification.py +++ b/twilio/rest/messaging/v1/tollfree_verification.py @@ -721,6 +721,7 @@ def create( :returns: The created TollfreeVerificationInstance """ + data = values.of( { "BusinessName": business_name, @@ -812,6 +813,7 @@ async def create_async( :returns: The created TollfreeVerificationInstance """ + data = values.of( { "BusinessName": business_name, diff --git a/twilio/rest/messaging/v1/usecase.py b/twilio/rest/messaging/v1/usecase.py index 4b455d8c6..3fb46b4a2 100644 --- a/twilio/rest/messaging/v1/usecase.py +++ b/twilio/rest/messaging/v1/usecase.py @@ -29,7 +29,7 @@ class UsecaseInstance(InstanceResource): def __init__(self, version: Version, payload: Dict[str, Any]): super().__init__(version) - self.usecases: Optional[List[object]] = payload.get("usecases") + self.usecases: Optional[List[Dict[str, object]]] = payload.get("usecases") def __repr__(self) -> str: """ diff --git a/twilio/rest/microvisor/v1/account_config.py b/twilio/rest/microvisor/v1/account_config.py index 7d8119a3d..459a95f25 100644 --- a/twilio/rest/microvisor/v1/account_config.py +++ b/twilio/rest/microvisor/v1/account_config.py @@ -305,6 +305,7 @@ def create(self, key: str, value: str) -> AccountConfigInstance: :returns: The created AccountConfigInstance """ + data = values.of( { "Key": key, @@ -329,6 +330,7 @@ async def create_async(self, key: str, value: str) -> AccountConfigInstance: :returns: The created AccountConfigInstance """ + data = values.of( { "Key": key, diff --git a/twilio/rest/microvisor/v1/account_secret.py b/twilio/rest/microvisor/v1/account_secret.py index a7fc4f896..eacd4fa52 100644 --- a/twilio/rest/microvisor/v1/account_secret.py +++ b/twilio/rest/microvisor/v1/account_secret.py @@ -303,6 +303,7 @@ def create(self, key: str, value: str) -> AccountSecretInstance: :returns: The created AccountSecretInstance """ + data = values.of( { "Key": key, @@ -327,6 +328,7 @@ async def create_async(self, key: str, value: str) -> AccountSecretInstance: :returns: The created AccountSecretInstance """ + data = values.of( { "Key": key, diff --git a/twilio/rest/microvisor/v1/device/device_config.py b/twilio/rest/microvisor/v1/device/device_config.py index a954727bf..54424e800 100644 --- a/twilio/rest/microvisor/v1/device/device_config.py +++ b/twilio/rest/microvisor/v1/device/device_config.py @@ -334,6 +334,7 @@ def create(self, key: str, value: str) -> DeviceConfigInstance: :returns: The created DeviceConfigInstance """ + data = values.of( { "Key": key, @@ -360,6 +361,7 @@ async def create_async(self, key: str, value: str) -> DeviceConfigInstance: :returns: The created DeviceConfigInstance """ + data = values.of( { "Key": key, diff --git a/twilio/rest/microvisor/v1/device/device_secret.py b/twilio/rest/microvisor/v1/device/device_secret.py index 7f2ee0eeb..124fe0e48 100644 --- a/twilio/rest/microvisor/v1/device/device_secret.py +++ b/twilio/rest/microvisor/v1/device/device_secret.py @@ -332,6 +332,7 @@ def create(self, key: str, value: str) -> DeviceSecretInstance: :returns: The created DeviceSecretInstance """ + data = values.of( { "Key": key, @@ -358,6 +359,7 @@ async def create_async(self, key: str, value: str) -> DeviceSecretInstance: :returns: The created DeviceSecretInstance """ + data = values.of( { "Key": key, diff --git a/twilio/rest/notify/v1/credential.py b/twilio/rest/notify/v1/credential.py index 2b1efcf82..61f1abd80 100644 --- a/twilio/rest/notify/v1/credential.py +++ b/twilio/rest/notify/v1/credential.py @@ -405,6 +405,7 @@ def create( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, @@ -448,6 +449,7 @@ async def create_async( :returns: The created CredentialInstance """ + data = values.of( { "Type": type, diff --git a/twilio/rest/notify/v1/service/__init__.py b/twilio/rest/notify/v1/service/__init__.py index b53ca2658..5c5d14d06 100644 --- a/twilio/rest/notify/v1/service/__init__.py +++ b/twilio/rest/notify/v1/service/__init__.py @@ -36,7 +36,7 @@ class ServiceInstance(InstanceResource): :ivar apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :ivar gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. :ivar fcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. - :ivar messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. In order to send SMS notifications this parameter has to be set. + :ivar messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. In order to send SMS notifications this parameter has to be set. :ivar facebook_messenger_page_id: Deprecated. :ivar default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :ivar default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -171,7 +171,7 @@ def update( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -225,7 +225,7 @@ async def update_async( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -384,7 +384,7 @@ def update( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -448,7 +448,7 @@ async def update_async( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -576,7 +576,7 @@ def create( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -590,6 +590,7 @@ def create( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -640,7 +641,7 @@ async def create_async( :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long. :param apn_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. :param gcm_credential_sid: The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. - :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + :param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. :param facebook_messenger_page_id: Deprecated. :param default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. :param default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. @@ -654,6 +655,7 @@ async def create_async( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/notify/v1/service/binding.py b/twilio/rest/notify/v1/service/binding.py index dba36be72..1bcb36d24 100644 --- a/twilio/rest/notify/v1/service/binding.py +++ b/twilio/rest/notify/v1/service/binding.py @@ -299,6 +299,7 @@ def create( :returns: The created BindingInstance """ + data = values.of( { "Identity": identity, @@ -344,6 +345,7 @@ async def create_async( :returns: The created BindingInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/notify/v1/service/notification.py b/twilio/rest/notify/v1/service/notification.py index 40234fb07..237e55311 100644 --- a/twilio/rest/notify/v1/service/notification.py +++ b/twilio/rest/notify/v1/service/notification.py @@ -144,7 +144,7 @@ def create( :param data: The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. :param apn: The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. :param gcm: The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). - :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. + :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. :param facebook_messenger: Deprecated. :param fcm: The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. :param segment: The Segment resource is deprecated. Use the `tag` parameter, instead. @@ -156,6 +156,7 @@ def create( :returns: The created NotificationInstance """ + data = values.of( { "Body": body, @@ -222,7 +223,7 @@ async def create_async( :param data: The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. :param apn: The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. :param gcm: The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). - :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. + :param sms: The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. :param facebook_messenger: Deprecated. :param fcm: The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. :param segment: The Segment resource is deprecated. Use the `tag` parameter, instead. @@ -234,6 +235,7 @@ async def create_async( :returns: The created NotificationInstance """ + data = values.of( { "Body": body, diff --git a/twilio/rest/numbers/v1/__init__.py b/twilio/rest/numbers/v1/__init__.py index a9285ae49..1619c070f 100644 --- a/twilio/rest/numbers/v1/__init__.py +++ b/twilio/rest/numbers/v1/__init__.py @@ -16,8 +16,9 @@ from twilio.base.version import Version from twilio.base.domain import Domain from twilio.rest.numbers.v1.bulk_eligibility import BulkEligibilityList +from twilio.rest.numbers.v1.eligibility import EligibilityList from twilio.rest.numbers.v1.porting_bulk_portability import PortingBulkPortabilityList -from twilio.rest.numbers.v1.porting_port_in_fetch import PortingPortInFetchList +from twilio.rest.numbers.v1.porting_port_in import PortingPortInList from twilio.rest.numbers.v1.porting_portability import PortingPortabilityList @@ -30,8 +31,9 @@ def __init__(self, domain: Domain): """ super().__init__(domain, "v1") self._bulk_eligibilities: Optional[BulkEligibilityList] = None + self._eligibilities: Optional[EligibilityList] = None self._porting_bulk_portabilities: Optional[PortingBulkPortabilityList] = None - self._porting_port_ins: Optional[PortingPortInFetchList] = None + self._porting_port_ins: Optional[PortingPortInList] = None self._porting_portabilities: Optional[PortingPortabilityList] = None @property @@ -40,6 +42,12 @@ def bulk_eligibilities(self) -> BulkEligibilityList: self._bulk_eligibilities = BulkEligibilityList(self) return self._bulk_eligibilities + @property + def eligibilities(self) -> EligibilityList: + if self._eligibilities is None: + self._eligibilities = EligibilityList(self) + return self._eligibilities + @property def porting_bulk_portabilities(self) -> PortingBulkPortabilityList: if self._porting_bulk_portabilities is None: @@ -47,9 +55,9 @@ def porting_bulk_portabilities(self) -> PortingBulkPortabilityList: return self._porting_bulk_portabilities @property - def porting_port_ins(self) -> PortingPortInFetchList: + def porting_port_ins(self) -> PortingPortInList: if self._porting_port_ins is None: - self._porting_port_ins = PortingPortInFetchList(self) + self._porting_port_ins = PortingPortInList(self) return self._porting_port_ins @property diff --git a/twilio/rest/numbers/v1/bulk_eligibility.py b/twilio/rest/numbers/v1/bulk_eligibility.py index 805f6b1bd..e68cee2a4 100644 --- a/twilio/rest/numbers/v1/bulk_eligibility.py +++ b/twilio/rest/numbers/v1/bulk_eligibility.py @@ -44,7 +44,7 @@ def __init__( self.request_id: Optional[str] = payload.get("request_id") self.url: Optional[str] = payload.get("url") - self.results: Optional[List[object]] = payload.get("results") + self.results: Optional[List[Dict[str, object]]] = payload.get("results") self.friendly_name: Optional[str] = payload.get("friendly_name") self.status: Optional[str] = payload.get("status") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( @@ -178,6 +178,38 @@ def __init__(self, version: Version): """ super().__init__(version) + self._uri = "/HostedNumber/Eligibility/Bulk" + + def create(self) -> BulkEligibilityInstance: + """ + Create the BulkEligibilityInstance + + + :returns: The created BulkEligibilityInstance + """ + + payload = self._version.create( + method="POST", + uri=self._uri, + ) + + return BulkEligibilityInstance(self._version, payload) + + async def create_async(self) -> BulkEligibilityInstance: + """ + Asynchronously create the BulkEligibilityInstance + + + :returns: The created BulkEligibilityInstance + """ + + payload = await self._version.create_async( + method="POST", + uri=self._uri, + ) + + return BulkEligibilityInstance(self._version, payload) + def get(self, request_id: str) -> BulkEligibilityContext: """ Constructs a BulkEligibilityContext diff --git a/twilio/rest/numbers/v1/eligibility.py b/twilio/rest/numbers/v1/eligibility.py new file mode 100644 index 000000000..6781c3d86 --- /dev/null +++ b/twilio/rest/numbers/v1/eligibility.py @@ -0,0 +1,92 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Numbers + This is the public Twilio REST API. + + NOTE: This class is auto generated by OpenAPI Generator. + https://openapi-generator.tech + Do not edit the class manually. +""" + + +from typing import Any, Dict, List, Optional + +from twilio.base.instance_resource import InstanceResource +from twilio.base.list_resource import ListResource +from twilio.base.version import Version + + +class EligibilityInstance(InstanceResource): + + """ + :ivar results: The result set that contains the eligibility check response for the requested number, each result has at least the following attributes: phone_number: The requested phone number ,hosting_account_sid: The account sid where the phone number will be hosted, date_last_checked: Datetime (ISO 8601) when the PN was last checked for eligibility, country: Phone number’s country, eligibility_status: Indicates the eligibility status of the PN (Eligible/Ineligible), eligibility_sub_status: Indicates the sub status of the eligibility , ineligibility_reason: Reason for number's ineligibility (if applicable), next_step: Suggested next step in the hosting process based on the eligibility status. + """ + + def __init__(self, version: Version, payload: Dict[str, Any]): + super().__init__(version) + + self.results: Optional[List[Dict[str, object]]] = payload.get("results") + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class EligibilityList(ListResource): + def __init__(self, version: Version): + """ + Initialize the EligibilityList + + :param version: Version that contains the resource + + """ + super().__init__(version) + + self._uri = "/HostedNumber/Eligibility" + + def create(self) -> EligibilityInstance: + """ + Create the EligibilityInstance + + + :returns: The created EligibilityInstance + """ + + payload = self._version.create( + method="POST", + uri=self._uri, + ) + + return EligibilityInstance(self._version, payload) + + async def create_async(self) -> EligibilityInstance: + """ + Asynchronously create the EligibilityInstance + + + :returns: The created EligibilityInstance + """ + + payload = await self._version.create_async( + method="POST", + uri=self._uri, + ) + + return EligibilityInstance(self._version, payload) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/numbers/v1/porting_bulk_portability.py b/twilio/rest/numbers/v1/porting_bulk_portability.py index 3abc24b6e..a6c037edb 100644 --- a/twilio/rest/numbers/v1/porting_bulk_portability.py +++ b/twilio/rest/numbers/v1/porting_bulk_portability.py @@ -48,7 +48,9 @@ def __init__( self.datetime_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("datetime_created") ) - self.phone_numbers: Optional[List[object]] = payload.get("phone_numbers") + self.phone_numbers: Optional[List[Dict[str, object]]] = payload.get( + "phone_numbers" + ) self.url: Optional[str] = payload.get("url") self._solution = { @@ -183,6 +185,7 @@ def create(self, phone_numbers: List[str]) -> PortingBulkPortabilityInstance: :returns: The created PortingBulkPortabilityInstance """ + data = values.of( { "PhoneNumbers": serialize.map(phone_numbers, lambda e: e), @@ -207,6 +210,7 @@ async def create_async( :returns: The created PortingBulkPortabilityInstance """ + data = values.of( { "PhoneNumbers": serialize.map(phone_numbers, lambda e: e), diff --git a/twilio/rest/numbers/v1/porting_port_in.py b/twilio/rest/numbers/v1/porting_port_in.py new file mode 100644 index 000000000..1bc33ac16 --- /dev/null +++ b/twilio/rest/numbers/v1/porting_port_in.py @@ -0,0 +1,94 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Numbers + This is the public Twilio REST API. + + NOTE: This class is auto generated by OpenAPI Generator. + https://openapi-generator.tech + Do not edit the class manually. +""" + + +from typing import Any, Dict, Optional + +from twilio.base.instance_resource import InstanceResource +from twilio.base.list_resource import ListResource +from twilio.base.version import Version + + +class PortingPortInInstance(InstanceResource): + + """ + :ivar port_in_request_sid: The SID of the Port In request, It is the request identifier + :ivar url: + """ + + def __init__(self, version: Version, payload: Dict[str, Any]): + super().__init__(version) + + self.port_in_request_sid: Optional[str] = payload.get("port_in_request_sid") + self.url: Optional[str] = payload.get("url") + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + + return "" + + +class PortingPortInList(ListResource): + def __init__(self, version: Version): + """ + Initialize the PortingPortInList + + :param version: Version that contains the resource + + """ + super().__init__(version) + + self._uri = "/Porting/PortIn" + + def create(self) -> PortingPortInInstance: + """ + Create the PortingPortInInstance + + + :returns: The created PortingPortInInstance + """ + + payload = self._version.create( + method="POST", + uri=self._uri, + ) + + return PortingPortInInstance(self._version, payload) + + async def create_async(self) -> PortingPortInInstance: + """ + Asynchronously create the PortingPortInInstance + + + :returns: The created PortingPortInInstance + """ + + payload = await self._version.create_async( + method="POST", + uri=self._uri, + ) + + return PortingPortInInstance(self._version, payload) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/numbers/v1/porting_port_in_fetch.py b/twilio/rest/numbers/v1/porting_port_in_fetch.py deleted file mode 100644 index 0ac469fe6..000000000 --- a/twilio/rest/numbers/v1/porting_port_in_fetch.py +++ /dev/null @@ -1,217 +0,0 @@ -r""" - This code was generated by - ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - - Twilio - Numbers - This is the public Twilio REST API. - - NOTE: This class is auto generated by OpenAPI Generator. - https://openapi-generator.tech - Do not edit the class manually. -""" - - -from datetime import date -from typing import Any, Dict, List, Optional -from twilio.base import deserialize -from twilio.base.instance_context import InstanceContext -from twilio.base.instance_resource import InstanceResource -from twilio.base.list_resource import ListResource -from twilio.base.version import Version - - -class PortingPortInFetchInstance(InstanceResource): - - """ - :ivar port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - :ivar url: The URL of this Port In request - :ivar account_sid: The Account SID that the numbers will be added to after they are ported into Twilio. - :ivar notification_emails: List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails. - :ivar target_port_in_date: Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation. - :ivar target_port_in_time_range_start: Minimum hour in the future needs to be established with the Ops team for validation. - :ivar target_port_in_time_range_end: Maximum hour in the future needs to be established with the Ops team for validation. - :ivar losing_carrier_information: The information for the losing carrier. - :ivar phone_numbers: The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212). - :ivar documents: The list of documents SID referencing a utility bills - """ - - def __init__( - self, - version: Version, - payload: Dict[str, Any], - port_in_request_sid: Optional[str] = None, - ): - super().__init__(version) - - self.port_in_request_sid: Optional[str] = payload.get("port_in_request_sid") - self.url: Optional[str] = payload.get("url") - self.account_sid: Optional[str] = payload.get("account_sid") - self.notification_emails: Optional[List[str]] = payload.get( - "notification_emails" - ) - self.target_port_in_date: Optional[date] = deserialize.iso8601_date( - payload.get("target_port_in_date") - ) - self.target_port_in_time_range_start: Optional[str] = payload.get( - "target_port_in_time_range_start" - ) - self.target_port_in_time_range_end: Optional[str] = payload.get( - "target_port_in_time_range_end" - ) - self.losing_carrier_information: Optional[Dict[str, object]] = payload.get( - "losing_carrier_information" - ) - self.phone_numbers: Optional[List[object]] = payload.get("phone_numbers") - self.documents: Optional[List[str]] = payload.get("documents") - - self._solution = { - "port_in_request_sid": port_in_request_sid or self.port_in_request_sid, - } - self._context: Optional[PortingPortInFetchContext] = None - - @property - def _proxy(self) -> "PortingPortInFetchContext": - """ - Generate an instance context for the instance, the context is capable of - performing various actions. All instance actions are proxied to the context - - :returns: PortingPortInFetchContext for this PortingPortInFetchInstance - """ - if self._context is None: - self._context = PortingPortInFetchContext( - self._version, - port_in_request_sid=self._solution["port_in_request_sid"], - ) - return self._context - - def fetch(self) -> "PortingPortInFetchInstance": - """ - Fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - return self._proxy.fetch() - - async def fetch_async(self) -> "PortingPortInFetchInstance": - """ - Asynchronous coroutine to fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - return await self._proxy.fetch_async() - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - context = " ".join("{}={}".format(k, v) for k, v in self._solution.items()) - return "".format(context) - - -class PortingPortInFetchContext(InstanceContext): - def __init__(self, version: Version, port_in_request_sid: str): - """ - Initialize the PortingPortInFetchContext - - :param version: Version that contains the resource - :param port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - """ - super().__init__(version) - - # Path Solution - self._solution = { - "port_in_request_sid": port_in_request_sid, - } - self._uri = "/Porting/PortIn/{port_in_request_sid}".format(**self._solution) - - def fetch(self) -> PortingPortInFetchInstance: - """ - Fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - - payload = self._version.fetch( - method="GET", - uri=self._uri, - ) - - return PortingPortInFetchInstance( - self._version, - payload, - port_in_request_sid=self._solution["port_in_request_sid"], - ) - - async def fetch_async(self) -> PortingPortInFetchInstance: - """ - Asynchronous coroutine to fetch the PortingPortInFetchInstance - - - :returns: The fetched PortingPortInFetchInstance - """ - - payload = await self._version.fetch_async( - method="GET", - uri=self._uri, - ) - - return PortingPortInFetchInstance( - self._version, - payload, - port_in_request_sid=self._solution["port_in_request_sid"], - ) - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - context = " ".join("{}={}".format(k, v) for k, v in self._solution.items()) - return "".format(context) - - -class PortingPortInFetchList(ListResource): - def __init__(self, version: Version): - """ - Initialize the PortingPortInFetchList - - :param version: Version that contains the resource - - """ - super().__init__(version) - - def get(self, port_in_request_sid: str) -> PortingPortInFetchContext: - """ - Constructs a PortingPortInFetchContext - - :param port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - """ - return PortingPortInFetchContext( - self._version, port_in_request_sid=port_in_request_sid - ) - - def __call__(self, port_in_request_sid: str) -> PortingPortInFetchContext: - """ - Constructs a PortingPortInFetchContext - - :param port_in_request_sid: The SID of the Port In request. This is a unique identifier of the port in request. - """ - return PortingPortInFetchContext( - self._version, port_in_request_sid=port_in_request_sid - ) - - def __repr__(self) -> str: - """ - Provide a friendly representation - - :returns: Machine friendly representation - """ - return "" diff --git a/twilio/rest/numbers/v2/authorization_document/__init__.py b/twilio/rest/numbers/v2/authorization_document/__init__.py index f8ac50dcc..c40d44421 100644 --- a/twilio/rest/numbers/v2/authorization_document/__init__.py +++ b/twilio/rest/numbers/v2/authorization_document/__init__.py @@ -297,6 +297,7 @@ def create( :returns: The created AuthorizationDocumentInstance """ + data = values.of( { "AddressSid": address_sid, @@ -339,6 +340,7 @@ async def create_async( :returns: The created AuthorizationDocumentInstance """ + data = values.of( { "AddressSid": address_sid, diff --git a/twilio/rest/numbers/v2/bulk_hosted_number_order.py b/twilio/rest/numbers/v2/bulk_hosted_number_order.py index 57e8723e7..e45b86854 100644 --- a/twilio/rest/numbers/v2/bulk_hosted_number_order.py +++ b/twilio/rest/numbers/v2/bulk_hosted_number_order.py @@ -64,7 +64,7 @@ def __init__( self.total_count: Optional[int] = deserialize.integer( payload.get("total_count") ) - self.results: Optional[List[object]] = payload.get("results") + self.results: Optional[List[Dict[str, object]]] = payload.get("results") self._solution = { "bulk_hosting_sid": bulk_hosting_sid or self.bulk_hosting_sid, @@ -214,6 +214,38 @@ def __init__(self, version: Version): """ super().__init__(version) + self._uri = "/HostedNumber/Orders/Bulk" + + def create(self) -> BulkHostedNumberOrderInstance: + """ + Create the BulkHostedNumberOrderInstance + + + :returns: The created BulkHostedNumberOrderInstance + """ + + payload = self._version.create( + method="POST", + uri=self._uri, + ) + + return BulkHostedNumberOrderInstance(self._version, payload) + + async def create_async(self) -> BulkHostedNumberOrderInstance: + """ + Asynchronously create the BulkHostedNumberOrderInstance + + + :returns: The created BulkHostedNumberOrderInstance + """ + + payload = await self._version.create_async( + method="POST", + uri=self._uri, + ) + + return BulkHostedNumberOrderInstance(self._version, payload) + def get(self, bulk_hosting_sid: str) -> BulkHostedNumberOrderContext: """ Constructs a BulkHostedNumberOrderContext diff --git a/twilio/rest/numbers/v2/hosted_number_order.py b/twilio/rest/numbers/v2/hosted_number_order.py index 813b9b482..81cd7e451 100644 --- a/twilio/rest/numbers/v2/hosted_number_order.py +++ b/twilio/rest/numbers/v2/hosted_number_order.py @@ -315,6 +315,7 @@ def create( :returns: The created HostedNumberOrderInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -385,6 +386,7 @@ async def create_async( :returns: The created HostedNumberOrderInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/numbers/v2/regulatory_compliance/bundle/__init__.py b/twilio/rest/numbers/v2/regulatory_compliance/bundle/__init__.py index ff7b1d7c0..1f1224fb2 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/bundle/__init__.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/bundle/__init__.py @@ -499,6 +499,7 @@ def create( :returns: The created BundleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -542,6 +543,7 @@ async def create_async( :returns: The created BundleInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -573,8 +575,6 @@ def stream( sort_by: Union["BundleInstance.SortBy", object] = values.unset, sort_direction: Union["BundleInstance.SortDirection", object] = values.unset, valid_until_date: Union[datetime, object] = values.unset, - valid_until_date_before: Union[datetime, object] = values.unset, - valid_until_date_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> Iterator[BundleInstance]: @@ -593,8 +593,6 @@ def stream( :param "BundleInstance.SortBy" sort_by: Can be `valid-until` or `date-updated`. Defaults to `date-created`. :param "BundleInstance.SortDirection" sort_direction: Default is `DESC`. Can be `ASC` or `DESC`. :param datetime valid_until_date: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_before: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_after: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -615,8 +613,6 @@ def stream( sort_by=sort_by, sort_direction=sort_direction, valid_until_date=valid_until_date, - valid_until_date_before=valid_until_date_before, - valid_until_date_after=valid_until_date_after, page_size=limits["page_size"], ) @@ -633,8 +629,6 @@ async def stream_async( sort_by: Union["BundleInstance.SortBy", object] = values.unset, sort_direction: Union["BundleInstance.SortDirection", object] = values.unset, valid_until_date: Union[datetime, object] = values.unset, - valid_until_date_before: Union[datetime, object] = values.unset, - valid_until_date_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> AsyncIterator[BundleInstance]: @@ -653,8 +647,6 @@ async def stream_async( :param "BundleInstance.SortBy" sort_by: Can be `valid-until` or `date-updated`. Defaults to `date-created`. :param "BundleInstance.SortDirection" sort_direction: Default is `DESC`. Can be `ASC` or `DESC`. :param datetime valid_until_date: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_before: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_after: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -675,8 +667,6 @@ async def stream_async( sort_by=sort_by, sort_direction=sort_direction, valid_until_date=valid_until_date, - valid_until_date_before=valid_until_date_before, - valid_until_date_after=valid_until_date_after, page_size=limits["page_size"], ) @@ -693,8 +683,6 @@ def list( sort_by: Union["BundleInstance.SortBy", object] = values.unset, sort_direction: Union["BundleInstance.SortDirection", object] = values.unset, valid_until_date: Union[datetime, object] = values.unset, - valid_until_date_before: Union[datetime, object] = values.unset, - valid_until_date_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> List[BundleInstance]: @@ -712,8 +700,6 @@ def list( :param "BundleInstance.SortBy" sort_by: Can be `valid-until` or `date-updated`. Defaults to `date-created`. :param "BundleInstance.SortDirection" sort_direction: Default is `DESC`. Can be `ASC` or `DESC`. :param datetime valid_until_date: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_before: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_after: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -734,8 +720,6 @@ def list( sort_by=sort_by, sort_direction=sort_direction, valid_until_date=valid_until_date, - valid_until_date_before=valid_until_date_before, - valid_until_date_after=valid_until_date_after, limit=limit, page_size=page_size, ) @@ -752,8 +736,6 @@ async def list_async( sort_by: Union["BundleInstance.SortBy", object] = values.unset, sort_direction: Union["BundleInstance.SortDirection", object] = values.unset, valid_until_date: Union[datetime, object] = values.unset, - valid_until_date_before: Union[datetime, object] = values.unset, - valid_until_date_after: Union[datetime, object] = values.unset, limit: Optional[int] = None, page_size: Optional[int] = None, ) -> List[BundleInstance]: @@ -771,8 +753,6 @@ async def list_async( :param "BundleInstance.SortBy" sort_by: Can be `valid-until` or `date-updated`. Defaults to `date-created`. :param "BundleInstance.SortDirection" sort_direction: Default is `DESC`. Can be `ASC` or `DESC`. :param datetime valid_until_date: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_before: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param datetime valid_until_date_after: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit :param page_size: Number of records to fetch per request, when not set will use @@ -794,8 +774,6 @@ async def list_async( sort_by=sort_by, sort_direction=sort_direction, valid_until_date=valid_until_date, - valid_until_date_before=valid_until_date_before, - valid_until_date_after=valid_until_date_after, limit=limit, page_size=page_size, ) @@ -812,8 +790,6 @@ def page( sort_by: Union["BundleInstance.SortBy", object] = values.unset, sort_direction: Union["BundleInstance.SortDirection", object] = values.unset, valid_until_date: Union[datetime, object] = values.unset, - valid_until_date_before: Union[datetime, object] = values.unset, - valid_until_date_after: Union[datetime, object] = values.unset, page_token: Union[str, object] = values.unset, page_number: Union[int, object] = values.unset, page_size: Union[int, object] = values.unset, @@ -831,8 +807,6 @@ def page( :param sort_by: Can be `valid-until` or `date-updated`. Defaults to `date-created`. :param sort_direction: Default is `DESC`. Can be `ASC` or `DESC`. :param valid_until_date: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param valid_until_date_before: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param valid_until_date_after: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state :param page_size: Number of records to return, defaults to 50 @@ -850,8 +824,6 @@ def page( "SortBy": sort_by, "SortDirection": sort_direction, "ValidUntilDate": serialize.iso8601_datetime(valid_until_date), - "ValidUntilDate<": serialize.iso8601_datetime(valid_until_date_before), - "ValidUntilDate>": serialize.iso8601_datetime(valid_until_date_after), "PageToken": page_token, "Page": page_number, "PageSize": page_size, @@ -872,8 +844,6 @@ async def page_async( sort_by: Union["BundleInstance.SortBy", object] = values.unset, sort_direction: Union["BundleInstance.SortDirection", object] = values.unset, valid_until_date: Union[datetime, object] = values.unset, - valid_until_date_before: Union[datetime, object] = values.unset, - valid_until_date_after: Union[datetime, object] = values.unset, page_token: Union[str, object] = values.unset, page_number: Union[int, object] = values.unset, page_size: Union[int, object] = values.unset, @@ -891,8 +861,6 @@ async def page_async( :param sort_by: Can be `valid-until` or `date-updated`. Defaults to `date-created`. :param sort_direction: Default is `DESC`. Can be `ASC` or `DESC`. :param valid_until_date: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param valid_until_date_before: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. - :param valid_until_date_after: Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state :param page_size: Number of records to return, defaults to 50 @@ -910,8 +878,6 @@ async def page_async( "SortBy": sort_by, "SortDirection": sort_direction, "ValidUntilDate": serialize.iso8601_datetime(valid_until_date), - "ValidUntilDate<": serialize.iso8601_datetime(valid_until_date_before), - "ValidUntilDate>": serialize.iso8601_datetime(valid_until_date_after), "PageToken": page_token, "Page": page_number, "PageSize": page_size, diff --git a/twilio/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.py b/twilio/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.py index 5a0cf036b..eb88f7c9b 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.py @@ -128,6 +128,7 @@ def create( :returns: The created BundleCopyInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -154,6 +155,7 @@ async def create_async( :returns: The created BundleCopyInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/numbers/v2/regulatory_compliance/bundle/evaluation.py b/twilio/rest/numbers/v2/regulatory_compliance/bundle/evaluation.py index 53ad9d769..e4c74ec92 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/bundle/evaluation.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/bundle/evaluation.py @@ -53,7 +53,7 @@ def __init__( self.regulation_sid: Optional[str] = payload.get("regulation_sid") self.bundle_sid: Optional[str] = payload.get("bundle_sid") self.status: Optional["EvaluationInstance.Status"] = payload.get("status") - self.results: Optional[List[object]] = payload.get("results") + self.results: Optional[List[Dict[str, object]]] = payload.get("results") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_created") ) diff --git a/twilio/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.py b/twilio/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.py index f5f36206b..4d2998ff6 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.py @@ -263,6 +263,7 @@ def create(self, object_sid: str) -> ItemAssignmentInstance: :returns: The created ItemAssignmentInstance """ + data = values.of( { "ObjectSid": object_sid, @@ -287,6 +288,7 @@ async def create_async(self, object_sid: str) -> ItemAssignmentInstance: :returns: The created ItemAssignmentInstance """ + data = values.of( { "ObjectSid": object_sid, diff --git a/twilio/rest/numbers/v2/regulatory_compliance/bundle/replace_items.py b/twilio/rest/numbers/v2/regulatory_compliance/bundle/replace_items.py index e8ab99ad7..91d5f18a1 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/bundle/replace_items.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/bundle/replace_items.py @@ -105,6 +105,7 @@ def create(self, from_bundle_sid: str) -> ReplaceItemsInstance: :returns: The created ReplaceItemsInstance """ + data = values.of( { "FromBundleSid": from_bundle_sid, @@ -129,6 +130,7 @@ async def create_async(self, from_bundle_sid: str) -> ReplaceItemsInstance: :returns: The created ReplaceItemsInstance """ + data = values.of( { "FromBundleSid": from_bundle_sid, diff --git a/twilio/rest/numbers/v2/regulatory_compliance/end_user.py b/twilio/rest/numbers/v2/regulatory_compliance/end_user.py index f9bc9d270..b717cd420 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/end_user.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/end_user.py @@ -348,6 +348,7 @@ def create( :returns: The created EndUserInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -379,6 +380,7 @@ async def create_async( :returns: The created EndUserInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/numbers/v2/regulatory_compliance/end_user_type.py b/twilio/rest/numbers/v2/regulatory_compliance/end_user_type.py index 0a762cea3..e11455813 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/end_user_type.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/end_user_type.py @@ -40,7 +40,7 @@ def __init__( self.sid: Optional[str] = payload.get("sid") self.friendly_name: Optional[str] = payload.get("friendly_name") self.machine_name: Optional[str] = payload.get("machine_name") - self.fields: Optional[List[object]] = payload.get("fields") + self.fields: Optional[List[Dict[str, object]]] = payload.get("fields") self.url: Optional[str] = payload.get("url") self._solution = { diff --git a/twilio/rest/numbers/v2/regulatory_compliance/supporting_document.py b/twilio/rest/numbers/v2/regulatory_compliance/supporting_document.py index e619ecdc2..6a4636198 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/supporting_document.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/supporting_document.py @@ -366,6 +366,7 @@ def create( :returns: The created SupportingDocumentInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -397,6 +398,7 @@ async def create_async( :returns: The created SupportingDocumentInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/numbers/v2/regulatory_compliance/supporting_document_type.py b/twilio/rest/numbers/v2/regulatory_compliance/supporting_document_type.py index 65c097b99..811ae1d83 100644 --- a/twilio/rest/numbers/v2/regulatory_compliance/supporting_document_type.py +++ b/twilio/rest/numbers/v2/regulatory_compliance/supporting_document_type.py @@ -40,7 +40,7 @@ def __init__( self.sid: Optional[str] = payload.get("sid") self.friendly_name: Optional[str] = payload.get("friendly_name") self.machine_name: Optional[str] = payload.get("machine_name") - self.fields: Optional[List[object]] = payload.get("fields") + self.fields: Optional[List[Dict[str, object]]] = payload.get("fields") self.url: Optional[str] = payload.get("url") self._solution = { diff --git a/twilio/rest/preview/deployed_devices/fleet/__init__.py b/twilio/rest/preview/deployed_devices/fleet/__init__.py index cb0c45498..b943e670c 100644 --- a/twilio/rest/preview/deployed_devices/fleet/__init__.py +++ b/twilio/rest/preview/deployed_devices/fleet/__init__.py @@ -427,6 +427,7 @@ def create(self, friendly_name: Union[str, object] = values.unset) -> FleetInsta :returns: The created FleetInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -451,6 +452,7 @@ async def create_async( :returns: The created FleetInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/preview/deployed_devices/fleet/certificate.py b/twilio/rest/preview/deployed_devices/fleet/certificate.py index a6654de67..f0304d709 100644 --- a/twilio/rest/preview/deployed_devices/fleet/certificate.py +++ b/twilio/rest/preview/deployed_devices/fleet/certificate.py @@ -374,6 +374,7 @@ def create( :returns: The created CertificateInstance """ + data = values.of( { "CertificateData": certificate_data, @@ -407,6 +408,7 @@ async def create_async( :returns: The created CertificateInstance """ + data = values.of( { "CertificateData": certificate_data, diff --git a/twilio/rest/preview/deployed_devices/fleet/deployment.py b/twilio/rest/preview/deployed_devices/fleet/deployment.py index 5dbda65c6..91272fc30 100644 --- a/twilio/rest/preview/deployed_devices/fleet/deployment.py +++ b/twilio/rest/preview/deployed_devices/fleet/deployment.py @@ -370,6 +370,7 @@ def create( :returns: The created DeploymentInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -400,6 +401,7 @@ async def create_async( :returns: The created DeploymentInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/preview/deployed_devices/fleet/device.py b/twilio/rest/preview/deployed_devices/fleet/device.py index afaa0fce2..1a992941a 100644 --- a/twilio/rest/preview/deployed_devices/fleet/device.py +++ b/twilio/rest/preview/deployed_devices/fleet/device.py @@ -410,6 +410,7 @@ def create( :returns: The created DeviceInstance """ + data = values.of( { "UniqueName": unique_name, @@ -449,6 +450,7 @@ async def create_async( :returns: The created DeviceInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/preview/deployed_devices/fleet/key.py b/twilio/rest/preview/deployed_devices/fleet/key.py index 9bcfd8fb0..e98d8dd69 100644 --- a/twilio/rest/preview/deployed_devices/fleet/key.py +++ b/twilio/rest/preview/deployed_devices/fleet/key.py @@ -372,6 +372,7 @@ def create( :returns: The created KeyInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -402,6 +403,7 @@ async def create_async( :returns: The created KeyInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/preview/hosted_numbers/authorization_document/__init__.py b/twilio/rest/preview/hosted_numbers/authorization_document/__init__.py index 1cab77127..5ea74ff51 100644 --- a/twilio/rest/preview/hosted_numbers/authorization_document/__init__.py +++ b/twilio/rest/preview/hosted_numbers/authorization_document/__init__.py @@ -417,6 +417,7 @@ def create( :returns: The created AuthorizationDocumentInstance """ + data = values.of( { "HostedNumberOrderSids": serialize.map( @@ -459,6 +460,7 @@ async def create_async( :returns: The created AuthorizationDocumentInstance """ + data = values.of( { "HostedNumberOrderSids": serialize.map( diff --git a/twilio/rest/preview/hosted_numbers/hosted_number_order.py b/twilio/rest/preview/hosted_numbers/hosted_number_order.py index 392720248..8a50a4537 100644 --- a/twilio/rest/preview/hosted_numbers/hosted_number_order.py +++ b/twilio/rest/preview/hosted_numbers/hosted_number_order.py @@ -543,6 +543,7 @@ def create( :returns: The created HostedNumberOrderInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -618,6 +619,7 @@ async def create_async( :returns: The created HostedNumberOrderInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/preview/marketplace/installed_add_on/__init__.py b/twilio/rest/preview/marketplace/installed_add_on/__init__.py index 87d092672..e9a7e8cd7 100644 --- a/twilio/rest/preview/marketplace/installed_add_on/__init__.py +++ b/twilio/rest/preview/marketplace/installed_add_on/__init__.py @@ -375,6 +375,7 @@ def create( :returns: The created InstalledAddOnInstance """ + data = values.of( { "AvailableAddOnSid": available_add_on_sid, @@ -409,6 +410,7 @@ async def create_async( :returns: The created InstalledAddOnInstance """ + data = values.of( { "AvailableAddOnSid": available_add_on_sid, diff --git a/twilio/rest/preview/sync/service/__init__.py b/twilio/rest/preview/sync/service/__init__.py index c9f33d19b..b3a962fa6 100644 --- a/twilio/rest/preview/sync/service/__init__.py +++ b/twilio/rest/preview/sync/service/__init__.py @@ -441,6 +441,7 @@ def create( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -475,6 +476,7 @@ async def create_async( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/preview/sync/service/document/__init__.py b/twilio/rest/preview/sync/service/document/__init__.py index ebd08889f..660aee9b1 100644 --- a/twilio/rest/preview/sync/service/document/__init__.py +++ b/twilio/rest/preview/sync/service/document/__init__.py @@ -397,6 +397,7 @@ def create( :returns: The created DocumentInstance """ + data = values.of( { "UniqueName": unique_name, @@ -427,6 +428,7 @@ async def create_async( :returns: The created DocumentInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/preview/sync/service/sync_list/__init__.py b/twilio/rest/preview/sync/service/sync_list/__init__.py index d3cd34c54..7dfc74396 100644 --- a/twilio/rest/preview/sync/service/sync_list/__init__.py +++ b/twilio/rest/preview/sync/service/sync_list/__init__.py @@ -316,6 +316,7 @@ def create( :returns: The created SyncListInstance """ + data = values.of( { "UniqueName": unique_name, @@ -342,6 +343,7 @@ async def create_async( :returns: The created SyncListInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/preview/sync/service/sync_list/sync_list_item.py b/twilio/rest/preview/sync/service/sync_list/sync_list_item.py index 592f84a3c..d795075fe 100644 --- a/twilio/rest/preview/sync/service/sync_list/sync_list_item.py +++ b/twilio/rest/preview/sync/service/sync_list/sync_list_item.py @@ -406,6 +406,7 @@ def create(self, data: object) -> SyncListItemInstance: :returns: The created SyncListItemInstance """ + data = values.of( { "Data": serialize.object(data), @@ -433,6 +434,7 @@ async def create_async(self, data: object) -> SyncListItemInstance: :returns: The created SyncListItemInstance """ + data = values.of( { "Data": serialize.object(data), diff --git a/twilio/rest/preview/sync/service/sync_map/__init__.py b/twilio/rest/preview/sync/service/sync_map/__init__.py index 47235fd80..cc5907cf8 100644 --- a/twilio/rest/preview/sync/service/sync_map/__init__.py +++ b/twilio/rest/preview/sync/service/sync_map/__init__.py @@ -314,6 +314,7 @@ def create(self, unique_name: Union[str, object] = values.unset) -> SyncMapInsta :returns: The created SyncMapInstance """ + data = values.of( { "UniqueName": unique_name, @@ -340,6 +341,7 @@ async def create_async( :returns: The created SyncMapInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/preview/sync/service/sync_map/sync_map_item.py b/twilio/rest/preview/sync/service/sync_map/sync_map_item.py index ef42e77d3..20240d1ef 100644 --- a/twilio/rest/preview/sync/service/sync_map/sync_map_item.py +++ b/twilio/rest/preview/sync/service/sync_map/sync_map_item.py @@ -407,6 +407,7 @@ def create(self, key: str, data: object) -> SyncMapItemInstance: :returns: The created SyncMapItemInstance """ + data = values.of( { "Key": key, @@ -436,6 +437,7 @@ async def create_async(self, key: str, data: object) -> SyncMapItemInstance: :returns: The created SyncMapItemInstance """ + data = values.of( { "Key": key, diff --git a/twilio/rest/preview/understand/assistant/__init__.py b/twilio/rest/preview/understand/assistant/__init__.py index 27970ca4d..9f50e5fff 100644 --- a/twilio/rest/preview/understand/assistant/__init__.py +++ b/twilio/rest/preview/understand/assistant/__init__.py @@ -612,6 +612,7 @@ def create( :returns: The created AssistantInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -658,6 +659,7 @@ async def create_async( :returns: The created AssistantInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/preview/understand/assistant/field_type/__init__.py b/twilio/rest/preview/understand/assistant/field_type/__init__.py index 0deb38faf..28cec5ac8 100644 --- a/twilio/rest/preview/understand/assistant/field_type/__init__.py +++ b/twilio/rest/preview/understand/assistant/field_type/__init__.py @@ -397,6 +397,7 @@ def create( :returns: The created FieldTypeInstance """ + data = values.of( { "UniqueName": unique_name, @@ -425,6 +426,7 @@ async def create_async( :returns: The created FieldTypeInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/preview/understand/assistant/field_type/field_value.py b/twilio/rest/preview/understand/assistant/field_type/field_value.py index 87fb7df94..71bf01bf5 100644 --- a/twilio/rest/preview/understand/assistant/field_type/field_value.py +++ b/twilio/rest/preview/understand/assistant/field_type/field_value.py @@ -289,6 +289,7 @@ def create( :returns: The created FieldValueInstance """ + data = values.of( { "Language": language, @@ -322,6 +323,7 @@ async def create_async( :returns: The created FieldValueInstance """ + data = values.of( { "Language": language, diff --git a/twilio/rest/preview/understand/assistant/model_build.py b/twilio/rest/preview/understand/assistant/model_build.py index 8b45b76dc..bc30ebdd2 100644 --- a/twilio/rest/preview/understand/assistant/model_build.py +++ b/twilio/rest/preview/understand/assistant/model_build.py @@ -368,6 +368,7 @@ def create( :returns: The created ModelBuildInstance """ + data = values.of( { "StatusCallback": status_callback, @@ -398,6 +399,7 @@ async def create_async( :returns: The created ModelBuildInstance """ + data = values.of( { "StatusCallback": status_callback, diff --git a/twilio/rest/preview/understand/assistant/query.py b/twilio/rest/preview/understand/assistant/query.py index 62fb2e3e1..116c425ff 100644 --- a/twilio/rest/preview/understand/assistant/query.py +++ b/twilio/rest/preview/understand/assistant/query.py @@ -386,6 +386,7 @@ def create( :returns: The created QueryInstance """ + data = values.of( { "Language": language, @@ -425,6 +426,7 @@ async def create_async( :returns: The created QueryInstance """ + data = values.of( { "Language": language, diff --git a/twilio/rest/preview/understand/assistant/task/__init__.py b/twilio/rest/preview/understand/assistant/task/__init__.py index 135a421ec..26fa1f74e 100644 --- a/twilio/rest/preview/understand/assistant/task/__init__.py +++ b/twilio/rest/preview/understand/assistant/task/__init__.py @@ -493,6 +493,7 @@ def create( :returns: The created TaskInstance """ + data = values.of( { "UniqueName": unique_name, @@ -529,6 +530,7 @@ async def create_async( :returns: The created TaskInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/preview/understand/assistant/task/field.py b/twilio/rest/preview/understand/assistant/task/field.py index e8f4aa3a8..c1f97b617 100644 --- a/twilio/rest/preview/understand/assistant/task/field.py +++ b/twilio/rest/preview/understand/assistant/task/field.py @@ -282,6 +282,7 @@ def create(self, field_type: str, unique_name: str) -> FieldInstance: :returns: The created FieldInstance """ + data = values.of( { "FieldType": field_type, @@ -311,6 +312,7 @@ async def create_async(self, field_type: str, unique_name: str) -> FieldInstance :returns: The created FieldInstance """ + data = values.of( { "FieldType": field_type, diff --git a/twilio/rest/preview/understand/assistant/task/sample.py b/twilio/rest/preview/understand/assistant/task/sample.py index ef8719c6a..ba8addfaa 100644 --- a/twilio/rest/preview/understand/assistant/task/sample.py +++ b/twilio/rest/preview/understand/assistant/task/sample.py @@ -406,6 +406,7 @@ def create( :returns: The created SampleInstance """ + data = values.of( { "Language": language, @@ -442,6 +443,7 @@ async def create_async( :returns: The created SampleInstance """ + data = values.of( { "Language": language, diff --git a/twilio/rest/preview/wireless/command.py b/twilio/rest/preview/wireless/command.py index 4f3e4603a..b8cc4d6a0 100644 --- a/twilio/rest/preview/wireless/command.py +++ b/twilio/rest/preview/wireless/command.py @@ -225,6 +225,7 @@ def create( :returns: The created CommandInstance """ + data = values.of( { "Command": command, @@ -268,6 +269,7 @@ async def create_async( :returns: The created CommandInstance """ + data = values.of( { "Command": command, diff --git a/twilio/rest/preview/wireless/rate_plan.py b/twilio/rest/preview/wireless/rate_plan.py index 04b16f5b3..08ace21fb 100644 --- a/twilio/rest/preview/wireless/rate_plan.py +++ b/twilio/rest/preview/wireless/rate_plan.py @@ -375,6 +375,7 @@ def create( :returns: The created RatePlanInstance """ + data = values.of( { "UniqueName": unique_name, @@ -429,6 +430,7 @@ async def create_async( :returns: The created RatePlanInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/preview_messaging/PreviewMessagingBase.py b/twilio/rest/preview_messaging/PreviewMessagingBase.py index 3b03fb7c0..1bd182d82 100644 --- a/twilio/rest/preview_messaging/PreviewMessagingBase.py +++ b/twilio/rest/preview_messaging/PreviewMessagingBase.py @@ -19,9 +19,9 @@ class PreviewMessagingBase(Domain): def __init__(self, twilio: Client): """ - Initialize the Preview Messaging Domain + Initialize the PreviewMessaging Domain - :returns: Domain for Preview Messaging + :returns: Domain for PreviewMessaging """ super().__init__(twilio, "https://preview.messaging.twilio.com") self._v1: Optional[V1] = None @@ -29,7 +29,7 @@ def __init__(self, twilio: Client): @property def v1(self) -> V1: """ - :returns: Versions v1 of Preview Messaging + :returns: Versions v1 of PreviewMessaging """ if self._v1 is None: self._v1 = V1(self) diff --git a/twilio/rest/preview_messaging/v1/message.py b/twilio/rest/preview_messaging/v1/message.py index 2d83b9338..2cce21f8e 100644 --- a/twilio/rest/preview_messaging/v1/message.py +++ b/twilio/rest/preview_messaging/v1/message.py @@ -81,7 +81,7 @@ class CreateMessagesRequest(object): """ def __init__(self, payload: Dict[str, Any]): - self.messages: Optional[MessageList.MessagingV1Message] = payload.get( + self.messages: Optional[List[MessageList.MessagingV1Message]] = payload.get( "messages" ) self.from_: Optional[str] = payload.get("from_") @@ -90,7 +90,7 @@ def __init__(self, payload: Dict[str, Any]): ) self.body: Optional[str] = payload.get("body") self.content_sid: Optional[str] = payload.get("content_sid") - self.media_url: Optional[str] = payload.get("media_url") + self.media_url: Optional[List[str]] = payload.get("media_url") self.status_callback: Optional[str] = payload.get("status_callback") self.validity_period: Optional[int] = payload.get("validity_period") self.send_at: Optional[str] = payload.get("send_at") @@ -124,25 +124,6 @@ def to_dict(self): "application_sid": self.application_sid, } - class MessagingV1FailedMessageReceipt(object): - """ - :ivar to: The recipient phone number - :ivar error_message: The description of the error_code - :ivar error_code: The error code associated with the message creation attempt - """ - - def __init__(self, payload: Dict[str, Any]): - self.to: Optional[str] = payload.get("to") - self.error_message: Optional[str] = payload.get("error_message") - self.error_code: Optional[int] = payload.get("error_code") - - def to_dict(self): - return { - "to": self.to, - "error_message": self.error_message, - "error_code": self.error_code, - } - class MessagingV1Message(object): """ :ivar to: The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. @@ -164,22 +145,6 @@ def to_dict(self): "content_variables": self.content_variables, } - class MessagingV1MessageReceipt(object): - """ - :ivar to: The recipient phone number - :ivar sid: The unique string that identifies the resource - """ - - def __init__(self, payload: Dict[str, Any]): - self.to: Optional[str] = payload.get("to") - self.sid: Optional[str] = payload.get("sid") - - def to_dict(self): - return { - "to": self.to, - "sid": self.sid, - } - def __init__(self, version: Version): """ Initialize the MessageList diff --git a/twilio/rest/proxy/v1/service/__init__.py b/twilio/rest/proxy/v1/service/__init__.py index ec886ad2b..0cd90e817 100644 --- a/twilio/rest/proxy/v1/service/__init__.py +++ b/twilio/rest/proxy/v1/service/__init__.py @@ -532,6 +532,7 @@ def create( :returns: The created ServiceInstance """ + data = values.of( { "UniqueName": unique_name, @@ -580,6 +581,7 @@ async def create_async( :returns: The created ServiceInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/proxy/v1/service/phone_number.py b/twilio/rest/proxy/v1/service/phone_number.py index fc8c514f1..ec0af3dde 100644 --- a/twilio/rest/proxy/v1/service/phone_number.py +++ b/twilio/rest/proxy/v1/service/phone_number.py @@ -366,6 +366,7 @@ def create( :returns: The created PhoneNumberInstance """ + data = values.of( { "Sid": sid, @@ -399,6 +400,7 @@ async def create_async( :returns: The created PhoneNumberInstance """ + data = values.of( { "Sid": sid, diff --git a/twilio/rest/proxy/v1/service/session/__init__.py b/twilio/rest/proxy/v1/service/session/__init__.py index 7ce76fcab..1c9dc055a 100644 --- a/twilio/rest/proxy/v1/service/session/__init__.py +++ b/twilio/rest/proxy/v1/service/session/__init__.py @@ -470,6 +470,7 @@ def create( :returns: The created SessionInstance """ + data = values.of( { "UniqueName": unique_name, @@ -514,6 +515,7 @@ async def create_async( :returns: The created SessionInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/proxy/v1/service/session/participant/__init__.py b/twilio/rest/proxy/v1/service/session/participant/__init__.py index ce3c16abd..a14b19a95 100644 --- a/twilio/rest/proxy/v1/service/session/participant/__init__.py +++ b/twilio/rest/proxy/v1/service/session/participant/__init__.py @@ -330,6 +330,7 @@ def create( :returns: The created ParticipantInstance """ + data = values.of( { "Identifier": identifier, @@ -369,6 +370,7 @@ async def create_async( :returns: The created ParticipantInstance """ + data = values.of( { "Identifier": identifier, diff --git a/twilio/rest/proxy/v1/service/session/participant/message_interaction.py b/twilio/rest/proxy/v1/service/session/participant/message_interaction.py index b07b1782f..d2b60ce95 100644 --- a/twilio/rest/proxy/v1/service/session/participant/message_interaction.py +++ b/twilio/rest/proxy/v1/service/session/participant/message_interaction.py @@ -322,6 +322,7 @@ def create( :returns: The created MessageInteractionInstance """ + data = values.of( { "Body": body, @@ -356,6 +357,7 @@ async def create_async( :returns: The created MessageInteractionInstance """ + data = values.of( { "Body": body, diff --git a/twilio/rest/proxy/v1/service/short_code.py b/twilio/rest/proxy/v1/service/short_code.py index f440a944e..ccda96db4 100644 --- a/twilio/rest/proxy/v1/service/short_code.py +++ b/twilio/rest/proxy/v1/service/short_code.py @@ -353,6 +353,7 @@ def create(self, sid: str) -> ShortCodeInstance: :returns: The created ShortCodeInstance """ + data = values.of( { "Sid": sid, @@ -377,6 +378,7 @@ async def create_async(self, sid: str) -> ShortCodeInstance: :returns: The created ShortCodeInstance """ + data = values.of( { "Sid": sid, diff --git a/twilio/rest/serverless/v1/service/__init__.py b/twilio/rest/serverless/v1/service/__init__.py index 146827d81..ab58c0eb8 100644 --- a/twilio/rest/serverless/v1/service/__init__.py +++ b/twilio/rest/serverless/v1/service/__init__.py @@ -450,6 +450,7 @@ def create( :returns: The created ServiceInstance """ + data = values.of( { "UniqueName": unique_name, @@ -484,6 +485,7 @@ async def create_async( :returns: The created ServiceInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/serverless/v1/service/asset/__init__.py b/twilio/rest/serverless/v1/service/asset/__init__.py index 7b70adf1c..38f359810 100644 --- a/twilio/rest/serverless/v1/service/asset/__init__.py +++ b/twilio/rest/serverless/v1/service/asset/__init__.py @@ -364,6 +364,7 @@ def create(self, friendly_name: str) -> AssetInstance: :returns: The created AssetInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -388,6 +389,7 @@ async def create_async(self, friendly_name: str) -> AssetInstance: :returns: The created AssetInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/serverless/v1/service/build/__init__.py b/twilio/rest/serverless/v1/service/build/__init__.py index e5dbe3f9e..25997bec2 100644 --- a/twilio/rest/serverless/v1/service/build/__init__.py +++ b/twilio/rest/serverless/v1/service/build/__init__.py @@ -62,9 +62,9 @@ def __init__(self, version: Version, payload: Dict[str, Any], service_sid: str, self.account_sid: Optional[str] = payload.get("account_sid") self.service_sid: Optional[str] = payload.get("service_sid") self.status: Optional["BuildInstance.Status"] = payload.get("status") - self.asset_versions: Optional[List[object]] = payload.get("asset_versions") - self.function_versions: Optional[List[object]] = payload.get("function_versions") - self.dependencies: Optional[List[object]] = payload.get("dependencies") + self.asset_versions: Optional[List[Dict[str, object]]] = payload.get("asset_versions") + self.function_versions: Optional[List[Dict[str, object]]] = payload.get("function_versions") + self.dependencies: Optional[List[Dict[str, object]]] = payload.get("dependencies") self.runtime: Optional["BuildInstance.Runtime"] = payload.get("runtime") self.date_created: Optional[datetime] = deserialize.iso8601_datetime(payload.get("date_created")) self.date_updated: Optional[datetime] = deserialize.iso8601_datetime(payload.get("date_updated")) @@ -275,7 +275,7 @@ def __repr__(self) -> str: class BuildList(ListResource): - + def __init__(self, version: Version, service_sid: str): """ Initialize the BuildList @@ -306,6 +306,7 @@ def create(self, asset_versions: Union[List[str], object]=values.unset, function :returns: The created BuildInstance """ + data = values.of({ 'AssetVersions': serialize.map(asset_versions, lambda e: e), 'FunctionVersions': serialize.map(function_versions, lambda e: e), @@ -329,6 +330,7 @@ async def create_async(self, asset_versions: Union[List[str], object]=values.uns :returns: The created BuildInstance """ + data = values.of({ 'AssetVersions': serialize.map(asset_versions, lambda e: e), 'FunctionVersions': serialize.map(function_versions, lambda e: e), diff --git a/twilio/rest/serverless/v1/service/build/build_status.py b/twilio/rest/serverless/v1/service/build/build_status.py index c127f89a4..2613ae3cb 100644 --- a/twilio/rest/serverless/v1/service/build/build_status.py +++ b/twilio/rest/serverless/v1/service/build/build_status.py @@ -164,7 +164,7 @@ def __repr__(self) -> str: class BuildStatusList(ListResource): - + def __init__(self, version: Version, service_sid: str, sid: str): """ Initialize the BuildStatusList diff --git a/twilio/rest/serverless/v1/service/environment/__init__.py b/twilio/rest/serverless/v1/service/environment/__init__.py index dac46b974..235c77739 100644 --- a/twilio/rest/serverless/v1/service/environment/__init__.py +++ b/twilio/rest/serverless/v1/service/environment/__init__.py @@ -341,6 +341,7 @@ def create( :returns: The created EnvironmentInstance """ + data = values.of( { "UniqueName": unique_name, @@ -369,6 +370,7 @@ async def create_async( :returns: The created EnvironmentInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/serverless/v1/service/environment/deployment.py b/twilio/rest/serverless/v1/service/environment/deployment.py index f0f6b5003..6667bd891 100644 --- a/twilio/rest/serverless/v1/service/environment/deployment.py +++ b/twilio/rest/serverless/v1/service/environment/deployment.py @@ -243,6 +243,7 @@ def create( :returns: The created DeploymentInstance """ + data = values.of( { "BuildSid": build_sid, @@ -272,6 +273,7 @@ async def create_async( :returns: The created DeploymentInstance """ + data = values.of( { "BuildSid": build_sid, diff --git a/twilio/rest/serverless/v1/service/environment/variable.py b/twilio/rest/serverless/v1/service/environment/variable.py index b619e3a65..b64484f57 100644 --- a/twilio/rest/serverless/v1/service/environment/variable.py +++ b/twilio/rest/serverless/v1/service/environment/variable.py @@ -390,6 +390,7 @@ def create(self, key: str, value: str) -> VariableInstance: :returns: The created VariableInstance """ + data = values.of( { "Key": key, @@ -419,6 +420,7 @@ async def create_async(self, key: str, value: str) -> VariableInstance: :returns: The created VariableInstance """ + data = values.of( { "Key": key, diff --git a/twilio/rest/serverless/v1/service/function/__init__.py b/twilio/rest/serverless/v1/service/function/__init__.py index 3f2919316..7b9718e24 100644 --- a/twilio/rest/serverless/v1/service/function/__init__.py +++ b/twilio/rest/serverless/v1/service/function/__init__.py @@ -366,6 +366,7 @@ def create(self, friendly_name: str) -> FunctionInstance: :returns: The created FunctionInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -390,6 +391,7 @@ async def create_async(self, friendly_name: str) -> FunctionInstance: :returns: The created FunctionInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/studio/v1/flow/engagement/__init__.py b/twilio/rest/studio/v1/flow/engagement/__init__.py index e0f56dbaf..8271fa2c9 100644 --- a/twilio/rest/studio/v1/flow/engagement/__init__.py +++ b/twilio/rest/studio/v1/flow/engagement/__init__.py @@ -325,6 +325,7 @@ def create( :returns: The created EngagementInstance """ + data = values.of( { "To": to, @@ -355,6 +356,7 @@ async def create_async( :returns: The created EngagementInstance """ + data = values.of( { "To": to, diff --git a/twilio/rest/studio/v1/flow/execution/__init__.py b/twilio/rest/studio/v1/flow/execution/__init__.py index d0ad05b67..c4cfd09c4 100644 --- a/twilio/rest/studio/v1/flow/execution/__init__.py +++ b/twilio/rest/studio/v1/flow/execution/__init__.py @@ -405,6 +405,7 @@ def create( :returns: The created ExecutionInstance """ + data = values.of( { "To": to, @@ -435,6 +436,7 @@ async def create_async( :returns: The created ExecutionInstance """ + data = values.of( { "To": to, diff --git a/twilio/rest/studio/v2/flow/__init__.py b/twilio/rest/studio/v2/flow/__init__.py index 408e29cc7..dafec9432 100644 --- a/twilio/rest/studio/v2/flow/__init__.py +++ b/twilio/rest/studio/v2/flow/__init__.py @@ -62,8 +62,8 @@ def __init__( self.revision: Optional[int] = deserialize.integer(payload.get("revision")) self.commit_message: Optional[str] = payload.get("commit_message") self.valid: Optional[bool] = payload.get("valid") - self.errors: Optional[List[object]] = payload.get("errors") - self.warnings: Optional[List[object]] = payload.get("warnings") + self.errors: Optional[List[Dict[str, object]]] = payload.get("errors") + self.warnings: Optional[List[Dict[str, object]]] = payload.get("warnings") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_created") ) @@ -452,6 +452,7 @@ def create( :returns: The created FlowInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -486,6 +487,7 @@ async def create_async( :returns: The created FlowInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/studio/v2/flow/execution/__init__.py b/twilio/rest/studio/v2/flow/execution/__init__.py index 117368352..de539fa59 100644 --- a/twilio/rest/studio/v2/flow/execution/__init__.py +++ b/twilio/rest/studio/v2/flow/execution/__init__.py @@ -403,6 +403,7 @@ def create( :returns: The created ExecutionInstance """ + data = values.of( { "To": to, @@ -433,6 +434,7 @@ async def create_async( :returns: The created ExecutionInstance """ + data = values.of( { "To": to, diff --git a/twilio/rest/studio/v2/flow/flow_revision.py b/twilio/rest/studio/v2/flow/flow_revision.py index a9a5394a4..64c50b0a3 100644 --- a/twilio/rest/studio/v2/flow/flow_revision.py +++ b/twilio/rest/studio/v2/flow/flow_revision.py @@ -60,7 +60,7 @@ def __init__( self.revision: Optional[int] = deserialize.integer(payload.get("revision")) self.commit_message: Optional[str] = payload.get("commit_message") self.valid: Optional[bool] = payload.get("valid") - self.errors: Optional[List[object]] = payload.get("errors") + self.errors: Optional[List[Dict[str, object]]] = payload.get("errors") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_created") ) diff --git a/twilio/rest/supersim/v1/esim_profile.py b/twilio/rest/supersim/v1/esim_profile.py index 082441dda..fedd2e174 100644 --- a/twilio/rest/supersim/v1/esim_profile.py +++ b/twilio/rest/supersim/v1/esim_profile.py @@ -36,7 +36,7 @@ class Status(object): :ivar sid: The unique string that we created to identify the eSIM Profile resource. :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the eSIM Profile resource belongs. :ivar iccid: The [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with the Sim resource. - :ivar sim_sid: The SID of the [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource that this eSIM Profile controls. + :ivar sim_sid: The SID of the [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource that this eSIM Profile controls. :ivar status: :ivar eid: Identifier of the eUICC that can claim the eSIM Profile. :ivar smdp_plus_address: Address of the SM-DP+ server from which the Profile will be downloaded. The URL will appear once the eSIM Profile reaches the status `available`. @@ -232,6 +232,7 @@ def create( :returns: The created EsimProfileInstance """ + data = values.of( { "CallbackUrl": callback_url, @@ -266,6 +267,7 @@ async def create_async( :returns: The created EsimProfileInstance """ + data = values.of( { "CallbackUrl": callback_url, @@ -298,7 +300,7 @@ def stream( The results are returned as a generator, so this operation is memory efficient. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit @@ -331,7 +333,7 @@ async def stream_async( The results are returned as a generator, so this operation is memory efficient. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit @@ -363,7 +365,7 @@ def list( memory before returning. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit @@ -398,7 +400,7 @@ async def list_async( memory before returning. :param str eid: List the eSIM Profiles that have been associated with an EId. - :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param "EsimProfileInstance.Status" status: List the eSIM Profiles that are in a given status. :param limit: Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit @@ -434,7 +436,7 @@ def page( Request is executed immediately :param eid: List the eSIM Profiles that have been associated with an EId. - :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param status: List the eSIM Profiles that are in a given status. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state @@ -470,7 +472,7 @@ async def page_async( Request is executed immediately :param eid: List the eSIM Profiles that have been associated with an EId. - :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. + :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. :param status: List the eSIM Profiles that are in a given status. :param page_token: PageToken provided by the API :param page_number: Page Number, this value is simply for client state diff --git a/twilio/rest/supersim/v1/fleet.py b/twilio/rest/supersim/v1/fleet.py index 0017ff4e9..e09ea796f 100644 --- a/twilio/rest/supersim/v1/fleet.py +++ b/twilio/rest/supersim/v1/fleet.py @@ -395,6 +395,7 @@ def create( :returns: The created FleetInstance """ + data = values.of( { "NetworkAccessProfile": network_access_profile, @@ -444,6 +445,7 @@ async def create_async( :returns: The created FleetInstance """ + data = values.of( { "NetworkAccessProfile": network_access_profile, diff --git a/twilio/rest/supersim/v1/ip_command.py b/twilio/rest/supersim/v1/ip_command.py index 98e6e2a0a..fd49bd8a8 100644 --- a/twilio/rest/supersim/v1/ip_command.py +++ b/twilio/rest/supersim/v1/ip_command.py @@ -246,6 +246,7 @@ def create( :returns: The created IpCommandInstance """ + data = values.of( { "Sim": sim, @@ -286,6 +287,7 @@ async def create_async( :returns: The created IpCommandInstance """ + data = values.of( { "Sim": sim, diff --git a/twilio/rest/supersim/v1/network.py b/twilio/rest/supersim/v1/network.py index 7364105c8..a526c8dfb 100644 --- a/twilio/rest/supersim/v1/network.py +++ b/twilio/rest/supersim/v1/network.py @@ -41,7 +41,7 @@ def __init__( self.friendly_name: Optional[str] = payload.get("friendly_name") self.url: Optional[str] = payload.get("url") self.iso_country: Optional[str] = payload.get("iso_country") - self.identifiers: Optional[List[object]] = payload.get("identifiers") + self.identifiers: Optional[List[Dict[str, object]]] = payload.get("identifiers") self._solution = { "sid": sid or self.sid, diff --git a/twilio/rest/supersim/v1/network_access_profile/__init__.py b/twilio/rest/supersim/v1/network_access_profile/__init__.py index 0712dbe65..3e2b65d9c 100644 --- a/twilio/rest/supersim/v1/network_access_profile/__init__.py +++ b/twilio/rest/supersim/v1/network_access_profile/__init__.py @@ -311,6 +311,7 @@ def create( :returns: The created NetworkAccessProfileInstance """ + data = values.of( { "UniqueName": unique_name, @@ -339,6 +340,7 @@ async def create_async( :returns: The created NetworkAccessProfileInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/supersim/v1/network_access_profile/network_access_profile_network.py b/twilio/rest/supersim/v1/network_access_profile/network_access_profile_network.py index 065418f39..a6ef54e51 100644 --- a/twilio/rest/supersim/v1/network_access_profile/network_access_profile_network.py +++ b/twilio/rest/supersim/v1/network_access_profile/network_access_profile_network.py @@ -48,7 +48,7 @@ def __init__( ) self.friendly_name: Optional[str] = payload.get("friendly_name") self.iso_country: Optional[str] = payload.get("iso_country") - self.identifiers: Optional[List[object]] = payload.get("identifiers") + self.identifiers: Optional[List[Dict[str, object]]] = payload.get("identifiers") self.url: Optional[str] = payload.get("url") self._solution = { @@ -272,6 +272,7 @@ def create(self, network: str) -> NetworkAccessProfileNetworkInstance: :returns: The created NetworkAccessProfileNetworkInstance """ + data = values.of( { "Network": network, @@ -298,6 +299,7 @@ async def create_async(self, network: str) -> NetworkAccessProfileNetworkInstanc :returns: The created NetworkAccessProfileNetworkInstance """ + data = values.of( { "Network": network, diff --git a/twilio/rest/supersim/v1/settings_update.py b/twilio/rest/supersim/v1/settings_update.py index d9b00143a..75a58a196 100644 --- a/twilio/rest/supersim/v1/settings_update.py +++ b/twilio/rest/supersim/v1/settings_update.py @@ -48,7 +48,7 @@ def __init__(self, version: Version, payload: Dict[str, Any]): self.iccid: Optional[str] = payload.get("iccid") self.sim_sid: Optional[str] = payload.get("sim_sid") self.status: Optional["SettingsUpdateInstance.Status"] = payload.get("status") - self.packages: Optional[List[object]] = payload.get("packages") + self.packages: Optional[List[Dict[str, object]]] = payload.get("packages") self.date_completed: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_completed") ) diff --git a/twilio/rest/supersim/v1/sim/__init__.py b/twilio/rest/supersim/v1/sim/__init__.py index fae942749..7b2636869 100644 --- a/twilio/rest/supersim/v1/sim/__init__.py +++ b/twilio/rest/supersim/v1/sim/__init__.py @@ -403,6 +403,7 @@ def create(self, iccid: str, registration_code: str) -> SimInstance: :returns: The created SimInstance """ + data = values.of( { "Iccid": iccid, @@ -427,6 +428,7 @@ async def create_async(self, iccid: str, registration_code: str) -> SimInstance: :returns: The created SimInstance """ + data = values.of( { "Iccid": iccid, diff --git a/twilio/rest/supersim/v1/sms_command.py b/twilio/rest/supersim/v1/sms_command.py index 83601dd7c..9e68e71b7 100644 --- a/twilio/rest/supersim/v1/sms_command.py +++ b/twilio/rest/supersim/v1/sms_command.py @@ -227,6 +227,7 @@ def create( :returns: The created SmsCommandInstance """ + data = values.of( { "Sim": sim, @@ -261,6 +262,7 @@ async def create_async( :returns: The created SmsCommandInstance """ + data = values.of( { "Sim": sim, diff --git a/twilio/rest/sync/v1/service/__init__.py b/twilio/rest/sync/v1/service/__init__.py index 7db062b90..8e640535d 100644 --- a/twilio/rest/sync/v1/service/__init__.py +++ b/twilio/rest/sync/v1/service/__init__.py @@ -518,6 +518,7 @@ def create( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -561,6 +562,7 @@ async def create_async( :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/sync/v1/service/document/__init__.py b/twilio/rest/sync/v1/service/document/__init__.py index 5689594a8..847dbccb3 100644 --- a/twilio/rest/sync/v1/service/document/__init__.py +++ b/twilio/rest/sync/v1/service/document/__init__.py @@ -423,6 +423,7 @@ def create( :returns: The created DocumentInstance """ + data = values.of( { "UniqueName": unique_name, @@ -456,6 +457,7 @@ async def create_async( :returns: The created DocumentInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/sync/v1/service/sync_list/__init__.py b/twilio/rest/sync/v1/service/sync_list/__init__.py index 545ebee38..960616260 100644 --- a/twilio/rest/sync/v1/service/sync_list/__init__.py +++ b/twilio/rest/sync/v1/service/sync_list/__init__.py @@ -427,6 +427,7 @@ def create( :returns: The created SyncListInstance """ + data = values.of( { "UniqueName": unique_name, @@ -460,6 +461,7 @@ async def create_async( :returns: The created SyncListInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/sync/v1/service/sync_list/sync_list_item.py b/twilio/rest/sync/v1/service/sync_list/sync_list_item.py index 640b4c38c..0959b0e51 100644 --- a/twilio/rest/sync/v1/service/sync_list/sync_list_item.py +++ b/twilio/rest/sync/v1/service/sync_list/sync_list_item.py @@ -463,6 +463,7 @@ def create( :returns: The created SyncListItemInstance """ + data = values.of( { "Data": serialize.object(data), @@ -502,6 +503,7 @@ async def create_async( :returns: The created SyncListItemInstance """ + data = values.of( { "Data": serialize.object(data), diff --git a/twilio/rest/sync/v1/service/sync_map/__init__.py b/twilio/rest/sync/v1/service/sync_map/__init__.py index 5b38378f2..9f034f558 100644 --- a/twilio/rest/sync/v1/service/sync_map/__init__.py +++ b/twilio/rest/sync/v1/service/sync_map/__init__.py @@ -427,6 +427,7 @@ def create( :returns: The created SyncMapInstance """ + data = values.of( { "UniqueName": unique_name, @@ -460,6 +461,7 @@ async def create_async( :returns: The created SyncMapInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/sync/v1/service/sync_map/sync_map_item.py b/twilio/rest/sync/v1/service/sync_map/sync_map_item.py index ef290caab..e3a7f321b 100644 --- a/twilio/rest/sync/v1/service/sync_map/sync_map_item.py +++ b/twilio/rest/sync/v1/service/sync_map/sync_map_item.py @@ -465,6 +465,7 @@ def create( :returns: The created SyncMapItemInstance """ + data = values.of( { "Key": key, @@ -507,6 +508,7 @@ async def create_async( :returns: The created SyncMapItemInstance """ + data = values.of( { "Key": key, diff --git a/twilio/rest/sync/v1/service/sync_stream/__init__.py b/twilio/rest/sync/v1/service/sync_stream/__init__.py index 59507674d..584783c98 100644 --- a/twilio/rest/sync/v1/service/sync_stream/__init__.py +++ b/twilio/rest/sync/v1/service/sync_stream/__init__.py @@ -379,6 +379,7 @@ def create( :returns: The created SyncStreamInstance """ + data = values.of( { "UniqueName": unique_name, @@ -409,6 +410,7 @@ async def create_async( :returns: The created SyncStreamInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/sync/v1/service/sync_stream/stream_message.py b/twilio/rest/sync/v1/service/sync_stream/stream_message.py index 5227bb076..eb9ac365b 100644 --- a/twilio/rest/sync/v1/service/sync_stream/stream_message.py +++ b/twilio/rest/sync/v1/service/sync_stream/stream_message.py @@ -84,6 +84,7 @@ def create(self, data: object) -> StreamMessageInstance: :returns: The created StreamMessageInstance """ + data = values.of( { "Data": serialize.object(data), @@ -111,6 +112,7 @@ async def create_async(self, data: object) -> StreamMessageInstance: :returns: The created StreamMessageInstance """ + data = values.of( { "Data": serialize.object(data), diff --git a/twilio/rest/taskrouter/v1/workspace/__init__.py b/twilio/rest/taskrouter/v1/workspace/__init__.py index 886ba65c9..479abeaa8 100644 --- a/twilio/rest/taskrouter/v1/workspace/__init__.py +++ b/twilio/rest/taskrouter/v1/workspace/__init__.py @@ -657,6 +657,7 @@ def create( :returns: The created WorkspaceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -699,6 +700,7 @@ async def create_async( :returns: The created WorkspaceInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/taskrouter/v1/workspace/activity.py b/twilio/rest/taskrouter/v1/workspace/activity.py index b233113d3..91a18c782 100644 --- a/twilio/rest/taskrouter/v1/workspace/activity.py +++ b/twilio/rest/taskrouter/v1/workspace/activity.py @@ -356,6 +356,7 @@ def create( :returns: The created ActivityInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -384,6 +385,7 @@ async def create_async( :returns: The created ActivityInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/taskrouter/v1/workspace/task/__init__.py b/twilio/rest/taskrouter/v1/workspace/task/__init__.py index 2687a2de3..f62da1759 100644 --- a/twilio/rest/taskrouter/v1/workspace/task/__init__.py +++ b/twilio/rest/taskrouter/v1/workspace/task/__init__.py @@ -528,6 +528,7 @@ def create( :returns: The created TaskInstance """ + data = values.of( { "Timeout": timeout, @@ -570,6 +571,7 @@ async def create_async( :returns: The created TaskInstance """ + data = values.of( { "Timeout": timeout, diff --git a/twilio/rest/taskrouter/v1/workspace/task/reservation.py b/twilio/rest/taskrouter/v1/workspace/task/reservation.py index af5098400..32e7c6b4d 100644 --- a/twilio/rest/taskrouter/v1/workspace/task/reservation.py +++ b/twilio/rest/taskrouter/v1/workspace/task/reservation.py @@ -200,7 +200,6 @@ def update( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Update the ReservationInstance @@ -259,7 +258,6 @@ def update( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -318,7 +316,6 @@ def update( supervisor=supervisor, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) async def update_async( @@ -383,7 +380,6 @@ async def update_async( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Asynchronous coroutine to update the ReservationInstance @@ -442,7 +438,6 @@ async def update_async( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -501,7 +496,6 @@ async def update_async( supervisor=supervisor, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) def __repr__(self) -> str: @@ -642,7 +636,6 @@ def update( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Update the ReservationInstance @@ -701,7 +694,6 @@ def update( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -766,7 +758,6 @@ def update( "Supervisor": supervisor, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( @@ -849,7 +840,6 @@ async def update_async( supervisor: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Asynchronous coroutine to update the ReservationInstance @@ -908,7 +898,6 @@ async def update_async( :param supervisor: The Supervisor SID/URI when executing the Supervise instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -973,7 +962,6 @@ async def update_async( "Supervisor": supervisor, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( diff --git a/twilio/rest/taskrouter/v1/workspace/task_channel.py b/twilio/rest/taskrouter/v1/workspace/task_channel.py index d6408dcd7..5744a3cba 100644 --- a/twilio/rest/taskrouter/v1/workspace/task_channel.py +++ b/twilio/rest/taskrouter/v1/workspace/task_channel.py @@ -380,6 +380,7 @@ def create( :returns: The created TaskChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -413,6 +414,7 @@ async def create_async( :returns: The created TaskChannelInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/taskrouter/v1/workspace/task_queue/__init__.py b/twilio/rest/taskrouter/v1/workspace/task_queue/__init__.py index cc523c851..82aaee699 100644 --- a/twilio/rest/taskrouter/v1/workspace/task_queue/__init__.py +++ b/twilio/rest/taskrouter/v1/workspace/task_queue/__init__.py @@ -21,6 +21,9 @@ from twilio.base.list_resource import ListResource from twilio.base.version import Version from twilio.base.page import Page +from twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_bulk_real_time_statistics import ( + TaskQueueBulkRealTimeStatisticsList, +) from twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics import ( TaskQueueCumulativeStatisticsList, ) @@ -512,6 +515,9 @@ def __init__(self, version: Version, workspace_sid: str): } self._uri = "/Workspaces/{workspace_sid}/TaskQueues".format(**self._solution) + self._bulk_real_time_statistics: Optional[ + TaskQueueBulkRealTimeStatisticsList + ] = None self._statistics: Optional[TaskQueuesStatisticsList] = None def create( @@ -535,6 +541,7 @@ def create( :returns: The created TaskQueueInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -577,6 +584,7 @@ async def create_async( :returns: The created TaskQueueInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -857,6 +865,17 @@ async def get_page_async(self, target_url: str) -> TaskQueuePage: response = await self._version.domain.twilio.request_async("GET", target_url) return TaskQueuePage(self._version, response, self._solution) + @property + def bulk_real_time_statistics(self) -> TaskQueueBulkRealTimeStatisticsList: + """ + Access the bulk_real_time_statistics + """ + if self._bulk_real_time_statistics is None: + self._bulk_real_time_statistics = TaskQueueBulkRealTimeStatisticsList( + self._version, workspace_sid=self._solution["workspace_sid"] + ) + return self._bulk_real_time_statistics + @property def statistics(self) -> TaskQueuesStatisticsList: """ diff --git a/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.py b/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.py new file mode 100644 index 000000000..eb8748e09 --- /dev/null +++ b/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.py @@ -0,0 +1,124 @@ +r""" + This code was generated by + ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + + Twilio - Taskrouter + This is the public Twilio REST API. + + NOTE: This class is auto generated by OpenAPI Generator. + https://openapi-generator.tech + Do not edit the class manually. +""" + + +from typing import Any, Dict, List, Optional +from twilio.base import deserialize + +from twilio.base.instance_resource import InstanceResource +from twilio.base.list_resource import ListResource +from twilio.base.version import Version + + +class TaskQueueBulkRealTimeStatisticsInstance(InstanceResource): + + """ + :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the TaskQueue resource. + :ivar workspace_sid: The SID of the Workspace that contains the TaskQueue. + :ivar task_queue_data: The real time statistics for each requested TaskQueue SID. `task_queue_data` returns the following attributes: `task_queue_sid`: The SID of the TaskQueue from which these statistics were calculated. `total_available_workers`: The total number of Workers available for Tasks in the TaskQueue. `total_eligible_workers`: The total number of Workers eligible for Tasks in the TaskQueue, regardless of their Activity state. `total_tasks`: The total number of Tasks. `longest_task_waiting_age`: The age of the longest waiting Task. `longest_task_waiting_sid`: The SID of the longest waiting Task. `tasks_by_status`: The number of Tasks grouped by their current status. `tasks_by_priority`: The number of Tasks grouped by priority. `activity_statistics`: The number of current Workers grouped by Activity. + :ivar task_queue_response_count: The number of TaskQueue statistics received in task_queue_data. + :ivar url: The absolute URL of the TaskQueue statistics resource. + """ + + def __init__(self, version: Version, payload: Dict[str, Any], workspace_sid: str): + super().__init__(version) + + self.account_sid: Optional[str] = payload.get("account_sid") + self.workspace_sid: Optional[str] = payload.get("workspace_sid") + self.task_queue_data: Optional[List[Dict[str, object]]] = payload.get( + "task_queue_data" + ) + self.task_queue_response_count: Optional[int] = deserialize.integer( + payload.get("task_queue_response_count") + ) + self.url: Optional[str] = payload.get("url") + + self._solution = { + "workspace_sid": workspace_sid, + } + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + context = " ".join("{}={}".format(k, v) for k, v in self._solution.items()) + return ( + "".format( + context + ) + ) + + +class TaskQueueBulkRealTimeStatisticsList(ListResource): + def __init__(self, version: Version, workspace_sid: str): + """ + Initialize the TaskQueueBulkRealTimeStatisticsList + + :param version: Version that contains the resource + :param workspace_sid: The unique SID identifier of the Workspace. + + """ + super().__init__(version) + + # Path Solution + self._solution = { + "workspace_sid": workspace_sid, + } + self._uri = "/Workspaces/{workspace_sid}/TaskQueues/RealTimeStatistics".format( + **self._solution + ) + + def create(self) -> TaskQueueBulkRealTimeStatisticsInstance: + """ + Create the TaskQueueBulkRealTimeStatisticsInstance + + + :returns: The created TaskQueueBulkRealTimeStatisticsInstance + """ + + payload = self._version.create( + method="POST", + uri=self._uri, + ) + + return TaskQueueBulkRealTimeStatisticsInstance( + self._version, payload, workspace_sid=self._solution["workspace_sid"] + ) + + async def create_async(self) -> TaskQueueBulkRealTimeStatisticsInstance: + """ + Asynchronously create the TaskQueueBulkRealTimeStatisticsInstance + + + :returns: The created TaskQueueBulkRealTimeStatisticsInstance + """ + + payload = await self._version.create_async( + method="POST", + uri=self._uri, + ) + + return TaskQueueBulkRealTimeStatisticsInstance( + self._version, payload, workspace_sid=self._solution["workspace_sid"] + ) + + def __repr__(self) -> str: + """ + Provide a friendly representation + + :returns: Machine friendly representation + """ + return "" diff --git a/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py b/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py index d588f99d4..1fc18c16f 100644 --- a/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py +++ b/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py @@ -50,7 +50,7 @@ def __init__( super().__init__(version) self.account_sid: Optional[str] = payload.get("account_sid") - self.activity_statistics: Optional[List[object]] = payload.get( + self.activity_statistics: Optional[List[Dict[str, object]]] = payload.get( "activity_statistics" ) self.longest_task_waiting_age: Optional[int] = deserialize.integer( diff --git a/twilio/rest/taskrouter/v1/workspace/worker/__init__.py b/twilio/rest/taskrouter/v1/workspace/worker/__init__.py index 104731aed..5eecad38b 100644 --- a/twilio/rest/taskrouter/v1/workspace/worker/__init__.py +++ b/twilio/rest/taskrouter/v1/workspace/worker/__init__.py @@ -522,6 +522,7 @@ def create( :returns: The created WorkerInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -555,6 +556,7 @@ async def create_async( :returns: The created WorkerInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/taskrouter/v1/workspace/worker/reservation.py b/twilio/rest/taskrouter/v1/workspace/worker/reservation.py index 24727b114..e99705d66 100644 --- a/twilio/rest/taskrouter/v1/workspace/worker/reservation.py +++ b/twilio/rest/taskrouter/v1/workspace/worker/reservation.py @@ -191,7 +191,6 @@ def update( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Update the ReservationInstance @@ -248,7 +247,6 @@ def update( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -305,7 +303,6 @@ def update( post_work_activity_sid=post_work_activity_sid, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) async def update_async( @@ -366,7 +363,6 @@ async def update_async( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> "ReservationInstance": """ Asynchronous coroutine to update the ReservationInstance @@ -423,7 +419,6 @@ async def update_async( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -480,7 +475,6 @@ async def update_async( post_work_activity_sid=post_work_activity_sid, end_conference_on_customer_exit=end_conference_on_customer_exit, beep_on_customer_entrance=beep_on_customer_entrance, - jitter_buffer_size=jitter_buffer_size, ) def __repr__(self) -> str: @@ -615,7 +609,6 @@ def update( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Update the ReservationInstance @@ -672,7 +665,6 @@ def update( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -735,7 +727,6 @@ def update( "PostWorkActivitySid": post_work_activity_sid, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( @@ -814,7 +805,6 @@ async def update_async( post_work_activity_sid: Union[str, object] = values.unset, end_conference_on_customer_exit: Union[bool, object] = values.unset, beep_on_customer_entrance: Union[bool, object] = values.unset, - jitter_buffer_size: Union[str, object] = values.unset, ) -> ReservationInstance: """ Asynchronous coroutine to update the ReservationInstance @@ -871,7 +861,6 @@ async def update_async( :param post_work_activity_sid: The new worker activity SID after executing a Conference instruction. :param end_conference_on_customer_exit: Whether to end the conference when the customer leaves. :param beep_on_customer_entrance: Whether to play a notification beep when the customer joins. - :param jitter_buffer_size: The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`. :returns: The updated ReservationInstance """ @@ -934,7 +923,6 @@ async def update_async( "PostWorkActivitySid": post_work_activity_sid, "EndConferenceOnCustomerExit": end_conference_on_customer_exit, "BeepOnCustomerEntrance": beep_on_customer_entrance, - "JitterBufferSize": jitter_buffer_size, } ) headers = values.of( diff --git a/twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py b/twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py index 14310b05b..dad1f6ff2 100644 --- a/twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py +++ b/twilio/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.py @@ -49,7 +49,7 @@ def __init__(self, version: Version, payload: Dict[str, Any], workspace_sid: str self.end_time: Optional[datetime] = deserialize.iso8601_datetime( payload.get("end_time") ) - self.activity_durations: Optional[List[object]] = payload.get( + self.activity_durations: Optional[List[Dict[str, object]]] = payload.get( "activity_durations" ) self.reservations_created: Optional[int] = deserialize.integer( diff --git a/twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py b/twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py index c59611dcf..8047c65ad 100644 --- a/twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py +++ b/twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py @@ -35,7 +35,7 @@ def __init__(self, version: Version, payload: Dict[str, Any], workspace_sid: str super().__init__(version) self.account_sid: Optional[str] = payload.get("account_sid") - self.activity_statistics: Optional[List[object]] = payload.get( + self.activity_statistics: Optional[List[Dict[str, object]]] = payload.get( "activity_statistics" ) self.total_workers: Optional[int] = deserialize.integer( diff --git a/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py b/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py index 04cbba20b..dff4bd0ba 100644 --- a/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py +++ b/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py @@ -515,6 +515,7 @@ def create( :returns: The created WorkflowInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -554,6 +555,7 @@ async def create_async( :returns: The created WorkflowInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/taskrouter/v1/workspace/workspace_real_time_statistics.py b/twilio/rest/taskrouter/v1/workspace/workspace_real_time_statistics.py index d69600d7f..8571bf3e0 100644 --- a/twilio/rest/taskrouter/v1/workspace/workspace_real_time_statistics.py +++ b/twilio/rest/taskrouter/v1/workspace/workspace_real_time_statistics.py @@ -40,7 +40,7 @@ def __init__(self, version: Version, payload: Dict[str, Any], workspace_sid: str super().__init__(version) self.account_sid: Optional[str] = payload.get("account_sid") - self.activity_statistics: Optional[List[object]] = payload.get( + self.activity_statistics: Optional[List[Dict[str, object]]] = payload.get( "activity_statistics" ) self.longest_task_waiting_age: Optional[int] = deserialize.integer( diff --git a/twilio/rest/trunking/v1/trunk/__init__.py b/twilio/rest/trunking/v1/trunk/__init__.py index e7a0aa5cf..4b1b8c793 100644 --- a/twilio/rest/trunking/v1/trunk/__init__.py +++ b/twilio/rest/trunking/v1/trunk/__init__.py @@ -575,6 +575,7 @@ def create( :returns: The created TrunkInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -623,6 +624,7 @@ async def create_async( :returns: The created TrunkInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/trunking/v1/trunk/credential_list.py b/twilio/rest/trunking/v1/trunk/credential_list.py index 805d66260..3caf6e542 100644 --- a/twilio/rest/trunking/v1/trunk/credential_list.py +++ b/twilio/rest/trunking/v1/trunk/credential_list.py @@ -261,6 +261,7 @@ def create(self, credential_list_sid: str) -> CredentialListInstance: :returns: The created CredentialListInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, @@ -285,6 +286,7 @@ async def create_async(self, credential_list_sid: str) -> CredentialListInstance :returns: The created CredentialListInstance """ + data = values.of( { "CredentialListSid": credential_list_sid, diff --git a/twilio/rest/trunking/v1/trunk/ip_access_control_list.py b/twilio/rest/trunking/v1/trunk/ip_access_control_list.py index e528e0b1c..38d6e4f03 100644 --- a/twilio/rest/trunking/v1/trunk/ip_access_control_list.py +++ b/twilio/rest/trunking/v1/trunk/ip_access_control_list.py @@ -263,6 +263,7 @@ def create(self, ip_access_control_list_sid: str) -> IpAccessControlListInstance :returns: The created IpAccessControlListInstance """ + data = values.of( { "IpAccessControlListSid": ip_access_control_list_sid, @@ -289,6 +290,7 @@ async def create_async( :returns: The created IpAccessControlListInstance """ + data = values.of( { "IpAccessControlListSid": ip_access_control_list_sid, diff --git a/twilio/rest/trunking/v1/trunk/origination_url.py b/twilio/rest/trunking/v1/trunk/origination_url.py index 79dca9387..2b7f48f43 100644 --- a/twilio/rest/trunking/v1/trunk/origination_url.py +++ b/twilio/rest/trunking/v1/trunk/origination_url.py @@ -418,6 +418,7 @@ def create( :returns: The created OriginationUrlInstance """ + data = values.of( { "Weight": weight, @@ -457,6 +458,7 @@ async def create_async( :returns: The created OriginationUrlInstance """ + data = values.of( { "Weight": weight, diff --git a/twilio/rest/trunking/v1/trunk/phone_number.py b/twilio/rest/trunking/v1/trunk/phone_number.py index 98f53c408..41b78e462 100644 --- a/twilio/rest/trunking/v1/trunk/phone_number.py +++ b/twilio/rest/trunking/v1/trunk/phone_number.py @@ -310,6 +310,7 @@ def create(self, phone_number_sid: str) -> PhoneNumberInstance: :returns: The created PhoneNumberInstance """ + data = values.of( { "PhoneNumberSid": phone_number_sid, @@ -334,6 +335,7 @@ async def create_async(self, phone_number_sid: str) -> PhoneNumberInstance: :returns: The created PhoneNumberInstance """ + data = values.of( { "PhoneNumberSid": phone_number_sid, diff --git a/twilio/rest/trusthub/v1/compliance_inquiries.py b/twilio/rest/trusthub/v1/compliance_inquiries.py index c5c88d915..7a55b1ad7 100644 --- a/twilio/rest/trusthub/v1/compliance_inquiries.py +++ b/twilio/rest/trusthub/v1/compliance_inquiries.py @@ -197,6 +197,7 @@ def create(self, primary_profile_sid: str) -> ComplianceInquiriesInstance: :returns: The created ComplianceInquiriesInstance """ + data = values.of( { "PrimaryProfileSid": primary_profile_sid, @@ -221,6 +222,7 @@ async def create_async( :returns: The created ComplianceInquiriesInstance """ + data = values.of( { "PrimaryProfileSid": primary_profile_sid, diff --git a/twilio/rest/trusthub/v1/compliance_tollfree_inquiries.py b/twilio/rest/trusthub/v1/compliance_tollfree_inquiries.py index f2059c4e5..25598554f 100644 --- a/twilio/rest/trusthub/v1/compliance_tollfree_inquiries.py +++ b/twilio/rest/trusthub/v1/compliance_tollfree_inquiries.py @@ -13,8 +13,8 @@ """ -from typing import Any, Dict, List, Optional, Union -from twilio.base import serialize, values +from typing import Any, Dict, Optional +from twilio.base import values from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource @@ -22,12 +22,6 @@ class ComplianceTollfreeInquiriesInstance(InstanceResource): - class OptInType(object): - VERBAL = "VERBAL" - WEB_FORM = "WEB_FORM" - PAPER_FORM = "PAPER_FORM" - VIA_TEXT = "VIA_TEXT" - MOBILE_QR_CODE = "MOBILE_QR_CODE" """ :ivar inquiry_id: The unique ID used to start an embedded compliance registration session. @@ -67,81 +61,21 @@ def __init__(self, version: Version): self._uri = "/ComplianceInquiries/Tollfree/Initialize" def create( - self, - tollfree_phone_number: str, - notification_email: str, - business_name: Union[str, object] = values.unset, - business_website: Union[str, object] = values.unset, - use_case_categories: Union[List[str], object] = values.unset, - use_case_summary: Union[str, object] = values.unset, - production_message_sample: Union[str, object] = values.unset, - opt_in_image_urls: Union[List[str], object] = values.unset, - opt_in_type: Union[ - "ComplianceTollfreeInquiriesInstance.OptInType", object - ] = values.unset, - message_volume: Union[str, object] = values.unset, - business_street_address: Union[str, object] = values.unset, - business_street_address2: Union[str, object] = values.unset, - business_city: Union[str, object] = values.unset, - business_state_province_region: Union[str, object] = values.unset, - business_postal_code: Union[str, object] = values.unset, - business_country: Union[str, object] = values.unset, - additional_information: Union[str, object] = values.unset, - business_contact_first_name: Union[str, object] = values.unset, - business_contact_last_name: Union[str, object] = values.unset, - business_contact_email: Union[str, object] = values.unset, - business_contact_phone: Union[str, object] = values.unset, + self, tollfree_phone_number: str, notification_email: str ) -> ComplianceTollfreeInquiriesInstance: """ Create the ComplianceTollfreeInquiriesInstance :param tollfree_phone_number: The Tollfree phone number to be verified - :param notification_email: The email address to receive the notification about the verification result. - :param business_name: The name of the business or organization using the Tollfree number. - :param business_website: The website of the business or organization using the Tollfree number. - :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable.. - :param use_case_summary: Use this to further explain how messaging is used by the business or organization. - :param production_message_sample: An example of message content, i.e. a sample message. - :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL. - :param opt_in_type: - :param message_volume: Estimate monthly volume of messages from the Tollfree Number. - :param business_street_address: The address of the business or organization using the Tollfree number. - :param business_street_address2: The address of the business or organization using the Tollfree number. - :param business_city: The city of the business or organization using the Tollfree number. - :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number. - :param business_postal_code: The postal code of the business or organization using the Tollfree number. - :param business_country: The country of the business or organization using the Tollfree number. - :param additional_information: Additional information to be provided for verification. - :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number. - :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. - :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. - :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. + :param notification_email: The notification email to be triggered when verification status is changed :returns: The created ComplianceTollfreeInquiriesInstance """ + data = values.of( { "TollfreePhoneNumber": tollfree_phone_number, "NotificationEmail": notification_email, - "BusinessName": business_name, - "BusinessWebsite": business_website, - "UseCaseCategories": serialize.map(use_case_categories, lambda e: e), - "UseCaseSummary": use_case_summary, - "ProductionMessageSample": production_message_sample, - "OptInImageUrls": serialize.map(opt_in_image_urls, lambda e: e), - "OptInType": opt_in_type, - "MessageVolume": message_volume, - "BusinessStreetAddress": business_street_address, - "BusinessStreetAddress2": business_street_address2, - "BusinessCity": business_city, - "BusinessStateProvinceRegion": business_state_province_region, - "BusinessPostalCode": business_postal_code, - "BusinessCountry": business_country, - "AdditionalInformation": additional_information, - "BusinessContactFirstName": business_contact_first_name, - "BusinessContactLastName": business_contact_last_name, - "BusinessContactEmail": business_contact_email, - "BusinessContactPhone": business_contact_phone, } ) @@ -154,81 +88,21 @@ def create( return ComplianceTollfreeInquiriesInstance(self._version, payload) async def create_async( - self, - tollfree_phone_number: str, - notification_email: str, - business_name: Union[str, object] = values.unset, - business_website: Union[str, object] = values.unset, - use_case_categories: Union[List[str], object] = values.unset, - use_case_summary: Union[str, object] = values.unset, - production_message_sample: Union[str, object] = values.unset, - opt_in_image_urls: Union[List[str], object] = values.unset, - opt_in_type: Union[ - "ComplianceTollfreeInquiriesInstance.OptInType", object - ] = values.unset, - message_volume: Union[str, object] = values.unset, - business_street_address: Union[str, object] = values.unset, - business_street_address2: Union[str, object] = values.unset, - business_city: Union[str, object] = values.unset, - business_state_province_region: Union[str, object] = values.unset, - business_postal_code: Union[str, object] = values.unset, - business_country: Union[str, object] = values.unset, - additional_information: Union[str, object] = values.unset, - business_contact_first_name: Union[str, object] = values.unset, - business_contact_last_name: Union[str, object] = values.unset, - business_contact_email: Union[str, object] = values.unset, - business_contact_phone: Union[str, object] = values.unset, + self, tollfree_phone_number: str, notification_email: str ) -> ComplianceTollfreeInquiriesInstance: """ Asynchronously create the ComplianceTollfreeInquiriesInstance :param tollfree_phone_number: The Tollfree phone number to be verified - :param notification_email: The email address to receive the notification about the verification result. - :param business_name: The name of the business or organization using the Tollfree number. - :param business_website: The website of the business or organization using the Tollfree number. - :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable.. - :param use_case_summary: Use this to further explain how messaging is used by the business or organization. - :param production_message_sample: An example of message content, i.e. a sample message. - :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL. - :param opt_in_type: - :param message_volume: Estimate monthly volume of messages from the Tollfree Number. - :param business_street_address: The address of the business or organization using the Tollfree number. - :param business_street_address2: The address of the business or organization using the Tollfree number. - :param business_city: The city of the business or organization using the Tollfree number. - :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number. - :param business_postal_code: The postal code of the business or organization using the Tollfree number. - :param business_country: The country of the business or organization using the Tollfree number. - :param additional_information: Additional information to be provided for verification. - :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number. - :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number. - :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number. - :param business_contact_phone: The phone number of the contact for the business or organization using the Tollfree number. + :param notification_email: The notification email to be triggered when verification status is changed :returns: The created ComplianceTollfreeInquiriesInstance """ + data = values.of( { "TollfreePhoneNumber": tollfree_phone_number, "NotificationEmail": notification_email, - "BusinessName": business_name, - "BusinessWebsite": business_website, - "UseCaseCategories": serialize.map(use_case_categories, lambda e: e), - "UseCaseSummary": use_case_summary, - "ProductionMessageSample": production_message_sample, - "OptInImageUrls": serialize.map(opt_in_image_urls, lambda e: e), - "OptInType": opt_in_type, - "MessageVolume": message_volume, - "BusinessStreetAddress": business_street_address, - "BusinessStreetAddress2": business_street_address2, - "BusinessCity": business_city, - "BusinessStateProvinceRegion": business_state_province_region, - "BusinessPostalCode": business_postal_code, - "BusinessCountry": business_country, - "AdditionalInformation": additional_information, - "BusinessContactFirstName": business_contact_first_name, - "BusinessContactLastName": business_contact_last_name, - "BusinessContactEmail": business_contact_email, - "BusinessContactPhone": business_contact_phone, } ) diff --git a/twilio/rest/trusthub/v1/customer_profiles/__init__.py b/twilio/rest/trusthub/v1/customer_profiles/__init__.py index a82fafa4d..c1fa25cce 100644 --- a/twilio/rest/trusthub/v1/customer_profiles/__init__.py +++ b/twilio/rest/trusthub/v1/customer_profiles/__init__.py @@ -479,6 +479,7 @@ def create( :returns: The created CustomerProfilesInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -513,6 +514,7 @@ async def create_async( :returns: The created CustomerProfilesInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.py b/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.py index e1905c1ac..41bc67e83 100644 --- a/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.py +++ b/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.py @@ -274,6 +274,7 @@ def create( :returns: The created CustomerProfilesChannelEndpointAssignmentInstance """ + data = values.of( { "ChannelEndpointType": channel_endpoint_type, @@ -304,6 +305,7 @@ async def create_async( :returns: The created CustomerProfilesChannelEndpointAssignmentInstance """ + data = values.of( { "ChannelEndpointType": channel_endpoint_type, diff --git a/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.py b/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.py index c318b539c..6003f5660 100644 --- a/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.py +++ b/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.py @@ -275,6 +275,7 @@ def create(self, object_sid: str) -> CustomerProfilesEntityAssignmentsInstance: :returns: The created CustomerProfilesEntityAssignmentsInstance """ + data = values.of( { "ObjectSid": object_sid, @@ -303,6 +304,7 @@ async def create_async( :returns: The created CustomerProfilesEntityAssignmentsInstance """ + data = values.of( { "ObjectSid": object_sid, diff --git a/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.py b/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.py index c3611f764..0b5f88b62 100644 --- a/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.py +++ b/twilio/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.py @@ -55,7 +55,7 @@ def __init__( self.status: Optional[ "CustomerProfilesEvaluationsInstance.Status" ] = payload.get("status") - self.results: Optional[List[object]] = payload.get("results") + self.results: Optional[List[Dict[str, object]]] = payload.get("results") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_created") ) @@ -236,6 +236,7 @@ def create(self, policy_sid: str) -> CustomerProfilesEvaluationsInstance: :returns: The created CustomerProfilesEvaluationsInstance """ + data = values.of( { "PolicySid": policy_sid, @@ -264,6 +265,7 @@ async def create_async( :returns: The created CustomerProfilesEvaluationsInstance """ + data = values.of( { "PolicySid": policy_sid, diff --git a/twilio/rest/trusthub/v1/end_user.py b/twilio/rest/trusthub/v1/end_user.py index 05f096b6c..c72cb6222 100644 --- a/twilio/rest/trusthub/v1/end_user.py +++ b/twilio/rest/trusthub/v1/end_user.py @@ -345,6 +345,7 @@ def create( :returns: The created EndUserInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -376,6 +377,7 @@ async def create_async( :returns: The created EndUserInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/trusthub/v1/end_user_type.py b/twilio/rest/trusthub/v1/end_user_type.py index 391012e1a..f3d79d2a6 100644 --- a/twilio/rest/trusthub/v1/end_user_type.py +++ b/twilio/rest/trusthub/v1/end_user_type.py @@ -40,7 +40,7 @@ def __init__( self.sid: Optional[str] = payload.get("sid") self.friendly_name: Optional[str] = payload.get("friendly_name") self.machine_name: Optional[str] = payload.get("machine_name") - self.fields: Optional[List[object]] = payload.get("fields") + self.fields: Optional[List[Dict[str, object]]] = payload.get("fields") self.url: Optional[str] = payload.get("url") self._solution = { diff --git a/twilio/rest/trusthub/v1/supporting_document.py b/twilio/rest/trusthub/v1/supporting_document.py index f1f29a4af..e53275619 100644 --- a/twilio/rest/trusthub/v1/supporting_document.py +++ b/twilio/rest/trusthub/v1/supporting_document.py @@ -362,6 +362,7 @@ def create( :returns: The created SupportingDocumentInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -393,6 +394,7 @@ async def create_async( :returns: The created SupportingDocumentInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/trusthub/v1/supporting_document_type.py b/twilio/rest/trusthub/v1/supporting_document_type.py index 204c0b53a..66b05f95f 100644 --- a/twilio/rest/trusthub/v1/supporting_document_type.py +++ b/twilio/rest/trusthub/v1/supporting_document_type.py @@ -40,7 +40,7 @@ def __init__( self.sid: Optional[str] = payload.get("sid") self.friendly_name: Optional[str] = payload.get("friendly_name") self.machine_name: Optional[str] = payload.get("machine_name") - self.fields: Optional[List[object]] = payload.get("fields") + self.fields: Optional[List[Dict[str, object]]] = payload.get("fields") self.url: Optional[str] = payload.get("url") self._solution = { diff --git a/twilio/rest/trusthub/v1/trust_products/__init__.py b/twilio/rest/trusthub/v1/trust_products/__init__.py index 627cc5a09..21b95d925 100644 --- a/twilio/rest/trusthub/v1/trust_products/__init__.py +++ b/twilio/rest/trusthub/v1/trust_products/__init__.py @@ -469,6 +469,7 @@ def create( :returns: The created TrustProductsInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -503,6 +504,7 @@ async def create_async( :returns: The created TrustProductsInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.py b/twilio/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.py index 42b5923e6..5083eb8a3 100644 --- a/twilio/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.py +++ b/twilio/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.py @@ -276,6 +276,7 @@ def create( :returns: The created TrustProductsChannelEndpointAssignmentInstance """ + data = values.of( { "ChannelEndpointType": channel_endpoint_type, @@ -306,6 +307,7 @@ async def create_async( :returns: The created TrustProductsChannelEndpointAssignmentInstance """ + data = values.of( { "ChannelEndpointType": channel_endpoint_type, diff --git a/twilio/rest/trusthub/v1/trust_products/trust_products_entity_assignments.py b/twilio/rest/trusthub/v1/trust_products/trust_products_entity_assignments.py index 306f9359b..bcd907cc2 100644 --- a/twilio/rest/trusthub/v1/trust_products/trust_products_entity_assignments.py +++ b/twilio/rest/trusthub/v1/trust_products/trust_products_entity_assignments.py @@ -269,6 +269,7 @@ def create(self, object_sid: str) -> TrustProductsEntityAssignmentsInstance: :returns: The created TrustProductsEntityAssignmentsInstance """ + data = values.of( { "ObjectSid": object_sid, @@ -297,6 +298,7 @@ async def create_async( :returns: The created TrustProductsEntityAssignmentsInstance """ + data = values.of( { "ObjectSid": object_sid, diff --git a/twilio/rest/trusthub/v1/trust_products/trust_products_evaluations.py b/twilio/rest/trusthub/v1/trust_products/trust_products_evaluations.py index f2d435c1c..665f5193c 100644 --- a/twilio/rest/trusthub/v1/trust_products/trust_products_evaluations.py +++ b/twilio/rest/trusthub/v1/trust_products/trust_products_evaluations.py @@ -55,7 +55,7 @@ def __init__( self.status: Optional["TrustProductsEvaluationsInstance.Status"] = payload.get( "status" ) - self.results: Optional[List[object]] = payload.get("results") + self.results: Optional[List[Dict[str, object]]] = payload.get("results") self.date_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_created") ) @@ -232,6 +232,7 @@ def create(self, policy_sid: str) -> TrustProductsEvaluationsInstance: :returns: The created TrustProductsEvaluationsInstance """ + data = values.of( { "PolicySid": policy_sid, @@ -258,6 +259,7 @@ async def create_async(self, policy_sid: str) -> TrustProductsEvaluationsInstanc :returns: The created TrustProductsEvaluationsInstance """ + data = values.of( { "PolicySid": policy_sid, diff --git a/twilio/rest/verify/v2/safelist.py b/twilio/rest/verify/v2/safelist.py index 45e5b220e..b0f05c500 100644 --- a/twilio/rest/verify/v2/safelist.py +++ b/twilio/rest/verify/v2/safelist.py @@ -215,6 +215,7 @@ def create(self, phone_number: str) -> SafelistInstance: :returns: The created SafelistInstance """ + data = values.of( { "PhoneNumber": phone_number, @@ -237,6 +238,7 @@ async def create_async(self, phone_number: str) -> SafelistInstance: :returns: The created SafelistInstance """ + data = values.of( { "PhoneNumber": phone_number, diff --git a/twilio/rest/verify/v2/service/__init__.py b/twilio/rest/verify/v2/service/__init__.py index 4e0bfadc3..ae087cb33 100644 --- a/twilio/rest/verify/v2/service/__init__.py +++ b/twilio/rest/verify/v2/service/__init__.py @@ -49,7 +49,6 @@ class ServiceInstance(InstanceResource): :ivar push: Configurations for the Push factors (channel) created under this Service. :ivar totp: Configurations for the TOTP factors (channel) created under this Service. :ivar default_template_sid: - :ivar verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :ivar date_created: The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. :ivar date_updated: The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. :ivar url: The absolute URL of the resource. @@ -81,9 +80,6 @@ def __init__( self.push: Optional[Dict[str, object]] = payload.get("push") self.totp: Optional[Dict[str, object]] = payload.get("totp") self.default_template_sid: Optional[str] = payload.get("default_template_sid") - self.verify_event_subscription_enabled: Optional[bool] = payload.get( - "verify_event_subscription_enabled" - ) self.date_created: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_created") ) @@ -168,7 +164,6 @@ def update( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> "ServiceInstance": """ Update the ServiceInstance @@ -190,7 +185,6 @@ def update( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -212,7 +206,6 @@ def update( totp_code_length=totp_code_length, totp_skew=totp_skew, default_template_sid=default_template_sid, - verify_event_subscription_enabled=verify_event_subscription_enabled, ) async def update_async( @@ -234,7 +227,6 @@ async def update_async( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> "ServiceInstance": """ Asynchronous coroutine to update the ServiceInstance @@ -256,7 +248,6 @@ async def update_async( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -278,7 +269,6 @@ async def update_async( totp_code_length=totp_code_length, totp_skew=totp_skew, default_template_sid=default_template_sid, - verify_event_subscription_enabled=verify_event_subscription_enabled, ) @property @@ -445,7 +435,6 @@ def update( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Update the ServiceInstance @@ -467,7 +456,6 @@ def update( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -490,7 +478,6 @@ def update( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) @@ -521,7 +508,6 @@ async def update_async( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Asynchronous coroutine to update the ServiceInstance @@ -543,7 +529,6 @@ async def update_async( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The updated ServiceInstance """ @@ -566,7 +551,6 @@ async def update_async( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) @@ -721,7 +705,6 @@ def create( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Create the ServiceInstance @@ -743,10 +726,10 @@ def create( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -766,7 +749,6 @@ def create( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) @@ -797,7 +779,6 @@ async def create_async( totp_code_length: Union[int, object] = values.unset, totp_skew: Union[int, object] = values.unset, default_template_sid: Union[str, object] = values.unset, - verify_event_subscription_enabled: Union[bool, object] = values.unset, ) -> ServiceInstance: """ Asynchronously create the ServiceInstance @@ -819,10 +800,10 @@ async def create_async( :param totp_code_length: Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 :param totp_skew: Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 :param default_template_sid: The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. - :param verify_event_subscription_enabled: Whether to allow verifications from the service to reach the stream-events sinks if configured :returns: The created ServiceInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -842,7 +823,6 @@ async def create_async( "Totp.CodeLength": totp_code_length, "Totp.Skew": totp_skew, "DefaultTemplateSid": default_template_sid, - "VerifyEventSubscriptionEnabled": verify_event_subscription_enabled, } ) diff --git a/twilio/rest/verify/v2/service/access_token.py b/twilio/rest/verify/v2/service/access_token.py index 8c1bc46f8..26aa9d2bf 100644 --- a/twilio/rest/verify/v2/service/access_token.py +++ b/twilio/rest/verify/v2/service/access_token.py @@ -217,6 +217,7 @@ def create( :returns: The created AccessTokenInstance """ + data = values.of( { "Identity": identity, @@ -253,6 +254,7 @@ async def create_async( :returns: The created AccessTokenInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/verify/v2/service/entity/__init__.py b/twilio/rest/verify/v2/service/entity/__init__.py index 74629d9bb..93134aaa8 100644 --- a/twilio/rest/verify/v2/service/entity/__init__.py +++ b/twilio/rest/verify/v2/service/entity/__init__.py @@ -332,6 +332,7 @@ def create(self, identity: str) -> EntityInstance: :returns: The created EntityInstance """ + data = values.of( { "Identity": identity, @@ -356,6 +357,7 @@ async def create_async(self, identity: str) -> EntityInstance: :returns: The created EntityInstance """ + data = values.of( { "Identity": identity, diff --git a/twilio/rest/verify/v2/service/entity/challenge/__init__.py b/twilio/rest/verify/v2/service/entity/challenge/__init__.py index 65aab902b..efe274607 100644 --- a/twilio/rest/verify/v2/service/entity/challenge/__init__.py +++ b/twilio/rest/verify/v2/service/entity/challenge/__init__.py @@ -428,6 +428,7 @@ def create( :returns: The created ChallengeInstance """ + data = values.of( { "FactorSid": factor_sid, @@ -475,6 +476,7 @@ async def create_async( :returns: The created ChallengeInstance """ + data = values.of( { "FactorSid": factor_sid, diff --git a/twilio/rest/verify/v2/service/entity/challenge/notification.py b/twilio/rest/verify/v2/service/entity/challenge/notification.py index a04fea65e..683415f70 100644 --- a/twilio/rest/verify/v2/service/entity/challenge/notification.py +++ b/twilio/rest/verify/v2/service/entity/challenge/notification.py @@ -107,6 +107,7 @@ def create(self, ttl: Union[int, object] = values.unset) -> NotificationInstance :returns: The created NotificationInstance """ + data = values.of( { "Ttl": ttl, @@ -137,6 +138,7 @@ async def create_async( :returns: The created NotificationInstance """ + data = values.of( { "Ttl": ttl, diff --git a/twilio/rest/verify/v2/service/entity/new_factor.py b/twilio/rest/verify/v2/service/entity/new_factor.py index 71c793cc6..1c2158227 100644 --- a/twilio/rest/verify/v2/service/entity/new_factor.py +++ b/twilio/rest/verify/v2/service/entity/new_factor.py @@ -161,6 +161,7 @@ def create( :returns: The created NewFactorInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -232,6 +233,7 @@ async def create_async( :returns: The created NewFactorInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/verify/v2/service/messaging_configuration.py b/twilio/rest/verify/v2/service/messaging_configuration.py index 51d170ea4..b96c4db03 100644 --- a/twilio/rest/verify/v2/service/messaging_configuration.py +++ b/twilio/rest/verify/v2/service/messaging_configuration.py @@ -350,6 +350,7 @@ def create( :returns: The created MessagingConfigurationInstance """ + data = values.of( { "Country": country, @@ -378,6 +379,7 @@ async def create_async( :returns: The created MessagingConfigurationInstance """ + data = values.of( { "Country": country, diff --git a/twilio/rest/verify/v2/service/rate_limit/__init__.py b/twilio/rest/verify/v2/service/rate_limit/__init__.py index f411c57e6..cf37fa1e8 100644 --- a/twilio/rest/verify/v2/service/rate_limit/__init__.py +++ b/twilio/rest/verify/v2/service/rate_limit/__init__.py @@ -377,6 +377,7 @@ def create( :returns: The created RateLimitInstance """ + data = values.of( { "UniqueName": unique_name, @@ -405,6 +406,7 @@ async def create_async( :returns: The created RateLimitInstance """ + data = values.of( { "UniqueName": unique_name, diff --git a/twilio/rest/verify/v2/service/rate_limit/bucket.py b/twilio/rest/verify/v2/service/rate_limit/bucket.py index a97b1e017..18ff98acd 100644 --- a/twilio/rest/verify/v2/service/rate_limit/bucket.py +++ b/twilio/rest/verify/v2/service/rate_limit/bucket.py @@ -392,6 +392,7 @@ def create(self, max: int, interval: int) -> BucketInstance: :returns: The created BucketInstance """ + data = values.of( { "Max": max, @@ -421,6 +422,7 @@ async def create_async(self, max: int, interval: int) -> BucketInstance: :returns: The created BucketInstance """ + data = values.of( { "Max": max, diff --git a/twilio/rest/verify/v2/service/verification.py b/twilio/rest/verify/v2/service/verification.py index 068e392c0..dc48cd010 100644 --- a/twilio/rest/verify/v2/service/verification.py +++ b/twilio/rest/verify/v2/service/verification.py @@ -75,7 +75,7 @@ def __init__( self.lookup: Optional[Dict[str, object]] = payload.get("lookup") self.amount: Optional[str] = payload.get("amount") self.payee: Optional[str] = payload.get("payee") - self.send_code_attempts: Optional[List[object]] = payload.get( + self.send_code_attempts: Optional[List[Dict[str, object]]] = payload.get( "send_code_attempts" ) self.date_created: Optional[datetime] = deserialize.iso8601_datetime( @@ -349,6 +349,7 @@ def create( :returns: The created VerificationInstance """ + data = values.of( { "To": to, @@ -424,6 +425,7 @@ async def create_async( :returns: The created VerificationInstance """ + data = values.of( { "To": to, diff --git a/twilio/rest/verify/v2/service/verification_check.py b/twilio/rest/verify/v2/service/verification_check.py index 05a8399f8..b33803854 100644 --- a/twilio/rest/verify/v2/service/verification_check.py +++ b/twilio/rest/verify/v2/service/verification_check.py @@ -65,7 +65,7 @@ def __init__(self, version: Version, payload: Dict[str, Any], service_sid: str): self.date_updated: Optional[datetime] = deserialize.iso8601_datetime( payload.get("date_updated") ) - self.sna_attempts_error_codes: Optional[List[object]] = payload.get( + self.sna_attempts_error_codes: Optional[List[Dict[str, object]]] = payload.get( "sna_attempts_error_codes" ) @@ -119,6 +119,7 @@ def create( :returns: The created VerificationCheckInstance """ + data = values.of( { "Code": code, @@ -158,6 +159,7 @@ async def create_async( :returns: The created VerificationCheckInstance """ + data = values.of( { "Code": code, diff --git a/twilio/rest/verify/v2/service/webhook.py b/twilio/rest/verify/v2/service/webhook.py index c7924db4b..15dce50aa 100644 --- a/twilio/rest/verify/v2/service/webhook.py +++ b/twilio/rest/verify/v2/service/webhook.py @@ -433,6 +433,7 @@ def create( :returns: The created WebhookInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -472,6 +473,7 @@ async def create_async( :returns: The created WebhookInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/video/v1/composition.py b/twilio/rest/video/v1/composition.py index 2fead1420..039f55e4a 100644 --- a/twilio/rest/video/v1/composition.py +++ b/twilio/rest/video/v1/composition.py @@ -309,6 +309,7 @@ def create( :returns: The created CompositionInstance """ + data = values.of( { "RoomSid": room_sid, @@ -360,6 +361,7 @@ async def create_async( :returns: The created CompositionInstance """ + data = values.of( { "RoomSid": room_sid, diff --git a/twilio/rest/video/v1/composition_hook.py b/twilio/rest/video/v1/composition_hook.py index e15c43c4a..f4cb5c7c7 100644 --- a/twilio/rest/video/v1/composition_hook.py +++ b/twilio/rest/video/v1/composition_hook.py @@ -484,6 +484,7 @@ def create( :returns: The created CompositionHookInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -538,6 +539,7 @@ async def create_async( :returns: The created CompositionHookInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/video/v1/room/__init__.py b/twilio/rest/video/v1/room/__init__.py index bc87b88e2..0310baae1 100644 --- a/twilio/rest/video/v1/room/__init__.py +++ b/twilio/rest/video/v1/room/__init__.py @@ -431,6 +431,7 @@ def create( :returns: The created RoomInstance """ + data = values.of( { "EnableTurn": enable_turn, @@ -498,6 +499,7 @@ async def create_async( :returns: The created RoomInstance """ + data = values.of( { "EnableTurn": enable_turn, diff --git a/twilio/rest/voice/v1/byoc_trunk.py b/twilio/rest/voice/v1/byoc_trunk.py index 88ed49dcb..076ea0de6 100644 --- a/twilio/rest/voice/v1/byoc_trunk.py +++ b/twilio/rest/voice/v1/byoc_trunk.py @@ -471,6 +471,7 @@ def create( :returns: The created ByocTrunkInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -523,6 +524,7 @@ async def create_async( :returns: The created ByocTrunkInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/voice/v1/connection_policy/__init__.py b/twilio/rest/voice/v1/connection_policy/__init__.py index e1c26dc49..fc8269105 100644 --- a/twilio/rest/voice/v1/connection_policy/__init__.py +++ b/twilio/rest/voice/v1/connection_policy/__init__.py @@ -350,6 +350,7 @@ def create( :returns: The created ConnectionPolicyInstance """ + data = values.of( { "FriendlyName": friendly_name, @@ -374,6 +375,7 @@ async def create_async( :returns: The created ConnectionPolicyInstance """ + data = values.of( { "FriendlyName": friendly_name, diff --git a/twilio/rest/voice/v1/connection_policy/connection_policy_target.py b/twilio/rest/voice/v1/connection_policy/connection_policy_target.py index e617072cb..0972b680d 100644 --- a/twilio/rest/voice/v1/connection_policy/connection_policy_target.py +++ b/twilio/rest/voice/v1/connection_policy/connection_policy_target.py @@ -424,6 +424,7 @@ def create( :returns: The created ConnectionPolicyTargetInstance """ + data = values.of( { "Target": target, @@ -465,6 +466,7 @@ async def create_async( :returns: The created ConnectionPolicyTargetInstance """ + data = values.of( { "Target": target, diff --git a/twilio/rest/voice/v1/dialing_permissions/bulk_country_update.py b/twilio/rest/voice/v1/dialing_permissions/bulk_country_update.py index 3e4966c72..4d62c547b 100644 --- a/twilio/rest/voice/v1/dialing_permissions/bulk_country_update.py +++ b/twilio/rest/voice/v1/dialing_permissions/bulk_country_update.py @@ -66,6 +66,7 @@ def create(self, update_request: str) -> BulkCountryUpdateInstance: :returns: The created BulkCountryUpdateInstance """ + data = values.of( { "UpdateRequest": update_request, @@ -88,6 +89,7 @@ async def create_async(self, update_request: str) -> BulkCountryUpdateInstance: :returns: The created BulkCountryUpdateInstance """ + data = values.of( { "UpdateRequest": update_request, diff --git a/twilio/rest/voice/v1/ip_record.py b/twilio/rest/voice/v1/ip_record.py index c81322d42..c363dd479 100644 --- a/twilio/rest/voice/v1/ip_record.py +++ b/twilio/rest/voice/v1/ip_record.py @@ -331,6 +331,7 @@ def create( :returns: The created IpRecordInstance """ + data = values.of( { "IpAddress": ip_address, @@ -362,6 +363,7 @@ async def create_async( :returns: The created IpRecordInstance """ + data = values.of( { "IpAddress": ip_address, diff --git a/twilio/rest/voice/v1/source_ip_mapping.py b/twilio/rest/voice/v1/source_ip_mapping.py index b61bee9cc..a192d762e 100644 --- a/twilio/rest/voice/v1/source_ip_mapping.py +++ b/twilio/rest/voice/v1/source_ip_mapping.py @@ -317,6 +317,7 @@ def create( :returns: The created SourceIpMappingInstance """ + data = values.of( { "IpRecordSid": ip_record_sid, @@ -343,6 +344,7 @@ async def create_async( :returns: The created SourceIpMappingInstance """ + data = values.of( { "IpRecordSid": ip_record_sid, diff --git a/twilio/rest/wireless/v1/command.py b/twilio/rest/wireless/v1/command.py index 16d230adb..0315bf8b5 100644 --- a/twilio/rest/wireless/v1/command.py +++ b/twilio/rest/wireless/v1/command.py @@ -291,6 +291,7 @@ def create( :returns: The created CommandInstance """ + data = values.of( { "Command": command, @@ -334,6 +335,7 @@ async def create_async( :returns: The created CommandInstance """ + data = values.of( { "Command": command, diff --git a/twilio/rest/wireless/v1/rate_plan.py b/twilio/rest/wireless/v1/rate_plan.py index 469c8997e..591cdf318 100644 --- a/twilio/rest/wireless/v1/rate_plan.py +++ b/twilio/rest/wireless/v1/rate_plan.py @@ -385,6 +385,7 @@ def create( :returns: The created RatePlanInstance """ + data = values.of( { "UniqueName": unique_name, @@ -442,6 +443,7 @@ async def create_async( :returns: The created RatePlanInstance """ + data = values.of( { "UniqueName": unique_name, From 1434500c634349bc5d6c3b092194754b1b1a4b20 Mon Sep 17 00:00:00 2001 From: Twilio Date: Thu, 4 Jan 2024 10:23:22 +0000 Subject: [PATCH 2/4] Release 9.0.0-rc.1 --- setup.py | 2 +- twilio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a4708e3d5..17471b3a6 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name="twilio", - version="9.0.0-rc.0", + version="9.0.0-rc.1", description="Twilio API client and TwiML generator", author="Twilio", help_center="https://www.twilio.com/help/contact", diff --git a/twilio/__init__.py b/twilio/__init__.py index ed70a4bc1..77e099505 100644 --- a/twilio/__init__.py +++ b/twilio/__init__.py @@ -1,2 +1,2 @@ -__version_info__ = ("8", "11", "0") +__version_info__ = ("9", "0", "0-rc.1") __version__ = ".".join(__version_info__) From c960808478b003103a038b9416d96f70e6718c55 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Mon, 8 Jan 2024 12:40:05 +0530 Subject: [PATCH 3/4] chore: removing ngrok cluster test --- tests/cluster/test_webhook.py | 156 +++++++++++++++++----------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/tests/cluster/test_webhook.py b/tests/cluster/test_webhook.py index 37c0dda3b..068eea49d 100644 --- a/tests/cluster/test_webhook.py +++ b/tests/cluster/test_webhook.py @@ -34,81 +34,81 @@ def process_request(self): ) -class WebhookTest(unittest.TestCase): - def setUp(self): - api_key = os.environ["TWILIO_API_KEY"] - api_secret = os.environ["TWILIO_API_SECRET"] - account_sid = os.environ["TWILIO_ACCOUNT_SID"] - self.client = Client(api_key, api_secret, account_sid) - - portNumber = 7777 - self.validation_server = HTTPServer(("", portNumber), RequestHandler) - self.tunnel = ngrok.connect(portNumber) - self.flow_sid = "" - _thread.start_new_thread(self.start_http_server, ()) - - def start_http_server(self): - self.validation_server.serve_forever() - - def tearDown(self): - self.client.studio.v2.flows(self.flow_sid).delete() - ngrok.kill() - self.validation_server.shutdown() - self.validation_server.server_close() - - def create_studio_flow(self, url, method): - flow = self.client.studio.v2.flows.create( - friendly_name="Python Cluster Test Flow", - status="published", - definition={ - "description": "Studio Flow", - "states": [ - { - "name": "Trigger", - "type": "trigger", - "transitions": [ - { - "next": "httpRequest", - "event": "incomingRequest", - }, - ], - "properties": {}, - }, - { - "name": "httpRequest", - "type": "make-http-request", - "transitions": [], - "properties": { - "method": method, - "content_type": "application/x-www-form-urlencoded;charset=utf-8", - "url": url, - }, - }, - ], - "initial_state": "Trigger", - "flags": { - "allow_concurrent_calls": True, - }, - }, - ) - return flow - - def validate(self, method): - flow = self.create_studio_flow(url=self.tunnel.public_url, method=method) - self.flow_sid = flow.sid - time.sleep(5) - self.client.studio.v2.flows(self.flow_sid).executions.create( - to="to", from_="from" - ) - - def test_get(self): - time.sleep(5) - self.validate("GET") - time.sleep(5) - self.assertEqual(RequestHandler.is_request_valid, True) - - def test_post(self): - time.sleep(5) - self.validate("POST") - time.sleep(5) - self.assertEqual(RequestHandler.is_request_valid, True) +# class WebhookTest(unittest.TestCase): +# def setUp(self): +# api_key = os.environ["TWILIO_API_KEY"] +# api_secret = os.environ["TWILIO_API_SECRET"] +# account_sid = os.environ["TWILIO_ACCOUNT_SID"] +# self.client = Client(api_key, api_secret, account_sid) +# +# portNumber = 7777 +# self.validation_server = HTTPServer(("", portNumber), RequestHandler) +# self.tunnel = ngrok.connect(portNumber) +# self.flow_sid = "" +# _thread.start_new_thread(self.start_http_server, ()) +# +# def start_http_server(self): +# self.validation_server.serve_forever() +# +# def tearDown(self): +# self.client.studio.v2.flows(self.flow_sid).delete() +# ngrok.kill() +# self.validation_server.shutdown() +# self.validation_server.server_close() +# +# def create_studio_flow(self, url, method): +# flow = self.client.studio.v2.flows.create( +# friendly_name="Python Cluster Test Flow", +# status="published", +# definition={ +# "description": "Studio Flow", +# "states": [ +# { +# "name": "Trigger", +# "type": "trigger", +# "transitions": [ +# { +# "next": "httpRequest", +# "event": "incomingRequest", +# }, +# ], +# "properties": {}, +# }, +# { +# "name": "httpRequest", +# "type": "make-http-request", +# "transitions": [], +# "properties": { +# "method": method, +# "content_type": "application/x-www-form-urlencoded;charset=utf-8", +# "url": url, +# }, +# }, +# ], +# "initial_state": "Trigger", +# "flags": { +# "allow_concurrent_calls": True, +# }, +# }, +# ) +# return flow +# +# def validate(self, method): +# flow = self.create_studio_flow(url=self.tunnel.public_url, method=method) +# self.flow_sid = flow.sid +# time.sleep(5) +# self.client.studio.v2.flows(self.flow_sid).executions.create( +# to="to", from_="from" +# ) +# +# def test_get(self): +# time.sleep(5) +# self.validate("GET") +# time.sleep(5) +# self.assertEqual(RequestHandler.is_request_valid, True) +# +# def test_post(self): +# time.sleep(5) +# self.validate("POST") +# time.sleep(5) +# self.assertEqual(RequestHandler.is_request_valid, True) From 7cebbc659618b774b00326b8e123bbd0136c2f51 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Mon, 8 Jan 2024 12:42:32 +0530 Subject: [PATCH 4/4] chore: ran prettier --- tests/cluster/test_webhook.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/cluster/test_webhook.py b/tests/cluster/test_webhook.py index 068eea49d..307cf3d39 100644 --- a/tests/cluster/test_webhook.py +++ b/tests/cluster/test_webhook.py @@ -1,12 +1,7 @@ import os -import unittest -import time -import _thread -from http.server import BaseHTTPRequestHandler, HTTPServer -from pyngrok import ngrok +from http.server import BaseHTTPRequestHandler from twilio.request_validator import RequestValidator -from twilio.rest import Client class RequestHandler(BaseHTTPRequestHandler):