├── .deepsource.toml ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── config.yml └── workflows │ ├── pr-lint.yml │ └── test-and-deploy.yml ├── .gitignore ├── AUTHORS.md ├── CHANGES.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── ISSUE_TEMPLATE.md ├── LICENSE ├── MANIFEST.in ├── Makefile ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── UPGRADE.md ├── VERSIONS.md ├── advanced-examples └── custom-http-client.md ├── docs ├── conf.py └── source │ └── _templates │ └── sidebarintro.html ├── examples ├── basic_usage.py ├── client_validation.py ├── organization_api.py └── public_oauth.py ├── index.rst ├── requirements.txt ├── setup.cfg ├── setup.py ├── sonar-project.properties ├── tests ├── __init__.py ├── cluster │ ├── test_cluster.py │ └── test_webhook.py ├── holodeck.py ├── requirements.txt └── unit │ ├── __init__.py │ ├── base │ ├── __init__.py │ ├── test_deprecation.py │ ├── test_deserialize.py │ ├── test_serialize.py │ └── test_version.py │ ├── http │ ├── __init__.py │ ├── test_async_http_client.py │ ├── test_http_client.py │ └── test_validation_client.py │ ├── jwt │ ├── __init__.py │ ├── test_access_token.py │ ├── test_client.py │ ├── test_client_validation.py │ ├── test_jwt.py │ └── test_task_router.py │ ├── rest │ └── test_client.py │ ├── test_request_validator.py │ └── twiml │ ├── __init__.py │ ├── test_messaging_response.py │ └── test_voice_response.py ├── tox.ini └── twilio ├── __init__.py ├── auth_strategy ├── __init__.py ├── auth_strategy.py ├── auth_type.py ├── no_auth_strategy.py └── token_auth_strategy.py ├── base ├── __init__.py ├── client_base.py ├── deserialize.py ├── domain.py ├── exceptions.py ├── instance_context.py ├── instance_resource.py ├── list_resource.py ├── obsolete.py ├── page.py ├── serialize.py ├── values.py └── version.py ├── credential ├── __init__.py ├── client_credential_provider.py ├── credential_provider.py └── orgs_credential_provider.py ├── http ├── __init__.py ├── async_http_client.py ├── client_token_manager.py ├── http_client.py ├── orgs_token_manager.py ├── request.py ├── response.py ├── token_manager.py └── validation_client.py ├── jwt ├── __init__.py ├── access_token │ ├── __init__.py │ └── grants.py ├── client │ └── __init__.py ├── taskrouter │ ├── __init__.py │ └── capabilities.py └── validation │ └── __init__.py ├── request_validator.py ├── rest ├── __init__.py ├── accounts │ ├── AccountsBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── auth_token_promotion.py │ │ ├── bulk_consents.py │ │ ├── bulk_contacts.py │ │ ├── credential │ │ ├── __init__.py │ │ ├── aws.py │ │ └── public_key.py │ │ ├── safelist.py │ │ └── secondary_auth_token.py ├── api │ ├── ApiBase.py │ ├── __init__.py │ └── v2010 │ │ ├── __init__.py │ │ └── account │ │ ├── __init__.py │ │ ├── address │ │ ├── __init__.py │ │ └── dependent_phone_number.py │ │ ├── application.py │ │ ├── authorized_connect_app.py │ │ ├── available_phone_number_country │ │ ├── __init__.py │ │ ├── local.py │ │ ├── machine_to_machine.py │ │ ├── mobile.py │ │ ├── national.py │ │ ├── shared_cost.py │ │ ├── toll_free.py │ │ └── voip.py │ │ ├── balance.py │ │ ├── call │ │ ├── __init__.py │ │ ├── event.py │ │ ├── notification.py │ │ ├── payment.py │ │ ├── recording.py │ │ ├── siprec.py │ │ ├── stream.py │ │ ├── transcription.py │ │ ├── user_defined_message.py │ │ └── user_defined_message_subscription.py │ │ ├── conference │ │ ├── __init__.py │ │ ├── participant.py │ │ └── recording.py │ │ ├── connect_app.py │ │ ├── incoming_phone_number │ │ ├── __init__.py │ │ ├── assigned_add_on │ │ │ ├── __init__.py │ │ │ └── assigned_add_on_extension.py │ │ ├── local.py │ │ ├── mobile.py │ │ └── toll_free.py │ │ ├── key.py │ │ ├── message │ │ ├── __init__.py │ │ ├── feedback.py │ │ └── media.py │ │ ├── new_key.py │ │ ├── new_signing_key.py │ │ ├── notification.py │ │ ├── outgoing_caller_id.py │ │ ├── queue │ │ ├── __init__.py │ │ └── member.py │ │ ├── recording │ │ ├── __init__.py │ │ ├── add_on_result │ │ │ ├── __init__.py │ │ │ └── payload │ │ │ │ ├── __init__.py │ │ │ │ └── data.py │ │ └── transcription.py │ │ ├── short_code.py │ │ ├── signing_key.py │ │ ├── sip │ │ ├── __init__.py │ │ ├── credential_list │ │ │ ├── __init__.py │ │ │ └── credential.py │ │ ├── domain │ │ │ ├── __init__.py │ │ │ ├── auth_types │ │ │ │ ├── __init__.py │ │ │ │ ├── auth_type_calls │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── auth_calls_credential_list_mapping.py │ │ │ │ │ └── auth_calls_ip_access_control_list_mapping.py │ │ │ │ └── auth_type_registrations │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── auth_registrations_credential_list_mapping.py │ │ │ ├── credential_list_mapping.py │ │ │ └── ip_access_control_list_mapping.py │ │ └── ip_access_control_list │ │ │ ├── __init__.py │ │ │ └── ip_address.py │ │ ├── token.py │ │ ├── transcription.py │ │ ├── usage │ │ ├── __init__.py │ │ ├── record │ │ │ ├── __init__.py │ │ │ ├── all_time.py │ │ │ ├── daily.py │ │ │ ├── last_month.py │ │ │ ├── monthly.py │ │ │ ├── this_month.py │ │ │ ├── today.py │ │ │ ├── yearly.py │ │ │ └── yesterday.py │ │ └── trigger.py │ │ └── validation_request.py ├── assistants │ ├── AssistantsBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── assistant │ │ ├── __init__.py │ │ ├── assistants_knowledge.py │ │ ├── assistants_tool.py │ │ ├── feedback.py │ │ └── message.py │ │ ├── knowledge │ │ ├── __init__.py │ │ ├── chunk.py │ │ └── knowledge_status.py │ │ ├── policy.py │ │ ├── session │ │ ├── __init__.py │ │ └── message.py │ │ └── tool.py ├── bulkexports │ ├── BulkexportsBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── export │ │ ├── __init__.py │ │ ├── day.py │ │ ├── export_custom_job.py │ │ └── job.py │ │ └── export_configuration.py ├── chat │ ├── ChatBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── credential.py │ │ └── service │ │ │ ├── __init__.py │ │ │ ├── channel │ │ │ ├── __init__.py │ │ │ ├── invite.py │ │ │ ├── member.py │ │ │ └── message.py │ │ │ ├── role.py │ │ │ └── user │ │ │ ├── __init__.py │ │ │ └── user_channel.py │ ├── v2 │ │ ├── __init__.py │ │ ├── credential.py │ │ └── service │ │ │ ├── __init__.py │ │ │ ├── binding.py │ │ │ ├── channel │ │ │ ├── __init__.py │ │ │ ├── invite.py │ │ │ ├── member.py │ │ │ ├── message.py │ │ │ └── webhook.py │ │ │ ├── role.py │ │ │ └── user │ │ │ ├── __init__.py │ │ │ ├── user_binding.py │ │ │ └── user_channel.py │ └── v3 │ │ ├── __init__.py │ │ └── channel.py ├── content │ ├── ContentBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── content │ │ │ ├── __init__.py │ │ │ ├── approval_create.py │ │ │ └── approval_fetch.py │ │ ├── content_and_approvals.py │ │ └── legacy_content.py │ └── v2 │ │ ├── __init__.py │ │ ├── content.py │ │ └── content_and_approvals.py ├── conversations │ ├── ConversationsBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── address_configuration.py │ │ ├── configuration │ │ ├── __init__.py │ │ └── webhook.py │ │ ├── conversation │ │ ├── __init__.py │ │ ├── message │ │ │ ├── __init__.py │ │ │ └── delivery_receipt.py │ │ ├── participant.py │ │ └── webhook.py │ │ ├── conversation_with_participants.py │ │ ├── credential.py │ │ ├── participant_conversation.py │ │ ├── role.py │ │ ├── service │ │ ├── __init__.py │ │ ├── binding.py │ │ ├── configuration │ │ │ ├── __init__.py │ │ │ ├── notification.py │ │ │ └── webhook.py │ │ ├── conversation │ │ │ ├── __init__.py │ │ │ ├── message │ │ │ │ ├── __init__.py │ │ │ │ └── delivery_receipt.py │ │ │ ├── participant.py │ │ │ └── webhook.py │ │ ├── conversation_with_participants.py │ │ ├── participant_conversation.py │ │ ├── role.py │ │ └── user │ │ │ ├── __init__.py │ │ │ └── user_conversation.py │ │ └── user │ │ ├── __init__.py │ │ └── user_conversation.py ├── events │ ├── EventsBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── event_type.py │ │ ├── schema │ │ ├── __init__.py │ │ └── schema_version.py │ │ ├── sink │ │ ├── __init__.py │ │ ├── sink_test.py │ │ └── sink_validate.py │ │ └── subscription │ │ ├── __init__.py │ │ └── subscribed_event.py ├── flex_api │ ├── FlexApiBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── assessments.py │ │ ├── channel.py │ │ ├── configuration.py │ │ ├── flex_flow.py │ │ ├── insights_assessments_comment.py │ │ ├── insights_conversations.py │ │ ├── insights_questionnaires.py │ │ ├── insights_questionnaires_category.py │ │ ├── insights_questionnaires_question.py │ │ ├── insights_segments.py │ │ ├── insights_session.py │ │ ├── insights_settings_answer_sets.py │ │ ├── insights_settings_comment.py │ │ ├── insights_user_roles.py │ │ ├── interaction │ │ │ ├── __init__.py │ │ │ └── interaction_channel │ │ │ │ ├── __init__.py │ │ │ │ ├── interaction_channel_invite.py │ │ │ │ ├── interaction_channel_participant.py │ │ │ │ └── interaction_transfer.py │ │ ├── plugin │ │ │ ├── __init__.py │ │ │ └── plugin_versions.py │ │ ├── plugin_archive.py │ │ ├── plugin_configuration │ │ │ ├── __init__.py │ │ │ └── configured_plugin.py │ │ ├── plugin_configuration_archive.py │ │ ├── plugin_release.py │ │ ├── plugin_version_archive.py │ │ ├── provisioning_status.py │ │ └── web_channel.py │ └── v2 │ │ ├── __init__.py │ │ ├── flex_user.py │ │ └── web_channels.py ├── frontline_api │ ├── FrontlineApiBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ └── user.py ├── iam │ ├── IamBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── api_key.py │ │ ├── get_api_keys.py │ │ ├── new_api_key.py │ │ └── token.py ├── insights │ ├── InsightsBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── call │ │ ├── __init__.py │ │ ├── annotation.py │ │ ├── call_summary.py │ │ ├── event.py │ │ └── metric.py │ │ ├── call_summaries.py │ │ ├── conference │ │ ├── __init__.py │ │ └── conference_participant.py │ │ ├── room │ │ ├── __init__.py │ │ └── participant.py │ │ └── setting.py ├── intelligence │ ├── IntelligenceBase.py │ ├── __init__.py │ └── v2 │ │ ├── __init__.py │ │ ├── custom_operator.py │ │ ├── operator.py │ │ ├── operator_attachment.py │ │ ├── operator_attachments.py │ │ ├── operator_type.py │ │ ├── prebuilt_operator.py │ │ ├── service.py │ │ └── transcript │ │ ├── __init__.py │ │ ├── media.py │ │ ├── operator_result.py │ │ └── sentence.py ├── ip_messaging │ ├── IpMessagingBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── credential.py │ │ └── service │ │ │ ├── __init__.py │ │ │ ├── channel │ │ │ ├── __init__.py │ │ │ ├── invite.py │ │ │ ├── member.py │ │ │ └── message.py │ │ │ ├── role.py │ │ │ └── user │ │ │ ├── __init__.py │ │ │ └── user_channel.py │ └── v2 │ │ ├── __init__.py │ │ ├── credential.py │ │ └── service │ │ ├── __init__.py │ │ ├── binding.py │ │ ├── channel │ │ ├── __init__.py │ │ ├── invite.py │ │ ├── member.py │ │ ├── message.py │ │ └── webhook.py │ │ ├── role.py │ │ └── user │ │ ├── __init__.py │ │ ├── user_binding.py │ │ └── user_channel.py ├── lookups │ ├── LookupsBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ └── phone_number.py │ └── v2 │ │ ├── __init__.py │ │ ├── bucket.py │ │ ├── lookup_override.py │ │ ├── phone_number.py │ │ ├── query.py │ │ └── rate_limit.py ├── marketplace │ ├── MarketplaceBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── available_add_on │ │ ├── __init__.py │ │ └── available_add_on_extension.py │ │ ├── installed_add_on │ │ ├── __init__.py │ │ ├── installed_add_on_extension.py │ │ └── installed_add_on_usage.py │ │ ├── module_data.py │ │ ├── module_data_management.py │ │ └── referral_conversion.py ├── messaging │ ├── MessagingBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── brand_registration │ │ │ ├── __init__.py │ │ │ ├── brand_registration_otp.py │ │ │ └── brand_vetting.py │ │ ├── deactivations.py │ │ ├── domain_certs.py │ │ ├── domain_config.py │ │ ├── domain_config_messaging_service.py │ │ ├── external_campaign.py │ │ ├── linkshortening_messaging_service.py │ │ ├── linkshortening_messaging_service_domain_association.py │ │ ├── request_managed_cert.py │ │ ├── service │ │ │ ├── __init__.py │ │ │ ├── alpha_sender.py │ │ │ ├── channel_sender.py │ │ │ ├── destination_alpha_sender.py │ │ │ ├── phone_number.py │ │ │ ├── short_code.py │ │ │ ├── us_app_to_person.py │ │ │ └── us_app_to_person_usecase.py │ │ ├── tollfree_verification.py │ │ └── usecase.py │ └── v2 │ │ ├── __init__.py │ │ └── channels_sender.py ├── monitor │ ├── MonitorBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── alert.py │ │ └── event.py ├── notify │ ├── NotifyBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── credential.py │ │ └── service │ │ ├── __init__.py │ │ ├── binding.py │ │ └── notification.py ├── numbers │ ├── NumbersBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── bulk_eligibility.py │ │ ├── eligibility.py │ │ ├── porting_port_in.py │ │ ├── porting_port_in_phone_number.py │ │ ├── porting_portability.py │ │ ├── porting_webhook_configuration.py │ │ ├── porting_webhook_configuration_delete.py │ │ ├── porting_webhook_configuration_fetch.py │ │ └── signing_request_configuration.py │ └── v2 │ │ ├── __init__.py │ │ ├── authorization_document │ │ ├── __init__.py │ │ └── dependent_hosted_number_order.py │ │ ├── bulk_hosted_number_order.py │ │ ├── bundle_clone.py │ │ ├── hosted_number_order.py │ │ └── regulatory_compliance │ │ ├── __init__.py │ │ ├── bundle │ │ ├── __init__.py │ │ ├── bundle_copy.py │ │ ├── evaluation.py │ │ ├── item_assignment.py │ │ └── replace_items.py │ │ ├── end_user.py │ │ ├── end_user_type.py │ │ ├── regulation.py │ │ ├── supporting_document.py │ │ └── supporting_document_type.py ├── oauth │ ├── OauthBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── authorize.py │ │ └── token.py ├── preview │ ├── PreviewBase.py │ ├── __init__.py │ ├── hosted_numbers │ │ ├── __init__.py │ │ ├── authorization_document │ │ │ ├── __init__.py │ │ │ └── dependent_hosted_number_order.py │ │ └── hosted_number_order.py │ ├── marketplace │ │ ├── __init__.py │ │ ├── available_add_on │ │ │ ├── __init__.py │ │ │ └── available_add_on_extension.py │ │ └── installed_add_on │ │ │ ├── __init__.py │ │ │ └── installed_add_on_extension.py │ └── wireless │ │ ├── __init__.py │ │ ├── command.py │ │ ├── rate_plan.py │ │ └── sim │ │ ├── __init__.py │ │ └── usage.py ├── preview_iam │ ├── PreviewIamBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── authorize.py │ │ └── token.py │ └── versionless │ │ ├── __init__.py │ │ └── organization │ │ ├── __init__.py │ │ ├── account.py │ │ ├── role_assignment.py │ │ └── user.py ├── pricing │ ├── PricingBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ ├── messaging │ │ │ ├── __init__.py │ │ │ └── country.py │ │ ├── phone_number │ │ │ ├── __init__.py │ │ │ └── country.py │ │ └── voice │ │ │ ├── __init__.py │ │ │ ├── country.py │ │ │ └── number.py │ └── v2 │ │ ├── __init__.py │ │ ├── country.py │ │ ├── number.py │ │ └── voice │ │ ├── __init__.py │ │ ├── country.py │ │ └── number.py ├── proxy │ ├── ProxyBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ └── service │ │ ├── __init__.py │ │ ├── phone_number.py │ │ └── session │ │ ├── __init__.py │ │ ├── interaction.py │ │ └── participant │ │ ├── __init__.py │ │ └── message_interaction.py ├── routes │ ├── RoutesBase.py │ ├── __init__.py │ └── v2 │ │ ├── __init__.py │ │ ├── phone_number.py │ │ ├── sip_domain.py │ │ └── trunk.py ├── serverless │ ├── ServerlessBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ └── service │ │ ├── __init__.py │ │ ├── asset │ │ ├── __init__.py │ │ └── asset_version.py │ │ ├── build │ │ ├── __init__.py │ │ └── build_status.py │ │ ├── environment │ │ ├── __init__.py │ │ ├── deployment.py │ │ ├── log.py │ │ └── variable.py │ │ └── function │ │ ├── __init__.py │ │ └── function_version │ │ ├── __init__.py │ │ └── function_version_content.py ├── studio │ ├── StudioBase.py │ ├── __init__.py │ ├── v1 │ │ ├── __init__.py │ │ └── flow │ │ │ ├── __init__.py │ │ │ ├── engagement │ │ │ ├── __init__.py │ │ │ ├── engagement_context.py │ │ │ └── step │ │ │ │ ├── __init__.py │ │ │ │ └── step_context.py │ │ │ └── execution │ │ │ ├── __init__.py │ │ │ ├── execution_context.py │ │ │ └── execution_step │ │ │ ├── __init__.py │ │ │ └── execution_step_context.py │ └── v2 │ │ ├── __init__.py │ │ ├── flow │ │ ├── __init__.py │ │ ├── execution │ │ │ ├── __init__.py │ │ │ ├── execution_context.py │ │ │ └── execution_step │ │ │ │ ├── __init__.py │ │ │ │ └── execution_step_context.py │ │ ├── flow_revision.py │ │ └── flow_test_user.py │ │ └── flow_validate.py ├── supersim │ ├── SupersimBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── esim_profile.py │ │ ├── fleet.py │ │ ├── ip_command.py │ │ ├── network.py │ │ ├── network_access_profile │ │ ├── __init__.py │ │ └── network_access_profile_network.py │ │ ├── settings_update.py │ │ ├── sim │ │ ├── __init__.py │ │ ├── billing_period.py │ │ └── sim_ip_address.py │ │ ├── sms_command.py │ │ └── usage_record.py ├── sync │ ├── SyncBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ └── service │ │ ├── __init__.py │ │ ├── document │ │ ├── __init__.py │ │ └── document_permission.py │ │ ├── sync_list │ │ ├── __init__.py │ │ ├── sync_list_item.py │ │ └── sync_list_permission.py │ │ ├── sync_map │ │ ├── __init__.py │ │ ├── sync_map_item.py │ │ └── sync_map_permission.py │ │ └── sync_stream │ │ ├── __init__.py │ │ └── stream_message.py ├── taskrouter │ ├── TaskrouterBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ └── workspace │ │ ├── __init__.py │ │ ├── activity.py │ │ ├── event.py │ │ ├── task │ │ ├── __init__.py │ │ └── reservation.py │ │ ├── task_channel.py │ │ ├── task_queue │ │ ├── __init__.py │ │ ├── task_queue_bulk_real_time_statistics.py │ │ ├── task_queue_cumulative_statistics.py │ │ ├── task_queue_real_time_statistics.py │ │ ├── task_queue_statistics.py │ │ └── task_queues_statistics.py │ │ ├── worker │ │ ├── __init__.py │ │ ├── reservation.py │ │ ├── worker_channel.py │ │ ├── worker_statistics.py │ │ ├── workers_cumulative_statistics.py │ │ ├── workers_real_time_statistics.py │ │ └── workers_statistics.py │ │ ├── workflow │ │ ├── __init__.py │ │ ├── workflow_cumulative_statistics.py │ │ ├── workflow_real_time_statistics.py │ │ └── workflow_statistics.py │ │ ├── workspace_cumulative_statistics.py │ │ ├── workspace_real_time_statistics.py │ │ └── workspace_statistics.py ├── trunking │ ├── TrunkingBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ └── trunk │ │ ├── __init__.py │ │ ├── credential_list.py │ │ ├── ip_access_control_list.py │ │ ├── origination_url.py │ │ ├── phone_number.py │ │ └── recording.py ├── trusthub │ ├── TrusthubBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── compliance_inquiries.py │ │ ├── compliance_registration_inquiries.py │ │ ├── compliance_tollfree_inquiries.py │ │ ├── customer_profiles │ │ ├── __init__.py │ │ ├── customer_profiles_channel_endpoint_assignment.py │ │ ├── customer_profiles_entity_assignments.py │ │ └── customer_profiles_evaluations.py │ │ ├── end_user.py │ │ ├── end_user_type.py │ │ ├── policies.py │ │ ├── supporting_document.py │ │ ├── supporting_document_type.py │ │ └── trust_products │ │ ├── __init__.py │ │ ├── trust_products_channel_endpoint_assignment.py │ │ ├── trust_products_entity_assignments.py │ │ └── trust_products_evaluations.py ├── verify │ ├── VerifyBase.py │ ├── __init__.py │ └── v2 │ │ ├── __init__.py │ │ ├── form.py │ │ ├── safelist.py │ │ ├── service │ │ ├── __init__.py │ │ ├── access_token.py │ │ ├── entity │ │ │ ├── __init__.py │ │ │ ├── challenge │ │ │ │ ├── __init__.py │ │ │ │ └── notification.py │ │ │ ├── factor.py │ │ │ └── new_factor.py │ │ ├── messaging_configuration.py │ │ ├── rate_limit │ │ │ ├── __init__.py │ │ │ └── bucket.py │ │ ├── verification.py │ │ ├── verification_check.py │ │ └── webhook.py │ │ ├── template.py │ │ ├── verification_attempt.py │ │ └── verification_attempts_summary.py ├── video │ ├── VideoBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── composition.py │ │ ├── composition_hook.py │ │ ├── composition_settings.py │ │ ├── recording.py │ │ ├── recording_settings.py │ │ └── room │ │ ├── __init__.py │ │ ├── participant │ │ ├── __init__.py │ │ ├── anonymize.py │ │ ├── published_track.py │ │ ├── subscribe_rules.py │ │ └── subscribed_track.py │ │ ├── recording_rules.py │ │ ├── room_recording.py │ │ └── transcriptions.py ├── voice │ ├── VoiceBase.py │ ├── __init__.py │ └── v1 │ │ ├── __init__.py │ │ ├── archived_call.py │ │ ├── byoc_trunk.py │ │ ├── connection_policy │ │ ├── __init__.py │ │ └── connection_policy_target.py │ │ ├── dialing_permissions │ │ ├── __init__.py │ │ ├── bulk_country_update.py │ │ ├── country │ │ │ ├── __init__.py │ │ │ └── highrisk_special_prefix.py │ │ └── settings.py │ │ ├── ip_record.py │ │ └── source_ip_mapping.py └── wireless │ ├── WirelessBase.py │ ├── __init__.py │ └── v1 │ ├── __init__.py │ ├── command.py │ ├── rate_plan.py │ ├── sim │ ├── __init__.py │ ├── data_session.py │ └── usage_record.py │ └── usage_record.py └── twiml ├── __init__.py ├── fax_response.py ├── messaging_response.py └── voice_response.py /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | exclude_patterns = [ 4 | 'examples/**', 5 | 6 | # auto-generated files 7 | 'twilio/rest/**', 8 | 'twilio/twiml/**', 9 | 'tests/integration/**', 10 | ] 11 | 12 | test_patterns = [ 13 | 'tests/**' 14 | ] 15 | 16 | [[analyzers]] 17 | name = "python" 18 | enabled = true 19 | 20 | [analyzers.meta] 21 | max_line_length = 100 22 | skip_doc_coverage = ["module", "magic", "class"] 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug report 2 | description: Report a bug with the twilio-python helper library. 3 | title: "[BUG] Describe the issue briefly" 4 | labels: "type: bug" 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thank you for reporting a bug in the twilio-python helper library. Please provide the details below to help us investigate and resolve the issue. 10 | 11 | - type: textarea 12 | attributes: 13 | label: Describe the bug 14 | description: Provide a clear and concise description of the issue. 15 | placeholder: A clear and concise description of the bug. 16 | validations: 17 | required: true 18 | 19 | - type: textarea 20 | attributes: 21 | label: Code snippet 22 | description: Provide the code snippet that reproduces the issue. 23 | placeholder: "```\n// Code snippet here\n```" 24 | validations: 25 | required: true 26 | 27 | - type: textarea 28 | attributes: 29 | label: Actual behavior 30 | description: Describe what actually happened. 31 | placeholder: A description of the actual behavior. 32 | validations: 33 | required: true 34 | 35 | - type: textarea 36 | attributes: 37 | label: Expected behavior 38 | description: Describe what you expected to happen. 39 | placeholder: A description of the expected outcome. 40 | validations: 41 | required: true 42 | 43 | - type: input 44 | attributes: 45 | label: twilio-python version 46 | description: Specify the version of the twilio-python helper library you are using. 47 | placeholder: e.g., 9.4.1 48 | validations: 49 | required: true 50 | 51 | - type: input 52 | attributes: 53 | label: Python version 54 | description: Specify the version of Python you are using. 55 | placeholder: e.g., 3.9.1 56 | validations: 57 | required: true 58 | 59 | - type: textarea 60 | attributes: 61 | label: Logs or error messages 62 | description: Provide relevant logs or error messages (if any). 63 | placeholder: "Error: Something went wrong..." 64 | 65 | - type: textarea 66 | attributes: 67 | label: Additional context 68 | description: Add any other context about the problem here. 69 | placeholder: Any additional 70 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Twilio Support 3 | url: https://twilio.com/help/contact 4 | about: Get Support 5 | - name: Stack Overflow 6 | url: https://stackoverflow.com/questions/tagged/twilio-python+or+twilio+python 7 | about: Ask questions on Stack Overflow 8 | - name: Documentation 9 | url: https://www.twilio.com/docs/libraries/reference/twilio-python 10 | about: View Reference Documentation 11 | -------------------------------------------------------------------------------- /.github/workflows/pr-lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint PR 2 | on: 3 | pull_request_target: 4 | types: [ opened, edited, synchronize, reopened ] 5 | 6 | jobs: 7 | validate: 8 | name: Validate title 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: amannn/action-semantic-pull-request@v5 12 | with: 13 | types: | 14 | chore 15 | docs 16 | fix 17 | feat 18 | misc 19 | test 20 | env: 21 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[co] 2 | 3 | # Packages 4 | *.egg 5 | *.egg-info 6 | dist 7 | /build/ 8 | eggs 9 | parts 10 | bin 11 | develop-eggs 12 | .installed.cfg 13 | scratch 14 | env 15 | venv* 16 | 17 | # Installer logs 18 | pip-log.txt 19 | 20 | # Unit test / coverage reports 21 | .coverage 22 | .tox 23 | coverage.xml 24 | 25 | .DS_Store 26 | 27 | # sphinx build and rst folder 28 | docs/build 29 | docs/source/_rst 30 | 31 | # PyCharm/IntelliJ 32 | .idea 33 | 34 | #htmlcov 35 | *htmlcov* 36 | 37 | # PyEnv 38 | .python-version 39 | 40 | README.md.bak 41 | 42 | **/.openapi-generator* 43 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Authors 2 | 3 | We'd like to thank the following people who have contributed to the 4 | `twilio-python` repository. 5 | 6 | - Adam Ballai 7 | - Alex Brinsmead 8 | - Alex Chan 9 | - Andrew Benton 10 | - Chad Selph 11 | - Comrade DOS 12 | - Dan Yang 13 | - Dennis Pilarinos 14 | - Doug Black 15 | - Evan Fossier 16 | - Fabian Topfstedt 17 | - Florian Le Goff 18 | - Frank Tobia 19 | - Frederik De Bleser 20 | - Guillaume BINET 21 | - Hunter Blanks 22 | - Joël Franusic 23 | - Justin Van Koten 24 | - Kenneth Reitz 25 | - Kevin Burke 26 | - Kyle Conroy 27 | - Michael Parker 28 | - Moses Palmér 29 | - Ryan Horn 30 | - Sam Kimbrel 31 | - Skylar Saveland 32 | - Tiberiu Ana 33 | - Zachary Voase 34 | - aes 35 | - dnathe4th 36 | - isbo 37 | - negeorge 38 | - Evan Cooke 39 | - tysonholub 40 | - Brodan 41 | - Kyle Jones -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7 2 | 3 | ENV PYTHONUNBUFFERED 1 4 | 5 | RUN mkdir /twilio 6 | WORKDIR /twilio 7 | 8 | COPY setup.py . 9 | COPY requirements.txt . 10 | COPY README.md . 11 | COPY twilio ./twilio 12 | COPY tests ./tests 13 | 14 | RUN pip install . 15 | RUN pip install -r tests/requirements.txt 16 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ### Issue Summary 10 | A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples. 11 | 12 | ### Steps to Reproduce 13 | 1. This is the first step 14 | 2. This is the second step 15 | 3. Further steps, etc. 16 | 17 | ### Code Snippet 18 | ```python 19 | # paste code here 20 | ``` 21 | 22 | ### Exception/Log 23 | ``` 24 | # paste exception/log here 25 | ``` 26 | 27 | ### Technical details: 28 | * twilio-python version: 29 | * python version: 30 | 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2023, Twilio, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | # Include the SSL certificate file in the package distributed by pip 2 | recursive-include twilio/conf * 3 | include LICENSE 4 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 16 | 17 | # Fixes # 18 | 19 | A short description of what this PR does. 20 | 21 | ### Checklist 22 | - [x] I acknowledge that all my contributions will be made under the project's license 23 | - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar) 24 | - [ ] I have read the [Contribution Guidelines](https://github.com/twilio/twilio-python/blob/main/CONTRIBUTING.md) and my PR follows them 25 | - [ ] I have titled the PR appropriately 26 | - [ ] I have updated my branch with the main branch 27 | - [ ] I have added tests that prove my fix is effective or that my feature works 28 | - [ ] I have added the necessary documentation about the functionality in the appropriate .md file 29 | - [ ] I have added inline documentation to the code I modified 30 | 31 | If you have questions, please file a [support ticket](https://twilio.com/help/contact), or create a GitHub Issue in this repository. 32 | -------------------------------------------------------------------------------- /VERSIONS.md: -------------------------------------------------------------------------------- 1 | # Versioning Strategy 2 | 3 | `twilio-python` uses a modified version of [Semantic Versioning][semver] for 4 | all changes to the helper library. It is strongly encouraged that you pin at 5 | least the major version and potentially the minor version to avoid pulling in 6 | breaking changes. 7 | 8 | Semantic Versions take the form of `MAJOR.MINOR.PATCH` 9 | 10 | When bugs are fixed in the library in a backwards-compatible way, the `PATCH` 11 | level will be incremented by one. When new features are added to the library 12 | in a backwards-compatible way, the `PATCH` level will be incremented by one. 13 | `PATCH` changes should _not_ break your code and are generally safe for upgrade. 14 | 15 | When a new large feature set comes online or a small breaking change is 16 | introduced, the `MINOR` version will be incremented by one and the `PATCH` 17 | version reset to zero. `MINOR` changes _may_ require some amount of manual code 18 | change for upgrade. These backwards-incompatible changes will generally be 19 | limited to a small number of function signature changes. 20 | 21 | The `MAJOR` version is used to indicate the family of technology represented by 22 | the helper library. Breaking changes that require extensive reworking of code 23 | will cause the `MAJOR` version to be incremented by one, and the `MINOR` and 24 | `PATCH` versions will be reset to zero. Twilio understands that this can be very 25 | disruptive, so we will only introduce this type of breaking change when 26 | absolutely necessary. New `MAJOR` versions will be communicated in advance with 27 | `Release Candidates` and a schedule. 28 | 29 | ## Supported Versions 30 | 31 | Only the current `MAJOR` version of `twilio-python` is supported. New 32 | features, functionality, bug fixes, and security updates will only be added to 33 | the current `MAJOR` version. 34 | 35 | [semver]: https://semver.org -------------------------------------------------------------------------------- /docs/source/_templates/sidebarintro.html: -------------------------------------------------------------------------------- 1 |

About twilio-python

2 |

3 | A Python module for communicating with the Twilio API and generating 4 | TwiML. 5 |

6 | 7 |

Useful Links

8 | 14 | -------------------------------------------------------------------------------- /examples/basic_usage.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from twilio.rest import Client 4 | from twilio.twiml.voice_response import VoiceResponse 5 | 6 | ACCOUNT_SID = os.environ.get("TWILIO_ACCOUNT_SID") 7 | AUTH_TOKEN = os.environ.get("TWILIO_AUTH_TOKEN") 8 | 9 | 10 | def example(): 11 | """ 12 | Some example usage of different twilio resources. 13 | """ 14 | client = Client(ACCOUNT_SID, AUTH_TOKEN) 15 | 16 | # Get all messages 17 | all_messages = client.messages.list() 18 | print("There are {} messages in your account.".format(len(all_messages))) 19 | 20 | # Get only last 10 messages... 21 | some_messages = client.messages.list(limit=10) 22 | print("Here are the last 10 messages in your account:") 23 | for m in some_messages: 24 | print(m) 25 | 26 | # Get messages in smaller pages... 27 | all_messages = client.messages.list(page_size=10) 28 | print("There are {} messages in your account.".format(len(all_messages))) 29 | 30 | print("Sending a message...") 31 | new_message = client.messages.create(to="XXXX", from_="YYYY", body="Twilio rocks!") 32 | 33 | print("Making a call...") 34 | new_call = client.calls.create(to="XXXX", from_="YYYY", method="GET") 35 | 36 | print("Serving TwiML") 37 | twiml_response = VoiceResponse() 38 | twiml_response.say("Hello!") 39 | twiml_response.hangup() 40 | twiml_xml = twiml_response.to_xml() 41 | print("Generated twiml: {}".format(twiml_xml)) 42 | 43 | 44 | if __name__ == "__main__": 45 | example() 46 | -------------------------------------------------------------------------------- /examples/client_validation.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from cryptography.hazmat.backends import default_backend 4 | from cryptography.hazmat.primitives.asymmetric import rsa 5 | from cryptography.hazmat.primitives.serialization import ( 6 | Encoding, 7 | PublicFormat, 8 | PrivateFormat, 9 | NoEncryption, 10 | ) 11 | 12 | from twilio.http.validation_client import ValidationClient 13 | from twilio.rest import Client 14 | 15 | 16 | ACCOUNT_SID = os.environ.get("TWILIO_ACCOUNT_SID") 17 | AUTH_TOKEN = os.environ.get("TWILIO_AUTH_TOKEN") 18 | 19 | 20 | def example(): 21 | """ 22 | Example of using the ValidationClient for signed requests to Twilio. 23 | This is only available to enterprise customers. 24 | 25 | This will walkthrough creating an API Key, generating an RSA keypair, setting up a 26 | ValidationClient with these values and making requests with the client. 27 | """ 28 | client = Client(ACCOUNT_SID, AUTH_TOKEN) 29 | 30 | # Using Client Validation requires using API Keys for auth 31 | # First create an API key using the standard account sid, auth token client 32 | print("Creating new api key...") 33 | api_key = client.new_keys.create(friendly_name="ClientValidationApiKey") 34 | 35 | # Generate a new RSA Keypair 36 | print("Generating RSA key pair...") 37 | key_pair = rsa.generate_private_key( 38 | public_exponent=65537, key_size=2048, backend=default_backend() 39 | ) 40 | public_key = key_pair.public_key().public_bytes( 41 | Encoding.PEM, PublicFormat.SubjectPublicKeyInfo 42 | ) 43 | private_key = key_pair.private_bytes( 44 | Encoding.PEM, PrivateFormat.PKCS8, NoEncryption() 45 | ) 46 | 47 | # Register the public key with Twilio 48 | print("Registering public key with Twilio...") 49 | credential = client.accounts.credentials.public_key.create( 50 | public_key, friendly_name="ClientValidationPublicKey" 51 | ) 52 | 53 | # Create a new ValidationClient with the keys we created 54 | validation_client = ValidationClient( 55 | ACCOUNT_SID, api_key.sid, credential.sid, private_key 56 | ) 57 | 58 | # Create a REST Client using the validation_client 59 | client = Client( 60 | api_key.sid, api_key.secret, ACCOUNT_SID, http_client=validation_client 61 | ) 62 | 63 | # Use the library as usual 64 | print("Trying out client validation...") 65 | messages = client.messages.list(limit=10) 66 | for m in messages: 67 | print("Message {}".format(m.sid)) 68 | 69 | print("Client validation works!") 70 | 71 | 72 | if __name__ == "__main__": 73 | example() 74 | -------------------------------------------------------------------------------- /examples/organization_api.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from twilio.rest import Client 4 | from twilio.credential.orgs_credential_provider import OrgsCredentialProvider 5 | 6 | ACCOUNT_SID = os.environ.get("TWILIO_ACCOUNT_SID") 7 | API_KEY = os.environ.get("TWILIO_API_KEY") 8 | API_SECRET = os.environ.get("TWILIO_API_SECRET") 9 | 10 | CLIENT_ID = os.environ.get("TWILIO_CLIENT_ID") 11 | CLIENT_SECRET = os.environ.get("CLIENT_SECRET") 12 | ORGS_SID = os.environ.get("ORGS_SID") 13 | 14 | 15 | def example(): 16 | """ 17 | Some example usage of using organization resources 18 | """ 19 | client = Client( 20 | account_sid=ACCOUNT_SID, 21 | credential_provider=OrgsCredentialProvider(CLIENT_ID, CLIENT_SECRET), 22 | ) 23 | 24 | accounts = client.preview_iam.organization( 25 | organization_sid=ORGS_SID 26 | ).accounts.stream() 27 | for record in accounts: 28 | print(record) 29 | 30 | 31 | if __name__ == "__main__": 32 | example() 33 | -------------------------------------------------------------------------------- /examples/public_oauth.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from twilio.rest import Client 4 | from twilio.credential.client_credential_provider import ClientCredentialProvider 5 | 6 | ACCOUNT_SID = os.environ.get("TWILIO_ACCOUNT_SID") 7 | API_KEY = os.environ.get("TWILIO_API_KEY") 8 | API_SECRET = os.environ.get("TWILIO_API_SECRET") 9 | FROM_NUMBER = os.environ.get("TWILIO_FROM_NUMBER") 10 | TO_NUMBER = os.environ.get("TWILIO_TO_NUMBER") 11 | 12 | CLIENT_ID = os.environ.get("TWILIO_CLIENT_ID") 13 | CLIENT_SECRET = os.environ.get("CLIENT_SECRET") 14 | 15 | 16 | def example(): 17 | """ 18 | Some example usage of message resources. 19 | """ 20 | client = Client( 21 | account_sid=ACCOUNT_SID, 22 | credential_provider=ClientCredentialProvider(CLIENT_ID, CLIENT_SECRET), 23 | ) 24 | 25 | msg = client.messages.create( 26 | to=self.to_number, from_=self.from_number, body="hello world" 27 | ) 28 | 29 | 30 | if __name__ == "__main__": 31 | example() 32 | -------------------------------------------------------------------------------- /index.rst: -------------------------------------------------------------------------------- 1 | .. twilio-python documentation master file, created by 2 | sphinx-quickstart on Fri Jul 27 12:54:05 2018. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 7 | Welcome to twilio-python's documentation! 8 | ========================================= 9 | 10 | Release v\ |version|. 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | 15 | README.md 16 | 17 | 18 | API auto-generated documentation 19 | ================================ 20 | 21 | If you are looking for information on a specific function, class or 22 | method, this part of the documentation is for you. 23 | 24 | .. toctree:: 25 | :maxdepth: 1 26 | :glob: 27 | 28 | docs/source/_rst/modules.rst 29 | 30 | 31 | Indices and tables 32 | ================== 33 | 34 | * :ref:`genindex` 35 | * :ref:`modindex` 36 | * :ref:`search` 37 | 38 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pygments>=2.7.4 # not directly required, pinned by Snyk to avoid a vulnerability 2 | requests>=2.32.2 3 | PyJWT>=2.0.0, <3.0.0 4 | aiohttp>=3.10.2 5 | aiohttp-retry==2.8.3 6 | certifi>=2023.7.22 # not directly required, pinned by Snyk to avoid a vulnerability 7 | urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability 8 | zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability 9 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [metadata] 5 | long_description = file: README.md 6 | license = MIT 7 | 8 | [flake8] 9 | exclude = ./twilio/rest,./twilio/twiml,./tests/integration 10 | 11 | [coverage:run] 12 | omit = twilio/rest/* 13 | relative_files = True 14 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | with open("README.md") as f: 4 | long_description = f.read() 5 | 6 | # To install the twilio-python library, open a Terminal shell, then run this 7 | # file by typing: 8 | # 9 | # python setup.py install 10 | # 11 | # You need to have the setuptools module installed. Try reading the setuptools 12 | # documentation: http://pypi.python.org/pypi/setuptools 13 | 14 | setup( 15 | name="twilio", 16 | version="9.6.5", 17 | description="Twilio API client and TwiML generator", 18 | author="Twilio", 19 | help_center="https://www.twilio.com/help/contact", 20 | url="https://github.com/twilio/twilio-python/", 21 | keywords=["twilio", "twiml"], 22 | python_requires=">=3.7.0", 23 | install_requires=[ 24 | "requests >= 2.0.0", 25 | "PyJWT >= 2.0.0, < 3.0.0", 26 | "aiohttp>=3.8.4", 27 | "aiohttp-retry>=2.8.3", 28 | ], 29 | packages=find_packages(exclude=["tests", "tests.*"]), 30 | include_package_data=True, 31 | classifiers=[ 32 | "Development Status :: 5 - Production/Stable", 33 | "Intended Audience :: Developers", 34 | "License :: OSI Approved :: MIT License", 35 | "Operating System :: OS Independent", 36 | "Programming Language :: Python", 37 | "Programming Language :: Python :: 3.7", 38 | "Programming Language :: Python :: 3.8", 39 | "Programming Language :: Python :: 3.9", 40 | "Programming Language :: Python :: 3.10", 41 | "Programming Language :: Python :: 3.11", 42 | "Programming Language :: Python :: 3.12", 43 | "Programming Language :: Python :: 3.13", 44 | "Programming Language :: Python :: Implementation :: CPython", 45 | "Topic :: Software Development :: Libraries :: Python Modules", 46 | "Topic :: Communications :: Telephony", 47 | ], 48 | long_description=long_description, 49 | long_description_content_type="text/markdown", 50 | ) 51 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectKey=twilio_twilio-python 2 | sonar.projectName=twilio-python 3 | sonar.organization=twilio 4 | 5 | sonar.sources=twilio/ 6 | # Exclude any auto-generated source code 7 | sonar.exclusions=twilio/rest/**/* 8 | sonar.tests=tests/ 9 | # Exclude any auto-generated integration tests 10 | sonar.test.exclusions=tests/integration/**/test_*.py 11 | 12 | # For Code Coverage analysis 13 | sonar.python.coverage.reportPaths=coverage.xml 14 | # Exclude auto-generated code from coverage analysis 15 | sonar.coverage.exclusions=twilio/rest/**/* 16 | sonar.python.version=3 17 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from tests.holodeck import Holodeck 4 | from twilio.rest import Client 5 | 6 | 7 | class IntegrationTestCase(unittest.TestCase): 8 | def setUp(self): 9 | super(IntegrationTestCase, self).setUp() 10 | self.account_sid = "AC" + "a" * 32 11 | self.auth_token = "AUTHTOKEN" 12 | self.holodeck = Holodeck() 13 | self.client = Client( 14 | username=self.account_sid, 15 | password=self.auth_token, 16 | http_client=self.holodeck, 17 | ) 18 | -------------------------------------------------------------------------------- /tests/requirements.txt: -------------------------------------------------------------------------------- 1 | Sphinx>=1.8.0 2 | mock 3 | pytest 4 | pytest-cov 5 | aiounittest 6 | flake8 7 | wheel>=0.22.0 8 | cryptography 9 | recommonmark 10 | django 11 | multidict 12 | pyngrok 13 | black 14 | autoflake 15 | -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/unit/base/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/unit/base/test_deprecation.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import warnings 3 | 4 | from twilio.base.obsolete import deprecated_method 5 | 6 | 7 | class DeprecatedMethodTest(unittest.TestCase): 8 | def test_deprecation_decorator(self): 9 | @deprecated_method 10 | def old_method(): 11 | return True 12 | 13 | with warnings.catch_warnings(record=True) as caught_warnings: 14 | warnings.simplefilter("always") 15 | # Call function that should raise a warning, but still execute 16 | self.assertTrue(old_method()) 17 | self.assertTrue(len(caught_warnings)) 18 | self.assertEqual( 19 | str(caught_warnings[0].message), 20 | "Function method .old_method() is deprecated", 21 | ) 22 | assert issubclass(caught_warnings[0].category, DeprecationWarning) 23 | 24 | def test_deprecation_decorator_with_new_method(self): 25 | @deprecated_method("new_method") 26 | def old_method(): 27 | return True 28 | 29 | with warnings.catch_warnings(record=True) as caught_warnings: 30 | warnings.simplefilter("always") 31 | 32 | # Call function that should raise a warning, but still execute 33 | self.assertTrue(old_method()) 34 | self.assertTrue(len(caught_warnings)) 35 | self.assertEqual( 36 | str(caught_warnings[0].message), 37 | "Function method .old_method() is deprecated in favor of .new_method()", 38 | ) 39 | assert issubclass(caught_warnings[0].category, DeprecationWarning) 40 | -------------------------------------------------------------------------------- /tests/unit/http/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/twilio-python/1f43fce728760c476ece57a1e6c857eea51c73e3/tests/unit/http/__init__.py -------------------------------------------------------------------------------- /tests/unit/jwt/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/unit/twiml/__init__.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from pytest import raises 4 | 5 | from twilio.twiml import format_language, lower_camel, TwiMLException, TwiML 6 | 7 | 8 | class TwilioTest(unittest.TestCase): 9 | def strip(self, xml): 10 | return str(xml) 11 | 12 | def test_append_fail(self): 13 | with raises(TwiMLException): 14 | t = TwiML() 15 | t.append(12345) 16 | 17 | def test_format_language_none(self): 18 | language = None 19 | self.assertEqual(language, format_language(language)) 20 | 21 | def test_format_language_valid(self): 22 | language = "en-US" 23 | self.assertEqual(language, format_language(language)) 24 | 25 | def test_format_language_coerced(self): 26 | language = "EN_us" 27 | self.assertEqual("en-US", format_language(language)) 28 | 29 | def test_format_language_fail(self): 30 | with raises(TwiMLException): 31 | format_language("this is invalid") 32 | 33 | def test_lower_camel_empty_string(self): 34 | self.assertEqual("", lower_camel("")) 35 | 36 | def test_lower_camel_none(self): 37 | self.assertEqual(None, lower_camel(None)) 38 | 39 | def test_lower_camel_single_word(self): 40 | self.assertEqual("foo", lower_camel("foo")) 41 | 42 | def test_lower_camel_double_word(self): 43 | self.assertEqual("fooBar", lower_camel("foo_bar")) 44 | 45 | def test_lower_camel_multi_word(self): 46 | self.assertEqual("fooBarBaz", lower_camel("foo_bar_baz")) 47 | 48 | def test_lower_camel_multi_word_mixed_case(self): 49 | self.assertEqual("fooBarBaz", lower_camel("foO_Bar_baz")) 50 | 51 | def test_lower_camel_camel_cased(self): 52 | self.assertEqual("fooBar", lower_camel("fooBar")) 53 | 54 | def test_utf8_encoding(self): 55 | t = TwiML() 56 | t.value = "An utf-8 character: ñ" 57 | self.assertEqual( 58 | t.to_xml(), 59 | 'An utf-8 character: ñ', 60 | ) 61 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | env_list = py3{7,8,9,10,11}, pypy 3 | skip_missing_interpreters = true 4 | 5 | [testenv] 6 | deps = -r{tox_root}/tests/requirements.txt 7 | commands = 8 | pytest \ 9 | [] 10 | -------------------------------------------------------------------------------- /twilio/__init__.py: -------------------------------------------------------------------------------- 1 | __version_info__ = ("9", "6", "5") 2 | __version__ = ".".join(__version_info__) 3 | -------------------------------------------------------------------------------- /twilio/auth_strategy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/twilio-python/1f43fce728760c476ece57a1e6c857eea51c73e3/twilio/auth_strategy/__init__.py -------------------------------------------------------------------------------- /twilio/auth_strategy/auth_strategy.py: -------------------------------------------------------------------------------- 1 | from twilio.auth_strategy.auth_type import AuthType 2 | from abc import abstractmethod 3 | 4 | 5 | class AuthStrategy(object): 6 | def __init__(self, auth_type: AuthType): 7 | self._auth_type = auth_type 8 | 9 | @property 10 | def auth_type(self) -> AuthType: 11 | return self._auth_type 12 | 13 | @abstractmethod 14 | def get_auth_string(self) -> str: 15 | """Return the authentication string.""" 16 | 17 | @abstractmethod 18 | def requires_authentication(self) -> bool: 19 | """Return True if authentication is required, else False.""" 20 | -------------------------------------------------------------------------------- /twilio/auth_strategy/auth_type.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | 4 | class AuthType(Enum): 5 | ORGS_TOKEN = "orgs_stoken" 6 | NO_AUTH = "noauth" 7 | BASIC = "basic" 8 | API_KEY = "api_key" 9 | CLIENT_CREDENTIALS = "client_credentials" 10 | 11 | def __str__(self): 12 | return self.value 13 | -------------------------------------------------------------------------------- /twilio/auth_strategy/no_auth_strategy.py: -------------------------------------------------------------------------------- 1 | from auth_type import AuthType 2 | from twilio.auth_strategy.auth_strategy import AuthStrategy 3 | 4 | 5 | class NoAuthStrategy(AuthStrategy): 6 | def __init__(self): 7 | super().__init__(AuthType.NO_AUTH) 8 | 9 | def get_auth_string(self) -> str: 10 | return "" 11 | 12 | def requires_authentication(self) -> bool: 13 | return False 14 | -------------------------------------------------------------------------------- /twilio/auth_strategy/token_auth_strategy.py: -------------------------------------------------------------------------------- 1 | import jwt 2 | import threading 3 | import logging 4 | from datetime import datetime, timezone 5 | 6 | from twilio.auth_strategy.auth_type import AuthType 7 | from twilio.auth_strategy.auth_strategy import AuthStrategy 8 | from twilio.http.token_manager import TokenManager 9 | 10 | 11 | class TokenAuthStrategy(AuthStrategy): 12 | def __init__(self, token_manager: TokenManager): 13 | super().__init__(AuthType.ORGS_TOKEN) 14 | self.token_manager = token_manager 15 | self.token = None 16 | self.lock = threading.Lock() 17 | logging.basicConfig(level=logging.INFO) 18 | self.logger = logging.getLogger(__name__) 19 | 20 | def get_auth_string(self) -> str: 21 | self.fetch_token() 22 | return f"Bearer {self.token}" 23 | 24 | def requires_authentication(self) -> bool: 25 | return True 26 | 27 | def fetch_token(self): 28 | if self.token is None or self.token == "" or self.is_token_expired(self.token): 29 | with self.lock: 30 | if ( 31 | self.token is None 32 | or self.token == "" 33 | or self.is_token_expired(self.token) 34 | ): 35 | self.logger.info("New token fetched for accessing organization API") 36 | self.token = self.token_manager.fetch_access_token() 37 | 38 | def is_token_expired(self, token): 39 | try: 40 | decoded = jwt.decode(token, options={"verify_signature": False}) 41 | exp = decoded.get("exp") 42 | 43 | if exp is None: 44 | return True # No expiration time present, consider it expired 45 | 46 | # Check if the expiration time has passed by using time-zone 47 | return datetime.fromtimestamp(exp, tz=timezone.utc) < datetime.now( 48 | timezone.utc 49 | ) 50 | 51 | except jwt.DecodeError: 52 | return True # Token is invalid 53 | except Exception as e: 54 | print(f"An error occurred: {e}") 55 | return True 56 | -------------------------------------------------------------------------------- /twilio/base/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/twilio-python/1f43fce728760c476ece57a1e6c857eea51c73e3/twilio/base/__init__.py -------------------------------------------------------------------------------- /twilio/base/deserialize.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from decimal import BasicContext, Decimal 3 | from email.utils import parsedate 4 | from typing import Optional, Union 5 | 6 | ISO8601_DATE_FORMAT = "%Y-%m-%d" 7 | ISO8601_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" 8 | 9 | 10 | def iso8601_date(s: str) -> Union[datetime.date, str]: 11 | """ 12 | Parses an ISO 8601 date string and returns a UTC date object or the string 13 | if the parsing failed. 14 | :param s: ISO 8601-formatted date string (2015-01-25) 15 | :return: 16 | """ 17 | try: 18 | return ( 19 | datetime.datetime.strptime(s, ISO8601_DATE_FORMAT) 20 | .replace(tzinfo=datetime.timezone.utc) 21 | .date() 22 | ) 23 | except (TypeError, ValueError): 24 | return s 25 | 26 | 27 | def iso8601_datetime( 28 | s: str, 29 | ) -> Union[datetime.datetime, str]: 30 | """ 31 | Parses an ISO 8601 datetime string and returns a UTC datetime object, 32 | or the string if parsing failed. 33 | :param s: ISO 8601-formatted datetime string (2015-01-25T12:34:56Z) 34 | """ 35 | try: 36 | return datetime.datetime.strptime(s, ISO8601_DATETIME_FORMAT).replace( 37 | tzinfo=datetime.timezone.utc 38 | ) 39 | except (TypeError, ValueError): 40 | return s 41 | 42 | 43 | def rfc2822_datetime(s: str) -> Optional[datetime.datetime]: 44 | """ 45 | Parses an RFC 2822 date string and returns a UTC datetime object, 46 | or the string if parsing failed. 47 | :param s: RFC 2822-formatted string date 48 | :return: datetime or str 49 | """ 50 | date_tuple = parsedate(s) 51 | if date_tuple is None: 52 | return None 53 | return datetime.datetime(*date_tuple[:6]).replace(tzinfo=datetime.timezone.utc) 54 | 55 | 56 | def decimal(d: Optional[str]) -> Union[Decimal, str]: 57 | """ 58 | Parses a decimal string into a Decimal 59 | :param d: decimal string 60 | """ 61 | if not d: 62 | return d 63 | return Decimal(d, BasicContext) 64 | 65 | 66 | def integer(i: str) -> Union[int, str]: 67 | """ 68 | Parses an integer string into an int 69 | :param i: integer string 70 | :return: int 71 | """ 72 | try: 73 | return int(i) 74 | except (TypeError, ValueError): 75 | return i 76 | -------------------------------------------------------------------------------- /twilio/base/instance_context.py: -------------------------------------------------------------------------------- 1 | from twilio.base.version import Version 2 | 3 | 4 | class InstanceContext(object): 5 | def __init__(self, version: Version): 6 | self._version = version 7 | -------------------------------------------------------------------------------- /twilio/base/instance_resource.py: -------------------------------------------------------------------------------- 1 | from twilio.base.version import Version 2 | 3 | 4 | class InstanceResource(object): 5 | def __init__(self, version: Version): 6 | self._version = version 7 | -------------------------------------------------------------------------------- /twilio/base/list_resource.py: -------------------------------------------------------------------------------- 1 | from twilio.base.version import Version 2 | 3 | 4 | class ListResource(object): 5 | def __init__(self, version: Version): 6 | self._version = version 7 | -------------------------------------------------------------------------------- /twilio/base/obsolete.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | import functools 3 | 4 | 5 | class ObsoleteException(Exception): 6 | """Base class for warnings about obsolete features.""" 7 | 8 | 9 | def obsolete_client(func): 10 | """This is a decorator which can be used to mark Client classes as 11 | obsolete. It will result in an error being emitted when the class is 12 | instantiated.""" 13 | 14 | @functools.wraps(func) 15 | def new_func(*args, **kwargs): 16 | raise ObsoleteException( 17 | "{} has been removed from this version of the library. " 18 | "Please refer to current documentation for guidance.".format(func.__name__) 19 | ) 20 | 21 | return new_func 22 | 23 | 24 | def deprecated_method(new_func=None): 25 | """ 26 | This is a decorator which can be used to mark deprecated methods. 27 | It will report in a DeprecationWarning being emitted to stderr when the deprecated method is used. 28 | """ 29 | 30 | def deprecated_method_wrapper(func): 31 | @functools.wraps(func) 32 | def wrapper(*args, **kwargs): 33 | msg = "Function method .{}() is deprecated".format(func.__name__) 34 | msg += ( 35 | " in favor of .{}()".format(new_func) 36 | if isinstance(new_func, str) 37 | else "" 38 | ) 39 | warnings.warn(msg, DeprecationWarning) 40 | return func(*args, **kwargs) 41 | 42 | return wrapper 43 | 44 | if callable(new_func): 45 | return deprecated_method_wrapper(new_func) 46 | 47 | return deprecated_method_wrapper 48 | -------------------------------------------------------------------------------- /twilio/base/serialize.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import json 3 | 4 | from twilio.base import values 5 | 6 | 7 | def iso8601_date(d): 8 | """ 9 | Return a string representation of a date that the Twilio API understands 10 | Format is YYYY-MM-DD. Returns None if d is not a string, datetime, or date 11 | """ 12 | if d == values.unset: 13 | return d 14 | elif isinstance(d, datetime.datetime): 15 | return str(d.date()) 16 | elif isinstance(d, datetime.date): 17 | return str(d) 18 | elif isinstance(d, str): 19 | return d 20 | 21 | 22 | def iso8601_datetime(d): 23 | """ 24 | Return a string representation of a date that the Twilio API understands 25 | Format is YYYY-MM-DD. Returns None if d is not a string, datetime, or date 26 | """ 27 | if d == values.unset: 28 | return d 29 | elif isinstance(d, datetime.datetime) or isinstance(d, datetime.date): 30 | return d.strftime("%Y-%m-%dT%H:%M:%SZ") 31 | elif isinstance(d, str): 32 | return d 33 | 34 | 35 | def prefixed_collapsible_map(m, prefix): 36 | """ 37 | Return a dict of params corresponding to those in m with the added prefix 38 | """ 39 | if m == values.unset: 40 | return {} 41 | 42 | def flatten_dict(d, result=None, prv_keys=None): 43 | if result is None: 44 | result = {} 45 | 46 | if prv_keys is None: 47 | prv_keys = [] 48 | 49 | for k, v in d.items(): 50 | if isinstance(v, dict): 51 | flatten_dict(v, result, prv_keys + [k]) 52 | else: 53 | result[".".join(prv_keys + [k])] = v 54 | 55 | return result 56 | 57 | if isinstance(m, dict): 58 | flattened = flatten_dict(m) 59 | return {"{}.{}".format(prefix, k): v for k, v in flattened.items()} 60 | 61 | return {} 62 | 63 | 64 | def boolean_to_string(bool_or_str): 65 | if bool_or_str == values.unset: 66 | return bool_or_str 67 | 68 | if bool_or_str is None: 69 | return bool_or_str 70 | 71 | if isinstance(bool_or_str, str): 72 | return bool_or_str.lower() 73 | 74 | return "true" if bool_or_str else "false" 75 | 76 | 77 | def object(obj): 78 | """ 79 | Return a jsonified string represenation of obj if obj is jsonifiable else 80 | return obj untouched 81 | """ 82 | if isinstance(obj, dict) or isinstance(obj, list): 83 | return json.dumps(obj) 84 | return obj 85 | 86 | 87 | def map(lst, serialize_func): 88 | """ 89 | Applies serialize_func to every element in lst 90 | """ 91 | if not isinstance(lst, list): 92 | return lst 93 | return [serialize_func(e) for e in lst] 94 | -------------------------------------------------------------------------------- /twilio/base/values.py: -------------------------------------------------------------------------------- 1 | from typing import Dict 2 | 3 | unset = object() 4 | 5 | 6 | def of(d: Dict[str, object]) -> Dict[str, object]: 7 | """ 8 | Remove unset values from a dict. 9 | 10 | :param d: A dict to strip. 11 | :return A dict with unset values removed. 12 | """ 13 | return {k: v for k, v in d.items() if v != unset} 14 | -------------------------------------------------------------------------------- /twilio/credential/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twilio/twilio-python/1f43fce728760c476ece57a1e6c857eea51c73e3/twilio/credential/__init__.py -------------------------------------------------------------------------------- /twilio/credential/client_credential_provider.py: -------------------------------------------------------------------------------- 1 | from twilio.http.client_token_manager import ClientTokenManager 2 | from twilio.base.exceptions import TwilioException 3 | from twilio.credential.credential_provider import CredentialProvider 4 | from twilio.auth_strategy.auth_type import AuthType 5 | from twilio.auth_strategy.token_auth_strategy import TokenAuthStrategy 6 | 7 | 8 | class ClientCredentialProvider(CredentialProvider): 9 | def __init__(self, client_id: str, client_secret: str, token_manager=None): 10 | super().__init__(AuthType.CLIENT_CREDENTIALS) 11 | 12 | if client_id is None or client_secret is None: 13 | raise TwilioException("Client id and Client secret are mandatory") 14 | 15 | self.grant_type = "client_credentials" 16 | self.client_id = client_id 17 | self.client_secret = client_secret 18 | self.token_manager = token_manager 19 | self.auth_strategy = None 20 | 21 | def to_auth_strategy(self): 22 | if self.token_manager is None: 23 | self.token_manager = ClientTokenManager( 24 | self.grant_type, self.client_id, self.client_secret 25 | ) 26 | if self.auth_strategy is None: 27 | self.auth_strategy = TokenAuthStrategy(self.token_manager) 28 | return self.auth_strategy 29 | -------------------------------------------------------------------------------- /twilio/credential/credential_provider.py: -------------------------------------------------------------------------------- 1 | from twilio.auth_strategy.auth_type import AuthType 2 | 3 | 4 | class CredentialProvider: 5 | def __init__(self, auth_type: AuthType): 6 | self._auth_type = auth_type 7 | 8 | @property 9 | def auth_type(self) -> AuthType: 10 | return self._auth_type 11 | 12 | def to_auth_strategy(self): 13 | raise NotImplementedError("Subclasses must implement this method") 14 | -------------------------------------------------------------------------------- /twilio/credential/orgs_credential_provider.py: -------------------------------------------------------------------------------- 1 | from twilio.http.orgs_token_manager import OrgTokenManager 2 | from twilio.base.exceptions import TwilioException 3 | from twilio.credential.credential_provider import CredentialProvider 4 | from twilio.auth_strategy.auth_type import AuthType 5 | from twilio.auth_strategy.token_auth_strategy import TokenAuthStrategy 6 | 7 | 8 | class OrgsCredentialProvider(CredentialProvider): 9 | def __init__(self, client_id: str, client_secret: str, token_manager=None): 10 | super().__init__(AuthType.CLIENT_CREDENTIALS) 11 | 12 | if client_id is None or client_secret is None: 13 | raise TwilioException("Client id and Client secret are mandatory") 14 | 15 | self.grant_type = "client_credentials" 16 | self.client_id = client_id 17 | self.client_secret = client_secret 18 | self.token_manager = token_manager 19 | self.auth_strategy = None 20 | 21 | def to_auth_strategy(self): 22 | if self.token_manager is None: 23 | self.token_manager = OrgTokenManager( 24 | self.grant_type, self.client_id, self.client_secret 25 | ) 26 | if self.auth_strategy is None: 27 | self.auth_strategy = TokenAuthStrategy(self.token_manager) 28 | return self.auth_strategy 29 | -------------------------------------------------------------------------------- /twilio/http/client_token_manager.py: -------------------------------------------------------------------------------- 1 | from twilio.http.token_manager import TokenManager 2 | from twilio.rest import Client 3 | 4 | 5 | class ClientTokenManager(TokenManager): 6 | """ 7 | Client Token Manager 8 | """ 9 | 10 | def __init__( 11 | self, 12 | grant_type: str, 13 | client_id: str, 14 | client_secret: str, 15 | code: str = None, 16 | redirect_uri: str = None, 17 | audience: str = None, 18 | refreshToken: str = None, 19 | scope: str = None, 20 | ): 21 | self.grant_type = grant_type 22 | self.client_id = client_id 23 | self.client_secret = client_secret 24 | self.code = code 25 | self.redirect_uri = redirect_uri 26 | self.audience = audience 27 | self.refreshToken = refreshToken 28 | self.scope = scope 29 | self.client = Client() 30 | 31 | def fetch_access_token(self): 32 | token_instance = self.client.iam.v1.token.create( 33 | grant_type=self.grant_type, 34 | client_id=self.client_id, 35 | client_secret=self.client_secret, 36 | code=self.code, 37 | redirect_uri=self.redirect_uri, 38 | audience=self.audience, 39 | scope=self.scope, 40 | ) 41 | return token_instance.access_token 42 | -------------------------------------------------------------------------------- /twilio/http/orgs_token_manager.py: -------------------------------------------------------------------------------- 1 | from twilio.http.token_manager import TokenManager 2 | from twilio.rest import Client 3 | 4 | 5 | class OrgTokenManager(TokenManager): 6 | """ 7 | Orgs Token Manager 8 | """ 9 | 10 | def __init__( 11 | self, 12 | grant_type: str, 13 | client_id: str, 14 | client_secret: str, 15 | code: str = None, 16 | redirect_uri: str = None, 17 | audience: str = None, 18 | refreshToken: str = None, 19 | scope: str = None, 20 | ): 21 | self.grant_type = grant_type 22 | self.client_id = client_id 23 | self.client_secret = client_secret 24 | self.code = code 25 | self.redirect_uri = redirect_uri 26 | self.audience = audience 27 | self.refreshToken = refreshToken 28 | self.scope = scope 29 | self.client = Client() 30 | 31 | def fetch_access_token(self): 32 | token_instance = self.client.iam.v1.token.create( 33 | grant_type=self.grant_type, 34 | client_id=self.client_id, 35 | client_secret=self.client_secret, 36 | code=self.code, 37 | redirect_uri=self.redirect_uri, 38 | audience=self.audience, 39 | scope=self.scope, 40 | ) 41 | return token_instance.access_token 42 | -------------------------------------------------------------------------------- /twilio/http/response.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Optional 2 | 3 | 4 | class Response(object): 5 | def __init__( 6 | self, 7 | status_code: int, 8 | text: str, 9 | headers: Optional[Any] = None, 10 | ): 11 | self.content = text 12 | self.headers = headers 13 | self.cached = False 14 | self.status_code = status_code 15 | self.ok = self.status_code < 400 16 | 17 | @property 18 | def text(self) -> str: 19 | return self.content 20 | 21 | def __repr__(self) -> str: 22 | return "HTTP {} {}".format(self.status_code, self.content) 23 | -------------------------------------------------------------------------------- /twilio/http/token_manager.py: -------------------------------------------------------------------------------- 1 | from twilio.base.version import Version 2 | 3 | 4 | class TokenManager: 5 | 6 | def fetch_access_token(self, version: Version): 7 | pass 8 | -------------------------------------------------------------------------------- /twilio/rest/accounts/AccountsBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.accounts.v1 import V1 17 | 18 | 19 | class AccountsBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Accounts Domain 24 | 25 | :returns: Domain for Accounts 26 | """ 27 | super().__init__(twilio, "https://accounts.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Accounts 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/accounts/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.accounts.AccountsBase import AccountsBase 4 | from twilio.rest.accounts.v1.auth_token_promotion import AuthTokenPromotionList 5 | from twilio.rest.accounts.v1.credential import CredentialList 6 | from twilio.rest.accounts.v1.secondary_auth_token import SecondaryAuthTokenList 7 | 8 | 9 | class Accounts(AccountsBase): 10 | @property 11 | def auth_token_promotion(self) -> AuthTokenPromotionList: 12 | warn( 13 | "auth_token_promotion is deprecated. Use v1.auth_token_promotion instead.", 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | return self.v1.auth_token_promotion 18 | 19 | @property 20 | def credentials(self) -> CredentialList: 21 | warn( 22 | "credentials is deprecated. Use v1.credentials instead.", 23 | DeprecationWarning, 24 | stacklevel=2, 25 | ) 26 | return self.v1.credentials 27 | 28 | @property 29 | def secondary_auth_token(self) -> SecondaryAuthTokenList: 30 | warn( 31 | "secondary_auth_token is deprecated. Use v1.secondary_auth_token instead.", 32 | DeprecationWarning, 33 | stacklevel=2, 34 | ) 35 | return self.v1.secondary_auth_token 36 | -------------------------------------------------------------------------------- /twilio/rest/accounts/v1/credential/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Accounts 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | 17 | 18 | from twilio.base.list_resource import ListResource 19 | from twilio.base.version import Version 20 | 21 | from twilio.rest.accounts.v1.credential.aws import AwsList 22 | from twilio.rest.accounts.v1.credential.public_key import PublicKeyList 23 | 24 | 25 | class CredentialList(ListResource): 26 | 27 | def __init__(self, version: Version): 28 | """ 29 | Initialize the CredentialList 30 | 31 | :param version: Version that contains the resource 32 | 33 | """ 34 | super().__init__(version) 35 | 36 | self._uri = "/Credentials" 37 | 38 | self._aws: Optional[AwsList] = None 39 | self._public_key: Optional[PublicKeyList] = None 40 | 41 | @property 42 | def aws(self) -> AwsList: 43 | """ 44 | Access the aws 45 | """ 46 | if self._aws is None: 47 | self._aws = AwsList(self._version) 48 | return self._aws 49 | 50 | @property 51 | def public_key(self) -> PublicKeyList: 52 | """ 53 | Access the public_key 54 | """ 55 | if self._public_key is None: 56 | self._public_key = PublicKeyList(self._version) 57 | return self._public_key 58 | 59 | def __repr__(self) -> str: 60 | """ 61 | Provide a friendly representation 62 | 63 | :returns: Machine friendly representation 64 | """ 65 | return "" 66 | -------------------------------------------------------------------------------- /twilio/rest/api/ApiBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.api.v2010 import V2010 17 | 18 | 19 | class ApiBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Api Domain 24 | 25 | :returns: Domain for Api 26 | """ 27 | super().__init__(twilio, "https://api.twilio.com") 28 | self._v2010: Optional[V2010] = None 29 | 30 | @property 31 | def v2010(self) -> V2010: 32 | """ 33 | :returns: Versions v2010 of Api 34 | """ 35 | if self._v2010 is None: 36 | self._v2010 = V2010(self) 37 | return self._v2010 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/api/v2010/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Api 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.api.v2010.account import AccountList 19 | from twilio.rest.api.v2010.account import AccountContext 20 | 21 | 22 | class V2010(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V2010 version of Api 27 | 28 | :param domain: The Twilio.api domain 29 | """ 30 | super().__init__(domain, "2010-04-01") 31 | self._accounts: Optional[AccountList] = None 32 | self._account: Optional[AccountContext] = None 33 | 34 | @property 35 | def accounts(self) -> AccountList: 36 | if self._accounts is None: 37 | self._accounts = AccountList(self) 38 | return self._accounts 39 | 40 | @property 41 | def account(self) -> AccountContext: 42 | if self._account is None: 43 | self._account = AccountContext(self, self.domain.twilio.account_sid) 44 | return self._account 45 | 46 | @account.setter 47 | def account(self, value: AccountContext) -> None: 48 | """ 49 | Setter to override account 50 | :param value: value to use as account 51 | """ 52 | self._account = value 53 | 54 | def __repr__(self) -> str: 55 | """ 56 | Provide a friendly representation 57 | :returns: Machine friendly representation 58 | """ 59 | return "" 60 | -------------------------------------------------------------------------------- /twilio/rest/api/v2010/account/usage/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Api 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | 17 | 18 | from twilio.base.list_resource import ListResource 19 | from twilio.base.version import Version 20 | 21 | from twilio.rest.api.v2010.account.usage.record import RecordList 22 | from twilio.rest.api.v2010.account.usage.trigger import TriggerList 23 | 24 | 25 | class UsageList(ListResource): 26 | 27 | def __init__(self, version: Version, account_sid: str): 28 | """ 29 | Initialize the UsageList 30 | 31 | :param version: Version that contains the resource 32 | :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. 33 | 34 | """ 35 | super().__init__(version) 36 | 37 | # Path Solution 38 | self._solution = { 39 | "account_sid": account_sid, 40 | } 41 | self._uri = "/Accounts/{account_sid}/Usage.json".format(**self._solution) 42 | 43 | self._records: Optional[RecordList] = None 44 | self._triggers: Optional[TriggerList] = None 45 | 46 | @property 47 | def records(self) -> RecordList: 48 | """ 49 | Access the records 50 | """ 51 | if self._records is None: 52 | self._records = RecordList( 53 | self._version, account_sid=self._solution["account_sid"] 54 | ) 55 | return self._records 56 | 57 | @property 58 | def triggers(self) -> TriggerList: 59 | """ 60 | Access the triggers 61 | """ 62 | if self._triggers is None: 63 | self._triggers = TriggerList( 64 | self._version, account_sid=self._solution["account_sid"] 65 | ) 66 | return self._triggers 67 | 68 | def __repr__(self) -> str: 69 | """ 70 | Provide a friendly representation 71 | 72 | :returns: Machine friendly representation 73 | """ 74 | return "" 75 | -------------------------------------------------------------------------------- /twilio/rest/assistants/AssistantsBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.assistants.v1 import V1 17 | 18 | 19 | class AssistantsBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Assistants Domain 24 | 25 | :returns: Domain for Assistants 26 | """ 27 | super().__init__(twilio, "https://assistants.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Assistants 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/assistants/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.assistants.AssistantsBase import AssistantsBase 4 | from twilio.rest.assistants.v1.assistant import AssistantList 5 | from twilio.rest.assistants.v1.knowledge import KnowledgeList 6 | from twilio.rest.assistants.v1.policy import PolicyList 7 | from twilio.rest.assistants.v1.session import SessionList 8 | from twilio.rest.assistants.v1.tool import ToolList 9 | 10 | 11 | class Assistants(AssistantsBase): 12 | 13 | @property 14 | def assistants(self) -> AssistantList: 15 | warn( 16 | "assistants is deprecated. Use v1.assistants instead.", 17 | DeprecationWarning, 18 | stacklevel=2, 19 | ) 20 | return self.v1.assistants 21 | 22 | @property 23 | def knowledge(self) -> KnowledgeList: 24 | warn( 25 | "knowledge is deprecated. Use v1.knowledge instead.", 26 | DeprecationWarning, 27 | stacklevel=2, 28 | ) 29 | return self.v1.knowledge 30 | 31 | @property 32 | def policies(self) -> PolicyList: 33 | warn( 34 | "policies is deprecated. Use v1.policies instead.", 35 | DeprecationWarning, 36 | stacklevel=2, 37 | ) 38 | return self.v1.policies 39 | 40 | @property 41 | def sessions(self) -> SessionList: 42 | warn( 43 | "sessions is deprecated. Use v1.sessions instead.", 44 | DeprecationWarning, 45 | stacklevel=2, 46 | ) 47 | return self.v1.sessions 48 | 49 | @property 50 | def tools(self) -> ToolList: 51 | warn( 52 | "tools is deprecated. Use v1.tools instead.", 53 | DeprecationWarning, 54 | stacklevel=2, 55 | ) 56 | return self.v1.tools 57 | -------------------------------------------------------------------------------- /twilio/rest/bulkexports/BulkexportsBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.bulkexports.v1 import V1 17 | 18 | 19 | class BulkexportsBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Bulkexports Domain 24 | 25 | :returns: Domain for Bulkexports 26 | """ 27 | super().__init__(twilio, "https://bulkexports.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Bulkexports 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/bulkexports/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.bulkexports.BulkexportsBase import BulkexportsBase 4 | from twilio.rest.bulkexports.v1.export import ExportList 5 | from twilio.rest.bulkexports.v1.export_configuration import ExportConfigurationList 6 | 7 | 8 | class Bulkexports(BulkexportsBase): 9 | @property 10 | def exports(self) -> ExportList: 11 | warn( 12 | "exports is deprecated. Use v1.exports instead.", 13 | DeprecationWarning, 14 | stacklevel=2, 15 | ) 16 | return self.v1.exports 17 | 18 | @property 19 | def export_configuration(self) -> ExportConfigurationList: 20 | warn( 21 | "export_configuration is deprecated. Use v1.export_configuration instead.", 22 | DeprecationWarning, 23 | stacklevel=2, 24 | ) 25 | return self.v1.export_configuration 26 | -------------------------------------------------------------------------------- /twilio/rest/bulkexports/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Bulkexports 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.bulkexports.v1.export import ExportList 19 | from twilio.rest.bulkexports.v1.export_configuration import ExportConfigurationList 20 | 21 | 22 | class V1(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V1 version of Bulkexports 27 | 28 | :param domain: The Twilio.bulkexports domain 29 | """ 30 | super().__init__(domain, "v1") 31 | self._exports: Optional[ExportList] = None 32 | self._export_configuration: Optional[ExportConfigurationList] = None 33 | 34 | @property 35 | def exports(self) -> ExportList: 36 | if self._exports is None: 37 | self._exports = ExportList(self) 38 | return self._exports 39 | 40 | @property 41 | def export_configuration(self) -> ExportConfigurationList: 42 | if self._export_configuration is None: 43 | self._export_configuration = ExportConfigurationList(self) 44 | return self._export_configuration 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/chat/ChatBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.chat.v1 import V1 17 | from twilio.rest.chat.v2 import V2 18 | from twilio.rest.chat.v3 import V3 19 | 20 | 21 | class ChatBase(Domain): 22 | 23 | def __init__(self, twilio: Client): 24 | """ 25 | Initialize the Chat Domain 26 | 27 | :returns: Domain for Chat 28 | """ 29 | super().__init__(twilio, "https://chat.twilio.com") 30 | self._v1: Optional[V1] = None 31 | self._v2: Optional[V2] = None 32 | self._v3: Optional[V3] = None 33 | 34 | @property 35 | def v1(self) -> V1: 36 | """ 37 | :returns: Versions v1 of Chat 38 | """ 39 | if self._v1 is None: 40 | self._v1 = V1(self) 41 | return self._v1 42 | 43 | @property 44 | def v2(self) -> V2: 45 | """ 46 | :returns: Versions v2 of Chat 47 | """ 48 | if self._v2 is None: 49 | self._v2 = V2(self) 50 | return self._v2 51 | 52 | @property 53 | def v3(self) -> V3: 54 | """ 55 | :returns: Versions v3 of Chat 56 | """ 57 | if self._v3 is None: 58 | self._v3 = V3(self) 59 | return self._v3 60 | 61 | def __repr__(self) -> str: 62 | """ 63 | Provide a friendly representation 64 | :returns: Machine friendly representation 65 | """ 66 | return "" 67 | -------------------------------------------------------------------------------- /twilio/rest/chat/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.chat.ChatBase import ChatBase 4 | from twilio.rest.chat.v2.credential import CredentialList 5 | from twilio.rest.chat.v2.service import ServiceList 6 | from twilio.rest.chat.v3.channel import ChannelList 7 | 8 | 9 | class Chat(ChatBase): 10 | @property 11 | def credentials(self) -> CredentialList: 12 | warn( 13 | "credentials is deprecated. Use v2.credentials instead.", 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | return self.v2.credentials 18 | 19 | @property 20 | def services(self) -> ServiceList: 21 | warn( 22 | "services is deprecated. Use v2.services instead.", 23 | DeprecationWarning, 24 | stacklevel=2, 25 | ) 26 | return self.v2.services 27 | 28 | @property 29 | def channels(self) -> ChannelList: 30 | warn( 31 | "channels is deprecated. Use v3.channels instead.", 32 | DeprecationWarning, 33 | stacklevel=2, 34 | ) 35 | return self.v3.channels 36 | -------------------------------------------------------------------------------- /twilio/rest/chat/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Chat 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.chat.v1.credential import CredentialList 19 | from twilio.rest.chat.v1.service import ServiceList 20 | 21 | 22 | class V1(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V1 version of Chat 27 | 28 | :param domain: The Twilio.chat domain 29 | """ 30 | super().__init__(domain, "v1") 31 | self._credentials: Optional[CredentialList] = None 32 | self._services: Optional[ServiceList] = None 33 | 34 | @property 35 | def credentials(self) -> CredentialList: 36 | if self._credentials is None: 37 | self._credentials = CredentialList(self) 38 | return self._credentials 39 | 40 | @property 41 | def services(self) -> ServiceList: 42 | if self._services is None: 43 | self._services = ServiceList(self) 44 | return self._services 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/chat/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Chat 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.chat.v2.credential import CredentialList 19 | from twilio.rest.chat.v2.service import ServiceList 20 | 21 | 22 | class V2(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V2 version of Chat 27 | 28 | :param domain: The Twilio.chat domain 29 | """ 30 | super().__init__(domain, "v2") 31 | self._credentials: Optional[CredentialList] = None 32 | self._services: Optional[ServiceList] = None 33 | 34 | @property 35 | def credentials(self) -> CredentialList: 36 | if self._credentials is None: 37 | self._credentials = CredentialList(self) 38 | return self._credentials 39 | 40 | @property 41 | def services(self) -> ServiceList: 42 | if self._services is None: 43 | self._services = ServiceList(self) 44 | return self._services 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/chat/v3/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Chat 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.chat.v3.channel import ChannelList 19 | 20 | 21 | class V3(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V3 version of Chat 26 | 27 | :param domain: The Twilio.chat domain 28 | """ 29 | super().__init__(domain, "v3") 30 | self._channels: Optional[ChannelList] = None 31 | 32 | @property 33 | def channels(self) -> ChannelList: 34 | if self._channels is None: 35 | self._channels = ChannelList(self) 36 | return self._channels 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/content/ContentBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.content.v1 import V1 17 | from twilio.rest.content.v2 import V2 18 | 19 | 20 | class ContentBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the Content Domain 25 | 26 | :returns: Domain for Content 27 | """ 28 | super().__init__(twilio, "https://content.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of Content 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of Content 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/content/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.content.ContentBase import ContentBase 4 | from twilio.rest.content.v1.content import ContentList 5 | from twilio.rest.content.v1.content_and_approvals import ContentAndApprovalsList 6 | from twilio.rest.content.v1.legacy_content import LegacyContentList 7 | 8 | 9 | class Content(ContentBase): 10 | @property 11 | def contents(self) -> ContentList: 12 | warn( 13 | "contents is deprecated. Use v1.contents instead.", 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | return self.v1.contents 18 | 19 | @property 20 | def content_and_approvals(self) -> ContentAndApprovalsList: 21 | warn( 22 | "content_and_approvals is deprecated. Use v1.content_and_approvals instead.", 23 | DeprecationWarning, 24 | stacklevel=2, 25 | ) 26 | return self.v1.content_and_approvals 27 | 28 | @property 29 | def legacy_contents(self) -> LegacyContentList: 30 | warn( 31 | "legacy_contents is deprecated. Use v1.legacy_contents instead.", 32 | DeprecationWarning, 33 | stacklevel=2, 34 | ) 35 | return self.v1.legacy_contents 36 | -------------------------------------------------------------------------------- /twilio/rest/content/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Content 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.content.v1.content import ContentList 19 | from twilio.rest.content.v1.content_and_approvals import ContentAndApprovalsList 20 | from twilio.rest.content.v1.legacy_content import LegacyContentList 21 | 22 | 23 | class V1(Version): 24 | 25 | def __init__(self, domain: Domain): 26 | """ 27 | Initialize the V1 version of Content 28 | 29 | :param domain: The Twilio.content domain 30 | """ 31 | super().__init__(domain, "v1") 32 | self._contents: Optional[ContentList] = None 33 | self._content_and_approvals: Optional[ContentAndApprovalsList] = None 34 | self._legacy_contents: Optional[LegacyContentList] = None 35 | 36 | @property 37 | def contents(self) -> ContentList: 38 | if self._contents is None: 39 | self._contents = ContentList(self) 40 | return self._contents 41 | 42 | @property 43 | def content_and_approvals(self) -> ContentAndApprovalsList: 44 | if self._content_and_approvals is None: 45 | self._content_and_approvals = ContentAndApprovalsList(self) 46 | return self._content_and_approvals 47 | 48 | @property 49 | def legacy_contents(self) -> LegacyContentList: 50 | if self._legacy_contents is None: 51 | self._legacy_contents = LegacyContentList(self) 52 | return self._legacy_contents 53 | 54 | def __repr__(self) -> str: 55 | """ 56 | Provide a friendly representation 57 | :returns: Machine friendly representation 58 | """ 59 | return "" 60 | -------------------------------------------------------------------------------- /twilio/rest/content/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Content 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.content.v2.content import ContentList 19 | from twilio.rest.content.v2.content_and_approvals import ContentAndApprovalsList 20 | 21 | 22 | class V2(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V2 version of Content 27 | 28 | :param domain: The Twilio.content domain 29 | """ 30 | super().__init__(domain, "v2") 31 | self._contents: Optional[ContentList] = None 32 | self._content_and_approvals: Optional[ContentAndApprovalsList] = None 33 | 34 | @property 35 | def contents(self) -> ContentList: 36 | if self._contents is None: 37 | self._contents = ContentList(self) 38 | return self._contents 39 | 40 | @property 41 | def content_and_approvals(self) -> ContentAndApprovalsList: 42 | if self._content_and_approvals is None: 43 | self._content_and_approvals = ContentAndApprovalsList(self) 44 | return self._content_and_approvals 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/conversations/ConversationsBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.conversations.v1 import V1 17 | 18 | 19 | class ConversationsBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Conversations Domain 24 | 25 | :returns: Domain for Conversations 26 | """ 27 | super().__init__(twilio, "https://conversations.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Conversations 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/events/EventsBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.events.v1 import V1 17 | 18 | 19 | class EventsBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Events Domain 24 | 25 | :returns: Domain for Events 26 | """ 27 | super().__init__(twilio, "https://events.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Events 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/events/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.events.EventsBase import EventsBase 4 | from twilio.rest.events.v1.event_type import EventTypeList 5 | from twilio.rest.events.v1.schema import SchemaList 6 | from twilio.rest.events.v1.sink import SinkList 7 | from twilio.rest.events.v1.subscription import SubscriptionList 8 | 9 | 10 | class Events(EventsBase): 11 | @property 12 | def event_types(self) -> EventTypeList: 13 | warn( 14 | "event_types is deprecated. Use v1.event_types instead.", 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | return self.v1.event_types 19 | 20 | @property 21 | def schemas(self) -> SchemaList: 22 | warn( 23 | "schemas is deprecated. Use v1.schemas instead.", 24 | DeprecationWarning, 25 | stacklevel=2, 26 | ) 27 | return self.v1.schemas 28 | 29 | @property 30 | def sinks(self) -> SinkList: 31 | warn( 32 | "sinks is deprecated. Use v1.sinks instead.", 33 | DeprecationWarning, 34 | stacklevel=2, 35 | ) 36 | return self.v1.sinks 37 | 38 | @property 39 | def subscriptions(self) -> SubscriptionList: 40 | warn( 41 | "subscriptions is deprecated. Use v1.subscriptions instead.", 42 | DeprecationWarning, 43 | stacklevel=2, 44 | ) 45 | return self.v1.subscriptions 46 | -------------------------------------------------------------------------------- /twilio/rest/events/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Events 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.events.v1.event_type import EventTypeList 19 | from twilio.rest.events.v1.schema import SchemaList 20 | from twilio.rest.events.v1.sink import SinkList 21 | from twilio.rest.events.v1.subscription import SubscriptionList 22 | 23 | 24 | class V1(Version): 25 | 26 | def __init__(self, domain: Domain): 27 | """ 28 | Initialize the V1 version of Events 29 | 30 | :param domain: The Twilio.events domain 31 | """ 32 | super().__init__(domain, "v1") 33 | self._event_types: Optional[EventTypeList] = None 34 | self._schemas: Optional[SchemaList] = None 35 | self._sinks: Optional[SinkList] = None 36 | self._subscriptions: Optional[SubscriptionList] = None 37 | 38 | @property 39 | def event_types(self) -> EventTypeList: 40 | if self._event_types is None: 41 | self._event_types = EventTypeList(self) 42 | return self._event_types 43 | 44 | @property 45 | def schemas(self) -> SchemaList: 46 | if self._schemas is None: 47 | self._schemas = SchemaList(self) 48 | return self._schemas 49 | 50 | @property 51 | def sinks(self) -> SinkList: 52 | if self._sinks is None: 53 | self._sinks = SinkList(self) 54 | return self._sinks 55 | 56 | @property 57 | def subscriptions(self) -> SubscriptionList: 58 | if self._subscriptions is None: 59 | self._subscriptions = SubscriptionList(self) 60 | return self._subscriptions 61 | 62 | def __repr__(self) -> str: 63 | """ 64 | Provide a friendly representation 65 | :returns: Machine friendly representation 66 | """ 67 | return "" 68 | -------------------------------------------------------------------------------- /twilio/rest/flex_api/FlexApiBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.flex_api.v1 import V1 17 | from twilio.rest.flex_api.v2 import V2 18 | 19 | 20 | class FlexApiBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the FlexApi Domain 25 | 26 | :returns: Domain for FlexApi 27 | """ 28 | super().__init__(twilio, "https://flex-api.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of FlexApi 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of FlexApi 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/flex_api/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Flex 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.flex_api.v2.flex_user import FlexUserList 19 | from twilio.rest.flex_api.v2.web_channels import WebChannelsList 20 | 21 | 22 | class V2(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V2 version of FlexApi 27 | 28 | :param domain: The Twilio.flex_api domain 29 | """ 30 | super().__init__(domain, "v2") 31 | self._flex_user: Optional[FlexUserList] = None 32 | self._web_channels: Optional[WebChannelsList] = None 33 | 34 | @property 35 | def flex_user(self) -> FlexUserList: 36 | if self._flex_user is None: 37 | self._flex_user = FlexUserList(self) 38 | return self._flex_user 39 | 40 | @property 41 | def web_channels(self) -> WebChannelsList: 42 | if self._web_channels is None: 43 | self._web_channels = WebChannelsList(self) 44 | return self._web_channels 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/frontline_api/FrontlineApiBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.frontline_api.v1 import V1 17 | 18 | 19 | class FrontlineApiBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the FrontlineApi Domain 24 | 25 | :returns: Domain for FrontlineApi 26 | """ 27 | super().__init__(twilio, "https://frontline-api.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of FrontlineApi 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/frontline_api/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.frontline_api.FrontlineApiBase import FrontlineApiBase 4 | from twilio.rest.frontline_api.v1.user import UserList 5 | 6 | 7 | class FrontlineApi(FrontlineApiBase): 8 | @property 9 | def users(self) -> UserList: 10 | warn( 11 | "users is deprecated. Use v1.users instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v1.users 16 | -------------------------------------------------------------------------------- /twilio/rest/frontline_api/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Frontline 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.frontline_api.v1.user import UserList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of FrontlineApi 26 | 27 | :param domain: The Twilio.frontline_api domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._users: Optional[UserList] = None 31 | 32 | @property 33 | def users(self) -> UserList: 34 | if self._users is None: 35 | self._users = UserList(self) 36 | return self._users 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/iam/IamBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.iam.v1 import V1 17 | 18 | 19 | class IamBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Iam Domain 24 | 25 | :returns: Domain for Iam 26 | """ 27 | super().__init__(twilio, "https://iam.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Iam 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/iam/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.iam.IamBase import IamBase 4 | from twilio.rest.iam.v1.api_key import ApiKeyList 5 | from twilio.rest.iam.v1.get_api_keys import GetApiKeysList 6 | 7 | 8 | class Iam(IamBase): 9 | @property 10 | def api_key(self) -> ApiKeyList: 11 | warn( 12 | "api_key is deprecated. Use v1.api_key instead.", 13 | DeprecationWarning, 14 | stacklevel=2, 15 | ) 16 | return self.v1.api_key 17 | 18 | @property 19 | def get_api_keys(self) -> GetApiKeysList: 20 | warn( 21 | "get_api_keys is deprecated. Use v1.get_api_keys instead.", 22 | DeprecationWarning, 23 | stacklevel=2, 24 | ) 25 | return self.v1.get_api_keys 26 | -------------------------------------------------------------------------------- /twilio/rest/iam/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Iam 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.iam.v1.api_key import ApiKeyList 19 | from twilio.rest.iam.v1.get_api_keys import GetApiKeysList 20 | from twilio.rest.iam.v1.new_api_key import NewApiKeyList 21 | from twilio.rest.iam.v1.token import TokenList 22 | 23 | 24 | class V1(Version): 25 | 26 | def __init__(self, domain: Domain): 27 | """ 28 | Initialize the V1 version of Iam 29 | 30 | :param domain: The Twilio.iam domain 31 | """ 32 | super().__init__(domain, "v1") 33 | self._api_key: Optional[ApiKeyList] = None 34 | self._get_api_keys: Optional[GetApiKeysList] = None 35 | self._new_api_key: Optional[NewApiKeyList] = None 36 | self._token: Optional[TokenList] = None 37 | 38 | @property 39 | def api_key(self) -> ApiKeyList: 40 | if self._api_key is None: 41 | self._api_key = ApiKeyList(self) 42 | return self._api_key 43 | 44 | @property 45 | def get_api_keys(self) -> GetApiKeysList: 46 | if self._get_api_keys is None: 47 | self._get_api_keys = GetApiKeysList(self) 48 | return self._get_api_keys 49 | 50 | @property 51 | def new_api_key(self) -> NewApiKeyList: 52 | if self._new_api_key is None: 53 | self._new_api_key = NewApiKeyList(self) 54 | return self._new_api_key 55 | 56 | @property 57 | def token(self) -> TokenList: 58 | if self._token is None: 59 | self._token = TokenList(self) 60 | return self._token 61 | 62 | def __repr__(self) -> str: 63 | """ 64 | Provide a friendly representation 65 | :returns: Machine friendly representation 66 | """ 67 | return "" 68 | -------------------------------------------------------------------------------- /twilio/rest/insights/InsightsBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.insights.v1 import V1 17 | 18 | 19 | class InsightsBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Insights Domain 24 | 25 | :returns: Domain for Insights 26 | """ 27 | super().__init__(twilio, "https://insights.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Insights 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/insights/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.insights.InsightsBase import InsightsBase 4 | from twilio.rest.insights.v1.call import CallList 5 | from twilio.rest.insights.v1.call_summaries import CallSummariesList 6 | from twilio.rest.insights.v1.conference import ConferenceList 7 | from twilio.rest.insights.v1.room import RoomList 8 | from twilio.rest.insights.v1.setting import SettingList 9 | 10 | 11 | class Insights(InsightsBase): 12 | @property 13 | def settings(self) -> SettingList: 14 | warn( 15 | "settings is deprecated. Use v1.settings instead.", 16 | DeprecationWarning, 17 | stacklevel=2, 18 | ) 19 | return self.v1.settings 20 | 21 | @property 22 | def calls(self) -> CallList: 23 | warn( 24 | "calls is deprecated. Use v1.calls instead.", 25 | DeprecationWarning, 26 | stacklevel=2, 27 | ) 28 | return self.v1.calls 29 | 30 | @property 31 | def call_summaries(self) -> CallSummariesList: 32 | warn( 33 | "call_summaries is deprecated. Use v1.call_summaries instead.", 34 | DeprecationWarning, 35 | stacklevel=2, 36 | ) 37 | return self.v1.call_summaries 38 | 39 | @property 40 | def conferences(self) -> ConferenceList: 41 | warn( 42 | "conferences is deprecated. Use v1.conferences instead.", 43 | DeprecationWarning, 44 | stacklevel=2, 45 | ) 46 | return self.v1.conferences 47 | 48 | @property 49 | def rooms(self) -> RoomList: 50 | warn( 51 | "rooms is deprecated. Use v1.rooms instead.", 52 | DeprecationWarning, 53 | stacklevel=2, 54 | ) 55 | return self.v1.rooms 56 | -------------------------------------------------------------------------------- /twilio/rest/intelligence/IntelligenceBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.intelligence.v2 import V2 17 | 18 | 19 | class IntelligenceBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Intelligence Domain 24 | 25 | :returns: Domain for Intelligence 26 | """ 27 | super().__init__(twilio, "https://intelligence.twilio.com") 28 | self._v2: Optional[V2] = None 29 | 30 | @property 31 | def v2(self) -> V2: 32 | """ 33 | :returns: Versions v2 of Intelligence 34 | """ 35 | if self._v2 is None: 36 | self._v2 = V2(self) 37 | return self._v2 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/intelligence/__init__.py: -------------------------------------------------------------------------------- 1 | from twilio.rest.intelligence.IntelligenceBase import IntelligenceBase 2 | from twilio.rest.intelligence.v2.service import ServiceList 3 | from twilio.rest.intelligence.v2.transcript import TranscriptList 4 | 5 | 6 | class Intelligence(IntelligenceBase): 7 | @property 8 | def transcripts(self) -> TranscriptList: 9 | return self.v2.transcripts 10 | 11 | @property 12 | def services(self) -> ServiceList: 13 | return self.v2.services 14 | -------------------------------------------------------------------------------- /twilio/rest/ip_messaging/IpMessagingBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.ip_messaging.v1 import V1 17 | from twilio.rest.ip_messaging.v2 import V2 18 | 19 | 20 | class IpMessagingBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the IpMessaging Domain 25 | 26 | :returns: Domain for IpMessaging 27 | """ 28 | super().__init__(twilio, "https://ip-messaging.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of IpMessaging 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of IpMessaging 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/ip_messaging/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.ip_messaging.IpMessagingBase import IpMessagingBase 4 | from twilio.rest.ip_messaging.v2.credential import CredentialList 5 | from twilio.rest.ip_messaging.v2.service import ServiceList 6 | 7 | 8 | class IpMessaging(IpMessagingBase): 9 | @property 10 | def credentials(self) -> CredentialList: 11 | warn( 12 | "credentials is deprecated. Use v2.credentials instead.", 13 | DeprecationWarning, 14 | stacklevel=2, 15 | ) 16 | return self.v2.credentials 17 | 18 | @property 19 | def services(self) -> ServiceList: 20 | warn( 21 | "services is deprecated. Use v2.services instead.", 22 | DeprecationWarning, 23 | stacklevel=2, 24 | ) 25 | return self.v2.services 26 | -------------------------------------------------------------------------------- /twilio/rest/ip_messaging/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Ip_messaging 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.ip_messaging.v1.credential import CredentialList 19 | from twilio.rest.ip_messaging.v1.service import ServiceList 20 | 21 | 22 | class V1(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V1 version of IpMessaging 27 | 28 | :param domain: The Twilio.ip_messaging domain 29 | """ 30 | super().__init__(domain, "v1") 31 | self._credentials: Optional[CredentialList] = None 32 | self._services: Optional[ServiceList] = None 33 | 34 | @property 35 | def credentials(self) -> CredentialList: 36 | if self._credentials is None: 37 | self._credentials = CredentialList(self) 38 | return self._credentials 39 | 40 | @property 41 | def services(self) -> ServiceList: 42 | if self._services is None: 43 | self._services = ServiceList(self) 44 | return self._services 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/ip_messaging/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Ip_messaging 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.ip_messaging.v2.credential import CredentialList 19 | from twilio.rest.ip_messaging.v2.service import ServiceList 20 | 21 | 22 | class V2(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V2 version of IpMessaging 27 | 28 | :param domain: The Twilio.ip_messaging domain 29 | """ 30 | super().__init__(domain, "v2") 31 | self._credentials: Optional[CredentialList] = None 32 | self._services: Optional[ServiceList] = None 33 | 34 | @property 35 | def credentials(self) -> CredentialList: 36 | if self._credentials is None: 37 | self._credentials = CredentialList(self) 38 | return self._credentials 39 | 40 | @property 41 | def services(self) -> ServiceList: 42 | if self._services is None: 43 | self._services = ServiceList(self) 44 | return self._services 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/lookups/LookupsBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.lookups.v1 import V1 17 | from twilio.rest.lookups.v2 import V2 18 | 19 | 20 | class LookupsBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the Lookups Domain 25 | 26 | :returns: Domain for Lookups 27 | """ 28 | super().__init__(twilio, "https://lookups.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of Lookups 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of Lookups 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/lookups/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.lookups.LookupsBase import LookupsBase 4 | from twilio.rest.lookups.v1.phone_number import PhoneNumberList 5 | 6 | 7 | class Lookups(LookupsBase): 8 | @property 9 | def phone_numbers(self) -> PhoneNumberList: 10 | warn( 11 | "phone_numbers is deprecated. Use v1.phone_numbers instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v1.phone_numbers 16 | -------------------------------------------------------------------------------- /twilio/rest/lookups/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Lookups 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.lookups.v1.phone_number import PhoneNumberList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of Lookups 26 | 27 | :param domain: The Twilio.lookups domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._phone_numbers: Optional[PhoneNumberList] = None 31 | 32 | @property 33 | def phone_numbers(self) -> PhoneNumberList: 34 | if self._phone_numbers is None: 35 | self._phone_numbers = PhoneNumberList(self) 36 | return self._phone_numbers 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/marketplace/MarketplaceBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.marketplace.v1 import V1 17 | 18 | 19 | class MarketplaceBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Marketplace Domain 24 | 25 | :returns: Domain for Marketplace 26 | """ 27 | super().__init__(twilio, "https://marketplace.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Marketplace 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/marketplace/__init__.py: -------------------------------------------------------------------------------- 1 | from twilio.rest.marketplace.MarketplaceBase import MarketplaceBase 2 | 3 | 4 | class Marketplace(MarketplaceBase): 5 | def available_add_ons(self): 6 | return self.v1.available_add_ons 7 | 8 | def installed_add_ons(self): 9 | return self.v1.installed_add_ons 10 | -------------------------------------------------------------------------------- /twilio/rest/messaging/MessagingBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.messaging.v1 import V1 17 | from twilio.rest.messaging.v2 import V2 18 | 19 | 20 | class MessagingBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the Messaging Domain 25 | 26 | :returns: Domain for Messaging 27 | """ 28 | super().__init__(twilio, "https://messaging.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of Messaging 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of Messaging 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/messaging/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Messaging 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.messaging.v2.channels_sender import ChannelsSenderList 19 | 20 | 21 | class V2(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V2 version of Messaging 26 | 27 | :param domain: The Twilio.messaging domain 28 | """ 29 | super().__init__(domain, "v2") 30 | self._channels_senders: Optional[ChannelsSenderList] = None 31 | 32 | @property 33 | def channels_senders(self) -> ChannelsSenderList: 34 | if self._channels_senders is None: 35 | self._channels_senders = ChannelsSenderList(self) 36 | return self._channels_senders 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/monitor/MonitorBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.monitor.v1 import V1 17 | 18 | 19 | class MonitorBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Monitor Domain 24 | 25 | :returns: Domain for Monitor 26 | """ 27 | super().__init__(twilio, "https://monitor.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Monitor 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/monitor/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.monitor.MonitorBase import MonitorBase 4 | from twilio.rest.monitor.v1.alert import AlertList 5 | from twilio.rest.monitor.v1.event import EventList 6 | 7 | 8 | class Monitor(MonitorBase): 9 | @property 10 | def alerts(self) -> AlertList: 11 | warn( 12 | "alerts is deprecated. Use v1.alerts instead.", 13 | DeprecationWarning, 14 | stacklevel=2, 15 | ) 16 | return self.v1.alerts 17 | 18 | @property 19 | def events(self) -> EventList: 20 | warn( 21 | "events is deprecated. Use v1.events instead.", 22 | DeprecationWarning, 23 | stacklevel=2, 24 | ) 25 | return self.v1.events 26 | -------------------------------------------------------------------------------- /twilio/rest/monitor/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Monitor 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.monitor.v1.alert import AlertList 19 | from twilio.rest.monitor.v1.event import EventList 20 | 21 | 22 | class V1(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V1 version of Monitor 27 | 28 | :param domain: The Twilio.monitor domain 29 | """ 30 | super().__init__(domain, "v1") 31 | self._alerts: Optional[AlertList] = None 32 | self._events: Optional[EventList] = None 33 | 34 | @property 35 | def alerts(self) -> AlertList: 36 | if self._alerts is None: 37 | self._alerts = AlertList(self) 38 | return self._alerts 39 | 40 | @property 41 | def events(self) -> EventList: 42 | if self._events is None: 43 | self._events = EventList(self) 44 | return self._events 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/notify/NotifyBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.notify.v1 import V1 17 | 18 | 19 | class NotifyBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Notify Domain 24 | 25 | :returns: Domain for Notify 26 | """ 27 | super().__init__(twilio, "https://notify.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Notify 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/notify/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.notify.NotifyBase import NotifyBase 4 | from twilio.rest.notify.v1.credential import CredentialList 5 | from twilio.rest.notify.v1.service import ServiceList 6 | 7 | 8 | class Notify(NotifyBase): 9 | @property 10 | def credentials(self) -> CredentialList: 11 | warn( 12 | "credentials is deprecated. Use v1.credentials instead.", 13 | DeprecationWarning, 14 | stacklevel=2, 15 | ) 16 | return self.v1.credentials 17 | 18 | @property 19 | def services(self) -> ServiceList: 20 | warn( 21 | "services is deprecated. Use v1.services instead.", 22 | DeprecationWarning, 23 | stacklevel=2, 24 | ) 25 | return self.v1.services 26 | -------------------------------------------------------------------------------- /twilio/rest/notify/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Notify 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.notify.v1.credential import CredentialList 19 | from twilio.rest.notify.v1.service import ServiceList 20 | 21 | 22 | class V1(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V1 version of Notify 27 | 28 | :param domain: The Twilio.notify domain 29 | """ 30 | super().__init__(domain, "v1") 31 | self._credentials: Optional[CredentialList] = None 32 | self._services: Optional[ServiceList] = None 33 | 34 | @property 35 | def credentials(self) -> CredentialList: 36 | if self._credentials is None: 37 | self._credentials = CredentialList(self) 38 | return self._credentials 39 | 40 | @property 41 | def services(self) -> ServiceList: 42 | if self._services is None: 43 | self._services = ServiceList(self) 44 | return self._services 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/numbers/NumbersBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.numbers.v1 import V1 17 | from twilio.rest.numbers.v2 import V2 18 | 19 | 20 | class NumbersBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the Numbers Domain 25 | 26 | :returns: Domain for Numbers 27 | """ 28 | super().__init__(twilio, "https://numbers.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of Numbers 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of Numbers 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/numbers/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.numbers.NumbersBase import NumbersBase 4 | from twilio.rest.numbers.v2.regulatory_compliance import RegulatoryComplianceList 5 | 6 | 7 | class Numbers(NumbersBase): 8 | @property 9 | def regulatory_compliance(self) -> RegulatoryComplianceList: 10 | warn( 11 | "regulatory_compliance is deprecated. Use v2.regulatory_compliance instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v2.regulatory_compliance 16 | -------------------------------------------------------------------------------- /twilio/rest/oauth/OauthBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.oauth.v1 import V1 17 | 18 | 19 | class OauthBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Oauth Domain 24 | 25 | :returns: Domain for Oauth 26 | """ 27 | super().__init__(twilio, "https://oauth.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Oauth 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/oauth/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.oauth.OauthBase import OauthBase 4 | from twilio.rest.oauth.v1.token import TokenList 5 | 6 | 7 | class Oauth(OauthBase): 8 | 9 | @property 10 | def token(self) -> TokenList: 11 | warn( 12 | "token is deprecated. Use v1.token instead.", 13 | DeprecationWarning, 14 | stacklevel=2, 15 | ) 16 | return self.v1.token 17 | -------------------------------------------------------------------------------- /twilio/rest/oauth/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Oauth 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.oauth.v1.authorize import AuthorizeList 19 | from twilio.rest.oauth.v1.token import TokenList 20 | 21 | 22 | class V1(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V1 version of Oauth 27 | 28 | :param domain: The Twilio.oauth domain 29 | """ 30 | super().__init__(domain, "v1") 31 | self._authorize: Optional[AuthorizeList] = None 32 | self._token: Optional[TokenList] = None 33 | 34 | @property 35 | def authorize(self) -> AuthorizeList: 36 | if self._authorize is None: 37 | self._authorize = AuthorizeList(self) 38 | return self._authorize 39 | 40 | @property 41 | def token(self) -> TokenList: 42 | if self._token is None: 43 | self._token = TokenList(self) 44 | return self._token 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/preview/PreviewBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.preview.hosted_numbers import HostedNumbers 17 | from twilio.rest.preview.marketplace import Marketplace 18 | from twilio.rest.preview.wireless import Wireless 19 | 20 | 21 | class PreviewBase(Domain): 22 | 23 | def __init__(self, twilio: Client): 24 | """ 25 | Initialize the Preview Domain 26 | 27 | :returns: Domain for Preview 28 | """ 29 | super().__init__(twilio, "https://preview.twilio.com") 30 | self._hosted_numbers: Optional[HostedNumbers] = None 31 | self._marketplace: Optional[Marketplace] = None 32 | self._wireless: Optional[Wireless] = None 33 | 34 | @property 35 | def hosted_numbers(self) -> HostedNumbers: 36 | """ 37 | :returns: Versions hosted_numbers of Preview 38 | """ 39 | if self._hosted_numbers is None: 40 | self._hosted_numbers = HostedNumbers(self) 41 | return self._hosted_numbers 42 | 43 | @property 44 | def marketplace(self) -> Marketplace: 45 | """ 46 | :returns: Versions marketplace of Preview 47 | """ 48 | if self._marketplace is None: 49 | self._marketplace = Marketplace(self) 50 | return self._marketplace 51 | 52 | @property 53 | def wireless(self) -> Wireless: 54 | """ 55 | :returns: Versions wireless of Preview 56 | """ 57 | if self._wireless is None: 58 | self._wireless = Wireless(self) 59 | return self._wireless 60 | 61 | def __repr__(self) -> str: 62 | """ 63 | Provide a friendly representation 64 | :returns: Machine friendly representation 65 | """ 66 | return "" 67 | -------------------------------------------------------------------------------- /twilio/rest/preview/hosted_numbers/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Preview 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.preview.hosted_numbers.authorization_document import ( 19 | AuthorizationDocumentList, 20 | ) 21 | from twilio.rest.preview.hosted_numbers.hosted_number_order import HostedNumberOrderList 22 | 23 | 24 | class HostedNumbers(Version): 25 | 26 | def __init__(self, domain: Domain): 27 | """ 28 | Initialize the HostedNumbers version of Preview 29 | 30 | :param domain: The Twilio.preview domain 31 | """ 32 | super().__init__(domain, "HostedNumbers") 33 | self._authorization_documents: Optional[AuthorizationDocumentList] = None 34 | self._hosted_number_orders: Optional[HostedNumberOrderList] = None 35 | 36 | @property 37 | def authorization_documents(self) -> AuthorizationDocumentList: 38 | if self._authorization_documents is None: 39 | self._authorization_documents = AuthorizationDocumentList(self) 40 | return self._authorization_documents 41 | 42 | @property 43 | def hosted_number_orders(self) -> HostedNumberOrderList: 44 | if self._hosted_number_orders is None: 45 | self._hosted_number_orders = HostedNumberOrderList(self) 46 | return self._hosted_number_orders 47 | 48 | def __repr__(self) -> str: 49 | """ 50 | Provide a friendly representation 51 | :returns: Machine friendly representation 52 | """ 53 | return "" 54 | -------------------------------------------------------------------------------- /twilio/rest/preview/marketplace/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Preview 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.preview.marketplace.available_add_on import AvailableAddOnList 19 | from twilio.rest.preview.marketplace.installed_add_on import InstalledAddOnList 20 | 21 | 22 | class Marketplace(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the Marketplace version of Preview 27 | 28 | :param domain: The Twilio.preview domain 29 | """ 30 | super().__init__(domain, "marketplace") 31 | self._available_add_ons: Optional[AvailableAddOnList] = None 32 | self._installed_add_ons: Optional[InstalledAddOnList] = None 33 | 34 | @property 35 | def available_add_ons(self) -> AvailableAddOnList: 36 | if self._available_add_ons is None: 37 | self._available_add_ons = AvailableAddOnList(self) 38 | return self._available_add_ons 39 | 40 | @property 41 | def installed_add_ons(self) -> InstalledAddOnList: 42 | if self._installed_add_ons is None: 43 | self._installed_add_ons = InstalledAddOnList(self) 44 | return self._installed_add_ons 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/preview/wireless/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Preview 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.preview.wireless.command import CommandList 19 | from twilio.rest.preview.wireless.rate_plan import RatePlanList 20 | from twilio.rest.preview.wireless.sim import SimList 21 | 22 | 23 | class Wireless(Version): 24 | 25 | def __init__(self, domain: Domain): 26 | """ 27 | Initialize the Wireless version of Preview 28 | 29 | :param domain: The Twilio.preview domain 30 | """ 31 | super().__init__(domain, "wireless") 32 | self._commands: Optional[CommandList] = None 33 | self._rate_plans: Optional[RatePlanList] = None 34 | self._sims: Optional[SimList] = None 35 | 36 | @property 37 | def commands(self) -> CommandList: 38 | if self._commands is None: 39 | self._commands = CommandList(self) 40 | return self._commands 41 | 42 | @property 43 | def rate_plans(self) -> RatePlanList: 44 | if self._rate_plans is None: 45 | self._rate_plans = RatePlanList(self) 46 | return self._rate_plans 47 | 48 | @property 49 | def sims(self) -> SimList: 50 | if self._sims is None: 51 | self._sims = SimList(self) 52 | return self._sims 53 | 54 | def __repr__(self) -> str: 55 | """ 56 | Provide a friendly representation 57 | :returns: Machine friendly representation 58 | """ 59 | return "" 60 | -------------------------------------------------------------------------------- /twilio/rest/preview_iam/PreviewIamBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.preview_iam.v1 import V1 17 | 18 | 19 | class PreviewIamBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the PreviewIam Domain 24 | 25 | :returns: Domain for PreviewIam 26 | """ 27 | super().__init__(twilio, "https://preview-iam.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of PreviewIam 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/preview_iam/__init__.py: -------------------------------------------------------------------------------- 1 | from twilio.rest.preview_iam.PreviewIamBase import PreviewIamBase 2 | 3 | from twilio.rest.preview_iam.v1.authorize import ( 4 | AuthorizeList, 5 | ) 6 | from twilio.rest.preview_iam.v1.token import ( 7 | TokenList, 8 | ) 9 | from twilio.rest.preview_iam.versionless.organization import ( 10 | OrganizationList, 11 | ) 12 | from twilio.rest.preview_iam.versionless import Versionless 13 | 14 | 15 | class PreviewIam(PreviewIamBase): 16 | @property 17 | def organization(self) -> OrganizationList: 18 | return Versionless(self).organization 19 | 20 | @property 21 | def authorize(self) -> AuthorizeList: 22 | return self.v1.authorize 23 | 24 | @property 25 | def token(self) -> TokenList: 26 | return self.v1.token 27 | -------------------------------------------------------------------------------- /twilio/rest/preview_iam/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Organization Public API 8 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.preview_iam.v1.authorize import AuthorizeList 19 | from twilio.rest.preview_iam.v1.token import TokenList 20 | 21 | 22 | class V1(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V1 version of PreviewIam 27 | 28 | :param domain: The Twilio.preview_iam domain 29 | """ 30 | super().__init__(domain, "v1") 31 | self._authorize: Optional[AuthorizeList] = None 32 | self._token: Optional[TokenList] = None 33 | 34 | @property 35 | def authorize(self) -> AuthorizeList: 36 | if self._authorize is None: 37 | self._authorize = AuthorizeList(self) 38 | return self._authorize 39 | 40 | @property 41 | def token(self) -> TokenList: 42 | if self._token is None: 43 | self._token = TokenList(self) 44 | return self._token 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/preview_iam/versionless/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Organization Public API 8 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.preview_iam.versionless.organization import OrganizationList 19 | 20 | 21 | class Versionless(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the Versionless version of PreviewIam 26 | 27 | :param domain: The Twilio.preview_iam domain 28 | """ 29 | super().__init__(domain, "Organizations") 30 | self._organization: Optional[OrganizationList] = None 31 | 32 | @property 33 | def organization(self) -> OrganizationList: 34 | if self._organization is None: 35 | self._organization = OrganizationList(self) 36 | return self._organization 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/pricing/PricingBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.pricing.v1 import V1 17 | from twilio.rest.pricing.v2 import V2 18 | 19 | 20 | class PricingBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the Pricing Domain 25 | 26 | :returns: Domain for Pricing 27 | """ 28 | super().__init__(twilio, "https://pricing.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of Pricing 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of Pricing 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/pricing/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.pricing.PricingBase import PricingBase 4 | from twilio.rest.pricing.v1.messaging import MessagingList 5 | from twilio.rest.pricing.v1.phone_number import PhoneNumberList 6 | from twilio.rest.pricing.v2.country import CountryList 7 | from twilio.rest.pricing.v2.number import NumberList 8 | from twilio.rest.pricing.v2.voice import VoiceList 9 | 10 | 11 | class Pricing(PricingBase): 12 | @property 13 | def messaging(self) -> MessagingList: 14 | warn( 15 | "messaging is deprecated. Use v1.messaging instead.", 16 | DeprecationWarning, 17 | stacklevel=2, 18 | ) 19 | return self.v1.messaging 20 | 21 | @property 22 | def phone_numbers(self) -> PhoneNumberList: 23 | warn( 24 | "phone_numbers is deprecated. Use v1.phone_numbers instead.", 25 | DeprecationWarning, 26 | stacklevel=2, 27 | ) 28 | return self.v1.phone_numbers 29 | 30 | @property 31 | def voice(self) -> VoiceList: 32 | warn( 33 | "voice is deprecated. Use v2.voice instead.", 34 | DeprecationWarning, 35 | stacklevel=2, 36 | ) 37 | return self.v2.voice 38 | 39 | @property 40 | def countries(self) -> CountryList: 41 | warn( 42 | "countries is deprecated. Use v2.countries instead.", 43 | DeprecationWarning, 44 | stacklevel=2, 45 | ) 46 | return self.v2.countries 47 | 48 | @property 49 | def numbers(self) -> NumberList: 50 | warn( 51 | "numbers is deprecated. Use v2.numbers instead.", 52 | DeprecationWarning, 53 | stacklevel=2, 54 | ) 55 | return self.v2.numbers 56 | -------------------------------------------------------------------------------- /twilio/rest/pricing/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Pricing 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.pricing.v1.messaging import MessagingList 19 | from twilio.rest.pricing.v1.phone_number import PhoneNumberList 20 | from twilio.rest.pricing.v1.voice import VoiceList 21 | 22 | 23 | class V1(Version): 24 | 25 | def __init__(self, domain: Domain): 26 | """ 27 | Initialize the V1 version of Pricing 28 | 29 | :param domain: The Twilio.pricing domain 30 | """ 31 | super().__init__(domain, "v1") 32 | self._messaging: Optional[MessagingList] = None 33 | self._phone_numbers: Optional[PhoneNumberList] = None 34 | self._voice: Optional[VoiceList] = None 35 | 36 | @property 37 | def messaging(self) -> MessagingList: 38 | if self._messaging is None: 39 | self._messaging = MessagingList(self) 40 | return self._messaging 41 | 42 | @property 43 | def phone_numbers(self) -> PhoneNumberList: 44 | if self._phone_numbers is None: 45 | self._phone_numbers = PhoneNumberList(self) 46 | return self._phone_numbers 47 | 48 | @property 49 | def voice(self) -> VoiceList: 50 | if self._voice is None: 51 | self._voice = VoiceList(self) 52 | return self._voice 53 | 54 | def __repr__(self) -> str: 55 | """ 56 | Provide a friendly representation 57 | :returns: Machine friendly representation 58 | """ 59 | return "" 60 | -------------------------------------------------------------------------------- /twilio/rest/pricing/v1/messaging/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Pricing 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | 17 | 18 | from twilio.base.list_resource import ListResource 19 | from twilio.base.version import Version 20 | 21 | from twilio.rest.pricing.v1.messaging.country import CountryList 22 | 23 | 24 | class MessagingList(ListResource): 25 | 26 | def __init__(self, version: Version): 27 | """ 28 | Initialize the MessagingList 29 | 30 | :param version: Version that contains the resource 31 | 32 | """ 33 | super().__init__(version) 34 | 35 | self._uri = "/Messaging" 36 | 37 | self._countries: Optional[CountryList] = None 38 | 39 | @property 40 | def countries(self) -> CountryList: 41 | """ 42 | Access the countries 43 | """ 44 | if self._countries is None: 45 | self._countries = CountryList(self._version) 46 | return self._countries 47 | 48 | def __repr__(self) -> str: 49 | """ 50 | Provide a friendly representation 51 | 52 | :returns: Machine friendly representation 53 | """ 54 | return "" 55 | -------------------------------------------------------------------------------- /twilio/rest/pricing/v1/phone_number/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Pricing 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | 17 | 18 | from twilio.base.list_resource import ListResource 19 | from twilio.base.version import Version 20 | 21 | from twilio.rest.pricing.v1.phone_number.country import CountryList 22 | 23 | 24 | class PhoneNumberList(ListResource): 25 | 26 | def __init__(self, version: Version): 27 | """ 28 | Initialize the PhoneNumberList 29 | 30 | :param version: Version that contains the resource 31 | 32 | """ 33 | super().__init__(version) 34 | 35 | self._uri = "/PhoneNumbers" 36 | 37 | self._countries: Optional[CountryList] = None 38 | 39 | @property 40 | def countries(self) -> CountryList: 41 | """ 42 | Access the countries 43 | """ 44 | if self._countries is None: 45 | self._countries = CountryList(self._version) 46 | return self._countries 47 | 48 | def __repr__(self) -> str: 49 | """ 50 | Provide a friendly representation 51 | 52 | :returns: Machine friendly representation 53 | """ 54 | return "" 55 | -------------------------------------------------------------------------------- /twilio/rest/pricing/v1/voice/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Pricing 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | 17 | 18 | from twilio.base.list_resource import ListResource 19 | from twilio.base.version import Version 20 | 21 | from twilio.rest.pricing.v1.voice.country import CountryList 22 | from twilio.rest.pricing.v1.voice.number import NumberList 23 | 24 | 25 | class VoiceList(ListResource): 26 | 27 | def __init__(self, version: Version): 28 | """ 29 | Initialize the VoiceList 30 | 31 | :param version: Version that contains the resource 32 | 33 | """ 34 | super().__init__(version) 35 | 36 | self._uri = "/Voice" 37 | 38 | self._countries: Optional[CountryList] = None 39 | self._numbers: Optional[NumberList] = None 40 | 41 | @property 42 | def countries(self) -> CountryList: 43 | """ 44 | Access the countries 45 | """ 46 | if self._countries is None: 47 | self._countries = CountryList(self._version) 48 | return self._countries 49 | 50 | @property 51 | def numbers(self) -> NumberList: 52 | """ 53 | Access the numbers 54 | """ 55 | if self._numbers is None: 56 | self._numbers = NumberList(self._version) 57 | return self._numbers 58 | 59 | def __repr__(self) -> str: 60 | """ 61 | Provide a friendly representation 62 | 63 | :returns: Machine friendly representation 64 | """ 65 | return "" 66 | -------------------------------------------------------------------------------- /twilio/rest/pricing/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Pricing 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.pricing.v2.country import CountryList 19 | from twilio.rest.pricing.v2.number import NumberList 20 | from twilio.rest.pricing.v2.voice import VoiceList 21 | 22 | 23 | class V2(Version): 24 | 25 | def __init__(self, domain: Domain): 26 | """ 27 | Initialize the V2 version of Pricing 28 | 29 | :param domain: The Twilio.pricing domain 30 | """ 31 | super().__init__(domain, "v2") 32 | self._countries: Optional[CountryList] = None 33 | self._numbers: Optional[NumberList] = None 34 | self._voice: Optional[VoiceList] = None 35 | 36 | @property 37 | def countries(self) -> CountryList: 38 | if self._countries is None: 39 | self._countries = CountryList(self) 40 | return self._countries 41 | 42 | @property 43 | def numbers(self) -> NumberList: 44 | if self._numbers is None: 45 | self._numbers = NumberList(self) 46 | return self._numbers 47 | 48 | @property 49 | def voice(self) -> VoiceList: 50 | if self._voice is None: 51 | self._voice = VoiceList(self) 52 | return self._voice 53 | 54 | def __repr__(self) -> str: 55 | """ 56 | Provide a friendly representation 57 | :returns: Machine friendly representation 58 | """ 59 | return "" 60 | -------------------------------------------------------------------------------- /twilio/rest/pricing/v2/voice/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Pricing 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | 17 | 18 | from twilio.base.list_resource import ListResource 19 | from twilio.base.version import Version 20 | 21 | from twilio.rest.pricing.v2.voice.country import CountryList 22 | from twilio.rest.pricing.v2.voice.number import NumberList 23 | 24 | 25 | class VoiceList(ListResource): 26 | 27 | def __init__(self, version: Version): 28 | """ 29 | Initialize the VoiceList 30 | 31 | :param version: Version that contains the resource 32 | 33 | """ 34 | super().__init__(version) 35 | 36 | self._uri = "/Voice" 37 | 38 | self._countries: Optional[CountryList] = None 39 | self._numbers: Optional[NumberList] = None 40 | 41 | @property 42 | def countries(self) -> CountryList: 43 | """ 44 | Access the countries 45 | """ 46 | if self._countries is None: 47 | self._countries = CountryList(self._version) 48 | return self._countries 49 | 50 | @property 51 | def numbers(self) -> NumberList: 52 | """ 53 | Access the numbers 54 | """ 55 | if self._numbers is None: 56 | self._numbers = NumberList(self._version) 57 | return self._numbers 58 | 59 | def __repr__(self) -> str: 60 | """ 61 | Provide a friendly representation 62 | 63 | :returns: Machine friendly representation 64 | """ 65 | return "" 66 | -------------------------------------------------------------------------------- /twilio/rest/proxy/ProxyBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.proxy.v1 import V1 17 | 18 | 19 | class ProxyBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Proxy Domain 24 | 25 | :returns: Domain for Proxy 26 | """ 27 | super().__init__(twilio, "https://proxy.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Proxy 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/proxy/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.proxy.ProxyBase import ProxyBase 4 | from twilio.rest.proxy.v1.service import ServiceList 5 | 6 | 7 | class Proxy(ProxyBase): 8 | @property 9 | def services(self) -> ServiceList: 10 | warn( 11 | "services is deprecated. Use v1.services instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v1.services 16 | -------------------------------------------------------------------------------- /twilio/rest/proxy/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Proxy 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.proxy.v1.service import ServiceList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of Proxy 26 | 27 | :param domain: The Twilio.proxy domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._services: Optional[ServiceList] = None 31 | 32 | @property 33 | def services(self) -> ServiceList: 34 | if self._services is None: 35 | self._services = ServiceList(self) 36 | return self._services 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/routes/RoutesBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.routes.v2 import V2 17 | 18 | 19 | class RoutesBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Routes Domain 24 | 25 | :returns: Domain for Routes 26 | """ 27 | super().__init__(twilio, "https://routes.twilio.com") 28 | self._v2: Optional[V2] = None 29 | 30 | @property 31 | def v2(self) -> V2: 32 | """ 33 | :returns: Versions v2 of Routes 34 | """ 35 | if self._v2 is None: 36 | self._v2 = V2(self) 37 | return self._v2 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/routes/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.routes.RoutesBase import RoutesBase 4 | from twilio.rest.routes.v2.phone_number import PhoneNumberList 5 | from twilio.rest.routes.v2.sip_domain import SipDomainList 6 | from twilio.rest.routes.v2.trunk import TrunkList 7 | 8 | 9 | class Routes(RoutesBase): 10 | @property 11 | def phone_numbers(self) -> PhoneNumberList: 12 | warn( 13 | "phone_numbers is deprecated. Use v2.phone_numbers instead.", 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | return self.v2.phone_numbers 18 | 19 | @property 20 | def sip_domains(self) -> SipDomainList: 21 | warn( 22 | "sip_domains is deprecated. Use v2.sip_domains instead.", 23 | DeprecationWarning, 24 | stacklevel=2, 25 | ) 26 | return self.v2.sip_domains 27 | 28 | @property 29 | def trunks(self) -> TrunkList: 30 | warn( 31 | "trunks is deprecated. Use v2.trunks instead.", 32 | DeprecationWarning, 33 | stacklevel=2, 34 | ) 35 | return self.v2.trunks 36 | -------------------------------------------------------------------------------- /twilio/rest/routes/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Routes 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.routes.v2.phone_number import PhoneNumberList 19 | from twilio.rest.routes.v2.sip_domain import SipDomainList 20 | from twilio.rest.routes.v2.trunk import TrunkList 21 | 22 | 23 | class V2(Version): 24 | 25 | def __init__(self, domain: Domain): 26 | """ 27 | Initialize the V2 version of Routes 28 | 29 | :param domain: The Twilio.routes domain 30 | """ 31 | super().__init__(domain, "v2") 32 | self._phone_numbers: Optional[PhoneNumberList] = None 33 | self._sip_domains: Optional[SipDomainList] = None 34 | self._trunks: Optional[TrunkList] = None 35 | 36 | @property 37 | def phone_numbers(self) -> PhoneNumberList: 38 | if self._phone_numbers is None: 39 | self._phone_numbers = PhoneNumberList(self) 40 | return self._phone_numbers 41 | 42 | @property 43 | def sip_domains(self) -> SipDomainList: 44 | if self._sip_domains is None: 45 | self._sip_domains = SipDomainList(self) 46 | return self._sip_domains 47 | 48 | @property 49 | def trunks(self) -> TrunkList: 50 | if self._trunks is None: 51 | self._trunks = TrunkList(self) 52 | return self._trunks 53 | 54 | def __repr__(self) -> str: 55 | """ 56 | Provide a friendly representation 57 | :returns: Machine friendly representation 58 | """ 59 | return "" 60 | -------------------------------------------------------------------------------- /twilio/rest/serverless/ServerlessBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.serverless.v1 import V1 17 | 18 | 19 | class ServerlessBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Serverless Domain 24 | 25 | :returns: Domain for Serverless 26 | """ 27 | super().__init__(twilio, "https://serverless.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Serverless 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/serverless/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.serverless.ServerlessBase import ServerlessBase 4 | from twilio.rest.serverless.v1.service import ServiceList 5 | 6 | 7 | class Serverless(ServerlessBase): 8 | @property 9 | def services(self) -> ServiceList: 10 | warn( 11 | "services is deprecated. Use v1.services instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v1.services 16 | -------------------------------------------------------------------------------- /twilio/rest/serverless/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Serverless 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.serverless.v1.service import ServiceList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of Serverless 26 | 27 | :param domain: The Twilio.serverless domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._services: Optional[ServiceList] = None 31 | 32 | @property 33 | def services(self) -> ServiceList: 34 | if self._services is None: 35 | self._services = ServiceList(self) 36 | return self._services 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/studio/StudioBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.studio.v1 import V1 17 | from twilio.rest.studio.v2 import V2 18 | 19 | 20 | class StudioBase(Domain): 21 | 22 | def __init__(self, twilio: Client): 23 | """ 24 | Initialize the Studio Domain 25 | 26 | :returns: Domain for Studio 27 | """ 28 | super().__init__(twilio, "https://studio.twilio.com") 29 | self._v1: Optional[V1] = None 30 | self._v2: Optional[V2] = None 31 | 32 | @property 33 | def v1(self) -> V1: 34 | """ 35 | :returns: Versions v1 of Studio 36 | """ 37 | if self._v1 is None: 38 | self._v1 = V1(self) 39 | return self._v1 40 | 41 | @property 42 | def v2(self) -> V2: 43 | """ 44 | :returns: Versions v2 of Studio 45 | """ 46 | if self._v2 is None: 47 | self._v2 = V2(self) 48 | return self._v2 49 | 50 | def __repr__(self) -> str: 51 | """ 52 | Provide a friendly representation 53 | :returns: Machine friendly representation 54 | """ 55 | return "" 56 | -------------------------------------------------------------------------------- /twilio/rest/studio/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.studio.StudioBase import StudioBase 4 | from twilio.rest.studio.v2.flow import FlowList 5 | from twilio.rest.studio.v2.flow_validate import FlowValidateList 6 | 7 | 8 | class Studio(StudioBase): 9 | @property 10 | def flows(self) -> FlowList: 11 | warn( 12 | "flows is deprecated. Use v2.flows instead.", 13 | DeprecationWarning, 14 | stacklevel=2, 15 | ) 16 | return self.v2.flows 17 | 18 | @property 19 | def flow_validate(self) -> FlowValidateList: 20 | warn( 21 | "flow_validate is deprecated. Use v2.flow_validate instead.", 22 | DeprecationWarning, 23 | stacklevel=2, 24 | ) 25 | return self.v2.flow_validate 26 | -------------------------------------------------------------------------------- /twilio/rest/studio/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Studio 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.studio.v1.flow import FlowList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of Studio 26 | 27 | :param domain: The Twilio.studio domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._flows: Optional[FlowList] = None 31 | 32 | @property 33 | def flows(self) -> FlowList: 34 | if self._flows is None: 35 | self._flows = FlowList(self) 36 | return self._flows 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/studio/v2/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Studio 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.studio.v2.flow import FlowList 19 | from twilio.rest.studio.v2.flow_validate import FlowValidateList 20 | 21 | 22 | class V2(Version): 23 | 24 | def __init__(self, domain: Domain): 25 | """ 26 | Initialize the V2 version of Studio 27 | 28 | :param domain: The Twilio.studio domain 29 | """ 30 | super().__init__(domain, "v2") 31 | self._flows: Optional[FlowList] = None 32 | self._flow_validate: Optional[FlowValidateList] = None 33 | 34 | @property 35 | def flows(self) -> FlowList: 36 | if self._flows is None: 37 | self._flows = FlowList(self) 38 | return self._flows 39 | 40 | @property 41 | def flow_validate(self) -> FlowValidateList: 42 | if self._flow_validate is None: 43 | self._flow_validate = FlowValidateList(self) 44 | return self._flow_validate 45 | 46 | def __repr__(self) -> str: 47 | """ 48 | Provide a friendly representation 49 | :returns: Machine friendly representation 50 | """ 51 | return "" 52 | -------------------------------------------------------------------------------- /twilio/rest/supersim/SupersimBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.supersim.v1 import V1 17 | 18 | 19 | class SupersimBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Supersim Domain 24 | 25 | :returns: Domain for Supersim 26 | """ 27 | super().__init__(twilio, "https://supersim.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Supersim 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/sync/SyncBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.sync.v1 import V1 17 | 18 | 19 | class SyncBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Sync Domain 24 | 25 | :returns: Domain for Sync 26 | """ 27 | super().__init__(twilio, "https://sync.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Sync 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/sync/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.sync.SyncBase import SyncBase 4 | from twilio.rest.sync.v1.service import ServiceList 5 | 6 | 7 | class Sync(SyncBase): 8 | @property 9 | def services(self) -> ServiceList: 10 | warn( 11 | "services is deprecated. Use v1.services instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v1.services 16 | -------------------------------------------------------------------------------- /twilio/rest/sync/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Sync 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.sync.v1.service import ServiceList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of Sync 26 | 27 | :param domain: The Twilio.sync domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._services: Optional[ServiceList] = None 31 | 32 | @property 33 | def services(self) -> ServiceList: 34 | if self._services is None: 35 | self._services = ServiceList(self) 36 | return self._services 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/taskrouter/TaskrouterBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.taskrouter.v1 import V1 17 | 18 | 19 | class TaskrouterBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Taskrouter Domain 24 | 25 | :returns: Domain for Taskrouter 26 | """ 27 | super().__init__(twilio, "https://taskrouter.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Taskrouter 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/taskrouter/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.taskrouter.TaskrouterBase import TaskrouterBase 4 | from twilio.rest.taskrouter.v1.workspace import WorkspaceList 5 | 6 | 7 | class Taskrouter(TaskrouterBase): 8 | @property 9 | def workspaces(self) -> WorkspaceList: 10 | warn( 11 | "workspaces is deprecated. Use v1.workspaces instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v1.workspaces 16 | -------------------------------------------------------------------------------- /twilio/rest/taskrouter/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Taskrouter 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.taskrouter.v1.workspace import WorkspaceList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of Taskrouter 26 | 27 | :param domain: The Twilio.taskrouter domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._workspaces: Optional[WorkspaceList] = None 31 | 32 | @property 33 | def workspaces(self) -> WorkspaceList: 34 | if self._workspaces is None: 35 | self._workspaces = WorkspaceList(self) 36 | return self._workspaces 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/trunking/TrunkingBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.trunking.v1 import V1 17 | 18 | 19 | class TrunkingBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Trunking Domain 24 | 25 | :returns: Domain for Trunking 26 | """ 27 | super().__init__(twilio, "https://trunking.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Trunking 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/trunking/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.trunking.TrunkingBase import TrunkingBase 4 | from twilio.rest.trunking.v1.trunk import TrunkList 5 | 6 | 7 | class Trunking(TrunkingBase): 8 | @property 9 | def trunks(self) -> TrunkList: 10 | warn( 11 | "trunks is deprecated. Use v1.trunks instead.", 12 | DeprecationWarning, 13 | stacklevel=2, 14 | ) 15 | return self.v1.trunks 16 | -------------------------------------------------------------------------------- /twilio/rest/trunking/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Trunking 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.trunking.v1.trunk import TrunkList 19 | 20 | 21 | class V1(Version): 22 | 23 | def __init__(self, domain: Domain): 24 | """ 25 | Initialize the V1 version of Trunking 26 | 27 | :param domain: The Twilio.trunking domain 28 | """ 29 | super().__init__(domain, "v1") 30 | self._trunks: Optional[TrunkList] = None 31 | 32 | @property 33 | def trunks(self) -> TrunkList: 34 | if self._trunks is None: 35 | self._trunks = TrunkList(self) 36 | return self._trunks 37 | 38 | def __repr__(self) -> str: 39 | """ 40 | Provide a friendly representation 41 | :returns: Machine friendly representation 42 | """ 43 | return "" 44 | -------------------------------------------------------------------------------- /twilio/rest/trusthub/TrusthubBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.trusthub.v1 import V1 17 | 18 | 19 | class TrusthubBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Trusthub Domain 24 | 25 | :returns: Domain for Trusthub 26 | """ 27 | super().__init__(twilio, "https://trusthub.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Trusthub 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/verify/VerifyBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.verify.v2 import V2 17 | 18 | 19 | class VerifyBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Verify Domain 24 | 25 | :returns: Domain for Verify 26 | """ 27 | super().__init__(twilio, "https://verify.twilio.com") 28 | self._v2: Optional[V2] = None 29 | 30 | @property 31 | def v2(self) -> V2: 32 | """ 33 | :returns: Versions v2 of Verify 34 | """ 35 | if self._v2 is None: 36 | self._v2 = V2(self) 37 | return self._v2 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/verify/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.verify.VerifyBase import VerifyBase 4 | from twilio.rest.verify.v2.form import FormList 5 | from twilio.rest.verify.v2.safelist import SafelistList 6 | from twilio.rest.verify.v2.service import ServiceList 7 | from twilio.rest.verify.v2.template import TemplateList 8 | from twilio.rest.verify.v2.verification_attempt import VerificationAttemptList 9 | from twilio.rest.verify.v2.verification_attempts_summary import ( 10 | VerificationAttemptsSummaryList, 11 | ) 12 | 13 | 14 | class Verify(VerifyBase): 15 | @property 16 | def forms(self) -> FormList: 17 | warn( 18 | "forms is deprecated. Use v2.forms instead.", 19 | DeprecationWarning, 20 | stacklevel=2, 21 | ) 22 | return self.v2.forms 23 | 24 | @property 25 | def safelist(self) -> SafelistList: 26 | warn( 27 | "safelist is deprecated. Use v2.safelist instead.", 28 | DeprecationWarning, 29 | stacklevel=2, 30 | ) 31 | return self.v2.safelist 32 | 33 | @property 34 | def services(self) -> ServiceList: 35 | warn( 36 | "services is deprecated. Use v2.services instead.", 37 | DeprecationWarning, 38 | stacklevel=2, 39 | ) 40 | return self.v2.services 41 | 42 | @property 43 | def verification_attempts(self) -> VerificationAttemptList: 44 | warn( 45 | "verification_attempts is deprecated. Use v2.verification_attempts instead.", 46 | DeprecationWarning, 47 | stacklevel=2, 48 | ) 49 | return self.v2.verification_attempts 50 | 51 | @property 52 | def verification_attempts_summary(self) -> VerificationAttemptsSummaryList: 53 | warn( 54 | "verification_attempts_summary is deprecated. Use v2.verification_attempts_summary instead.", 55 | DeprecationWarning, 56 | stacklevel=2, 57 | ) 58 | return self.v2.verification_attempts_summary 59 | 60 | @property 61 | def templates(self) -> TemplateList: 62 | warn( 63 | "templates is deprecated. Use v2.templates instead.", 64 | DeprecationWarning, 65 | stacklevel=2, 66 | ) 67 | return self.v2.templates 68 | -------------------------------------------------------------------------------- /twilio/rest/video/VideoBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.video.v1 import V1 17 | 18 | 19 | class VideoBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Video Domain 24 | 25 | :returns: Domain for Video 26 | """ 27 | super().__init__(twilio, "https://video.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Video 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/video/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.video.VideoBase import VideoBase 4 | from twilio.rest.video.v1.composition import CompositionList 5 | from twilio.rest.video.v1.composition_hook import CompositionHookList 6 | from twilio.rest.video.v1.composition_settings import CompositionSettingsList 7 | from twilio.rest.video.v1.recording import RecordingList 8 | from twilio.rest.video.v1.recording_settings import RecordingSettingsList 9 | from twilio.rest.video.v1.room import RoomList 10 | 11 | 12 | class Video(VideoBase): 13 | @property 14 | def compositions(self) -> CompositionList: 15 | warn( 16 | "compositions is deprecated. Use v1.compositions instead.", 17 | DeprecationWarning, 18 | stacklevel=2, 19 | ) 20 | return self.v1.compositions 21 | 22 | @property 23 | def composition_hooks(self) -> CompositionHookList: 24 | warn( 25 | "composition_hooks is deprecated. Use v1.composition_hooks instead.", 26 | DeprecationWarning, 27 | stacklevel=2, 28 | ) 29 | return self.v1.composition_hooks 30 | 31 | @property 32 | def composition_settings(self) -> CompositionSettingsList: 33 | warn( 34 | "composition_settings is deprecated. Use v1.composition_settings instead.", 35 | DeprecationWarning, 36 | stacklevel=2, 37 | ) 38 | return self.v1.composition_settings 39 | 40 | @property 41 | def recordings(self) -> RecordingList: 42 | warn( 43 | "recordings is deprecated. Use v1.recordings instead.", 44 | DeprecationWarning, 45 | stacklevel=2, 46 | ) 47 | return self.v1.recordings 48 | 49 | @property 50 | def recording_settings(self) -> RecordingSettingsList: 51 | warn( 52 | "recording_settings is deprecated. Use v1.recording_settings instead.", 53 | DeprecationWarning, 54 | stacklevel=2, 55 | ) 56 | return self.v1.recording_settings 57 | 58 | @property 59 | def rooms(self) -> RoomList: 60 | warn( 61 | "rooms is deprecated. Use v1.rooms instead.", 62 | DeprecationWarning, 63 | stacklevel=2, 64 | ) 65 | return self.v1.rooms 66 | -------------------------------------------------------------------------------- /twilio/rest/voice/VoiceBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.voice.v1 import V1 17 | 18 | 19 | class VoiceBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Voice Domain 24 | 25 | :returns: Domain for Voice 26 | """ 27 | super().__init__(twilio, "https://voice.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Voice 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/voice/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.voice.VoiceBase import VoiceBase 4 | from twilio.rest.voice.v1.archived_call import ArchivedCallList 5 | from twilio.rest.voice.v1.byoc_trunk import ByocTrunkList 6 | from twilio.rest.voice.v1.connection_policy import ConnectionPolicyList 7 | from twilio.rest.voice.v1.dialing_permissions import DialingPermissionsList 8 | from twilio.rest.voice.v1.ip_record import IpRecordList 9 | from twilio.rest.voice.v1.source_ip_mapping import SourceIpMappingList 10 | 11 | 12 | class Voice(VoiceBase): 13 | @property 14 | def archived_calls(self) -> ArchivedCallList: 15 | warn( 16 | "archived_calls is deprecated. Use v1.archived_calls instead.", 17 | DeprecationWarning, 18 | stacklevel=2, 19 | ) 20 | return self.v1.archived_calls 21 | 22 | @property 23 | def byoc_trunks(self) -> ByocTrunkList: 24 | warn( 25 | "byoc_trunks is deprecated. Use v1.byoc_trunks instead.", 26 | DeprecationWarning, 27 | stacklevel=2, 28 | ) 29 | return self.v1.byoc_trunks 30 | 31 | @property 32 | def connection_policies(self) -> ConnectionPolicyList: 33 | warn( 34 | "connection_policies is deprecated. Use v1.connection_policies instead.", 35 | DeprecationWarning, 36 | stacklevel=2, 37 | ) 38 | return self.v1.connection_policies 39 | 40 | @property 41 | def dialing_permissions(self) -> DialingPermissionsList: 42 | warn( 43 | "dialing_permissions is deprecated. Use v1.dialing_permissions instead.", 44 | DeprecationWarning, 45 | stacklevel=2, 46 | ) 47 | return self.v1.dialing_permissions 48 | 49 | @property 50 | def ip_records(self) -> IpRecordList: 51 | warn( 52 | "ip_records is deprecated. Use v1.ip_records instead.", 53 | DeprecationWarning, 54 | stacklevel=2, 55 | ) 56 | return self.v1.ip_records 57 | 58 | @property 59 | def source_ip_mappings(self) -> SourceIpMappingList: 60 | warn( 61 | "source_ip_mappings is deprecated. Use v1.source_ip_mappings instead.", 62 | DeprecationWarning, 63 | stacklevel=2, 64 | ) 65 | return self.v1.source_ip_mappings 66 | -------------------------------------------------------------------------------- /twilio/rest/voice/v1/dialing_permissions/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Voice 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | 17 | 18 | from twilio.base.list_resource import ListResource 19 | from twilio.base.version import Version 20 | 21 | from twilio.rest.voice.v1.dialing_permissions.bulk_country_update import ( 22 | BulkCountryUpdateList, 23 | ) 24 | from twilio.rest.voice.v1.dialing_permissions.country import CountryList 25 | from twilio.rest.voice.v1.dialing_permissions.settings import SettingsList 26 | 27 | 28 | class DialingPermissionsList(ListResource): 29 | 30 | def __init__(self, version: Version): 31 | """ 32 | Initialize the DialingPermissionsList 33 | 34 | :param version: Version that contains the resource 35 | 36 | """ 37 | super().__init__(version) 38 | 39 | self._uri = "/DialingPermissions" 40 | 41 | self._bulk_country_updates: Optional[BulkCountryUpdateList] = None 42 | self._countries: Optional[CountryList] = None 43 | self._settings: Optional[SettingsList] = None 44 | 45 | @property 46 | def bulk_country_updates(self) -> BulkCountryUpdateList: 47 | """ 48 | Access the bulk_country_updates 49 | """ 50 | if self._bulk_country_updates is None: 51 | self._bulk_country_updates = BulkCountryUpdateList(self._version) 52 | return self._bulk_country_updates 53 | 54 | @property 55 | def countries(self) -> CountryList: 56 | """ 57 | Access the countries 58 | """ 59 | if self._countries is None: 60 | self._countries = CountryList(self._version) 61 | return self._countries 62 | 63 | @property 64 | def settings(self) -> SettingsList: 65 | """ 66 | Access the settings 67 | """ 68 | if self._settings is None: 69 | self._settings = SettingsList(self._version) 70 | return self._settings 71 | 72 | def __repr__(self) -> str: 73 | """ 74 | Provide a friendly representation 75 | 76 | :returns: Machine friendly representation 77 | """ 78 | return "" 79 | -------------------------------------------------------------------------------- /twilio/rest/wireless/WirelessBase.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | NOTE: This class is auto generated by OpenAPI Generator. 8 | https://openapi-generator.tech 9 | Do not edit the class manually. 10 | """ 11 | 12 | from typing import Optional 13 | 14 | from twilio.base.domain import Domain 15 | from twilio.rest import Client 16 | from twilio.rest.wireless.v1 import V1 17 | 18 | 19 | class WirelessBase(Domain): 20 | 21 | def __init__(self, twilio: Client): 22 | """ 23 | Initialize the Wireless Domain 24 | 25 | :returns: Domain for Wireless 26 | """ 27 | super().__init__(twilio, "https://wireless.twilio.com") 28 | self._v1: Optional[V1] = None 29 | 30 | @property 31 | def v1(self) -> V1: 32 | """ 33 | :returns: Versions v1 of Wireless 34 | """ 35 | if self._v1 is None: 36 | self._v1 = V1(self) 37 | return self._v1 38 | 39 | def __repr__(self) -> str: 40 | """ 41 | Provide a friendly representation 42 | :returns: Machine friendly representation 43 | """ 44 | return "" 45 | -------------------------------------------------------------------------------- /twilio/rest/wireless/__init__.py: -------------------------------------------------------------------------------- 1 | from warnings import warn 2 | 3 | from twilio.rest.wireless.WirelessBase import WirelessBase 4 | from twilio.rest.wireless.v1.command import CommandList 5 | from twilio.rest.wireless.v1.rate_plan import RatePlanList 6 | from twilio.rest.wireless.v1.sim import SimList 7 | from twilio.rest.wireless.v1.usage_record import UsageRecordList 8 | 9 | 10 | class Wireless(WirelessBase): 11 | @property 12 | def usage_records(self) -> UsageRecordList: 13 | warn( 14 | "usage_records is deprecated. Use v1.usage_records instead.", 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | return self.v1.usage_records 19 | 20 | @property 21 | def commands(self) -> CommandList: 22 | warn( 23 | "commands is deprecated. Use v1.commands instead.", 24 | DeprecationWarning, 25 | stacklevel=2, 26 | ) 27 | return self.v1.commands 28 | 29 | @property 30 | def rate_plans(self) -> RatePlanList: 31 | warn( 32 | "rate_plans is deprecated. Use v1.rate_plans instead.", 33 | DeprecationWarning, 34 | stacklevel=2, 35 | ) 36 | return self.v1.rate_plans 37 | 38 | @property 39 | def sims(self) -> SimList: 40 | warn( 41 | "sims is deprecated. Use v1.sims instead.", DeprecationWarning, stacklevel=2 42 | ) 43 | return self.v1.sims 44 | -------------------------------------------------------------------------------- /twilio/rest/wireless/v1/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | This code was generated by 3 | ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ 4 | | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ 5 | | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ 6 | 7 | Twilio - Wireless 8 | This is the public Twilio REST API. 9 | 10 | NOTE: This class is auto generated by OpenAPI Generator. 11 | https://openapi-generator.tech 12 | Do not edit the class manually. 13 | """ 14 | 15 | from typing import Optional 16 | from twilio.base.version import Version 17 | from twilio.base.domain import Domain 18 | from twilio.rest.wireless.v1.command import CommandList 19 | from twilio.rest.wireless.v1.rate_plan import RatePlanList 20 | from twilio.rest.wireless.v1.sim import SimList 21 | from twilio.rest.wireless.v1.usage_record import UsageRecordList 22 | 23 | 24 | class V1(Version): 25 | 26 | def __init__(self, domain: Domain): 27 | """ 28 | Initialize the V1 version of Wireless 29 | 30 | :param domain: The Twilio.wireless domain 31 | """ 32 | super().__init__(domain, "v1") 33 | self._commands: Optional[CommandList] = None 34 | self._rate_plans: Optional[RatePlanList] = None 35 | self._sims: Optional[SimList] = None 36 | self._usage_records: Optional[UsageRecordList] = None 37 | 38 | @property 39 | def commands(self) -> CommandList: 40 | if self._commands is None: 41 | self._commands = CommandList(self) 42 | return self._commands 43 | 44 | @property 45 | def rate_plans(self) -> RatePlanList: 46 | if self._rate_plans is None: 47 | self._rate_plans = RatePlanList(self) 48 | return self._rate_plans 49 | 50 | @property 51 | def sims(self) -> SimList: 52 | if self._sims is None: 53 | self._sims = SimList(self) 54 | return self._sims 55 | 56 | @property 57 | def usage_records(self) -> UsageRecordList: 58 | if self._usage_records is None: 59 | self._usage_records = UsageRecordList(self) 60 | return self._usage_records 61 | 62 | def __repr__(self) -> str: 63 | """ 64 | Provide a friendly representation 65 | :returns: Machine friendly representation 66 | """ 67 | return "" 68 | -------------------------------------------------------------------------------- /twilio/twiml/fax_response.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | r""" 3 | This code was generated by 4 | \ / _ _ _| _ _ 5 | | (_)\/(_)(_|\/| |(/_ v1.0.0 6 | / / 7 | """ 8 | 9 | from twilio.twiml import ( 10 | TwiML, 11 | ) 12 | 13 | 14 | class FaxResponse(TwiML): 15 | """ TwiML for Faxes""" 16 | 17 | def __init__(self, **kwargs): 18 | super(FaxResponse, self).__init__(**kwargs) 19 | self.name = "Response" 20 | 21 | def receive( 22 | self, 23 | action=None, 24 | method=None, 25 | media_type=None, 26 | page_size=None, 27 | store_media=None, 28 | **kwargs 29 | ): 30 | """ 31 | Create a element 32 | 33 | :param action: Receive action URL 34 | :param method: Receive action URL method 35 | :param media_type: The media type used to store media in the fax media store 36 | :param page_size: What size to interpret received pages as 37 | :param store_media: Whether or not to store received media in the fax media store 38 | :param kwargs: additional attributes 39 | 40 | :returns: element 41 | """ 42 | return self.nest( 43 | Receive( 44 | action=action, 45 | method=method, 46 | media_type=media_type, 47 | page_size=page_size, 48 | store_media=store_media, 49 | **kwargs 50 | ) 51 | ) 52 | 53 | 54 | class Receive(TwiML): 55 | """ TwiML Verb""" 56 | 57 | def __init__(self, **kwargs): 58 | super(Receive, self).__init__(**kwargs) 59 | self.name = "Receive" 60 | --------------------------------------------------------------------------------