telnyx 2.0.0__tar.gz → 2.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of telnyx might be problematic. Click here for more details.
- {telnyx-2.0.0 → telnyx-2.1.2}/PKG-INFO +25 -22
- {telnyx-2.0.0 → telnyx-2.1.2}/README.md +15 -15
- telnyx-2.1.2/VERSION +1 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/setup.cfg +1 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/setup.py +10 -11
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/__init__.py +1 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_requestor.py +19 -17
- telnyx-2.1.2/telnyx/api_resources/__init__.py +318 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/api_resource.py +5 -4
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/nested_resource_class_methods.py +11 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/updateable_api_resource.py +2 -1
- telnyx-2.0.0/telnyx/api_resources/message.py → telnyx-2.1.2/telnyx/api_resources/access_token.py +2 -2
- telnyx-2.1.2/telnyx/api_resources/address.py +28 -0
- telnyx-2.1.2/telnyx/api_resources/advanced_optinoptout.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/ai.py +36 -0
- telnyx-2.1.2/telnyx/api_resources/autorechargepreference.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/billing.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/bucket.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/bucket_usage.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/bulk_credential.py +13 -0
- telnyx-2.1.2/telnyx/api_resources/bulk_phone_number_campaign.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/bulk_phone_number_operation.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/bulk_sole_proprietor_creation.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/business_identity.py +17 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/call.py +87 -53
- telnyx-2.1.2/telnyx/api_resources/call_information.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/call_recording.py +22 -0
- telnyx-2.1.2/telnyx/api_resources/cdr_usage_report.py +7 -0
- telnyx-2.0.0/telnyx/api_resources/document.py → telnyx-2.1.2/telnyx/api_resources/credential_connection.py +9 -9
- telnyx-2.1.2/telnyx/api_resources/csv_download.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/customer_service_record.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/debugging.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/detail_record.py +7 -0
- telnyx-2.0.0/telnyx/api_resources/credential_connection.py → telnyx-2.1.2/telnyx/api_resources/dialogflow_integration.py +2 -2
- telnyx-2.1.2/telnyx/api_resources/document.py +21 -0
- telnyx-2.1.2/telnyx/api_resources/dynamic_emergency_endpoint.py +13 -0
- telnyx-2.1.2/telnyx/api_resources/enum.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/external_connection.py +17 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/fax.py +6 -8
- telnyx-2.1.2/telnyx/api_resources/inventory_level.py +7 -0
- telnyx-2.0.0/telnyx/api_resources/address.py → telnyx-2.1.2/telnyx/api_resources/ip_address.py +3 -3
- telnyx-2.1.2/telnyx/api_resources/ip_range.py +11 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/list_object.py +2 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/managed_account.py +2 -2
- telnyx-2.1.2/telnyx/api_resources/mdr_detail_report.py +11 -0
- telnyx-2.1.2/telnyx/api_resources/mdr_usage_report.py +11 -0
- telnyx-2.1.2/telnyx/api_resources/media_storage_api.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/message.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/messaging_hosted_number.py +20 -0
- telnyx-2.1.2/telnyx/api_resources/messaging_tollfree_verification.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/messaging_url_domain.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/mobile_network_operator.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/network.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/notification.py +17 -0
- telnyx-2.0.0/telnyx/api_resources/whatsapp_phone_number.py → telnyx-2.1.2/telnyx/api_resources/number_configuration.py +2 -2
- telnyx-2.1.2/telnyx/api_resources/number_portout.py +11 -0
- telnyx-2.0.0/telnyx/api_resources/whatsapp_contact.py → telnyx-2.1.2/telnyx/api_resources/numbers_feature.py +2 -2
- telnyx-2.1.2/telnyx/api_resources/ota_update.py +7 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/phone_number.py +4 -2
- telnyx-2.1.2/telnyx/api_resources/phone_number_block_order.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/phone_number_blocks_background_job.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/phone_number_campaign.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/phone_number_configuration.py +24 -0
- telnyx-2.0.0/telnyx/api_resources/whatsapp_message.py → telnyx-2.1.2/telnyx/api_resources/phone_number_order.py +2 -2
- telnyx-2.1.2/telnyx/api_resources/phone_number_order_document.py +13 -0
- telnyx-2.1.2/telnyx/api_resources/phone_number_porting.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/phone_number_reservation.py +15 -0
- telnyx-2.1.2/telnyx/api_resources/phone_number_search.py +7 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/porting_order.py +1 -8
- telnyx-2.1.2/telnyx/api_resources/presigned_object_url.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/private_wireless_gateway.py +13 -0
- telnyx-2.1.2/telnyx/api_resources/public_internet_gateway.py +13 -0
- telnyx-2.1.2/telnyx/api_resources/push_credential.py +11 -0
- telnyx-2.1.2/telnyx/api_resources/queue_command.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/recordings_command.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/region.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/register_call.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/report.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/reporting.py +11 -0
- telnyx-2.1.2/telnyx/api_resources/requirement.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/requirement_type.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/room_composition.py +11 -0
- telnyx-2.1.2/telnyx/api_resources/room_recording.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/rooms_client_token.py +24 -0
- telnyx-2.1.2/telnyx/api_resources/shared_campaign.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/sim_card.py +89 -0
- telnyx-2.1.2/telnyx/api_resources/sim_card_group.py +34 -0
- telnyx-2.1.2/telnyx/api_resources/ssl_certificate.py +11 -0
- telnyx-2.1.2/telnyx/api_resources/texml_application.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/texml_rest_command.py +13 -0
- telnyx-2.1.2/telnyx/api_resources/verified_calls_display_profile.py +17 -0
- telnyx-2.1.2/telnyx/api_resources/verified_number.py +16 -0
- telnyx-2.0.0/telnyx/api_resources/phone_number_campaign.py → telnyx-2.1.2/telnyx/api_resources/verify.py +6 -5
- telnyx-2.1.2/telnyx/api_resources/virtual_cross_connect.py +24 -0
- telnyx-2.1.2/telnyx/api_resources/wdr_detail_report.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/webhook.py +7 -0
- telnyx-2.1.2/telnyx/api_resources/wireguard_interface.py +17 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/error.py +1 -2
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/http_client.py +10 -9
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/multipart_data_generator.py +1 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/telnyx_object.py +3 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/util.py +86 -20
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/webhook.py +0 -2
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx.egg-info/PKG-INFO +25 -22
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx.egg-info/SOURCES.txt +72 -12
- telnyx-2.1.2/telnyx.egg-info/requires.txt +3 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_access_control_ip.py +3 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_document.py +4 -6
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_messaging_profile.py +1 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_phone_number.py +22 -24
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_porting_order.py +9 -30
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_queue.py +6 -4
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_sim_card_order.py +2 -4
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_verification.py +0 -16
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/conftest.py +2 -2
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/request_mock.py +2 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_api_requestor.py +2 -2
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_error.py +3 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_http_client.py +1 -2
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_multipart_data_generator.py +2 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_telnyx_object.py +1 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_util.py +2 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_webhook.py +0 -1
- {telnyx-2.0.0 → telnyx-2.1.2}/tox.ini +7 -8
- telnyx-2.0.0/VERSION +0 -1
- telnyx-2.0.0/telnyx/api_resources/__init__.py +0 -178
- telnyx-2.0.0/telnyx/api_resources/messaging_hosted_number.py +0 -7
- telnyx-2.0.0/telnyx/api_resources/sim_card.py +0 -59
- telnyx-2.0.0/telnyx/api_resources/sim_card_group.py +0 -17
- telnyx-2.0.0/telnyx/api_resources/whatsapp_business_account.py +0 -7
- telnyx-2.0.0/telnyx/api_resources/whatsapp_media.py +0 -15
- telnyx-2.0.0/telnyx/six.py +0 -892
- telnyx-2.0.0/telnyx.egg-info/requires.txt +0 -7
- telnyx-2.0.0/tests/api_resources/test_telephony_credential.py +0 -56
- telnyx-2.0.0/tests/api_resources/test_whatsapp_business_account.py +0 -17
- telnyx-2.0.0/tests/api_resources/test_whatsapp_contact.py +0 -14
- telnyx-2.0.0/tests/api_resources/test_whatsapp_media.py +0 -20
- telnyx-2.0.0/tests/api_resources/test_whatsapp_message.py +0 -24
- telnyx-2.0.0/tests/api_resources/test_whatsapp_phone_number.py +0 -22
- {telnyx-2.0.0 → telnyx-2.1.2}/.coveragerc +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/.flake8 +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/CHANGELOG.md +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/LICENSE +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/MANIFEST.in +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/pyproject.toml +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/pytest.ini +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/__init__.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/createable_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/deletable_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/listable_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/abstract/singleton_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/access_control_ip.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/access_ip_address.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/api_key.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/authentication_provider.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/available_phone_number.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/balance.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/billing_group.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/brand.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/bulk_creation.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/call_control_application.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/campaign.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/comment.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/conference.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/connection.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/custom_storage_credential.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/detail_records_report.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/dynamic_emergency_address.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/event.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/fax_application.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/fqdn.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/fqdn_connection.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/inbound_channel.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/inventory_coverage.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/ip.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/ip_connection.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/media.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/messaging_hosted_number_order.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/messaging_phone_number.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/messaging_profile.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/notification_channel.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/notification_event.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/notification_event_condition.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/notification_profiles.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/notification_setting.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/number_lookup.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/number_order.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/number_order_phone_number.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/number_reservation.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/outbound_voice_profile.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/phone_assignment_profile.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/phone_number_jobs.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/phone_number_regulatory_requirement.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/portability_check.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/portout.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/public_key.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/queue.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/room.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/room_participant.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/room_session.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/short_code.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/sim_card_action.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/sim_card_order.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/sub_number_order.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/telephony_credential.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/verification.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/verify_profile.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/webhook_deliveries.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/api_resources/wireless_detail_record_report.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/request_metrics.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx/telnyx_response.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx.egg-info/dependency_links.txt +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx.egg-info/not-zip-safe +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/telnyx.egg-info/top_level.txt +0 -0
- {telnyx-2.0.0/tests/api_resources/abstract → telnyx-2.1.2/tests}/__init__.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/__init__.py +0 -0
- {telnyx-2.0.0/tests → telnyx-2.1.2/tests/api_resources/abstract}/__init__.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/abstract/test_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/abstract/test_createable_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/abstract/test_deletable_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/abstract/test_listable_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/abstract/test_nested_resource_class_methods.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/abstract/test_singleton_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/abstract/test_updateable_api_resource.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_address.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_authentication_provider.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_available_phone_number.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_balance.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_billing_group.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_call.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_call_control_application.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_campaign.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_comment.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_conference.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_connection.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_credential_connection.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_custom_storage_credential.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_detail_records_report.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_dynamic_emergency_address.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_fax.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_fax_applications.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_fqdn.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_inbound_channel.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_inventory_coverage.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_ip_connection.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_list_object.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_managed_account.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_media.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_message.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_messaging_hosted_number.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_messaging_hosted_number_order.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_notification_channel.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_notification_event.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_notification_event_condition.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_notification_profile.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_notification_setting.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_number_lookup.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_number_order.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_number_reservation.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_outbound_voice_profiles.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_phone_number_campaign.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_phone_number_job.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_phone_number_regulatory_requirement.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_portability_check.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_portout.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_public_key.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_room.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_room_participant.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_room_sessions.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_short_code.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_sim_card.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_sim_card_action.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_sim_card_group.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_sub_number_order.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_verify_profiles.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_webhook_deliveries.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/api_resources/test_wireless_details_record_report.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/telnyx_mock.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_request_metrics.py +0 -0
- {telnyx-2.0.0 → telnyx-2.1.2}/tests/test_telnyx_response.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: telnyx
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.2
|
|
4
4
|
Summary: Python bindings for the Telnyx API
|
|
5
5
|
Home-page: https://github.com/team-telnyx/telnyx-python
|
|
6
6
|
Author: Telnyx
|
|
@@ -15,18 +15,21 @@ Classifier: Intended Audience :: Developers
|
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python
|
|
18
|
-
Classifier: Programming Language :: Python :: 2
|
|
19
|
-
Classifier: Programming Language :: Python :: 2.7
|
|
20
18
|
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
25
25
|
Classifier: Topic :: Communications :: Telephony
|
|
26
26
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
|
-
Requires-Python: >=
|
|
27
|
+
Requires-Python: >=3.8
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
License-File: LICENSE
|
|
30
|
+
Requires-Dist: requests>=2.20
|
|
31
|
+
Requires-Dist: six
|
|
32
|
+
Requires-Dist: PyNaCl
|
|
30
33
|
|
|
31
34
|
# Telnyx Python Library
|
|
32
35
|
|
|
@@ -76,7 +79,7 @@ into using https://www.piwheels.org/ for ARM compiled wheels.
|
|
|
76
79
|
|
|
77
80
|
### Requirements
|
|
78
81
|
|
|
79
|
-
- Python
|
|
82
|
+
- Python 3.8+ (PyPy supported)
|
|
80
83
|
|
|
81
84
|
#### Additional Requirements for Source Install
|
|
82
85
|
|
|
@@ -167,6 +170,7 @@ telnyx.max_network_retries = 2
|
|
|
167
170
|
```
|
|
168
171
|
|
|
169
172
|
### Reserved word keyword arguments
|
|
173
|
+
|
|
170
174
|
The Telnyx API includes `from` as an attribute that can be set on messages.
|
|
171
175
|
`from` is also a reserved word in Python. If you would like to use keyword
|
|
172
176
|
arguments where an argument is a reserved word you can add the suffix `_` e.g.
|
|
@@ -182,6 +186,7 @@ telnyx.Message.create(
|
|
|
182
186
|
The argument will be automatically rewritten to `from` in the keyword arguments dict.
|
|
183
187
|
|
|
184
188
|
> Pro Tip: You can alternatively unpack a dictionary like so:
|
|
189
|
+
>
|
|
185
190
|
> ```python
|
|
186
191
|
> message = {
|
|
187
192
|
> "from": "+18445550001",
|
|
@@ -250,19 +255,19 @@ Run all tests on all supported Python versions:
|
|
|
250
255
|
|
|
251
256
|
Run all tests for a specific Python version (modify `-e` according to your Python target):
|
|
252
257
|
|
|
253
|
-
pipenv run tox -e
|
|
258
|
+
pipenv run tox -e py38
|
|
254
259
|
|
|
255
260
|
Run all tests in a single file:
|
|
256
261
|
|
|
257
|
-
pipenv run tox -e
|
|
262
|
+
pipenv run tox -e py38 -- tests/api_resources/abstract/test_updateable_api_resource.py
|
|
258
263
|
|
|
259
264
|
Run a single test suite:
|
|
260
265
|
|
|
261
|
-
pipenv run tox -e
|
|
266
|
+
pipenv run tox -e py38 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource
|
|
262
267
|
|
|
263
268
|
Run a single test:
|
|
264
269
|
|
|
265
|
-
pipenv run tox -e
|
|
270
|
+
pipenv run tox -e py38 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource::test_save
|
|
266
271
|
|
|
267
272
|
Run the linter with:
|
|
268
273
|
|
|
@@ -277,11 +282,11 @@ with:
|
|
|
277
282
|
### Adding a new endpoint
|
|
278
283
|
|
|
279
284
|
1. Define a class for the object that the endpoint interacts with under
|
|
280
|
-
`telnyx/api_resources/`. The path name singularized should typically match
|
|
281
|
-
the record type of the object returned e.g. `/v2/available_phone_numbers`
|
|
282
|
-
returns a list of objects with the record_type `available_phone_number`.
|
|
283
|
-
Inherit from the classes that define the behavior available on the endpoint,one or more of `CreateableAPIResource`, `DeletableAPIResource`,
|
|
284
|
-
`ListableAPIResource`, `UpdateableAPIResource`.
|
|
285
|
+
`telnyx/api_resources/`. The path name singularized should typically match
|
|
286
|
+
the record type of the object returned e.g. `/v2/available_phone_numbers`
|
|
287
|
+
returns a list of objects with the record_type `available_phone_number`.
|
|
288
|
+
Inherit from the classes that define the behavior available on the endpoint,one or more of `CreateableAPIResource`, `DeletableAPIResource`,
|
|
289
|
+
`ListableAPIResource`, `UpdateableAPIResource`.
|
|
285
290
|
|
|
286
291
|
2. Import your class in `telnyx/api_resources/__init__.py`.
|
|
287
292
|
|
|
@@ -289,7 +294,6 @@ Inherit from the classes that define the behavior available on the endpoint,one
|
|
|
289
294
|
|
|
290
295
|
4. Add tests for your new class under `tests/api_resources/`.
|
|
291
296
|
|
|
292
|
-
|
|
293
297
|
[api-keys]: https://portal.telnyx.com/#/app/auth/v2
|
|
294
298
|
[black]: https://github.com/ambv/black
|
|
295
299
|
[pipenv]: https://github.com/pypa/pipenv
|
|
@@ -298,21 +302,20 @@ Inherit from the classes that define the behavior available on the endpoint,one
|
|
|
298
302
|
## Releasing
|
|
299
303
|
|
|
300
304
|
1. Update version in
|
|
301
|
-
|
|
302
|
-
|
|
305
|
+
- `setup.py` (in the `setup()` call, the `version` kwarg)
|
|
306
|
+
- `telnyx/__init__.py` (the `__version__` string)
|
|
303
307
|
2. Create new branch, add changes, commit, and push
|
|
304
308
|
3. Ensure commit passes tests in [Travis][travis-telnyx-python]
|
|
305
309
|
4. Tag that commit with `git tag -a v{VERSION} -m "Release v{VERSION}"`, and push the tag `git push --follow-tags`
|
|
306
310
|
5. Ensure checked out copy is entirely clean (best to create a new environment...)
|
|
307
311
|
6. `make dists`
|
|
308
|
-
7.
|
|
312
|
+
7. _If you haven't done it before_, download the upload API keys from LastPass (search for "pypi") and put the contents between "PYPIRC FILE" tags into `~/.pypirc-telnyx`.
|
|
309
313
|
8. `make testupload`, check that it looks OK on PyPI and that it's installable via `pip`.
|
|
310
314
|
9. `make liveupload`, repeat checks for live version.
|
|
311
315
|
10. Ta-da.
|
|
312
316
|
|
|
313
317
|
[travis-telnyx-python]: https://travis-ci.org/team-telnyx/telnyx-python
|
|
314
318
|
|
|
315
|
-
|
|
316
319
|
## Acknowledgments
|
|
317
320
|
|
|
318
321
|
The contributors and maintainers of Telnyx Python would like to extend their
|
|
@@ -46,7 +46,7 @@ into using https://www.piwheels.org/ for ARM compiled wheels.
|
|
|
46
46
|
|
|
47
47
|
### Requirements
|
|
48
48
|
|
|
49
|
-
- Python
|
|
49
|
+
- Python 3.8+ (PyPy supported)
|
|
50
50
|
|
|
51
51
|
#### Additional Requirements for Source Install
|
|
52
52
|
|
|
@@ -137,6 +137,7 @@ telnyx.max_network_retries = 2
|
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
### Reserved word keyword arguments
|
|
140
|
+
|
|
140
141
|
The Telnyx API includes `from` as an attribute that can be set on messages.
|
|
141
142
|
`from` is also a reserved word in Python. If you would like to use keyword
|
|
142
143
|
arguments where an argument is a reserved word you can add the suffix `_` e.g.
|
|
@@ -152,6 +153,7 @@ telnyx.Message.create(
|
|
|
152
153
|
The argument will be automatically rewritten to `from` in the keyword arguments dict.
|
|
153
154
|
|
|
154
155
|
> Pro Tip: You can alternatively unpack a dictionary like so:
|
|
156
|
+
>
|
|
155
157
|
> ```python
|
|
156
158
|
> message = {
|
|
157
159
|
> "from": "+18445550001",
|
|
@@ -220,19 +222,19 @@ Run all tests on all supported Python versions:
|
|
|
220
222
|
|
|
221
223
|
Run all tests for a specific Python version (modify `-e` according to your Python target):
|
|
222
224
|
|
|
223
|
-
pipenv run tox -e
|
|
225
|
+
pipenv run tox -e py38
|
|
224
226
|
|
|
225
227
|
Run all tests in a single file:
|
|
226
228
|
|
|
227
|
-
pipenv run tox -e
|
|
229
|
+
pipenv run tox -e py38 -- tests/api_resources/abstract/test_updateable_api_resource.py
|
|
228
230
|
|
|
229
231
|
Run a single test suite:
|
|
230
232
|
|
|
231
|
-
pipenv run tox -e
|
|
233
|
+
pipenv run tox -e py38 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource
|
|
232
234
|
|
|
233
235
|
Run a single test:
|
|
234
236
|
|
|
235
|
-
pipenv run tox -e
|
|
237
|
+
pipenv run tox -e py38 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource::test_save
|
|
236
238
|
|
|
237
239
|
Run the linter with:
|
|
238
240
|
|
|
@@ -247,11 +249,11 @@ with:
|
|
|
247
249
|
### Adding a new endpoint
|
|
248
250
|
|
|
249
251
|
1. Define a class for the object that the endpoint interacts with under
|
|
250
|
-
`telnyx/api_resources/`. The path name singularized should typically match
|
|
251
|
-
the record type of the object returned e.g. `/v2/available_phone_numbers`
|
|
252
|
-
returns a list of objects with the record_type `available_phone_number`.
|
|
253
|
-
Inherit from the classes that define the behavior available on the endpoint,one or more of `CreateableAPIResource`, `DeletableAPIResource`,
|
|
254
|
-
`ListableAPIResource`, `UpdateableAPIResource`.
|
|
252
|
+
`telnyx/api_resources/`. The path name singularized should typically match
|
|
253
|
+
the record type of the object returned e.g. `/v2/available_phone_numbers`
|
|
254
|
+
returns a list of objects with the record_type `available_phone_number`.
|
|
255
|
+
Inherit from the classes that define the behavior available on the endpoint,one or more of `CreateableAPIResource`, `DeletableAPIResource`,
|
|
256
|
+
`ListableAPIResource`, `UpdateableAPIResource`.
|
|
255
257
|
|
|
256
258
|
2. Import your class in `telnyx/api_resources/__init__.py`.
|
|
257
259
|
|
|
@@ -259,7 +261,6 @@ Inherit from the classes that define the behavior available on the endpoint,one
|
|
|
259
261
|
|
|
260
262
|
4. Add tests for your new class under `tests/api_resources/`.
|
|
261
263
|
|
|
262
|
-
|
|
263
264
|
[api-keys]: https://portal.telnyx.com/#/app/auth/v2
|
|
264
265
|
[black]: https://github.com/ambv/black
|
|
265
266
|
[pipenv]: https://github.com/pypa/pipenv
|
|
@@ -268,21 +269,20 @@ Inherit from the classes that define the behavior available on the endpoint,one
|
|
|
268
269
|
## Releasing
|
|
269
270
|
|
|
270
271
|
1. Update version in
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
- `setup.py` (in the `setup()` call, the `version` kwarg)
|
|
273
|
+
- `telnyx/__init__.py` (the `__version__` string)
|
|
273
274
|
2. Create new branch, add changes, commit, and push
|
|
274
275
|
3. Ensure commit passes tests in [Travis][travis-telnyx-python]
|
|
275
276
|
4. Tag that commit with `git tag -a v{VERSION} -m "Release v{VERSION}"`, and push the tag `git push --follow-tags`
|
|
276
277
|
5. Ensure checked out copy is entirely clean (best to create a new environment...)
|
|
277
278
|
6. `make dists`
|
|
278
|
-
7.
|
|
279
|
+
7. _If you haven't done it before_, download the upload API keys from LastPass (search for "pypi") and put the contents between "PYPIRC FILE" tags into `~/.pypirc-telnyx`.
|
|
279
280
|
8. `make testupload`, check that it looks OK on PyPI and that it's installable via `pip`.
|
|
280
281
|
9. `make liveupload`, repeat checks for live version.
|
|
281
282
|
10. Ta-da.
|
|
282
283
|
|
|
283
284
|
[travis-telnyx-python]: https://travis-ci.org/team-telnyx/telnyx-python
|
|
284
285
|
|
|
285
|
-
|
|
286
286
|
## Acknowledgments
|
|
287
287
|
|
|
288
288
|
The contributors and maintainers of Telnyx Python would like to extend their
|
telnyx-2.1.2/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.2
|
|
@@ -31,7 +31,7 @@ with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
|
|
|
31
31
|
|
|
32
32
|
setup(
|
|
33
33
|
name="telnyx",
|
|
34
|
-
version="2.
|
|
34
|
+
version="2.1.2",
|
|
35
35
|
description="Python bindings for the Telnyx API",
|
|
36
36
|
long_description=long_description,
|
|
37
37
|
long_description_content_type="text/markdown",
|
|
@@ -48,14 +48,13 @@ setup(
|
|
|
48
48
|
packages=find_packages(exclude=["tests", "tests.*"]),
|
|
49
49
|
zip_safe=False,
|
|
50
50
|
install_requires=[
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
"requests >= 2.20",
|
|
52
|
+
"six",
|
|
53
53
|
"PyNaCl",
|
|
54
54
|
],
|
|
55
|
-
python_requires=">=
|
|
55
|
+
python_requires=">=3.8",
|
|
56
56
|
tests_require=[
|
|
57
|
-
|
|
58
|
-
'pytest >= 4, < 5; python_version < "3.0"',
|
|
57
|
+
"pytest >= 4",
|
|
59
58
|
"pytest-mock >= 1.7",
|
|
60
59
|
"pytest-xdist >= 1.22",
|
|
61
60
|
"pytest-cov >= 2.5",
|
|
@@ -67,12 +66,12 @@ setup(
|
|
|
67
66
|
"License :: OSI Approved :: MIT License",
|
|
68
67
|
"Operating System :: OS Independent",
|
|
69
68
|
"Programming Language :: Python",
|
|
70
|
-
"Programming Language :: Python :: 2",
|
|
71
|
-
"Programming Language :: Python :: 2.7",
|
|
72
69
|
"Programming Language :: Python :: 3",
|
|
73
|
-
"Programming Language :: Python :: 3.
|
|
74
|
-
"Programming Language :: Python :: 3.
|
|
75
|
-
"Programming Language :: Python :: 3.
|
|
70
|
+
"Programming Language :: Python :: 3.8",
|
|
71
|
+
"Programming Language :: Python :: 3.9",
|
|
72
|
+
"Programming Language :: Python :: 3.10",
|
|
73
|
+
"Programming Language :: Python :: 3.11",
|
|
74
|
+
"Programming Language :: Python :: 3.12",
|
|
76
75
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
77
76
|
"Topic :: Communications :: Telephony",
|
|
78
77
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
@@ -6,10 +6,12 @@ import json
|
|
|
6
6
|
import platform
|
|
7
7
|
import time
|
|
8
8
|
|
|
9
|
+
import six
|
|
10
|
+
from six.moves.urllib.parse import urlencode, urlsplit, urlunsplit
|
|
11
|
+
|
|
9
12
|
import telnyx
|
|
10
|
-
from telnyx import error, http_client,
|
|
13
|
+
from telnyx import error, http_client, util
|
|
11
14
|
from telnyx.multipart_data_generator import MultipartDataGenerator
|
|
12
|
-
from telnyx.six.moves.urllib.parse import urlencode, urlsplit, urlunsplit
|
|
13
15
|
from telnyx.telnyx_response import TelnyxResponse
|
|
14
16
|
|
|
15
17
|
|
|
@@ -123,37 +125,37 @@ class APIRequestor(object):
|
|
|
123
125
|
)
|
|
124
126
|
|
|
125
127
|
if rcode == 400:
|
|
126
|
-
return error.InvalidRequestError(error_list,
|
|
128
|
+
return error.InvalidRequestError(error_list, rcode, rbody, resp, rheaders)
|
|
127
129
|
elif rcode == 401:
|
|
128
|
-
return error.AuthenticationError(error_list,
|
|
130
|
+
return error.AuthenticationError(error_list, rcode, rbody, resp, rheaders)
|
|
129
131
|
elif rcode == 403:
|
|
130
|
-
return error.PermissionError(error_list,
|
|
132
|
+
return error.PermissionError(error_list, rcode, rbody, resp, rheaders)
|
|
131
133
|
elif rcode == 404:
|
|
132
|
-
return error.ResourceNotFoundError(error_list,
|
|
134
|
+
return error.ResourceNotFoundError(error_list, rcode, rbody, resp, rheaders)
|
|
133
135
|
elif rcode == 405:
|
|
134
136
|
return error.MethodNotSupportedError(
|
|
135
|
-
error_list,
|
|
137
|
+
error_list, rcode, rbody, resp, rheaders
|
|
136
138
|
)
|
|
137
139
|
elif rcode == 408:
|
|
138
|
-
return error.TimeoutError(error_list,
|
|
140
|
+
return error.TimeoutError(error_list, rcode, rbody, resp, rheaders)
|
|
139
141
|
elif rcode == 415:
|
|
140
142
|
return error.UnsupportedMediaTypeError(
|
|
141
|
-
error_list,
|
|
143
|
+
error_list, rcode, rbody, resp, rheaders
|
|
142
144
|
)
|
|
143
145
|
elif rcode == 422:
|
|
144
146
|
return error.InvalidParametersError(
|
|
145
|
-
error_list,
|
|
147
|
+
error_list, rcode, rbody, resp, rheaders
|
|
146
148
|
)
|
|
147
149
|
elif rcode == 429:
|
|
148
|
-
return error.RateLimitError(error_list,
|
|
150
|
+
return error.RateLimitError(error_list, rcode, rbody, resp, rheaders)
|
|
149
151
|
elif rcode == 500:
|
|
150
|
-
return error.APIError(error_list,
|
|
152
|
+
return error.APIError(error_list, rcode, rbody, resp, rheaders)
|
|
151
153
|
elif rcode == 503:
|
|
152
154
|
return error.ServiceUnavailableError(
|
|
153
|
-
error_list,
|
|
155
|
+
error_list, rcode, rbody, resp, rheaders
|
|
154
156
|
)
|
|
155
157
|
else:
|
|
156
|
-
return error.APIError(error_list,
|
|
158
|
+
return error.APIError(error_list, rcode, rbody, resp, rheaders)
|
|
157
159
|
|
|
158
160
|
def request_headers(self, api_key, method):
|
|
159
161
|
user_agent = "Telnyx/v2 PythonBindings/%s" % (telnyx.__version__,)
|
|
@@ -237,9 +239,9 @@ class APIRequestor(object):
|
|
|
237
239
|
generator.add_params(params or {})
|
|
238
240
|
post_data = generator.get_post_data()
|
|
239
241
|
encoded_params = params
|
|
240
|
-
supplied_headers[
|
|
241
|
-
"
|
|
242
|
-
|
|
242
|
+
supplied_headers["Content-Type"] = (
|
|
243
|
+
"multipart/form-data; boundary=%s" % (generator.boundary,)
|
|
244
|
+
)
|
|
243
245
|
else:
|
|
244
246
|
raise error.APIConnectionError(
|
|
245
247
|
"Unrecognized HTTP method %r. This may indicate a bug in the "
|