From ff6d31faa312db7e0023e973a9e0f13ac012fbc7 Mon Sep 17 00:00:00 2001 From: Dan Tolbert Date: Thu, 17 Dec 2020 17:40:57 -0500 Subject: [PATCH] production SDK release --- README.md | 123 +- api/openapi.yaml | 21407 +++++++++----- build.gradle | 2 +- build.sbt | 2 +- docs/AnchorsiteOverride.md | 29 + docs/CallControlApplicationsApi.md | 16 +- docs/ConferenceCommandsApi.md | 16 +- docs/Connection.md | 31 + docs/ConnectionResponse.md | 12 + docs/ConnectionRtcpSettings.md | 23 + docs/ConnectionsApi.md | 170 + docs/CreateCredentialConnectionRequest.md | 48 + docs/CreateFaxApplicationRequest.md | 19 + docs/CreateFaxApplicationRequestInbound.md | 23 + docs/CreateFaxApplicationRequestOutbound.md | 13 + docs/CreateFqdnConnectionRequest.md | 35 + docs/CreateFqdnRequest.md | 15 + docs/CreateInboundIpRequest.md | 75 + docs/CreateIpConnectionRequest.md | 46 + docs/CreateIpRequest.md | 14 + docs/CreateOutboundVoiceProfileRequest.md | 24 + docs/CreateTexmlApplicationRequest.md | 42 + docs/CreateTexmlApplicationRequestInbound.md | 23 + docs/CreateTexmlApplicationRequestOutbound.md | 13 + docs/CredentialConnection.md | 52 + docs/CredentialConnectionResponse.md | 12 + docs/CredentialConnectionsApi.md | 392 + docs/CredentialInbound.md | 43 + docs/CredentialOutbound.md | 43 + docs/CsvDownloadsApi.md | 8 +- docs/DebuggingApi.md | 8 +- docs/DtmfType.md | 15 + docs/EncryptedMedia.md | 13 + docs/FaxApplication.md | 23 + docs/FqdNsApi.md | 392 + docs/Fqdn.md | 19 + docs/FqdnConnection.md | 39 + docs/FqdnConnectionResponse.md | 12 + docs/FqdnConnectionTransportProtocol.md | 15 + docs/FqdnConnectionsApi.md | 389 + docs/FqdnResponse.md | 12 + docs/IPsApi.md | 389 + docs/InboundFqdn.md | 75 + docs/InboundIp.md | 78 + docs/InlineResponse200.md | 13 + docs/InlineResponse2001.md | 13 + docs/InlineResponse201.md | 12 + docs/InlineResponse2011.md | 12 + docs/Ip.md | 18 + docs/IpConnection.md | 50 + docs/IpConnectionResponse.md | 12 + docs/IpConnectionsApi.md | 392 + docs/IpResponse.md | 12 + docs/ListConnectionsResponse.md | 13 + docs/ListCredentialConnectionsResponse.md | 13 + docs/ListFqdnConnectionsResponse.md | 13 + docs/ListFqdnsResponse.md | 13 + docs/ListIpConnectionsResponse.md | 13 + docs/ListIpsResponse.md | 12 + docs/ListOutboundVoiceProfilesResponse.md | 13 + .../ListPhoneNumbersBackgroundJobsResponse.md | 13 + docs/MessagingHostedNumberApi.md | 8 +- docs/MessagingProfilesApi.md | 32 +- docs/MessagingUrlDomainsApi.md | 8 +- docs/NumberBackgroundJobsApi.md | 306 + docs/NumberConfigurationsApi.md | 34 +- docs/NumberOrderDocumentsApi.md | 8 +- docs/NumberOrderRegulatoryRequirementsApi.md | 16 +- docs/NumberOrdersApi.md | 8 +- docs/NumberReservationsApi.md | 8 +- docs/OutboundCallRecording.md | 43 + docs/OutboundIp.md | 55 + docs/OutboundVoiceProfile.md | 29 + docs/OutboundVoiceProfileResponse.md | 12 + docs/OutboundVoiceProfilesApi.md | 390 + docs/PhoneNumberDetailed.md | 1 + docs/PhoneNumberWithVoiceSettings.md | 1 + docs/PhoneNumbersEnableEmergency.md | 12 + docs/PhoneNumbersJob.md | 12 + docs/PhoneNumbersJobDeletePhoneNumbers.md | 12 + ...honeNumbersJobDeletePhoneNumbersRequest.md | 12 + docs/PhoneNumbersJobFailedOperation.md | 14 + docs/PhoneNumbersJobSuccessfulOperation.md | 13 + ...umbersJobUpdateEmergencySettingsRequest.md | 14 + docs/ProgrammableFaxApplicationsApi.md | 386 + docs/RecordingsCommandsApi.md | 8 +- docs/ServicePlan.md | 15 + docs/ShortCodesApi.md | 8 +- docs/TeXmlApplicationsApi.md | 386 + docs/TexmlApplication.md | 46 + docs/TrafficType.md | 13 + docs/UpdateCredentialConnectionRequest.md | 48 + docs/UpdateFaxApplicationRequest.md | 19 + docs/UpdateFqdnConnectionRequest.md | 35 + docs/UpdateFqdnRequest.md | 15 + docs/UpdateIpConnectionRequest.md | 46 + docs/UpdateIpRequest.md | 14 + docs/UpdateOutboundVoiceProfileRequest.md | 24 + docs/UpdatePhoneNumberRequest.md | 1 + docs/UpdateTexmlApplicationRequest.md | 42 + docs/UsagePaymentMethod.md | 13 + docs/WebhookApiVersion.md | 13 + .../open-api_java_sdk_config.json | 2 +- openapi-configuration/spec3.json | 23355 ++++++++++------ pom.xml | 2 +- .../sdk/api/CallControlApplicationsApi.java | 20 +- .../telnyx/sdk/api/ConferenceCommandsApi.java | 8 +- .../com/telnyx/sdk/api/ConnectionsApi.java | 273 + .../sdk/api/CredentialConnectionsApi.java | 499 + .../com/telnyx/sdk/api/CsvDownloadsApi.java | 4 +- .../java/com/telnyx/sdk/api/DebuggingApi.java | 4 +- .../java/com/telnyx/sdk/api/FqdNsApi.java | 495 + .../telnyx/sdk/api/FqdnConnectionsApi.java | 487 + src/main/java/com/telnyx/sdk/api/IPsApi.java | 484 + .../com/telnyx/sdk/api/IpConnectionsApi.java | 499 + .../sdk/api/MessagingHostedNumberApi.java | 4 +- .../telnyx/sdk/api/MessagingProfilesApi.java | 16 +- .../sdk/api/MessagingUrlDomainsApi.java | 4 +- .../sdk/api/NumberBackgroundJobsApi.java | 454 + .../sdk/api/NumberConfigurationsApi.java | 44 +- .../sdk/api/NumberOrderDocumentsApi.java | 4 +- .../NumberOrderRegulatoryRequirementsApi.java | 8 +- .../com/telnyx/sdk/api/NumberOrdersApi.java | 4 +- .../telnyx/sdk/api/NumberReservationsApi.java | 4 +- .../sdk/api/OutboundVoiceProfilesApi.java | 489 + .../api/ProgrammableFaxApplicationsApi.java | 430 + .../telnyx/sdk/api/RecordingsCommandsApi.java | 4 +- .../com/telnyx/sdk/api/ShortCodesApi.java | 4 +- .../telnyx/sdk/api/TeXmlApplicationsApi.java | 430 + .../telnyx/sdk/model/AnchorsiteOverride.java | 79 + .../java/com/telnyx/sdk/model/Connection.java | 468 + .../telnyx/sdk/model/ConnectionResponse.java | 110 + .../sdk/model/ConnectionRtcpSettings.java | 204 + .../sdk/model/CreateConferenceRequest.java | 2 +- .../CreateCredentialConnectionRequest.java | 729 + .../model/CreateFaxApplicationRequest.java | 345 + .../CreateFaxApplicationRequestInbound.java | 204 + .../CreateFaxApplicationRequestOutbound.java | 139 + .../model/CreateFqdnConnectionRequest.java | 604 + .../telnyx/sdk/model/CreateFqdnRequest.java | 209 + .../sdk/model/CreateInboundIpRequest.java | 724 + .../sdk/model/CreateIpConnectionRequest.java | 672 + .../com/telnyx/sdk/model/CreateIpRequest.java | 168 + .../CreateOutboundVoiceProfileRequest.java | 516 + .../model/CreateTexmlApplicationRequest.java | 541 + .../CreateTexmlApplicationRequestInbound.java | 204 + ...CreateTexmlApplicationRequestOutbound.java | 139 + .../sdk/model/CredentialConnection.java | 852 + .../model/CredentialConnectionResponse.java | 110 + .../telnyx/sdk/model/CredentialInbound.java | 499 + .../telnyx/sdk/model/CredentialOutbound.java | 429 + .../java/com/telnyx/sdk/model/DtmfType.java | 65 + .../com/telnyx/sdk/model/EncryptedMedia.java | 63 + .../com/telnyx/sdk/model/FaxApplication.java | 459 + src/main/java/com/telnyx/sdk/model/Fqdn.java | 319 + .../com/telnyx/sdk/model/FqdnConnection.java | 724 + .../sdk/model/FqdnConnectionResponse.java | 110 + .../FqdnConnectionTransportProtocol.java | 65 + .../com/telnyx/sdk/model/FqdnResponse.java | 110 + .../com/telnyx/sdk/model/InboundFqdn.java | 757 + .../java/com/telnyx/sdk/model/InboundIp.java | 814 + .../telnyx/sdk/model/InlineResponse200.java | 151 + .../telnyx/sdk/model/InlineResponse2001.java | 151 + .../telnyx/sdk/model/InlineResponse201.java | 110 + .../telnyx/sdk/model/InlineResponse2011.java | 110 + src/main/java/com/telnyx/sdk/model/Ip.java | 289 + .../com/telnyx/sdk/model/IpConnection.java | 792 + .../sdk/model/IpConnectionResponse.java | 110 + .../java/com/telnyx/sdk/model/IpResponse.java | 110 + .../sdk/model/ListConnectionsResponse.java | 151 + .../ListCredentialConnectionsResponse.java | 151 + .../model/ListFqdnConnectionsResponse.java | 151 + .../telnyx/sdk/model/ListFqdnsResponse.java | 151 + .../sdk/model/ListIpConnectionsResponse.java | 151 + .../com/telnyx/sdk/model/ListIpsResponse.java | 120 + .../ListOutboundVoiceProfilesResponse.java | 151 + ...istPhoneNumbersBackgroundJobsResponse.java | 151 + .../sdk/model/OutboundCallRecording.java | 316 + .../java/com/telnyx/sdk/model/OutboundIp.java | 554 + .../sdk/model/OutboundVoiceProfile.java | 666 + .../model/OutboundVoiceProfileResponse.java | 110 + .../telnyx/sdk/model/PhoneNumberDetailed.java | 32 +- .../model/PhoneNumberWithVoiceSettings.java | 32 +- .../model/PhoneNumbersEnableEmergency.java | 110 + .../com/telnyx/sdk/model/PhoneNumbersJob.java | 109 + .../PhoneNumbersJobDeletePhoneNumbers.java | 110 + ...neNumbersJobDeletePhoneNumbersRequest.java | 115 + .../model/PhoneNumbersJobFailedOperation.java | 180 + .../PhoneNumbersJobSuccessfulOperation.java | 139 + ...bersJobUpdateEmergencySettingsRequest.java | 173 + .../com/telnyx/sdk/model/ServicePlan.java | 65 + .../telnyx/sdk/model/TexmlApplication.java | 655 + .../com/telnyx/sdk/model/TrafficType.java | 63 + .../UpdateCredentialConnectionRequest.java | 732 + .../model/UpdateFaxApplicationRequest.java | 345 + .../model/UpdateFqdnConnectionRequest.java | 605 + .../telnyx/sdk/model/UpdateFqdnRequest.java | 212 + .../sdk/model/UpdateIpConnectionRequest.java | 672 + .../com/telnyx/sdk/model/UpdateIpRequest.java | 168 + .../UpdateOutboundVoiceProfileRequest.java | 516 + .../sdk/model/UpdatePhoneNumberRequest.java | 32 +- .../model/UpdateTexmlApplicationRequest.java | 541 + .../telnyx/sdk/model/UsagePaymentMethod.java | 63 + .../telnyx/sdk/model/WebhookApiVersion.java | 63 + .../telnyx/sdk/api/ConnectionsApiTest.java | 77 + .../sdk/api/CredentialConnectionsApiTest.java | 125 + .../java/com/telnyx/sdk/api/FqdNsApiTest.java | 127 + .../sdk/api/FqdnConnectionsApiTest.java | 123 + .../java/com/telnyx/sdk/api/IPsApiTest.java | 126 + .../telnyx/sdk/api/IpConnectionsApiTest.java | 125 + .../sdk/api/NumberBackgroundJobsApiTest.java | 113 + .../sdk/api/OutboundVoiceProfilesApiTest.java | 123 + .../ProgrammableFaxApplicationsApiTest.java | 119 + .../sdk/api/TeXmlApplicationsApiTest.java | 119 + .../sdk/model/AnchorsiteOverrideTest.java | 34 + .../sdk/model/ConnectionResponseTest.java | 51 + .../sdk/model/ConnectionRtcpSettingsTest.java | 66 + .../com/telnyx/sdk/model/ConnectionTest.java | 134 + ...CreateCredentialConnectionRequestTest.java | 195 + ...reateFaxApplicationRequestInboundTest.java | 66 + ...eateFaxApplicationRequestOutboundTest.java | 58 + .../CreateFaxApplicationRequestTest.java | 112 + .../CreateFqdnConnectionRequestTest.java | 171 + .../sdk/model/CreateFqdnRequestTest.java | 77 + .../sdk/model/CreateInboundIpRequestTest.java | 164 + .../model/CreateIpConnectionRequestTest.java | 179 + .../telnyx/sdk/model/CreateIpRequestTest.java | 66 + ...CreateOutboundVoiceProfileRequestTest.java | 157 + ...ateTexmlApplicationRequestInboundTest.java | 66 + ...teTexmlApplicationRequestOutboundTest.java | 58 + .../CreateTexmlApplicationRequestTest.java | 150 + .../CredentialConnectionResponseTest.java | 51 + .../sdk/model/CredentialConnectionTest.java | 227 + .../sdk/model/CredentialInboundTest.java | 132 + .../sdk/model/CredentialOutboundTest.java | 114 + .../com/telnyx/sdk/model/DtmfTypeTest.java | 34 + .../telnyx/sdk/model/EncryptedMediaTest.java | 34 + .../telnyx/sdk/model/FaxApplicationTest.java | 144 + .../sdk/model/FqdnConnectionResponseTest.java | 51 + .../telnyx/sdk/model/FqdnConnectionTest.java | 203 + .../FqdnConnectionTransportProtocolTest.java | 34 + .../telnyx/sdk/model/FqdnResponseTest.java | 51 + .../java/com/telnyx/sdk/model/FqdnTest.java | 106 + .../com/telnyx/sdk/model/InboundFqdnTest.java | 167 + .../com/telnyx/sdk/model/InboundIpTest.java | 188 + .../sdk/model/InlineResponse2001Test.java | 62 + .../sdk/model/InlineResponse200Test.java | 62 + .../sdk/model/InlineResponse2011Test.java | 51 + .../sdk/model/InlineResponse201Test.java | 51 + .../sdk/model/IpConnectionResponseTest.java | 51 + .../telnyx/sdk/model/IpConnectionTest.java | 211 + .../com/telnyx/sdk/model/IpResponseTest.java | 51 + .../java/com/telnyx/sdk/model/IpTest.java | 98 + .../model/ListConnectionsResponseTest.java | 62 + ...ListCredentialConnectionsResponseTest.java | 62 + .../ListFqdnConnectionsResponseTest.java | 62 + .../sdk/model/ListFqdnsResponseTest.java | 62 + .../model/ListIpConnectionsResponseTest.java | 62 + .../telnyx/sdk/model/ListIpsResponseTest.java | 53 + ...ListOutboundVoiceProfilesResponseTest.java | 62 + ...honeNumbersBackgroundJobsResponseTest.java | 62 + .../sdk/model/OutboundCallRecordingTest.java | 76 + .../com/telnyx/sdk/model/OutboundIpTest.java | 138 + .../OutboundVoiceProfileResponseTest.java | 51 + .../sdk/model/OutboundVoiceProfileTest.java | 197 + .../PhoneNumbersEnableEmergencyTest.java | 51 + ...mbersJobDeletePhoneNumbersRequestTest.java | 52 + ...PhoneNumbersJobDeletePhoneNumbersTest.java | 51 + .../PhoneNumbersJobFailedOperationTest.java | 69 + ...honeNumbersJobSuccessfulOperationTest.java | 58 + .../telnyx/sdk/model/PhoneNumbersJobTest.java | 50 + ...JobUpdateEmergencySettingsRequestTest.java | 68 + .../com/telnyx/sdk/model/ServicePlanTest.java | 34 + .../sdk/model/TexmlApplicationTest.java | 182 + .../com/telnyx/sdk/model/TrafficTypeTest.java | 34 + ...UpdateCredentialConnectionRequestTest.java | 195 + .../UpdateFaxApplicationRequestTest.java | 112 + .../UpdateFqdnConnectionRequestTest.java | 171 + .../sdk/model/UpdateFqdnRequestTest.java | 77 + .../model/UpdateIpConnectionRequestTest.java | 179 + .../telnyx/sdk/model/UpdateIpRequestTest.java | 66 + ...UpdateOutboundVoiceProfileRequestTest.java | 157 + .../UpdateTexmlApplicationRequestTest.java | 150 + .../sdk/model/UsagePaymentMethodTest.java | 34 + .../sdk/model/WebhookApiVersionTest.java | 34 + 285 files changed, 68668 insertions(+), 16168 deletions(-) create mode 100644 docs/AnchorsiteOverride.md create mode 100644 docs/Connection.md create mode 100644 docs/ConnectionResponse.md create mode 100644 docs/ConnectionRtcpSettings.md create mode 100644 docs/ConnectionsApi.md create mode 100644 docs/CreateCredentialConnectionRequest.md create mode 100644 docs/CreateFaxApplicationRequest.md create mode 100644 docs/CreateFaxApplicationRequestInbound.md create mode 100644 docs/CreateFaxApplicationRequestOutbound.md create mode 100644 docs/CreateFqdnConnectionRequest.md create mode 100644 docs/CreateFqdnRequest.md create mode 100644 docs/CreateInboundIpRequest.md create mode 100644 docs/CreateIpConnectionRequest.md create mode 100644 docs/CreateIpRequest.md create mode 100644 docs/CreateOutboundVoiceProfileRequest.md create mode 100644 docs/CreateTexmlApplicationRequest.md create mode 100644 docs/CreateTexmlApplicationRequestInbound.md create mode 100644 docs/CreateTexmlApplicationRequestOutbound.md create mode 100644 docs/CredentialConnection.md create mode 100644 docs/CredentialConnectionResponse.md create mode 100644 docs/CredentialConnectionsApi.md create mode 100644 docs/CredentialInbound.md create mode 100644 docs/CredentialOutbound.md create mode 100644 docs/DtmfType.md create mode 100644 docs/EncryptedMedia.md create mode 100644 docs/FaxApplication.md create mode 100644 docs/FqdNsApi.md create mode 100644 docs/Fqdn.md create mode 100644 docs/FqdnConnection.md create mode 100644 docs/FqdnConnectionResponse.md create mode 100644 docs/FqdnConnectionTransportProtocol.md create mode 100644 docs/FqdnConnectionsApi.md create mode 100644 docs/FqdnResponse.md create mode 100644 docs/IPsApi.md create mode 100644 docs/InboundFqdn.md create mode 100644 docs/InboundIp.md create mode 100644 docs/InlineResponse200.md create mode 100644 docs/InlineResponse2001.md create mode 100644 docs/InlineResponse201.md create mode 100644 docs/InlineResponse2011.md create mode 100644 docs/Ip.md create mode 100644 docs/IpConnection.md create mode 100644 docs/IpConnectionResponse.md create mode 100644 docs/IpConnectionsApi.md create mode 100644 docs/IpResponse.md create mode 100644 docs/ListConnectionsResponse.md create mode 100644 docs/ListCredentialConnectionsResponse.md create mode 100644 docs/ListFqdnConnectionsResponse.md create mode 100644 docs/ListFqdnsResponse.md create mode 100644 docs/ListIpConnectionsResponse.md create mode 100644 docs/ListIpsResponse.md create mode 100644 docs/ListOutboundVoiceProfilesResponse.md create mode 100644 docs/ListPhoneNumbersBackgroundJobsResponse.md create mode 100644 docs/NumberBackgroundJobsApi.md create mode 100644 docs/OutboundCallRecording.md create mode 100644 docs/OutboundIp.md create mode 100644 docs/OutboundVoiceProfile.md create mode 100644 docs/OutboundVoiceProfileResponse.md create mode 100644 docs/OutboundVoiceProfilesApi.md create mode 100644 docs/PhoneNumbersEnableEmergency.md create mode 100644 docs/PhoneNumbersJob.md create mode 100644 docs/PhoneNumbersJobDeletePhoneNumbers.md create mode 100644 docs/PhoneNumbersJobDeletePhoneNumbersRequest.md create mode 100644 docs/PhoneNumbersJobFailedOperation.md create mode 100644 docs/PhoneNumbersJobSuccessfulOperation.md create mode 100644 docs/PhoneNumbersJobUpdateEmergencySettingsRequest.md create mode 100644 docs/ProgrammableFaxApplicationsApi.md create mode 100644 docs/ServicePlan.md create mode 100644 docs/TeXmlApplicationsApi.md create mode 100644 docs/TexmlApplication.md create mode 100644 docs/TrafficType.md create mode 100644 docs/UpdateCredentialConnectionRequest.md create mode 100644 docs/UpdateFaxApplicationRequest.md create mode 100644 docs/UpdateFqdnConnectionRequest.md create mode 100644 docs/UpdateFqdnRequest.md create mode 100644 docs/UpdateIpConnectionRequest.md create mode 100644 docs/UpdateIpRequest.md create mode 100644 docs/UpdateOutboundVoiceProfileRequest.md create mode 100644 docs/UpdateTexmlApplicationRequest.md create mode 100644 docs/UsagePaymentMethod.md create mode 100644 docs/WebhookApiVersion.md create mode 100644 src/main/java/com/telnyx/sdk/api/ConnectionsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/CredentialConnectionsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/FqdNsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/FqdnConnectionsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/IPsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/IpConnectionsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/NumberBackgroundJobsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/OutboundVoiceProfilesApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApi.java create mode 100644 src/main/java/com/telnyx/sdk/api/TeXmlApplicationsApi.java create mode 100644 src/main/java/com/telnyx/sdk/model/AnchorsiteOverride.java create mode 100644 src/main/java/com/telnyx/sdk/model/Connection.java create mode 100644 src/main/java/com/telnyx/sdk/model/ConnectionResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ConnectionRtcpSettings.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateCredentialConnectionRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInbound.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutbound.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateFqdnConnectionRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateFqdnRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateInboundIpRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateIpConnectionRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateIpRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInbound.java create mode 100644 src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutbound.java create mode 100644 src/main/java/com/telnyx/sdk/model/CredentialConnection.java create mode 100644 src/main/java/com/telnyx/sdk/model/CredentialConnectionResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/CredentialInbound.java create mode 100644 src/main/java/com/telnyx/sdk/model/CredentialOutbound.java create mode 100644 src/main/java/com/telnyx/sdk/model/DtmfType.java create mode 100644 src/main/java/com/telnyx/sdk/model/EncryptedMedia.java create mode 100644 src/main/java/com/telnyx/sdk/model/FaxApplication.java create mode 100644 src/main/java/com/telnyx/sdk/model/Fqdn.java create mode 100644 src/main/java/com/telnyx/sdk/model/FqdnConnection.java create mode 100644 src/main/java/com/telnyx/sdk/model/FqdnConnectionResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocol.java create mode 100644 src/main/java/com/telnyx/sdk/model/FqdnResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/InboundFqdn.java create mode 100644 src/main/java/com/telnyx/sdk/model/InboundIp.java create mode 100644 src/main/java/com/telnyx/sdk/model/InlineResponse200.java create mode 100644 src/main/java/com/telnyx/sdk/model/InlineResponse2001.java create mode 100644 src/main/java/com/telnyx/sdk/model/InlineResponse201.java create mode 100644 src/main/java/com/telnyx/sdk/model/InlineResponse2011.java create mode 100644 src/main/java/com/telnyx/sdk/model/Ip.java create mode 100644 src/main/java/com/telnyx/sdk/model/IpConnection.java create mode 100644 src/main/java/com/telnyx/sdk/model/IpConnectionResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/IpResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListConnectionsResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListCredentialConnectionsResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListFqdnConnectionsResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListFqdnsResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListIpConnectionsResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListIpsResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/OutboundCallRecording.java create mode 100644 src/main/java/com/telnyx/sdk/model/OutboundIp.java create mode 100644 src/main/java/com/telnyx/sdk/model/OutboundVoiceProfile.java create mode 100644 src/main/java/com/telnyx/sdk/model/OutboundVoiceProfileResponse.java create mode 100644 src/main/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergency.java create mode 100644 src/main/java/com/telnyx/sdk/model/PhoneNumbersJob.java create mode 100644 src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbers.java create mode 100644 src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperation.java create mode 100644 src/main/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperation.java create mode 100644 src/main/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/ServicePlan.java create mode 100644 src/main/java/com/telnyx/sdk/model/TexmlApplication.java create mode 100644 src/main/java/com/telnyx/sdk/model/TrafficType.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateFaxApplicationRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateFqdnRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateIpConnectionRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateIpRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequest.java create mode 100644 src/main/java/com/telnyx/sdk/model/UsagePaymentMethod.java create mode 100644 src/main/java/com/telnyx/sdk/model/WebhookApiVersion.java create mode 100644 src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/IPsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/IpConnectionsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/NumberBackgroundJobsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/OutboundVoiceProfilesApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/api/TeXmlApplicationsApiTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/AnchorsiteOverrideTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ConnectionResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ConnectionRtcpSettingsTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ConnectionTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateCredentialConnectionRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInboundTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutboundTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateFqdnConnectionRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateFqdnRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateInboundIpRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateIpConnectionRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateIpRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInboundTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutboundTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CredentialConnectionResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CredentialConnectionTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CredentialInboundTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/CredentialOutboundTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/DtmfTypeTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/EncryptedMediaTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/FaxApplicationTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/FqdnConnectionResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/FqdnConnectionTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocolTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/FqdnResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/FqdnTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/InboundFqdnTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/InboundIpTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/InlineResponse2001Test.java create mode 100644 src/test/java/com/telnyx/sdk/model/InlineResponse200Test.java create mode 100644 src/test/java/com/telnyx/sdk/model/InlineResponse2011Test.java create mode 100644 src/test/java/com/telnyx/sdk/model/InlineResponse201Test.java create mode 100644 src/test/java/com/telnyx/sdk/model/IpConnectionResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/IpConnectionTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/IpResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/IpTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListConnectionsResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListCredentialConnectionsResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListFqdnConnectionsResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListFqdnsResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListIpConnectionsResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListIpsResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/OutboundCallRecordingTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/OutboundIpTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileResponseTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergencyTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperationTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperationTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/PhoneNumbersJobTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/ServicePlanTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/TexmlApplicationTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/TrafficTypeTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateFaxApplicationRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateFqdnRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateIpConnectionRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateIpRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequestTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/UsagePaymentMethodTest.java create mode 100644 src/test/java/com/telnyx/sdk/model/WebhookApiVersionTest.java diff --git a/README.md b/README.md index 61323704..ce76d799 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Add this dependency to your project's POM: com.telnyx.sdk telnyx - 2.2.0 + 2.3.0 compile ``` @@ -38,7 +38,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.telnyx.sdk:telnyx:2.2.0" +compile "com.telnyx.sdk:telnyx:2.3.0" ``` ### Others @@ -53,7 +53,7 @@ mvn clean package Then manually install the following JARs: -- `target/telnyx-2.2.0.jar` +- `target/telnyx-2.3.0.jar` - `target/lib/*.jar` ## JDK Support @@ -162,10 +162,37 @@ Class | Method | HTTP request | Description *ConferenceCommandsApi* | [**listConferenceParticipants**](docs/ConferenceCommandsApi.md#listConferenceParticipants) | **GET** /conferences/{conference_id}/participants | List conference participants *ConferenceCommandsApi* | [**listConferences**](docs/ConferenceCommandsApi.md#listConferences) | **GET** /conferences | List conferences *ConferenceCommandsApi* | [**retrieveConference**](docs/ConferenceCommandsApi.md#retrieveConference) | **GET** /conferences/{id} | Retrieve a conference +*ConnectionsApi* | [**listConnections**](docs/ConnectionsApi.md#listConnections) | **GET** /connections | List connections +*ConnectionsApi* | [**retrieveConnection**](docs/ConnectionsApi.md#retrieveConnection) | **GET** /connections/{id} | Retrieve a connection +*CredentialConnectionsApi* | [**createCredentialConnection**](docs/CredentialConnectionsApi.md#createCredentialConnection) | **POST** /credential_connections | Create a credential connection +*CredentialConnectionsApi* | [**deleteCredentialConnection**](docs/CredentialConnectionsApi.md#deleteCredentialConnection) | **DELETE** /credential_connections/{id} | Delete a credential connection +*CredentialConnectionsApi* | [**listCredentialConnections**](docs/CredentialConnectionsApi.md#listCredentialConnections) | **GET** /credential_connections | List credential connections +*CredentialConnectionsApi* | [**retrieveCredentialConnection**](docs/CredentialConnectionsApi.md#retrieveCredentialConnection) | **GET** /credential_connections/{id} | Retrieve a credential connection +*CredentialConnectionsApi* | [**updateCredentialConnection**](docs/CredentialConnectionsApi.md#updateCredentialConnection) | **PATCH** /credential_connections/{id} | Update a credential connection *CsvDownloadsApi* | [**createCsvDownload**](docs/CsvDownloadsApi.md#createCsvDownload) | **POST** /phone_numbers/csv_downloads | Create a CSV download *CsvDownloadsApi* | [**listCsvDownloads**](docs/CsvDownloadsApi.md#listCsvDownloads) | **GET** /phone_numbers/csv_downloads | List CSV downloads *CsvDownloadsApi* | [**retrieveCsvDownload**](docs/CsvDownloadsApi.md#retrieveCsvDownload) | **GET** /phone_numbers/csv_downloads/{id} | Retrieve a CSV download *DebuggingApi* | [**listCallEvents**](docs/DebuggingApi.md#listCallEvents) | **GET** /call_events | List call events +*FqdNsApi* | [**createFqdn**](docs/FqdNsApi.md#createFqdn) | **POST** /fqdns | Create an Fqdn +*FqdNsApi* | [**deleteFqdn**](docs/FqdNsApi.md#deleteFqdn) | **DELETE** /fqdns/{id} | Delete an Fqdn +*FqdNsApi* | [**listFqdns**](docs/FqdNsApi.md#listFqdns) | **GET** /fqdns | List Fqdns +*FqdNsApi* | [**retrieveFqdn**](docs/FqdNsApi.md#retrieveFqdn) | **GET** /fqdns/{id} | Retrieve an Fqdn +*FqdNsApi* | [**updateFqdn**](docs/FqdNsApi.md#updateFqdn) | **PATCH** /fqdns/{id} | Update an Fqdn +*FqdnConnectionsApi* | [**createFqdnConnection**](docs/FqdnConnectionsApi.md#createFqdnConnection) | **POST** /fqdn_connections | Create an Fqdn connection +*FqdnConnectionsApi* | [**deleteFqdnConnection**](docs/FqdnConnectionsApi.md#deleteFqdnConnection) | **DELETE** /fqdn_connections/{id} | Delete an Fqdn connection +*FqdnConnectionsApi* | [**listFqdnConnections**](docs/FqdnConnectionsApi.md#listFqdnConnections) | **GET** /fqdn_connections | List Fqdn connections +*FqdnConnectionsApi* | [**retrieveFqdnConnection**](docs/FqdnConnectionsApi.md#retrieveFqdnConnection) | **GET** /fqdn_connections/{id} | Retrieve an Fqdn connection +*FqdnConnectionsApi* | [**updateFqdnConnection**](docs/FqdnConnectionsApi.md#updateFqdnConnection) | **PATCH** /fqdn_connections/{id} | Update an Fqdn connection +*IPsApi* | [**createIp**](docs/IPsApi.md#createIp) | **POST** /ips | Create an Ip +*IPsApi* | [**deleteIp**](docs/IPsApi.md#deleteIp) | **DELETE** /ips/{id} | Delete an Ip +*IPsApi* | [**listIps**](docs/IPsApi.md#listIps) | **GET** /ips | List Ips +*IPsApi* | [**retrieveIp**](docs/IPsApi.md#retrieveIp) | **GET** /ips/{id} | Retrieve an Ip +*IPsApi* | [**updateIp**](docs/IPsApi.md#updateIp) | **PATCH** /ips/{id} | Update an Ip +*IpConnectionsApi* | [**createIpConnection**](docs/IpConnectionsApi.md#createIpConnection) | **POST** /ip_connections | Create an Ip connection +*IpConnectionsApi* | [**deleteIpConnection**](docs/IpConnectionsApi.md#deleteIpConnection) | **DELETE** /ip_connections/{id} | Delete an Ip connection +*IpConnectionsApi* | [**listIpConnections**](docs/IpConnectionsApi.md#listIpConnections) | **GET** /ip_connections | List Ip connections +*IpConnectionsApi* | [**retrieveIpConnection**](docs/IpConnectionsApi.md#retrieveIpConnection) | **GET** /ip_connections/{id} | Retrieve an Ip connection +*IpConnectionsApi* | [**updateIpConnection**](docs/IpConnectionsApi.md#updateIpConnection) | **PATCH** /ip_connections/{id} | Update an Ip connection *MessagesApi* | [**createLongCodeMessage**](docs/MessagesApi.md#createLongCodeMessage) | **POST** /messages/long_code | Send a long code message *MessagesApi* | [**createMessage**](docs/MessagesApi.md#createMessage) | **POST** /messages | Send a message *MessagesApi* | [**createNumberPoolMessage**](docs/MessagesApi.md#createNumberPoolMessage) | **POST** /messages/number_pool | Send a message using number pool @@ -186,6 +213,10 @@ Class | Method | HTTP request | Description *MessagingProfilesApi* | [**retrieveMessagingProfileDetailedMetrics**](docs/MessagingProfilesApi.md#retrieveMessagingProfileDetailedMetrics) | **GET** /messaging_profiles/{id}/metrics | Retrieve messaging profile metrics *MessagingProfilesApi* | [**updateMessagingProfile**](docs/MessagingProfilesApi.md#updateMessagingProfile) | **PATCH** /messaging_profiles/{id} | Update a messaging profile *MessagingUrlDomainsApi* | [**listMessagingUrlDomains**](docs/MessagingUrlDomainsApi.md#listMessagingUrlDomains) | **GET** /messaging_url_domains | List messaging URL domains +*NumberBackgroundJobsApi* | [**createPhoneNumbersJobDeletePhoneNumbers**](docs/NumberBackgroundJobsApi.md#createPhoneNumbersJobDeletePhoneNumbers) | **POST** /phone_numbers/jobs/delete_phone_numbers | Delete a batch of numbers +*NumberBackgroundJobsApi* | [**createPhoneNumbersJobUpdateEmergencySettings**](docs/NumberBackgroundJobsApi.md#createPhoneNumbersJobUpdateEmergencySettings) | **POST** /phone_numbers/jobs/update_emergency_settings | Update the emergency settings from a batch of numbers +*NumberBackgroundJobsApi* | [**listPhoneNumbersJobs**](docs/NumberBackgroundJobsApi.md#listPhoneNumbersJobs) | **GET** /phone_numbers/jobs | Lists the phone numbers jobs +*NumberBackgroundJobsApi* | [**retrievePhoneNumbersJob**](docs/NumberBackgroundJobsApi.md#retrievePhoneNumbersJob) | **GET** /phone_numbers/jobs/{id} | Retrieve a phone numbers job *NumberConfigurationsApi* | [**deletePhoneNumber**](docs/NumberConfigurationsApi.md#deletePhoneNumber) | **DELETE** /phone_numbers/{id} | Delete a phone number *NumberConfigurationsApi* | [**enableEmergencyPhoneNumber**](docs/NumberConfigurationsApi.md#enableEmergencyPhoneNumber) | **POST** /phone_numbers/{id}/actions/enable_emergency | Enable emergency for a phone number *NumberConfigurationsApi* | [**listPhoneNumbers**](docs/NumberConfigurationsApi.md#listPhoneNumbers) | **GET** /phone_numbers | List phone numbers @@ -213,15 +244,31 @@ Class | Method | HTTP request | Description *NumberReservationsApi* | [**listNumberReservations**](docs/NumberReservationsApi.md#listNumberReservations) | **GET** /number_reservations | List number reservations *NumberReservationsApi* | [**retrieveNumberReservation**](docs/NumberReservationsApi.md#retrieveNumberReservation) | **GET** /number_reservations/{number_reservation_id} | Retrieve a number reservation *NumberSearchApi* | [**listAvailablePhoneNumbers**](docs/NumberSearchApi.md#listAvailablePhoneNumbers) | **GET** /available_phone_numbers | List available phone numbers +*OutboundVoiceProfilesApi* | [**createOutboundVoiceProfile**](docs/OutboundVoiceProfilesApi.md#createOutboundVoiceProfile) | **POST** /outbound_voice_profiles | Create an outbound voice profile +*OutboundVoiceProfilesApi* | [**deleteOutboundVoiceProfile**](docs/OutboundVoiceProfilesApi.md#deleteOutboundVoiceProfile) | **DELETE** /outbound_voice_profiles/{id} | Delete an outbound voice profile +*OutboundVoiceProfilesApi* | [**listOutboundVoiceProfiles**](docs/OutboundVoiceProfilesApi.md#listOutboundVoiceProfiles) | **GET** /outbound_voice_profiles | Get all outbound voice profiles +*OutboundVoiceProfilesApi* | [**retrieveOutboundVoiceProfile**](docs/OutboundVoiceProfilesApi.md#retrieveOutboundVoiceProfile) | **GET** /outbound_voice_profiles/{id} | Retrieve an outbound voice profile +*OutboundVoiceProfilesApi* | [**updateOutboundVoiceProfile**](docs/OutboundVoiceProfilesApi.md#updateOutboundVoiceProfile) | **PATCH** /outbound_voice_profiles/{id} | Updates an existing outbound voice profile. +*ProgrammableFaxApplicationsApi* | [**createFaxApplication**](docs/ProgrammableFaxApplicationsApi.md#createFaxApplication) | **POST** /fax_applications | Creates a Fax Application +*ProgrammableFaxApplicationsApi* | [**deleteFaxApplication**](docs/ProgrammableFaxApplicationsApi.md#deleteFaxApplication) | **DELETE** /fax_applications/{id} | Deletes a Fax Application +*ProgrammableFaxApplicationsApi* | [**getFaxApplication**](docs/ProgrammableFaxApplicationsApi.md#getFaxApplication) | **GET** /fax_applications/{id} | Retrieve a Fax Application +*ProgrammableFaxApplicationsApi* | [**listFaxApplications**](docs/ProgrammableFaxApplicationsApi.md#listFaxApplications) | **GET** /fax_applications | List all Fax Applications +*ProgrammableFaxApplicationsApi* | [**updateFaxApplication**](docs/ProgrammableFaxApplicationsApi.md#updateFaxApplication) | **PATCH** /fax_applications/{id} | Update a Fax Application *RecordingsCommandsApi* | [**listRecordings**](docs/RecordingsCommandsApi.md#listRecordings) | **GET** /recordings | List recordings *RecordingsCommandsApi* | [**retrieveRecording**](docs/RecordingsCommandsApi.md#retrieveRecording) | **GET** /recordings/{id} | Retrieve a recording *ShortCodesApi* | [**listShortCodes**](docs/ShortCodesApi.md#listShortCodes) | **GET** /short_codes | List short codes *ShortCodesApi* | [**retrieveShortCode**](docs/ShortCodesApi.md#retrieveShortCode) | **GET** /short_codes/{id} | Retrieve a short code *ShortCodesApi* | [**updateShortCode**](docs/ShortCodesApi.md#updateShortCode) | **PATCH** /short_codes/{id} | Update short code +*TeXmlApplicationsApi* | [**createTexmlApplication**](docs/TeXmlApplicationsApi.md#createTexmlApplication) | **POST** /texml_applications | Creates a TeXML Application +*TeXmlApplicationsApi* | [**deleteTexmlApplication**](docs/TeXmlApplicationsApi.md#deleteTexmlApplication) | **DELETE** /texml_applications/{id} | Deletes a TeXML Application +*TeXmlApplicationsApi* | [**findTexmlApplications**](docs/TeXmlApplicationsApi.md#findTexmlApplications) | **GET** /texml_applications | List all TeXML Applications +*TeXmlApplicationsApi* | [**getTexmlApplication**](docs/TeXmlApplicationsApi.md#getTexmlApplication) | **GET** /texml_applications/{id} | Retrieve a TeXML Application +*TeXmlApplicationsApi* | [**updateTexmlApplication**](docs/TeXmlApplicationsApi.md#updateTexmlApplication) | **PATCH** /texml_applications/{id} | Update a TeXML Application ## Documentation for Models + - [AnchorsiteOverride](docs/AnchorsiteOverride.md) - [AnswerRequest](docs/AnswerRequest.md) - [AvailablePhoneNumber](docs/AvailablePhoneNumber.md) - [AvailablePhoneNumbersMetadata](docs/AvailablePhoneNumbersMetadata.md) @@ -338,9 +385,21 @@ Class | Method | HTTP request | Description - [ConferenceSpeakStartedEvent](docs/ConferenceSpeakStartedEvent.md) - [ConferenceUnholdRequest](docs/ConferenceUnholdRequest.md) - [ConferenceUnmuteRequest](docs/ConferenceUnmuteRequest.md) + - [Connection](docs/Connection.md) + - [ConnectionResponse](docs/ConnectionResponse.md) + - [ConnectionRtcpSettings](docs/ConnectionRtcpSettings.md) - [CostInformation](docs/CostInformation.md) - [CreateCallControlApplicationRequest](docs/CreateCallControlApplicationRequest.md) - [CreateConferenceRequest](docs/CreateConferenceRequest.md) + - [CreateCredentialConnectionRequest](docs/CreateCredentialConnectionRequest.md) + - [CreateFaxApplicationRequest](docs/CreateFaxApplicationRequest.md) + - [CreateFaxApplicationRequestInbound](docs/CreateFaxApplicationRequestInbound.md) + - [CreateFaxApplicationRequestOutbound](docs/CreateFaxApplicationRequestOutbound.md) + - [CreateFqdnConnectionRequest](docs/CreateFqdnConnectionRequest.md) + - [CreateFqdnRequest](docs/CreateFqdnRequest.md) + - [CreateInboundIpRequest](docs/CreateInboundIpRequest.md) + - [CreateIpConnectionRequest](docs/CreateIpConnectionRequest.md) + - [CreateIpRequest](docs/CreateIpRequest.md) - [CreateLongCodeMessageRequest](docs/CreateLongCodeMessageRequest.md) - [CreateMessageRequest](docs/CreateMessageRequest.md) - [CreateMessagingHostedNumberOrderRequest](docs/CreateMessagingHostedNumberOrderRequest.md) @@ -349,19 +408,37 @@ Class | Method | HTTP request | Description - [CreateNumberOrderRequest](docs/CreateNumberOrderRequest.md) - [CreateNumberPoolMessageRequest](docs/CreateNumberPoolMessageRequest.md) - [CreateNumberReservationRequest](docs/CreateNumberReservationRequest.md) + - [CreateOutboundVoiceProfileRequest](docs/CreateOutboundVoiceProfileRequest.md) - [CreateShortCodeMessageRequest](docs/CreateShortCodeMessageRequest.md) + - [CreateTexmlApplicationRequest](docs/CreateTexmlApplicationRequest.md) + - [CreateTexmlApplicationRequestInbound](docs/CreateTexmlApplicationRequestInbound.md) + - [CreateTexmlApplicationRequestOutbound](docs/CreateTexmlApplicationRequestOutbound.md) + - [CredentialConnection](docs/CredentialConnection.md) + - [CredentialConnectionResponse](docs/CredentialConnectionResponse.md) + - [CredentialInbound](docs/CredentialInbound.md) + - [CredentialOutbound](docs/CredentialOutbound.md) - [CsvDownload](docs/CsvDownload.md) - [CustomSipHeader](docs/CustomSipHeader.md) + - [DtmfType](docs/DtmfType.md) - [EmergencySettings](docs/EmergencySettings.md) + - [EncryptedMedia](docs/EncryptedMedia.md) - [Error](docs/Error.md) - [ErrorMeta](docs/ErrorMeta.md) - [ErrorSource](docs/ErrorSource.md) - [Errors](docs/Errors.md) + - [FaxApplication](docs/FaxApplication.md) + - [Fqdn](docs/Fqdn.md) + - [FqdnConnection](docs/FqdnConnection.md) + - [FqdnConnectionResponse](docs/FqdnConnectionResponse.md) + - [FqdnConnectionTransportProtocol](docs/FqdnConnectionTransportProtocol.md) + - [FqdnResponse](docs/FqdnResponse.md) - [GatherUsingAudioRequest](docs/GatherUsingAudioRequest.md) - [GatherUsingSpeakRequest](docs/GatherUsingSpeakRequest.md) - [GetRecordingResponse](docs/GetRecordingResponse.md) - [HangupRequest](docs/HangupRequest.md) - [HostedNumber](docs/HostedNumber.md) + - [InboundFqdn](docs/InboundFqdn.md) + - [InboundIp](docs/InboundIp.md) - [InboundMessage](docs/InboundMessage.md) - [InboundMessageEvent](docs/InboundMessageEvent.md) - [InboundMessagePayload](docs/InboundMessagePayload.md) @@ -370,12 +447,26 @@ Class | Method | HTTP request | Description - [InboundMessagePayloadFrom](docs/InboundMessagePayloadFrom.md) - [InboundMessagePayloadMedia](docs/InboundMessagePayloadMedia.md) - [InboundMessagePayloadTo](docs/InboundMessagePayloadTo.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse201](docs/InlineResponse201.md) + - [InlineResponse2011](docs/InlineResponse2011.md) + - [Ip](docs/Ip.md) + - [IpConnection](docs/IpConnection.md) + - [IpConnectionResponse](docs/IpConnectionResponse.md) + - [IpResponse](docs/IpResponse.md) - [JoinConferenceRequest](docs/JoinConferenceRequest.md) - [ListAvailablePhoneNumbersResponse](docs/ListAvailablePhoneNumbersResponse.md) - [ListCSVDownloadsResponse](docs/ListCSVDownloadsResponse.md) - [ListCallControlApplicationsResponse](docs/ListCallControlApplicationsResponse.md) - [ListCallEventsResponse](docs/ListCallEventsResponse.md) - [ListConferencesResponse](docs/ListConferencesResponse.md) + - [ListConnectionsResponse](docs/ListConnectionsResponse.md) + - [ListCredentialConnectionsResponse](docs/ListCredentialConnectionsResponse.md) + - [ListFqdnConnectionsResponse](docs/ListFqdnConnectionsResponse.md) + - [ListFqdnsResponse](docs/ListFqdnsResponse.md) + - [ListIpConnectionsResponse](docs/ListIpConnectionsResponse.md) + - [ListIpsResponse](docs/ListIpsResponse.md) - [ListMessagingHostedNumberOrderResponse](docs/ListMessagingHostedNumberOrderResponse.md) - [ListMessagingProfileMetricsResponse](docs/ListMessagingProfileMetricsResponse.md) - [ListMessagingProfilePhoneNumbersResponse](docs/ListMessagingProfilePhoneNumbersResponse.md) @@ -387,8 +478,10 @@ Class | Method | HTTP request | Description - [ListNumberOrderRegulatoryRequirementsResponse](docs/ListNumberOrderRegulatoryRequirementsResponse.md) - [ListNumberOrdersResponse](docs/ListNumberOrdersResponse.md) - [ListNumberReservationsResponse](docs/ListNumberReservationsResponse.md) + - [ListOutboundVoiceProfilesResponse](docs/ListOutboundVoiceProfilesResponse.md) - [ListParticipantsResponse](docs/ListParticipantsResponse.md) - [ListPhoneNumberRegulatoryRequirementsResponse](docs/ListPhoneNumberRegulatoryRequirementsResponse.md) + - [ListPhoneNumbersBackgroundJobsResponse](docs/ListPhoneNumbersBackgroundJobsResponse.md) - [ListPhoneNumbersResponse](docs/ListPhoneNumbersResponse.md) - [ListPhoneNumbersWithVoiceSettingsResponse](docs/ListPhoneNumbersWithVoiceSettingsResponse.md) - [ListRecordingsResponse](docs/ListRecordingsResponse.md) @@ -418,12 +511,16 @@ Class | Method | HTTP request | Description - [NumberPoolSettings](docs/NumberPoolSettings.md) - [NumberReservation](docs/NumberReservation.md) - [NumberReservationResponse](docs/NumberReservationResponse.md) + - [OutboundCallRecording](docs/OutboundCallRecording.md) + - [OutboundIp](docs/OutboundIp.md) - [OutboundMessage](docs/OutboundMessage.md) - [OutboundMessageEvent](docs/OutboundMessageEvent.md) - [OutboundMessagePayload](docs/OutboundMessagePayload.md) - [OutboundMessagePayloadFrom](docs/OutboundMessagePayloadFrom.md) - [OutboundMessagePayloadMedia](docs/OutboundMessagePayloadMedia.md) - [OutboundMessagePayloadTo](docs/OutboundMessagePayloadTo.md) + - [OutboundVoiceProfile](docs/OutboundVoiceProfile.md) + - [OutboundVoiceProfileResponse](docs/OutboundVoiceProfileResponse.md) - [PaginationMeta](docs/PaginationMeta.md) - [PaginationMetaSimple](docs/PaginationMetaSimple.md) - [Participant](docs/Participant.md) @@ -439,6 +536,13 @@ Class | Method | HTTP request | Description - [PhoneNumberWithMessagingSettings](docs/PhoneNumberWithMessagingSettings.md) - [PhoneNumberWithMessagingSettingsFeatures](docs/PhoneNumberWithMessagingSettingsFeatures.md) - [PhoneNumberWithVoiceSettings](docs/PhoneNumberWithVoiceSettings.md) + - [PhoneNumbersEnableEmergency](docs/PhoneNumbersEnableEmergency.md) + - [PhoneNumbersJob](docs/PhoneNumbersJob.md) + - [PhoneNumbersJobDeletePhoneNumbers](docs/PhoneNumbersJobDeletePhoneNumbers.md) + - [PhoneNumbersJobDeletePhoneNumbersRequest](docs/PhoneNumbersJobDeletePhoneNumbersRequest.md) + - [PhoneNumbersJobFailedOperation](docs/PhoneNumbersJobFailedOperation.md) + - [PhoneNumbersJobSuccessfulOperation](docs/PhoneNumbersJobSuccessfulOperation.md) + - [PhoneNumbersJobUpdateEmergencySettingsRequest](docs/PhoneNumbersJobUpdateEmergencySettingsRequest.md) - [PlayAudioUrlRequest](docs/PlayAudioUrlRequest.md) - [PlaybackStopRequest](docs/PlaybackStopRequest.md) - [Recording](docs/Recording.md) @@ -459,6 +563,7 @@ Class | Method | HTTP request | Description - [RetrieveMessagingSettingsResponse](docs/RetrieveMessagingSettingsResponse.md) - [RetrievePhoneNumberVoiceResponse](docs/RetrievePhoneNumberVoiceResponse.md) - [SendDTMFRequest](docs/SendDTMFRequest.md) + - [ServicePlan](docs/ServicePlan.md) - [ShortCode](docs/ShortCode.md) - [ShortCodeResponse](docs/ShortCodeResponse.md) - [SpeakRequest](docs/SpeakRequest.md) @@ -467,17 +572,29 @@ Class | Method | HTTP request | Description - [StopForkingRequest](docs/StopForkingRequest.md) - [StopGatherRequest](docs/StopGatherRequest.md) - [StopRecordingRequest](docs/StopRecordingRequest.md) + - [TexmlApplication](docs/TexmlApplication.md) + - [TrafficType](docs/TrafficType.md) - [TransferCallRequest](docs/TransferCallRequest.md) - [UpdateCallControlApplicationRequest](docs/UpdateCallControlApplicationRequest.md) + - [UpdateCredentialConnectionRequest](docs/UpdateCredentialConnectionRequest.md) + - [UpdateFaxApplicationRequest](docs/UpdateFaxApplicationRequest.md) + - [UpdateFqdnConnectionRequest](docs/UpdateFqdnConnectionRequest.md) + - [UpdateFqdnRequest](docs/UpdateFqdnRequest.md) + - [UpdateIpConnectionRequest](docs/UpdateIpConnectionRequest.md) + - [UpdateIpRequest](docs/UpdateIpRequest.md) - [UpdateMessagingProfileRequest](docs/UpdateMessagingProfileRequest.md) - [UpdateNumberOrderDocumentRequest](docs/UpdateNumberOrderDocumentRequest.md) - [UpdateNumberOrderRequest](docs/UpdateNumberOrderRequest.md) + - [UpdateOutboundVoiceProfileRequest](docs/UpdateOutboundVoiceProfileRequest.md) - [UpdatePhoneNumberMessagingSettingsRequest](docs/UpdatePhoneNumberMessagingSettingsRequest.md) - [UpdatePhoneNumberRequest](docs/UpdatePhoneNumberRequest.md) - [UpdatePhoneNumberVoiceSettingsRequest](docs/UpdatePhoneNumberVoiceSettingsRequest.md) - [UpdateShortCodeRequest](docs/UpdateShortCodeRequest.md) + - [UpdateTexmlApplicationRequest](docs/UpdateTexmlApplicationRequest.md) - [UploadFileMessagingHostedNumberOrderRequest](docs/UploadFileMessagingHostedNumberOrderRequest.md) - [UrlShortenerSettings](docs/UrlShortenerSettings.md) + - [UsagePaymentMethod](docs/UsagePaymentMethod.md) + - [WebhookApiVersion](docs/WebhookApiVersion.md) ## Documentation for Authorization diff --git a/api/openapi.yaml b/api/openapi.yaml index 876630e1..ad69638f 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -21,8 +21,20 @@ tags: name: Call Information - description: Conference command operations name: Conference Commands +- description: Connections operations + name: Connections +- description: Credential connection operations + name: Credential Connections - description: Call Control debugging name: Debugging +- description: FQDN connection operations + name: FQDN Connections +- description: FQDN operations + name: FQDNs +- description: IP connection operations + name: IP Connections +- description: IP operations + name: IPs - description: Messages name: Messages - description: Manage your messaging hosted numbers @@ -31,6 +43,8 @@ tags: name: Messaging Profiles - description: Messaging URL Domains name: Messaging URL Domains +- description: Background jobs performed over a batch of phone numbers + name: Number Background Jobs - description: Configure your phone numbers name: Number Configurations - description: Number order documents @@ -43,10 +57,16 @@ tags: name: Number Reservations - description: Number search name: Number Search +- description: Outbound voice profiles operations + name: Outbound Voice Profiles +- description: Fax Applications operations + name: Programmable Fax Applications - description: Recordings commands operations name: Recordings Commands - description: Short codes name: Short Codes +- description: TeXML Applications operations + name: TeXML Applications paths: /available_phone_numbers: get: @@ -242,7 +262,7 @@ paths: description: Return a list of call control applications. operationId: listCallControlApplications parameters: - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -252,7 +272,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -277,7 +297,7 @@ paths: - description: Identifies the associated outbound voice profile. explode: true in: query - name: filter[outbound.outbound_voice_profile_id] + name: filter[outbound_voice_profile_id] required: false schema: example: "1293384261075731499" @@ -555,7 +575,7 @@ paths: example: 2019-03-29T11:10:00Z type: string style: form - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -565,7 +585,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -2109,7 +2129,7 @@ paths: schema: type: string style: form - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -2119,7 +2139,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -2284,7 +2304,7 @@ paths: schema: type: boolean style: form - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -2294,7 +2314,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -2970,227 +2990,357 @@ paths: x-latency-category: interactive x-contentType: application/json x-accepts: application/json - /messages: - post: - callbacks: - deliveryUpdate: - '{$request.body#/webhook_url}': - post: - operationId: deliveryUpdate_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OutboundMessageEvent' - required: true - responses: - "200": - description: The server must return an HTTP 200, otherwise we will - reattempt delivery at the failover webhook URL. - x-callback-request: true - description: | - Send a message with a Phone Number, Alphanumeric Sender ID, Short Code or Number Pool. + /connections: + get: + description: Returns a list of your connections irrespective of type. + operationId: listConnections + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: If present, connections with connection_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. + explode: true + in: query + name: filter[connection_name][contains] + required: false + schema: + default: "null" + type: string + style: form + - description: Identifies the associated outbound voice profile. + explode: true + in: query + name: filter[outbound_voice_profile_id] + required: false + schema: + example: "1293384261075731499" + format: int64 + type: string + style: form + - description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
If not given, results are sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + default: created_at + enum: + - created_at + - connection_name + - active + example: connection_name + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Message_Response' - description: Successful response with details about a message. - default: + $ref: '#/components/schemas/List_Connections_Response' + description: Successful response with a list of connections. + "400": + description: Bad request + "401": + description: Unauthorized + "404": + description: Resource not found + summary: List connections + tags: + - Connections + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /connections/{id}: + get: + description: Retrieves the high-level details of an existing connection. To + retrieve specific authentication information, use the endpoint for the specific + connection type. + operationId: retrieveConnection + parameters: + - description: IP Connection ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Send a message + $ref: '#/components/schemas/Connection_Response' + description: Successful response with details about a connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Retrieve a connection tags: - - Messages + - Connections + x-latency-category: responsive + x-accepts: application/json + /credential_connections: + get: + description: Returns a list of your credential connections. + operationId: listCredentialConnections + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: If present, connections with connection_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. + explode: true + in: query + name: filter[connection_name][contains] + required: false + schema: + default: "null" + type: string + style: form + - description: Identifies the associated outbound voice profile. + explode: true + in: query + name: filter[outbound.outbound_voice_profile_id] + required: false + schema: + example: "1293384261075731499" + format: int64 + type: string + style: form + - description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
If not given, results are sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + default: created_at + enum: + - created_at + - connection_name + - active + example: connection_name + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Credential_Connections_Response' + description: Successful response with a list of credential connections. + "400": + description: Bad request + "401": + description: Unauthorized + "404": + description: Resource not found + summary: List credential connections + tags: + - Credential Connections + x-group-parameters: "true" x-latency-category: responsive - x-contentType: application/json x-accepts: application/json - /messages/long_code: post: - callbacks: - deliveryUpdate: - '{$request.body#/webhook_url}': - post: - operationId: deliveryUpdate_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OutboundMessageEvent' - required: true - responses: - "200": - description: The server must return an HTTP 200, otherwise we will - reattempt delivery at the failover webhook URL. - x-callback-request: true - operationId: createLongCodeMessage + description: Creates a credential connection. + operationId: createCredentialConnection + parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateLongCodeMessageRequest' - description: Message payload + $ref: '#/components/schemas/CreateCredentialConnectionRequest' + description: Parameters that can be defined during credential connection creation + required: true responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Message_Response' - description: Successful response with details about a message. - default: + "201": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Send a long code message + $ref: '#/components/schemas/Credential_Connection_Response' + description: Successful response with details about a credential connection. + "422": + description: Bad request + summary: Create a credential connection tags: - - Messages + - Credential Connections x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /messages/number_pool: - post: - callbacks: - deliveryUpdate: - '{$request.body#/webhook_url}': - post: - operationId: deliveryUpdate_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OutboundMessageEvent' - required: true - responses: - "200": - description: The server must return an HTTP 200, otherwise we will - reattempt delivery at the failover webhook URL. - x-callback-request: true - operationId: createNumberPoolMessage - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateNumberPoolMessageRequest' - description: Message payload + /credential_connections/{id}: + delete: + description: Deletes an existing credential connection. + operationId: deleteCredentialConnection + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Message_Response' - description: Successful response with details about a message. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Send a message using number pool + $ref: '#/components/schemas/Credential_Connection_Response' + description: Successful response with details about a credential connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Delete a credential connection tags: - - Messages + - Credential Connections x-latency-category: responsive - x-contentType: application/json x-accepts: application/json - /messages/short_code: - post: - callbacks: - deliveryUpdate: - '{$request.body#/webhook_url}': - post: - operationId: deliveryUpdate_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OutboundMessageEvent' - required: true - responses: - "200": - description: The server must return an HTTP 200, otherwise we will - reattempt delivery at the failover webhook URL. - x-callback-request: true - operationId: createShortCodeMessage - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateShortCodeMessageRequest' - description: Message payload + get: + description: Retrieves the details of an existing credential connection. + operationId: retrieveCredentialConnection + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Message_Response' - description: Successful response with details about a message. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Send a short code message + $ref: '#/components/schemas/Credential_Connection_Response' + description: Successful response with details about a credential connection. + "400": + description: Bad request + "401": + description: Unauthorized + "404": + description: Resource not found + summary: Retrieve a credential connection tags: - - Messages + - Credential Connections x-latency-category: responsive - x-contentType: application/json x-accepts: application/json - /messages/{id}: - get: - description: 'Note: This API endpoint can only retrieve messages that are no - older than 10 days since their creation. If you require messages older than - this, please generate an [MDR report.](https://developers.telnyx.com/docs/api/v1/reports/MDR-Reports)' - operationId: retrieveMessage + patch: + description: Updates settings of an existing credential connection. + operationId: updateCredentialConnection parameters: - - description: The id of the message + - description: Identifies the resource. explode: false in: path name: id required: true schema: - format: uuid type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCredentialConnectionRequest' + description: Parameters that can be updated in a credential connection + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Message_Response' - description: Successful response with details about a message. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Retrieve a message + $ref: '#/components/schemas/Credential_Connection_Response' + description: Successful response with details about a credential connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Update a credential connection tags: - - Messages + - Credential Connections x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /messaging_hosted_number_orders: + /fax_applications: get: - operationId: listMessagingHostedNumberOrder + description: This endpoint returns a list of your Fax Applications inside the + 'data' attribute of the response. You can adjust which applications are listed + by using filters. Fax Applications are used to configure how you send and + receive faxes using the Programmable Fax API with Telnyx. + operationId: listFaxApplications parameters: - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -3200,7 +3350,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -3211,64 +3361,114 @@ paths: minimum: 1 type: integer style: form + - description: If present, applications with application_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. + explode: true + in: query + name: filter[application_name][contains] + required: false + schema: + default: "null" + type: string + style: form + - description: Identifies the associated outbound voice profile. + explode: true + in: query + name: filter[outbound_voice_profile_id] + required: false + schema: + example: "1293384261075731499" + format: int64 + type: string + style: form + - description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
If not given, results are sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + default: created_at + enum: + - created_at + - connection_name + - active + example: connection_name + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Messaging_Hosted_Number_Order_Response' - description: Successful response with a list of messaging hosted number - orders. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List messaging hosted number orders + $ref: '#/components/schemas/inline_response_200' + description: Successful response + "400": + description: Bad request + "401": + description: Unauthorized + "404": + description: Resource not found + summary: List all Fax Applications tags: - - Messaging Hosted Number - x-group-parameters: "true" + - Programmable Fax Applications x-latency-category: responsive x-accepts: application/json post: - operationId: createMessagingHostedNumberOrder + description: Creates a new Fax Application based on the parameters sent in the + request. The application name and webhook URL are required. Once created, + you can assign phone numbers to your application using the `/phone_numbers` + endpoint. + operationId: CreateFaxApplication + parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateMessagingHostedNumberOrderRequest' - description: Message payload + $ref: '#/components/schemas/CreateFaxApplicationRequest' + description: Parameters that can be set when creating a Fax Application + required: true responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Order_Response' - description: Successful response with details about a messaging hosted number - order. - default: + "201": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Create a messaging hosted number order + $ref: '#/components/schemas/inline_response_201' + description: Successful response + "422": + description: Bad request + summary: Creates a Fax Application tags: - - Messaging Hosted Number + - Programmable Fax Applications x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /messaging_hosted_number_orders/{id}: - get: - operationId: retrieveMessagingHostedNumberOrder + /fax_applications/{id}: + delete: + description: Permanently deletes a Fax Application. Deletion may be prevented + if the application is in use by phone numbers. + operationId: DeleteFaxApplication parameters: - - description: Identifies the type of resource. + - description: Identifies the resource. explode: false in: path name: id required: true schema: + example: "1293384261075731499" + format: int64 type: string style: simple responses: @@ -3276,100 +3476,99 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Order_Response' - description: Successful response with details about a messaging hosted number - order. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Retrieve a messaging hosted number order + $ref: '#/components/schemas/inline_response_201' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Deletes a Fax Application tags: - - Messaging Hosted Number + - Programmable Fax Applications x-latency-category: responsive x-accepts: application/json - /messaging_hosted_number_orders/{id}/actions/file_upload: - post: - operationId: uploadFileMessagingHostedNumberOrder + get: + description: Return the details of an existing Fax Application inside the 'data' + attribute of the response. + operationId: getFaxApplication parameters: - - description: Identifies the type of resource. + - description: Identifies the resource. explode: false in: path name: id required: true schema: + example: "1293384261075731499" + format: int64 type: string style: simple - requestBody: - content: - multipart/form-data: - encoding: - loa: - contentType: application/pdf - style: form - bill: - contentType: application/pdf - style: form - schema: - $ref: '#/components/schemas/UploadFileMessagingHostedNumberOrderRequest' - description: Message payload responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Order_Response' - description: Successful response with details about a messaging hosted number - order. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Upload file required for a messaging hosted number order + $ref: '#/components/schemas/inline_response_201' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Retrieve a Fax Application tags: - - Messaging Hosted Number + - Programmable Fax Applications x-latency-category: responsive - x-contentType: multipart/form-data x-accepts: application/json - /messaging_hosted_numbers/{id}: - delete: - operationId: deleteMessagingHostedNumber + patch: + description: Updates settings of an existing Fax Application based on the parameters + of the request. + operationId: UpdateFaxApplication parameters: - - description: Identifies the type of resource. + - description: Identifies the resource. explode: false in: path name: id required: true schema: + example: "1293384261075731499" + format: int64 type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateFaxApplicationRequest' + description: Parameters to be updated for the Fax Application + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Response' - description: Successful response with details about a messaging hosted number. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Delete a messaging hosted number + $ref: '#/components/schemas/inline_response_201' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Update a Fax Application tags: - - Messaging Hosted Number + - Programmable Fax Applications x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /messaging_profile_metrics: + /fqdn_connections: get: - operationId: listMessagingProfileMetrics + description: Returns a list of your FQDN connections. + operationId: listFqdnConnections parameters: - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -3379,7 +3578,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -3390,29 +3589,41 @@ paths: minimum: 1 type: integer style: form - - description: The id of the messaging profile(s) to retrieve + - description: If present, connections with connection_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. explode: true in: query - name: id + name: filter[connection_name][contains] required: false schema: - format: uuid + default: "null" type: string style: form - - description: The timeframe for which you'd like to retrieve metrics. + - description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
If not given, results are sorted by created_at in descending order. explode: true in: query - name: time_frame + name: sort required: false schema: - default: 24h + default: created_at enum: - - 1h - - 3h - - 24h - - 3d - - 7d - - 30d + - created_at + - connection_name + - active + example: connection_name type: string style: form responses: @@ -3420,149 +3631,57 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/List_Messaging_Profile_Metrics_Response' - description: Successful response with a list of messaging profile metrics. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List messaging profile metrics - tags: - - Messaging Profiles - x-group-parameters: "true" - x-latency-category: responsive - x-accepts: application/json - /messaging_profiles: - get: - operationId: listMessagingProfiles - parameters: - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/List_Messaging_Profiles_Response' - description: Successful response with a list of messaging profiles. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List messaging profiles + $ref: '#/components/schemas/List_Fqdn_Connections_Response' + description: Successful response with a list of FQDN connections. + "400": + description: Bad request + "401": + description: Unauthorized + "404": + description: Resource not found + summary: List Fqdn connections tags: - - Messaging Profiles + - FQDN Connections x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json post: - callbacks: - inboundMessage: - '{$request.body#/webhook_url}': - post: - operationId: inboundMessage_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InboundMessageEvent' - required: true - responses: - "200": - description: The server must return an HTTP 200, otherwise we will - reattempt delivery at the failover webhook URL. - x-callback-request: true - deliveryUpdate: - '{$request.body#/webhook_url}': - post: - operationId: deliveryUpdate_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OutboundMessageEvent' - required: true - responses: - "200": - description: The server must return an HTTP 200, otherwise we will - reattempt delivery at the failover webhook URL. - x-callback-request: true - replacedLinkClick: - '{$request.body#/webhook_url}': - post: - operationId: replacedLinkClick_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReplacedLinkClickEvent' - required: true - responses: - "200": - description: The server must return an HTTP 200, otherwise we will - reattempt delivery at the failover webhook URL. - x-callback-request: true - operationId: createMessagingProfile + description: Creates a FQDN connection. + operationId: createFqdnConnection + parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateMessagingProfileRequest' - description: New Messaging Profile object + $ref: '#/components/schemas/CreateFqdnConnectionRequest' + description: Parameters that can be defined during FQDN connection creation required: true responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Messaging_Profile_Response' - description: Successful response with details about a messaging profile. - default: + "201": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Create a messaging profile + $ref: '#/components/schemas/Fqdn_Connection_Response' + description: Successful response with details about an FQDN connection. + "422": + description: Bad request + summary: Create an Fqdn connection tags: - - Messaging Profiles + - FQDN Connections x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /messaging_profiles/{id}: + /fqdn_connections/{id}: delete: - operationId: deleteMessagingProfile + description: Deletes an FQDN connection. + operationId: deleteFqdnConnection parameters: - - description: The id of the messaging profile to retrieve + - description: FQDN Connection ID explode: false in: path name: id required: true schema: - format: uuid type: string style: simple responses: @@ -3570,29 +3689,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Messaging_Profile_Response' - description: Successful response with details about a messaging profile. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Delete a messaging profile + $ref: '#/components/schemas/Fqdn_Connection_Response' + description: Successful response with details about an FQDN connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Delete an Fqdn connection tags: - - Messaging Profiles + - FQDN Connections x-latency-category: responsive x-accepts: application/json get: - operationId: retrieveMessagingProfile + description: Retrieves the details of an existing FQDN connection. + operationId: retrieveFqdnConnection parameters: - - description: The id of the messaging profile to retrieve + - description: FQDN Connection ID explode: false in: path name: id required: true schema: - format: uuid type: string style: simple responses: @@ -3600,84 +3719,116 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Messaging_Profile_Response' - description: Successful response with details about a messaging profile. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Retrieve a messaging profile + $ref: '#/components/schemas/Fqdn_Connection_Response' + description: Successful response with details about an FQDN connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Retrieve an Fqdn connection tags: - - Messaging Profiles + - FQDN Connections x-latency-category: responsive x-accepts: application/json patch: - operationId: updateMessagingProfile + description: Updates settings of an existing FQDN connection. + operationId: updateFqdnConnection parameters: - - description: The id of the messaging profile to retrieve + - description: FQDN Connection ID explode: false in: path name: id required: true schema: - format: uuid type: string style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateMessagingProfileRequest' - description: New Messaging Profile object + $ref: '#/components/schemas/UpdateFqdnConnectionRequest' + description: Parameters that can be updated in a FQDN connection required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Messaging_Profile_Response' - description: Successful response with details about a messaging profile. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Update a messaging profile + $ref: '#/components/schemas/Fqdn_Connection_Response' + description: Successful response with details about an FQDN connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Update an Fqdn connection tags: - - Messaging Profiles + - FQDN Connections x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /messaging_profiles/{id}/metrics: + /fqdns: get: - operationId: retrieveMessagingProfileDetailedMetrics + description: Get all FQDNs belonging to the user that match the given filters. + operationId: listFqdns parameters: - - description: The id of the messaging profile to retrieve - explode: false - in: path - name: id - required: true + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: ID of the FQDN connection to which the FQDN belongs. + explode: true + in: query + name: filter[connection_id] + required: false schema: - format: uuid type: string - style: simple - - description: The timeframe for which you'd like to retrieve metrics. + style: form + - description: FQDN represented by the resource. explode: true in: query - name: time_frame + name: filter[fqdn] required: false schema: - default: 24h - enum: - - 1h - - 3h - - 24h - - 3d - - 7d - - 30d + example: example.com + type: string + style: form + - description: Port to use when connecting to the FQDN. + explode: true + in: query + name: filter[port] + required: false + schema: + example: 5060 + type: integer + style: form + - description: DNS record type used by the FQDN. + explode: true + in: query + name: filter[dns_record_type] + required: false + schema: + example: a type: string style: form responses: @@ -3685,53 +3836,56 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Messaging_Profile_Metrics_Response' - description: Successful response with details about a messaging profile's - metrics. - default: + $ref: '#/components/schemas/List_Fqdns_Response' + description: Successful response with a list of FQDN connections. + "400": + description: Bad request + "401": + description: Unauthorized + summary: List Fqdns + tags: + - FQDNs + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + post: + description: Create a new FQDN object. + operationId: createFqdn + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFqdnRequest' + responses: + "201": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Retrieve messaging profile metrics + $ref: '#/components/schemas/Fqdn_Response' + description: Successful response with details about an FQDN connection. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Create an Fqdn tags: - - Messaging Profiles - x-group-parameters: "true" + - FQDNs x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /messaging_profiles/{id}/phone_numbers: - get: - operationId: listMessagingProfilePhoneNumbers + /fqdns/{id}: + delete: + description: Delete an FQDN. + operationId: deleteFqdn parameters: - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form - - description: The id of the messaging profile to retrieve + - description: Identifies the resource. explode: false in: path name: id required: true schema: - format: uuid + example: "1517907029795014409" + format: int64 type: string style: simple responses: @@ -3739,53 +3893,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/List_Messaging_Profile_Phone_Numbers_Response' - description: Successful response with a list of messaging profile phone - numbers. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List phone numbers associated with a messaging profile + $ref: '#/components/schemas/Fqdn_Response' + description: Successful response with details about an FQDN connection. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Delete an Fqdn tags: - - Messaging Profiles - x-group-parameters: "true" + - FQDNs x-latency-category: responsive x-accepts: application/json - /messaging_profiles/{id}/short_codes: get: - operationId: listMessagingProfileShortCodes + description: Return the details regarding a specific FQDN. + operationId: retrieveFqdn parameters: - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form - - description: The id of the messaging profile to retrieve + - description: Identifies the resource. explode: false in: path name: id required: true schema: - format: uuid + example: "1517907029795014409" + format: int64 type: string style: simple responses: @@ -3793,26 +3923,59 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/List_Messaging_Profile_Short_Codes_Response' - description: Successful response with a list of messaging profile short - codes. - default: + $ref: '#/components/schemas/Fqdn_Response' + description: Successful response with details about an FQDN connection. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Retrieve an Fqdn + tags: + - FQDNs + x-latency-category: responsive + x-accepts: application/json + patch: + description: Update the details of a specific FQDN. + operationId: updateFqdn + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1517907029795014409" + format: int64 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateFqdnRequest' + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List short codes associated with a messaging profile + $ref: '#/components/schemas/Fqdn_Response' + description: Successful response with details about an FQDN connection. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Update an Fqdn tags: - - Messaging Profiles - x-group-parameters: "true" + - FQDNs x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /messaging_url_domains: + /ip_connections: get: - operationId: listMessagingUrlDomains + description: Returns a list of your IP connections. + operationId: listIpConnections parameters: - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -3822,7 +3985,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -3833,131 +3996,107 @@ paths: minimum: 1 type: integer style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/List_Messaging_Profile_Url_Domains_Response' - description: Successful response with details about a messaging URL domain. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List messaging URL domains - tags: - - Messaging URL Domains - x-group-parameters: "true" - x-latency-category: responsive - x-accepts: application/json - /number_order_documents: - get: - description: Gets a paginated list of number order documents. - operationId: listNumberOrderDocuments - parameters: - - description: Filter number order documents by `requirement_id`. + - description: If present, connections with connection_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. explode: true in: query - name: filter[requirement_id] + name: filter[connection_name][contains] required: false schema: + default: "null" type: string style: form - - description: Filter number order documents after this datetime. + - description: Identifies the associated outbound voice profile. explode: true in: query - name: filter[created_at][gt] + name: filter[outbound.outbound_voice_profile_id] required: false schema: + example: "1293384261075731499" + format: int64 type: string style: form - - description: Filter number order documents from before this datetime. + - description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
If not given, results are sorted by created_at in descending order. explode: true in: query - name: filter[created_at][lt] + name: sort required: false schema: + default: created_at + enum: + - created_at + - connection_name + - active + example: connection_name type: string style: form - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Number_Order_Documents_Response' - description: Successful response with a list of number order documents. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List number order documents + $ref: '#/components/schemas/List_Ip_Connections_Response' + description: Successful response with a list of IP connections. + "400": + description: Bad request + "401": + description: Unauthorized + "404": + description: Resource not found + summary: List Ip connections tags: - - Number Order Documents + - IP Connections x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json post: - description: Upload a phone number order document. - operationId: createNumberOrderDocument + description: Creates an IP connection. + operationId: createIpConnection + parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateNumberOrderDocumentRequest' + $ref: '#/components/schemas/CreateIpConnectionRequest' + description: Parameters that can be defined during IP connection creation required: true responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Number_Order_Document_Response' - description: Successful response with details about a number order document. - default: + "201": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Create a number order document + $ref: '#/components/schemas/Ip_Connection_Response' + description: Successful response with details about an IP connection. + "422": + description: Bad request + summary: Create an Ip connection tags: - - Number Order Documents + - IP Connections x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /number_order_documents/{number_order_document_id}: - get: - description: Gets a single number order document. - operationId: retrieveNumberOrderDocument + /ip_connections/{id}: + delete: + description: Deletes an existing IP connection. + operationId: deleteIpConnection parameters: - - description: The number order document ID. + - description: Identifies the type of resource. explode: false in: path - name: number_order_document_id + name: id required: true schema: type: string @@ -3967,27 +4106,57 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Number_Order_Document_Response' - description: Successful response with details about a number order document. - default: + $ref: '#/components/schemas/Ip_Connection_Response' + description: Successful response with details about an IP connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Delete an Ip connection + tags: + - IP Connections + x-latency-category: responsive + x-accepts: application/json + get: + description: Retrieves the details of an existing ip connection. + operationId: retrieveIpConnection + parameters: + - description: IP Connection ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Retrieve a number order document + $ref: '#/components/schemas/Ip_Connection_Response' + description: Successful response with details about an IP connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Retrieve an Ip connection tags: - - Number Order Documents + - IP Connections x-latency-category: responsive x-accepts: application/json patch: - description: Updates a number order document. - operationId: updateNumberOrderDocument + description: Updates settings of an existing IP connection. + operationId: updateIpConnection parameters: - - description: The number order document ID. + - description: Identifies the type of resource. explode: false in: path - name: number_order_document_id + name: id required: true schema: type: string @@ -3996,99 +4165,78 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateNumberOrderDocumentRequest' + $ref: '#/components/schemas/UpdateIpConnectionRequest' + description: Parameters that can be updated in a IP connection required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Number_Order_Document_Response' - description: Successful response with details about a number order document. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Update a number order document + $ref: '#/components/schemas/Ip_Connection_Response' + description: Successful response with details about an IP connection. + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Update an Ip connection tags: - - Number Order Documents + - IP Connections x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /number_orders: + /ips: get: - description: Get a paginated list of number orders. - operationId: listNumberOrders + description: Get all IPs belonging to the user that match the given filters. + operationId: listIps parameters: - - description: Filter number orders by status. - explode: true - in: query - name: filter[status] - required: false - schema: - type: string - style: form - - description: Filter number orders later than this value. + - description: The page number to load. explode: true in: query - name: filter[created_at][gt] + name: page[number] required: false schema: - type: string + default: 1 + minimum: 1 + type: integer style: form - - description: Filter number orders earlier than this value. + - description: The size of the page. explode: true in: query - name: filter[created_at][lt] + name: page[size] required: false schema: - type: string + default: 20 + maximum: 250 + minimum: 1 + type: integer style: form - - description: Filter number orders having these phone numbers. + - description: ID of the IP Connection to which this IP should be attached. explode: true in: query - name: filter[phone_numbers.phone_number] + name: filter[connection_id] required: false schema: type: string style: form - - description: Filter number orders via the customer reference set. + - description: IP adddress represented by this resource. explode: true in: query - name: filter[customer_reference] + name: filter[ip_address] required: false schema: + example: 192.168.0.0 type: string style: form - - description: Filter number orders by requirements met. - explode: true - in: query - name: filter[requirements_met] - required: false - schema: - type: boolean - style: form - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page + - description: Port to use when connecting to this IP. explode: true in: query - name: page[size] + name: filter[port] required: false schema: - default: 20 - maximum: 250 - minimum: 1 + example: 5060 type: integer style: form responses: @@ -4096,75 +4244,56 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/List_Number_Orders_Response' - description: Successful response with a list of number orders. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List number orders + $ref: '#/components/schemas/List_Ips_Response' + description: Successful response with a list of IPs. + "400": + description: Bad request + "401": + description: Unauthorized + summary: List Ips tags: - - Number Orders + - IPs x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json post: - callbacks: - numberOrderStatusUpdate: - '{$request.body#/webhook_url}': - post: - operationId: numberOrderStatusUpdate_Post - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NumberOrderedEvent' - required: true - responses: - "200": - description: The server must return a HTTP 200, otherwise we will - reattempt to deliver the webhook to the failover URL. - x-callback-request: true - description: Creates a phone number order. - operationId: createNumberOrder + description: Create a new IP object. + operationId: createIp requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateNumberOrderRequest' - required: true + $ref: '#/components/schemas/CreateIpRequest' responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Number_Order_Response' - description: Successful response with details about a number order. - default: + "201": content: application/json: schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Create a number order + $ref: '#/components/schemas/Ip_Response' + description: Successful response with details about an IP. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Create an Ip tags: - - Number Orders + - IPs x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /number_orders/{number_order_id}: - get: - description: Get an existing phone number order. - operationId: retrieveNumberOrder + /ips/{id}: + delete: + description: Delete an IP. + operationId: deleteIp parameters: - - description: The number order ID. + - description: Identifies the type of resource. explode: false in: path - name: number_order_id + name: id required: true schema: + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: uuid type: string style: simple responses: @@ -4172,460 +4301,304 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Number_Order_Response' - description: Successful response with details about a number order. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Retrieve a number order + $ref: '#/components/schemas/Ip_Response' + description: Successful response with details about an IP. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Delete an Ip tags: - - Number Orders + - IPs x-latency-category: responsive x-accepts: application/json - patch: - description: Updates a phone number order. - operationId: updateNumberOrder + get: + description: Return the details regarding a specific IP. + operationId: retrieveIp parameters: - - description: The number order ID. + - description: Identifies the type of resource. explode: false in: path - name: number_order_id + name: id required: true schema: + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: uuid type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateNumberOrderRequest' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Number_Order_Response' - description: Successful response with details about a number order. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: Update a number order + $ref: '#/components/schemas/Ip_Response' + description: Successful response with details about an IP. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Retrieve an Ip tags: - - Number Orders + - IPs x-latency-category: responsive - x-contentType: application/json x-accepts: application/json - /number_reservations: - get: - description: Gets a paginated list of phone number reservations. - operationId: listNumberReservations + patch: + description: Update the details of a specific IP. + operationId: updateIp parameters: - - description: Filter number reservations by status. - explode: true - in: query - name: filter[status] - required: false - schema: - type: string - style: form - - description: Filter number reservations later than this value. - explode: true - in: query - name: filter[created_at][gt] - required: false - schema: - type: string - style: form - - description: Filter number reservations earlier than this value. - explode: true - in: query - name: filter[created_at][lt] - required: false - schema: - type: string - style: form - - description: Filter number reservations having these phone numbers. - explode: true - in: query - name: filter[phone_numbers.phone_number] - required: false - schema: - type: string - style: form - - description: Filter number reservations via the customer reference set. - explode: true - in: query - name: filter[customer_reference] - required: false + - description: Identifies the type of resource. + explode: false + in: path + name: id + required: true schema: + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: uuid type: string - style: form - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateIpRequest' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Number_Reservations_Response' - description: Successful response with a list of number reservations. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Errors' - description: Unexpected error - summary: List number reservations + $ref: '#/components/schemas/Ip_Response' + description: Successful response with details about an IP. + "400": + description: Bad request + "401": + description: Unauthorized + summary: Update an Ip tags: - - Number Reservations - x-group-parameters: "true" + - IPs x-latency-category: responsive + x-contentType: application/json x-accepts: application/json + /messages: post: - description: Creates a Phone Number Reservation for multiple numbers. - operationId: createNumberReservation + callbacks: + deliveryUpdate: + '{$request.body#/webhook_url}': + post: + operationId: deliveryUpdate_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OutboundMessageEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true + description: | + Send a message with a Phone Number, Alphanumeric Sender ID, Short Code or Number Pool. + + This endpoint allows you to send a message with any messaging resource. + Current messaging resources include: long-code, short-code, number-pool, and + alphanumeric-sender-id. + operationId: createMessage requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateNumberReservationRequest' - required: true + $ref: '#/components/schemas/CreateMessageRequest' + description: Message payload responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Number_Reservation_Response' - description: Successful response with details about a number reservation. + $ref: '#/components/schemas/Message_Response' + description: Successful response with details about a message. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Create a number reservation + summary: Send a message tags: - - Number Reservations + - Messages x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /number_reservations/{number_reservation_id}: - get: - description: Gets a single phone number reservation. - operationId: retrieveNumberReservation - parameters: - - description: The number reservation ID. - explode: false - in: path - name: number_reservation_id - required: true - schema: - type: string - style: simple + /messages/long_code: + post: + callbacks: + deliveryUpdate: + '{$request.body#/webhook_url}': + post: + operationId: deliveryUpdate_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OutboundMessageEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true + operationId: createLongCodeMessage + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLongCodeMessageRequest' + description: Message payload responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Number_Reservation_Response' - description: Successful response with details about a number reservation. + $ref: '#/components/schemas/Message_Response' + description: Successful response with details about a message. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Retrieve a number reservation + summary: Send a long code message tags: - - Number Reservations + - Messages x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /number_reservations/{number_reservation_id}/actions/extend: + /messages/number_pool: post: - description: Extends reservation expiry time on all phone numbers. - operationId: extendNumberReservationExpiryTime - parameters: - - description: The number reservation ID. - explode: false - in: path - name: number_reservation_id - required: true - schema: - type: string - style: simple + callbacks: + deliveryUpdate: + '{$request.body#/webhook_url}': + post: + operationId: deliveryUpdate_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OutboundMessageEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true + operationId: createNumberPoolMessage + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNumberPoolMessageRequest' + description: Message payload responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Number_Reservation_Response' - description: Successful response with details about a number reservation. + $ref: '#/components/schemas/Message_Response' + description: Successful response with details about a message. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Extend a number reservation + summary: Send a message using number pool tags: - - Number Reservations + - Messages x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /phone_number_regulatory_requirements: - get: - description: Gets a paginated list of phone number regulatory requirements. - operationId: listPhoneNumberRegulatoryRequirements - parameters: - - description: The list of phone numbers to retrieve regulatory requirements - for. - explode: true - in: query - name: filter[phone_number] - required: false - schema: - items: - type: string - type: array - style: form - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form + /messages/short_code: + post: + callbacks: + deliveryUpdate: + '{$request.body#/webhook_url}': + post: + operationId: deliveryUpdate_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OutboundMessageEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true + operationId: createShortCodeMessage + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateShortCodeMessageRequest' + description: Message payload responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Phone_Number_Regulatory_Requirements_Response' - description: Successful response with a list of phone number regulatory - requirements. + $ref: '#/components/schemas/Message_Response' + description: Successful response with details about a message. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: List regulatory requirements per number + summary: Send a short code message tags: - - Number Order Regulatory Requirements - x-group-parameters: "true" + - Messages x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /phone_numbers: + /messages/{id}: get: - operationId: listPhoneNumbers + description: 'Note: This API endpoint can only retrieve messages that are no + older than 10 days since their creation. If you require messages older than + this, please generate an [MDR report.](https://developers.telnyx.com/docs/api/v1/reports/MDR-Reports)' + operationId: retrieveMessage parameters: - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form - - description: Filter by phone number tags. - explode: true - in: query - name: filter[tag] - required: false - schema: - type: string - style: form - - description: |- - Filter by phone number. Requires at least three digits. - Non-numerical characters will result in no values being returned. - explode: true - in: query - name: filter[phone_number] - required: false - schema: - type: string - style: form - - description: Filter by phone number status. - explode: true - in: query - name: filter[status] - required: false - schema: - enum: - - purchase_pending - - purchase_failed - - port_pending - - active - - deleted - - port_failed - - emergency_only - - ported_out - - port_out_pending - example: active - type: string - style: form - - description: Filter contains connection name. Requires at least three characters. - explode: true - in: query - name: filter[voice.connection_name][contains] - required: false - schema: - example: test - type: string - style: form - - description: Filter starts with connection name. Requires at least three characters. - explode: true - in: query - name: filter[voice.connection_name][starts_with] - required: false - schema: - example: test - type: string - style: form - - description: Filter ends with connection name. Requires at least three characters. - explode: true - in: query - name: filter[voice.connection_name][ends_with] - required: false - schema: - example: test - type: string - style: form - - description: Filter by connection name. - explode: true - in: query - name: filter[voice.connection_name][eq] - required: false - schema: - example: test - type: string - style: form - - description: Filter by usage_payment_method. - explode: true - in: query - name: filter[usage_payment_method] - required: false - schema: - enum: - - pay-per-minute - - channel - example: channel - type: string - style: form - - description: Filter by the billing_group_id associated with phone numbers. - To filter to only phone numbers that have no billing group associated them, - set the value of this filter to the string 'null'. - explode: true - in: query - name: filter[billing_group_id] - required: false - schema: - example: 62e4bf2e-c278-4282-b524-488d9c9c43b2 - type: string - style: form - - description: Filter by the emergency_address_id associated with phone numbers. - To filter only phone numbers that have no emergency address associated with - them, set the value of this filter to the string 'null'. - explode: true - in: query - name: filter[emergency_address_id] - required: false - schema: - example: "9102160989215728032" - format: int64 - type: string - style: form - - description: Specifies the sort order for results. If not given, results are - sorted by created_at in descending order. - explode: true - in: query - name: sort - required: false + - description: The id of the message + explode: false + in: path + name: id + required: true schema: - enum: - - purchased_at - - phone_number - - connection_name - - usage_payment_method - example: connection_name + format: uuid type: string - style: form + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Phone_Numbers_Response' - description: Successful response with a list of phone numbers. + $ref: '#/components/schemas/Message_Response' + description: Successful response with details about a message. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: List phone numbers + summary: Retrieve a message tags: - - Number Configurations - x-group-parameters: "true" + - Messages x-latency-category: responsive x-accepts: application/json - /phone_numbers/csv_downloads: + /messaging_hosted_number_orders: get: - operationId: listCsvDownloads + operationId: listMessagingHostedNumberOrder parameters: - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -4635,7 +4608,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -4651,45 +4624,54 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/List_CSV_Downloads_Response' - description: Successful response with a list of CSV downloads. + $ref: '#/components/schemas/List_Messaging_Hosted_Number_Order_Response' + description: Successful response with a list of messaging hosted number + orders. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: List CSV downloads + summary: List messaging hosted number orders tags: - - CSV Downloads + - Messaging Hosted Number x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json post: - operationId: createCsvDownload + operationId: createMessagingHostedNumberOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMessagingHostedNumberOrderRequest' + description: Message payload responses: "200": content: application/json: schema: - $ref: '#/components/schemas/CSV_Download_Response' - description: Successful response with details about a CSV download. + $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Order_Response' + description: Successful response with details about a messaging hosted number + order. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Create a CSV download + summary: Create a messaging hosted number order tags: - - CSV Downloads - x-latency-category: background + - Messaging Hosted Number + x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /phone_numbers/csv_downloads/{id}: + /messaging_hosted_number_orders/{id}: get: - operationId: retrieveCsvDownload + operationId: retrieveMessagingHostedNumberOrder parameters: - - description: Identifies the CSV download. + - description: Identifies the type of resource. explode: false in: path name: id @@ -4702,69 +4684,100 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CSV_Download_Response' - description: Successful response with details about a CSV download. + $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Order_Response' + description: Successful response with details about a messaging hosted number + order. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Retrieve a CSV download + summary: Retrieve a messaging hosted number order tags: - - CSV Downloads - x-latency-category: background + - Messaging Hosted Number + x-latency-category: responsive x-accepts: application/json - /phone_numbers/messaging: - get: - operationId: listPhoneNumbersWithMessagingSettings + /messaging_hosted_number_orders/{id}/actions/file_upload: + post: + operationId: uploadFileMessagingHostedNumberOrder parameters: - - description: The page number to load - explode: true - in: query - name: page[number] - required: false + - description: Identifies the type of resource. + explode: false + in: path + name: id + required: true schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false + type: string + style: simple + requestBody: + content: + multipart/form-data: + encoding: + loa: + contentType: application/pdf + style: form + bill: + contentType: application/pdf + style: form + schema: + $ref: '#/components/schemas/UploadFileMessagingHostedNumberOrderRequest' + description: Message payload + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Order_Response' + description: Successful response with details about a messaging hosted number + order. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Upload file required for a messaging hosted number order + tags: + - Messaging Hosted Number + x-latency-category: responsive + x-contentType: multipart/form-data + x-accepts: application/json + /messaging_hosted_numbers/{id}: + delete: + operationId: deleteMessagingHostedNumber + parameters: + - description: Identifies the type of resource. + explode: false + in: path + name: id + required: true schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Messaging_Settings_Response' - description: Successful response with a list of phone numbers with messaging - settings. + $ref: '#/components/schemas/Retrieve_Messaging_Hosted_Number_Response' + description: Successful response with details about a messaging hosted number. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: List phone numbers with messaging settings + summary: Delete a messaging hosted number tags: - - Number Configurations - x-group-parameters: "true" + - Messaging Hosted Number x-latency-category: responsive x-accepts: application/json - /phone_numbers/voice: + /messaging_profile_metrics: get: - operationId: listPhoneNumbersWithVoiceSettings + operationId: listMessagingProfileMetrics parameters: - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -4774,7 +4787,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -4785,115 +4798,179 @@ paths: minimum: 1 type: integer style: form - - description: |- - Filter by phone number. Requires at least three digits. - Non-numerical characters will result in no values being returned. + - description: The id of the messaging profile(s) to retrieve explode: true in: query - name: filter[phone_number] + name: id required: false schema: + format: uuid type: string style: form - - description: Filter contains connection name. Requires at least three characters. + - description: The timeframe for which you'd like to retrieve metrics. explode: true in: query - name: filter[connection_name][contains] + name: time_frame required: false schema: - example: test + default: 24h + enum: + - 1h + - 3h + - 24h + - 3d + - 7d + - 30d type: string style: form - - description: Filter by usage_payment_method. + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Messaging_Profile_Metrics_Response' + description: Successful response with a list of messaging profile metrics. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List messaging profile metrics + tags: + - Messaging Profiles + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /messaging_profiles: + get: + operationId: listMessagingProfiles + parameters: + - description: The page number to load. explode: true in: query - name: filter[usage_payment_method] + name: page[number] required: false schema: - enum: - - pay-per-minute - - channel - example: channel - type: string + default: 1 + minimum: 1 + type: integer style: form - - description: Specifies the sort order for results. If not given, results are - sorted by created_at in descending order. + - description: The size of the page. explode: true in: query - name: sort + name: page[size] required: false schema: - enum: - - purchased_at - - phone_number - - connection_name - - usage_payment_method - example: connection_name - type: string + default: 20 + maximum: 250 + minimum: 1 + type: integer style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Phone_Numbers_With_Voice_Settings_Response' - description: Successful response with a list of phone numbers with voice - settings. + $ref: '#/components/schemas/List_Messaging_Profiles_Response' + description: Successful response with a list of messaging profiles. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: List phone numbers with voice settings + summary: List messaging profiles tags: - - Number Configurations + - Messaging Profiles x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json - /phone_numbers/{id}: - delete: - operationId: deletePhoneNumber - parameters: - - description: Identifies the resource. - explode: false - in: path - name: id + post: + callbacks: + inboundMessage: + '{$request.body#/webhook_url}': + post: + operationId: inboundMessage_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InboundMessageEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true + deliveryUpdate: + '{$request.body#/webhook_url}': + post: + operationId: deliveryUpdate_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OutboundMessageEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true + replacedLinkClick: + '{$request.body#/webhook_url}': + post: + operationId: replacedLinkClick_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReplacedLinkClickEvent' + required: true + responses: + "200": + description: The server must return an HTTP 200, otherwise we will + reattempt delivery at the failover webhook URL. + x-callback-request: true + operationId: createMessagingProfile + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMessagingProfileRequest' + description: New Messaging Profile object required: true - schema: - example: "1293384261075731499" - format: int64 - type: string - style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Phone_Number_Response' - description: Successful response with details about a phone number. + $ref: '#/components/schemas/Messaging_Profile_Response' + description: Successful response with details about a messaging profile. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Delete a phone number + summary: Create a messaging profile tags: - - Number Configurations + - Messaging Profiles x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - get: - operationId: retrievePhoneNumber + /messaging_profiles/{id}: + delete: + operationId: deleteMessagingProfile parameters: - - description: Identifies the resource. + - description: The id of the messaging profile to retrieve explode: false in: path name: id required: true schema: - example: "1293384261075731499" - format: int64 + format: uuid type: string style: simple responses: @@ -4901,184 +4978,222 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Phone_Number_Response' - description: Successful response with details about a phone number. + $ref: '#/components/schemas/Messaging_Profile_Response' + description: Successful response with details about a messaging profile. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Retrieve a phone number + summary: Delete a messaging profile tags: - - Number Configurations + - Messaging Profiles x-latency-category: responsive x-accepts: application/json - patch: - operationId: updatePhoneNumber + get: + operationId: retrieveMessagingProfile parameters: - - description: Identifies the resource. + - description: The id of the messaging profile to retrieve explode: false in: path name: id required: true schema: - example: "1293384261075731499" - format: int64 + format: uuid type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePhoneNumberRequest' - description: Updated settings for the phone number. - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Phone_Number_Response' - description: Successful response with details about a phone number. + $ref: '#/components/schemas/Messaging_Profile_Response' + description: Successful response with details about a messaging profile. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Update a phone number + summary: Retrieve a messaging profile tags: - - Number Configurations + - Messaging Profiles x-latency-category: responsive - x-contentType: application/json x-accepts: application/json - /phone_numbers/{id}/actions/enable_emergency: - post: - operationId: enableEmergencyPhoneNumber + patch: + operationId: updateMessagingProfile parameters: - - description: Identifies the resource. + - description: The id of the messaging profile to retrieve explode: false in: path name: id required: true schema: - example: "1293384261075731499" - format: int64 + format: uuid type: string style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/PhoneNumberEnableEmergencyRequest' + $ref: '#/components/schemas/UpdateMessagingProfileRequest' + description: New Messaging Profile object required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Phone_Number_Enable_Emergency' - description: Phone number emergency enabled. - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/Phone_Number_Enable_Emergency' - description: Phone number emergency requested. + $ref: '#/components/schemas/Messaging_Profile_Response' + description: Successful response with details about a messaging profile. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Enable emergency for a phone number + summary: Update a messaging profile tags: - - Number Configurations + - Messaging Profiles x-latency-category: responsive x-contentType: application/json x-accepts: application/json - /phone_numbers/{id}/messaging: + /messaging_profiles/{id}/metrics: get: - operationId: retrievePhoneNumberWithMessagingSettings + operationId: retrieveMessagingProfileDetailedMetrics parameters: - - description: Identifies the type of resource. + - description: The id of the messaging profile to retrieve explode: false in: path name: id required: true schema: + format: uuid type: string style: simple + - description: The timeframe for which you'd like to retrieve metrics. + explode: true + in: query + name: time_frame + required: false + schema: + default: 24h + enum: + - 1h + - 3h + - 24h + - 3d + - 7d + - 30d + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Messaging_Settings_Response' - description: Successful response with details about a phone number including - voice settings. + $ref: '#/components/schemas/Retrieve_Messaging_Profile_Metrics_Response' + description: Successful response with details about a messaging profile's + metrics. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Retrieve a phone number with messaging settings + summary: Retrieve messaging profile metrics tags: - - Number Configurations + - Messaging Profiles + x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json - patch: - operationId: updatePhoneNumberWithMessagingSettings + /messaging_profiles/{id}/phone_numbers: + get: + operationId: listMessagingProfilePhoneNumbers parameters: - - description: Identifies the type of resource. + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: The id of the messaging profile to retrieve explode: false in: path name: id required: true schema: + format: uuid type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePhoneNumberMessagingSettingsRequest' - description: Updated messaging settings for the phone number - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Messaging_Settings_Response' - description: Successful response with details about a phone number including - voice settings. + $ref: '#/components/schemas/List_Messaging_Profile_Phone_Numbers_Response' + description: Successful response with a list of messaging profile phone + numbers. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Update a phone number with messaging settings + summary: List phone numbers associated with a messaging profile tags: - - Number Configurations + - Messaging Profiles + x-group-parameters: "true" x-latency-category: responsive - x-contentType: application/json x-accepts: application/json - /phone_numbers/{id}/voice: + /messaging_profiles/{id}/short_codes: get: - operationId: retrievePhoneNumberWithVoiceSettings + operationId: listMessagingProfileShortCodes parameters: - - description: Identifies the resource. + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: The id of the messaging profile to retrieve explode: false in: path name: id required: true schema: - example: "1293384261075731499" - format: int64 + format: uuid type: string style: simple responses: @@ -5086,95 +5201,95 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Phone_Number_Voice_Response' - description: Successful response with details about a phone number including - voice settings. + $ref: '#/components/schemas/List_Messaging_Profile_Short_Codes_Response' + description: Successful response with a list of messaging profile short + codes. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Retrieve a phone number with voice settings + summary: List short codes associated with a messaging profile tags: - - Number Configurations + - Messaging Profiles + x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json - patch: - operationId: updatePhoneNumberWithVoiceSettings + /messaging_url_domains: + get: + operationId: listMessagingUrlDomains parameters: - - description: Identifies the resource. - explode: false - in: path - name: id - required: true + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false schema: - example: "1293384261075731499" - format: int64 - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePhoneNumberVoiceSettingsRequest' - description: Updated voice settings for the phone number. - required: true + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Retrieve_Phone_Number_Voice_Response' - description: Successful response with details about a phone number including - voice settings. + $ref: '#/components/schemas/List_Messaging_Profile_Url_Domains_Response' + description: Successful response with details about a messaging URL domain. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Update a phone number with voice settings + summary: List messaging URL domains tags: - - Number Configurations + - Messaging URL Domains + x-group-parameters: "true" x-latency-category: responsive - x-contentType: application/json x-accepts: application/json - /recordings: + /number_order_documents: get: - description: Lists recordings for the authenticated user - operationId: listRecordings + description: Gets a paginated list of number order documents. + operationId: listNumberOrderDocuments parameters: - - description: Return only recordings associated with a given conference + - description: Filter number order documents by `requirement_id`. explode: true in: query - name: filter[conference_id] + name: filter[requirement_id] required: false schema: - example: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 type: string style: form - - description: Return only recordings created later than or at given ISO 8601 - datetime + - description: Filter number order documents after this datetime. explode: true in: query - name: filter[created_at][gte] + name: filter[created_at][gt] required: false schema: - example: 2019-03-29T11:10:00Z type: string style: form - - description: Return only recordings created earlier than or at given ISO 8601 - datetime + - description: Filter number order documents from before this datetime. explode: true in: query - name: filter[created_at][lte] + name: filter[created_at][lt] required: false schema: - example: 2019-03-29T11:10:00Z type: string style: form - - description: The page number to load + - description: The page number to load. explode: true in: query name: page[number] @@ -5184,7 +5299,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -5200,27 +5315,57 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/List_Recordings_Response' - description: Successful response with a list of recordings. - "401": - description: Unauthorized - "422": - description: Unprocessable entity - summary: List recordings + $ref: '#/components/schemas/List_Number_Order_Documents_Response' + description: Successful response with a list of number order documents. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List number order documents tags: - - Recordings Commands + - Number Order Documents x-group-parameters: "true" - x-latency-category: interactive + x-latency-category: responsive x-accepts: application/json - /recordings/{id}: + post: + description: Upload a phone number order document. + operationId: createNumberOrderDocument + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNumberOrderDocumentRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Number_Order_Document_Response' + description: Successful response with details about a number order document. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Create a number order document + tags: + - Number Order Documents + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /number_order_documents/{number_order_document_id}: get: - description: Retrieve a recording from the authenticated user's recordings - operationId: retrieveRecording + description: Gets a single number order document. + operationId: retrieveNumberOrderDocument parameters: - - description: Uniquely identifies the recording + - description: The number order document ID. explode: false in: path - name: id + name: number_order_document_id required: true schema: type: string @@ -5230,47 +5375,110 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Get_Recording_Response' - description: Successful response with details about a recording. - "401": - description: Unauthorized - "404": - description: Conference does not exist - summary: Retrieve a recording + $ref: '#/components/schemas/Number_Order_Document_Response' + description: Successful response with details about a number order document. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a number order document tags: - - Recordings Commands - x-latency-category: interactive + - Number Order Documents + x-latency-category: responsive x-accepts: application/json - /regulatory_requirements: + patch: + description: Updates a number order document. + operationId: updateNumberOrderDocument + parameters: + - description: The number order document ID. + explode: false + in: path + name: number_order_document_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateNumberOrderDocumentRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Number_Order_Document_Response' + description: Successful response with details about a number order document. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Update a number order document + tags: + - Number Order Documents + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /number_orders: get: - description: Gets a paginated list of number order regulatory requirements. - operationId: listNumberOrderRegulatoryRequirements + description: Get a paginated list of number orders. + operationId: listNumberOrders parameters: - - description: Filter number order regulatory requirements by `requirement_id`. + - description: Filter number orders by status. explode: true in: query - name: filter[requirement_id] + name: filter[status] required: false schema: type: string style: form - - description: Filter number order regulatory requirements by `field_type`. + - description: Filter number orders later than this value. explode: true in: query - name: filter[field_type] + name: filter[created_at][gt] required: false schema: type: string style: form - - description: Filter number order regulatory requirements by `requirement_type`. + - description: Filter number orders earlier than this value. explode: true in: query - name: filter[requirement_type] + name: filter[created_at][lt] + required: false + schema: + type: string + style: form + - description: Filter number orders having these phone numbers. + explode: true + in: query + name: filter[phone_numbers.phone_number] + required: false + schema: + type: string + style: form + - description: Filter number orders via the customer reference set. + explode: true + in: query + name: filter[customer_reference] required: false schema: type: string style: form - - description: The page number to load + - description: Filter number orders by requirements met. + explode: true + in: query + name: filter[requirements_met] + required: false + schema: + type: boolean + style: form + - description: The page number to load. explode: true in: query name: page[number] @@ -5280,7 +5488,7 @@ paths: minimum: 1 type: integer style: form - - description: The size of the page + - description: The size of the page. explode: true in: query name: page[size] @@ -5296,470 +5504,2451 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/List_Number_Order_Regulatory_Requirements_Response' - description: Successful response with a list of number order regulatory - requirements. + $ref: '#/components/schemas/List_Number_Orders_Response' + description: Successful response with a list of number orders. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: List number order regulatory requirements + summary: List number orders tags: - - Number Order Regulatory Requirements + - Number Orders x-group-parameters: "true" x-latency-category: responsive x-accepts: application/json - /regulatory_requirements/{requirement_id}: - get: - description: Gets a single number order regulatory requirement. - operationId: retrieveNumberOrderRegulatoryRequirement - parameters: - - description: The number order regulatory requirement ID. - explode: false - in: path - name: requirement_id + post: + callbacks: + numberOrderStatusUpdate: + '{$request.body#/webhook_url}': + post: + operationId: numberOrderStatusUpdate_Post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NumberOrderedEvent' + required: true + responses: + "200": + description: The server must return a HTTP 200, otherwise we will + reattempt to deliver the webhook to the failover URL. + x-callback-request: true + description: Creates a phone number order. + operationId: createNumberOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateNumberOrderRequest' required: true - schema: - type: string - style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Number_Order_Regulatory_Requirement_Response' - description: Successful response with details about a number order regulatory - requirement. + $ref: '#/components/schemas/Number_Order_Response' + description: Successful response with details about a number order. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Retrieve a number order regulatory requirement + summary: Create a number order tags: - - Number Order Regulatory Requirements + - Number Orders x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - /short_codes: + /number_orders/{number_order_id}: get: - operationId: listShortCodes + description: Get an existing phone number order. + operationId: retrieveNumberOrder parameters: - - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form - - description: Filter by Messaging Profile ID. Use the string `null` for phone - numbers without assigned profiles. A synonym for the `/messaging_profiles/{id}/short_codes` - endpoint when querying about an extant profile. - explode: true - in: query - name: filter[messaging_profile_id] - required: false + - description: The number order ID. + explode: false + in: path + name: number_order_id + required: true schema: type: string - style: form + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/List_Short_Codes_Response' - description: Successful response with a list of short codes. + $ref: '#/components/schemas/Number_Order_Response' + description: Successful response with details about a number order. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: List short codes + summary: Retrieve a number order tags: - - Short Codes - x-group-parameters: "true" + - Number Orders x-latency-category: responsive x-accepts: application/json - /short_codes/{id}: - get: - operationId: retrieveShortCode + patch: + description: Updates a phone number order. + operationId: updateNumberOrder parameters: - - description: The id of the short code + - description: The number order ID. explode: false in: path - name: id + name: number_order_id required: true schema: - format: uuid type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateNumberOrderRequest' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Short_Code_Response' - description: Successful response with details about a short code. + $ref: '#/components/schemas/Number_Order_Response' + description: Successful response with details about a number order. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Retrieve a short code + summary: Update a number order tags: - - Short Codes + - Number Orders x-latency-category: responsive + x-contentType: application/json x-accepts: application/json - patch: - description: Update the settings for a specific short code. To unbind a short - code from a profile, set the `messaging_profile_id` to `null` or an empty - string. - operationId: updateShortCode + /number_reservations: + get: + description: Gets a paginated list of phone number reservations. + operationId: listNumberReservations parameters: - - description: The id of the short code - explode: false - in: path - name: id - required: true + - description: Filter number reservations by status. + explode: true + in: query + name: filter[status] + required: false schema: - format: uuid type: string - style: simple + style: form + - description: Filter number reservations later than this value. + explode: true + in: query + name: filter[created_at][gt] + required: false + schema: + type: string + style: form + - description: Filter number reservations earlier than this value. + explode: true + in: query + name: filter[created_at][lt] + required: false + schema: + type: string + style: form + - description: Filter number reservations having these phone numbers. + explode: true + in: query + name: filter[phone_numbers.phone_number] + required: false + schema: + type: string + style: form + - description: Filter number reservations via the customer reference set. + explode: true + in: query + name: filter[customer_reference] + required: false + schema: + type: string + style: form + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Number_Reservations_Response' + description: Successful response with a list of number reservations. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List number reservations + tags: + - Number Reservations + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + post: + description: Creates a Phone Number Reservation for multiple numbers. + operationId: createNumberReservation requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateShortCodeRequest' - description: Short code update + $ref: '#/components/schemas/CreateNumberReservationRequest' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Short_Code_Response' - description: Successful response with details about a short code. + $ref: '#/components/schemas/Number_Reservation_Response' + description: Successful response with details about a number reservation. default: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error - summary: Update short code + summary: Create a number reservation tags: - - Short Codes + - Number Reservations x-latency-category: responsive x-contentType: application/json x-accepts: application/json -components: - callbacks: {} - examples: {} - headers: {} - links: {} - parameters: - CallControlId: - description: Unique identifier and token for controlling the call - explode: false - in: path - name: call_control_id - required: true - schema: - type: string - style: simple - FilterApplicationName: - description: If present, applications with application_name containing - the given value will be returned. Matching is not case-sensitive. Requires - at least three characters. - explode: true - in: query - name: filter[application_name][contains] - required: false - schema: - default: "null" - type: string - style: form - FilterCallEventStatus: - description: Event status - explode: true - in: query - name: filter[status] - required: false - schema: - enum: - - delivered - - failed - example: delivered - type: string - style: form - FilterCallEventTimestampEqualTo: - description: 'Event timestamp: equal' - explode: true - in: query - name: filter[event_timestamp][eq] - required: false - schema: - example: 2019-03-29T11:10:00Z - type: string - style: form - FilterCallEventTimestampGreaterThan: - description: 'Event timestamp: greater than' - explode: true - in: query - name: filter[event_timestamp][gt] - required: false - schema: - example: 2019-03-29T11:10:00Z - type: string - style: form - FilterCallEventTimestampGreaterThanOrEqualTo: - description: 'Event timestamp: greater than or equal' - explode: true - in: query - name: filter[event_timestamp][gte] - required: false - schema: - example: 2019-03-29T11:10:00Z - type: string - style: form - FilterCallEventTimestampLessThan: - description: 'Event timestamp: lower than' - explode: true - in: query - name: filter[event_timestamp][lt] - required: false - schema: - example: 2019-03-29T11:10:00Z - type: string - style: form - FilterCallEventTimestampLessThanOrEqualTo: - description: 'Event timestamp: lower than or equal' - explode: true - in: query - name: filter[event_timestamp][lte] - required: false - schema: - example: 2019-03-29T11:10:00Z - type: string - style: form - FilterCallEventType: - description: Event type - explode: true - in: query - name: filter[type] - required: false - schema: - enum: - - command - - webhook - example: webhook - type: string - style: form - FilterCallLegId: - description: The unique identifier of an individual call leg. - explode: true - in: query - name: filter[call_leg_id] - required: false - schema: - format: uuid - type: string - style: form - FilterCallSessionId: - description: The unique identifier of the call control session. A session may - include multiple call leg events. - explode: true - in: query - name: filter[call_session_id] - required: false - schema: - format: uuid - type: string - style: form - FilterConferenceName: - description: If present, conferences will be filtered to those with a matching - `name` attribute. Matching is case-sensitive - explode: true - in: query - name: filter[name] - required: false - schema: - type: string - style: form - FilterOutboundVoiceProfileId: - description: Identifies the associated outbound voice profile. - explode: true - in: query - name: filter[outbound.outbound_voice_profile_id] - required: false - schema: - example: "1293384261075731499" - format: int64 - type: string - style: form - IntId: - description: Identifies the resource. - explode: false - in: path - name: id - required: true - schema: - example: "1293384261075731499" - format: int64 - type: string - style: simple - MessagingProfileId: - description: The id of the messaging profile to retrieve - explode: false - in: path - name: id - required: true - schema: - format: uuid - type: string - style: simple - MessagingProfileMetric: - description: The id of the messaging profile(s) to retrieve - explode: true - in: query - name: id - required: false - schema: - format: uuid - type: string - style: form - MessagingProfileMetricTimeFrame: - description: The timeframe for which you'd like to retrieve metrics. - explode: true - in: query - name: time_frame - required: false - schema: - default: 24h - enum: - - 1h - - 3h - - 24h - - 3d - - 7d - - 30d - type: string - style: form - PageNumber: - description: The page number to load - explode: true - in: query - name: page[number] - required: false - schema: - default: 1 - minimum: 1 - type: integer - style: form - PageSize: - description: The size of the page - explode: true - in: query - name: page[size] - required: false - schema: - default: 20 - maximum: 250 - minimum: 1 - type: integer - style: form - ShortCodeId: - description: The id of the short code - explode: false - in: path - name: id - required: true - schema: - format: uuid - type: string - style: simple - SortConnection: - description: |- - Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

- That is:
+ explode: true + in: query + name: sort + required: false + schema: + default: -created_at + enum: + - enabled + - -enabled + - created_at + - -created_at + - name + - -name + - service_plan + - -service_plan + - traffic_type + - -traffic_type + - usage_payment_method + - -usage_payment_method + example: name + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Outbound_Voice_Profiles_Response' + description: Successful response + "401": + description: Unauthorized + "422": + description: Bad request + summary: Get all outbound voice profiles + tags: + - Outbound Voice Profiles + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + post: + description: Create an outbound voice profile. + operationId: createOutboundVoiceProfile + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOutboundVoiceProfileRequest' + description: Parameters that can be defined when creating an outbound voice + profile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Outbound_Voice_Profile_Response' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Create an outbound voice profile + tags: + - Outbound Voice Profiles + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /outbound_voice_profiles/{id}: + delete: + description: Deletes an existing outbound voice profile. + operationId: deleteOutboundVoiceProfile + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Outbound_Voice_Profile_Response' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Delete an outbound voice profile + tags: + - Outbound Voice Profiles + x-latency-category: responsive + x-accepts: application/json + get: + description: Retrieves the details of an existing outbound voice profile. + operationId: retrieveOutboundVoiceProfile + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Outbound_Voice_Profile_Response' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Retrieve an outbound voice profile + tags: + - Outbound Voice Profiles + x-latency-category: responsive + x-accepts: application/json + patch: + description: Updates an existing outbound voice profile. + operationId: updateOutboundVoiceProfile + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateOutboundVoiceProfileRequest' + description: Parameters that can be updated on an outbound voice profile + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Outbound_Voice_Profile_Response' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Updates an existing outbound voice profile. + tags: + - Outbound Voice Profiles + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /phone_number_regulatory_requirements: + get: + description: Gets a paginated list of phone number regulatory requirements. + operationId: listPhoneNumberRegulatoryRequirements + parameters: + - description: The list of phone numbers to retrieve regulatory requirements + for. + explode: true + in: query + name: filter[phone_number] + required: false + schema: + items: + type: string + type: array + style: form + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Phone_Number_Regulatory_Requirements_Response' + description: Successful response with a list of phone number regulatory + requirements. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List regulatory requirements per number + tags: + - Number Order Regulatory Requirements + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /phone_numbers: + get: + operationId: listPhoneNumbers + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: Filter by phone number tags. + explode: true + in: query + name: filter[tag] + required: false + schema: + type: string + style: form + - description: |- + Filter by phone number. Requires at least three digits. + Non-numerical characters will result in no values being returned. + explode: true + in: query + name: filter[phone_number] + required: false + schema: + type: string + style: form + - description: Filter by phone number status. + explode: true + in: query + name: filter[status] + required: false + schema: + enum: + - purchase_pending + - purchase_failed + - port_pending + - active + - deleted + - port_failed + - emergency_only + - ported_out + - port_out_pending + example: active + type: string + style: form + - description: Filter contains connection name. Requires at least three characters. + explode: true + in: query + name: filter[voice.connection_name][contains] + required: false + schema: + example: test + type: string + style: form + - description: Filter starts with connection name. Requires at least three characters. + explode: true + in: query + name: filter[voice.connection_name][starts_with] + required: false + schema: + example: test + type: string + style: form + - description: Filter ends with connection name. Requires at least three characters. + explode: true + in: query + name: filter[voice.connection_name][ends_with] + required: false + schema: + example: test + type: string + style: form + - description: Filter by connection name. + explode: true + in: query + name: filter[voice.connection_name][eq] + required: false + schema: + example: test + type: string + style: form + - description: Filter by usage_payment_method. + explode: true + in: query + name: filter[usage_payment_method] + required: false + schema: + enum: + - pay-per-minute + - channel + example: channel + type: string + style: form + - description: Filter by the billing_group_id associated with phone numbers. + To filter to only phone numbers that have no billing group associated them, + set the value of this filter to the string 'null'. + explode: true + in: query + name: filter[billing_group_id] + required: false + schema: + example: 62e4bf2e-c278-4282-b524-488d9c9c43b2 + type: string + style: form + - description: Filter by the emergency_address_id associated with phone numbers. + To filter only phone numbers that have no emergency address associated with + them, set the value of this filter to the string 'null'. + explode: true + in: query + name: filter[emergency_address_id] + required: false + schema: + example: "9102160989215728032" + format: int64 + type: string + style: form + - description: Filter numbers via the customer_reference set. + explode: true + in: query + name: filter[customer_reference] + required: false + schema: + example: MY REF 001 + type: string + style: form + - description: Specifies the sort order for results. If not given, results are + sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + enum: + - purchased_at + - phone_number + - connection_name + - usage_payment_method + example: connection_name + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Phone_Numbers_Response' + description: Successful response with a list of phone numbers. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List phone numbers + tags: + - Number Configurations + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /phone_numbers/csv_downloads: + get: + operationId: listCsvDownloads + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_CSV_Downloads_Response' + description: Successful response with a list of CSV downloads. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List CSV downloads + tags: + - CSV Downloads + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + post: + operationId: createCsvDownload + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CSV_Download_Response' + description: Successful response with details about a CSV download. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Create a CSV download + tags: + - CSV Downloads + x-latency-category: background + x-accepts: application/json + /phone_numbers/csv_downloads/{id}: + get: + operationId: retrieveCsvDownload + parameters: + - description: Identifies the CSV download. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CSV_Download_Response' + description: Successful response with details about a CSV download. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a CSV download + tags: + - CSV Downloads + x-latency-category: background + x-accepts: application/json + /phone_numbers/jobs: + get: + operationId: listPhoneNumbersJobs + parameters: + - description: Filter the phone number jobs by type. + explode: true + in: query + name: filter[type] + required: false + schema: + description: Identifies the type of the background job. + enum: + - update_emergency_settings + - delete_phone_numbers + example: update_emergency_settings + type: string + style: form + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: Specifies the sort order for results. If not given, results are + sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + enum: + - created_at + example: created_at + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Phone_Numbers_Background_Jobs_Response' + description: Successful response with a list of phone numbers background + jobs. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Lists the phone numbers jobs + tags: + - Number Background Jobs + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /phone_numbers/jobs/delete_phone_numbers: + post: + description: Creates a new background job to delete a batch of numbers. At most + one thousand numbers can be updated per API call. + operationId: createPhoneNumbersJobDeletePhoneNumbers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PhoneNumbersJobDeletePhoneNumbersRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Numbers_Job_Delete_Phone_Numbers' + description: Phone numbers job delete phone numbers requested. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Delete a batch of numbers + tags: + - Number Background Jobs + x-latency-category: background + x-group-parameters: "true" + x-contentType: application/json + x-accepts: application/json + /phone_numbers/jobs/update_emergency_settings: + post: + description: Creates a background job to update the emergency settings of a + collection of phone numbers. At most one thousand numbers can be updated per + API call. + operationId: createPhoneNumbersJobUpdateEmergencySettings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PhoneNumbersJobUpdateEmergencySettingsRequest' + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Numbers_Enable_Emergency' + description: Phone numbers enable emergency requested. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Update the emergency settings from a batch of numbers + tags: + - Number Background Jobs + x-latency-category: background + x-contentType: application/json + x-accepts: application/json + /phone_numbers/jobs/{id}: + get: + operationId: retrievePhoneNumbersJob + parameters: + - description: Identifies the Phone Numbers Job. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Numbers_Job' + description: Phone numbers job details. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a phone numbers job + tags: + - Number Background Jobs + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /phone_numbers/messaging: + get: + operationId: listPhoneNumbersWithMessagingSettings + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Messaging_Settings_Response' + description: Successful response with a list of phone numbers with messaging + settings. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List phone numbers with messaging settings + tags: + - Number Configurations + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /phone_numbers/voice: + get: + operationId: listPhoneNumbersWithVoiceSettings + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: |- + Filter by phone number. Requires at least three digits. + Non-numerical characters will result in no values being returned. + explode: true + in: query + name: filter[phone_number] + required: false + schema: + type: string + style: form + - description: Filter contains connection name. Requires at least three characters. + explode: true + in: query + name: filter[connection_name][contains] + required: false + schema: + example: test + type: string + style: form + - description: Filter numbers via the customer_reference set. + explode: true + in: query + name: filter[customer_reference] + required: false + schema: + type: string + style: form + - description: Filter by usage_payment_method. + explode: true + in: query + name: filter[usage_payment_method] + required: false + schema: + enum: + - pay-per-minute + - channel + example: channel + type: string + style: form + - description: Specifies the sort order for results. If not given, results are + sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + enum: + - purchased_at + - phone_number + - connection_name + - usage_payment_method + example: connection_name + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Phone_Numbers_With_Voice_Settings_Response' + description: Successful response with a list of phone numbers with voice + settings. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List phone numbers with voice settings + tags: + - Number Configurations + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /phone_numbers/{id}: + delete: + operationId: deletePhoneNumber + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Number_Response' + description: Successful response with details about a phone number. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Delete a phone number + tags: + - Number Configurations + x-latency-category: responsive + x-accepts: application/json + get: + operationId: retrievePhoneNumber + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Number_Response' + description: Successful response with details about a phone number. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a phone number + tags: + - Number Configurations + x-latency-category: responsive + x-accepts: application/json + patch: + operationId: updatePhoneNumber + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePhoneNumberRequest' + description: Updated settings for the phone number. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Number_Response' + description: Successful response with details about a phone number. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Update a phone number + tags: + - Number Configurations + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /phone_numbers/{id}/actions/enable_emergency: + post: + operationId: enableEmergencyPhoneNumber + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PhoneNumberEnableEmergencyRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Number_Enable_Emergency' + description: Phone number emergency enabled. + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/Phone_Number_Enable_Emergency' + description: Phone number emergency requested. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Enable emergency for a phone number + tags: + - Number Configurations + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /phone_numbers/{id}/messaging: + get: + operationId: retrievePhoneNumberWithMessagingSettings + parameters: + - description: Identifies the type of resource. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Retrieve_Messaging_Settings_Response' + description: Successful response with details about a phone number including + voice settings. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a phone number with messaging settings + tags: + - Number Configurations + x-latency-category: responsive + x-accepts: application/json + patch: + operationId: updatePhoneNumberWithMessagingSettings + parameters: + - description: Identifies the type of resource. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePhoneNumberMessagingSettingsRequest' + description: Updated messaging settings for the phone number + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Retrieve_Messaging_Settings_Response' + description: Successful response with details about a phone number including + voice settings. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Update a phone number with messaging settings + tags: + - Number Configurations + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /phone_numbers/{id}/voice: + get: + operationId: retrievePhoneNumberWithVoiceSettings + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Retrieve_Phone_Number_Voice_Response' + description: Successful response with details about a phone number including + voice settings. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a phone number with voice settings + tags: + - Number Configurations + x-latency-category: responsive + x-accepts: application/json + patch: + operationId: updatePhoneNumberWithVoiceSettings + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePhoneNumberVoiceSettingsRequest' + description: Updated voice settings for the phone number. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Retrieve_Phone_Number_Voice_Response' + description: Successful response with details about a phone number including + voice settings. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Update a phone number with voice settings + tags: + - Number Configurations + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /recordings: + get: + description: Lists recordings for the authenticated user + operationId: listRecordings + parameters: + - description: Return only recordings associated with a given conference + explode: true + in: query + name: filter[conference_id] + required: false + schema: + example: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + type: string + style: form + - description: Return only recordings created later than or at given ISO 8601 + datetime + explode: true + in: query + name: filter[created_at][gte] + required: false + schema: + example: 2019-03-29T11:10:00Z + type: string + style: form + - description: Return only recordings created earlier than or at given ISO 8601 + datetime + explode: true + in: query + name: filter[created_at][lte] + required: false + schema: + example: 2019-03-29T11:10:00Z + type: string + style: form + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Recordings_Response' + description: Successful response with a list of recordings. + "401": + description: Unauthorized + "422": + description: Unprocessable entity + summary: List recordings + tags: + - Recordings Commands + x-group-parameters: "true" + x-latency-category: interactive + x-accepts: application/json + /recordings/{id}: + get: + description: Retrieve a recording from the authenticated user's recordings + operationId: retrieveRecording + parameters: + - description: Uniquely identifies the recording + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Get_Recording_Response' + description: Successful response with details about a recording. + "401": + description: Unauthorized + "404": + description: Conference does not exist + summary: Retrieve a recording + tags: + - Recordings Commands + x-latency-category: interactive + x-accepts: application/json + /regulatory_requirements: + get: + description: Gets a paginated list of number order regulatory requirements. + operationId: listNumberOrderRegulatoryRequirements + parameters: + - description: Filter number order regulatory requirements by `requirement_id`. + explode: true + in: query + name: filter[requirement_id] + required: false + schema: + type: string + style: form + - description: Filter number order regulatory requirements by `field_type`. + explode: true + in: query + name: filter[field_type] + required: false + schema: + type: string + style: form + - description: Filter number order regulatory requirements by `requirement_type`. + explode: true + in: query + name: filter[requirement_type] + required: false + schema: + type: string + style: form + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Number_Order_Regulatory_Requirements_Response' + description: Successful response with a list of number order regulatory + requirements. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List number order regulatory requirements + tags: + - Number Order Regulatory Requirements + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /regulatory_requirements/{requirement_id}: + get: + description: Gets a single number order regulatory requirement. + operationId: retrieveNumberOrderRegulatoryRequirement + parameters: + - description: The number order regulatory requirement ID. + explode: false + in: path + name: requirement_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Number_Order_Regulatory_Requirement_Response' + description: Successful response with details about a number order regulatory + requirement. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a number order regulatory requirement + tags: + - Number Order Regulatory Requirements + x-latency-category: responsive + x-accepts: application/json + /short_codes: + get: + operationId: listShortCodes + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: Filter by Messaging Profile ID. Use the string `null` for phone + numbers without assigned profiles. A synonym for the `/messaging_profiles/{id}/short_codes` + endpoint when querying about an extant profile. + explode: true + in: query + name: filter[messaging_profile_id] + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/List_Short_Codes_Response' + description: Successful response with a list of short codes. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: List short codes + tags: + - Short Codes + x-group-parameters: "true" + x-latency-category: responsive + x-accepts: application/json + /short_codes/{id}: + get: + operationId: retrieveShortCode + parameters: + - description: The id of the short code + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Short_Code_Response' + description: Successful response with details about a short code. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Retrieve a short code + tags: + - Short Codes + x-latency-category: responsive + x-accepts: application/json + patch: + description: Update the settings for a specific short code. To unbind a short + code from a profile, set the `messaging_profile_id` to `null` or an empty + string. + operationId: updateShortCode + parameters: + - description: The id of the short code + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateShortCodeRequest' + description: Short code update + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Short_Code_Response' + description: Successful response with details about a short code. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Errors' + description: Unexpected error + summary: Update short code + tags: + - Short Codes + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /texml_applications: + get: + description: Returns a list of your TeXML Applications. + operationId: findTexmlApplications + parameters: + - description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + - description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + - description: If present, applications with friendly_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. + explode: true + in: query + name: filter[friendly_name][contains] + required: false + schema: + default: "null" + type: string + style: form + - description: Identifies the associated outbound voice profile. + explode: true + in: query + name: filter[outbound_voice_profile_id] + required: false + schema: + example: "1293384261075731499" + format: int64 + type: string + style: form + - description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
If not given, results are sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + default: created_at + enum: + - created_at + - connection_name + - active + example: connection_name + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + description: Successful response + "400": + description: Bad request + "401": + description: Unauthorized + "404": + description: Resource not found + summary: List all TeXML Applications + tags: + - TeXML Applications + x-latency-category: responsive + x-accepts: application/json + post: + description: Creates a TeXML Application. + operationId: CreateTexmlApplication + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTexmlApplicationRequest' + description: Parameters that can be set when creating a TeXML Application + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201_1' + description: Successful response + "422": + description: Bad request + summary: Creates a TeXML Application + tags: + - TeXML Applications + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json + /texml_applications/{id}: + delete: + description: Deletes a TeXML Application. + operationId: DeleteTexmlApplication + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201_1' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Deletes a TeXML Application + tags: + - TeXML Applications + x-latency-category: responsive + x-accepts: application/json + get: + description: Retrieves the details of an existing TeXML Application. + operationId: getTexmlApplication + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201_1' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Retrieve a TeXML Application + tags: + - TeXML Applications + x-latency-category: responsive + x-accepts: application/json + patch: + description: Updates settings of an existing TeXML Application. + operationId: UpdateTexmlApplication + parameters: + - description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTexmlApplicationRequest' + description: Parameters that can be updated in a TeXML Application + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201_1' + description: Successful response + "401": + description: Unauthorized + "404": + description: Resource not found + "422": + description: Bad request + summary: Update a TeXML Application + tags: + - TeXML Applications + x-latency-category: responsive + x-contentType: application/json + x-accepts: application/json +components: + callbacks: {} + examples: {} + headers: {} + links: {} + parameters: + CallControlId: + description: Unique identifier and token for controlling the call + explode: false + in: path + name: call_control_id + required: true + schema: + type: string + style: simple + FilterApplicationName: + description: If present, applications with application_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. + explode: true + in: query + name: filter[application_name][contains] + required: false + schema: + default: "null" + type: string + style: form + FilterCallEventStatus: + description: Event status + explode: true + in: query + name: filter[status] + required: false + schema: + enum: + - delivered + - failed + example: delivered + type: string + style: form + FilterCallEventTimestampEqualTo: + description: 'Event timestamp: equal' + explode: true + in: query + name: filter[event_timestamp][eq] + required: false + schema: + example: 2019-03-29T11:10:00Z + type: string + style: form + FilterCallEventTimestampGreaterThan: + description: 'Event timestamp: greater than' + explode: true + in: query + name: filter[event_timestamp][gt] + required: false + schema: + example: 2019-03-29T11:10:00Z + type: string + style: form + FilterCallEventTimestampGreaterThanOrEqualTo: + description: 'Event timestamp: greater than or equal' + explode: true + in: query + name: filter[event_timestamp][gte] + required: false + schema: + example: 2019-03-29T11:10:00Z + type: string + style: form + FilterCallEventTimestampLessThan: + description: 'Event timestamp: lower than' + explode: true + in: query + name: filter[event_timestamp][lt] + required: false + schema: + example: 2019-03-29T11:10:00Z + type: string + style: form + FilterCallEventTimestampLessThanOrEqualTo: + description: 'Event timestamp: lower than or equal' + explode: true + in: query + name: filter[event_timestamp][lte] + required: false + schema: + example: 2019-03-29T11:10:00Z + type: string + style: form + FilterCallEventType: + description: Event type + explode: true + in: query + name: filter[type] + required: false + schema: + enum: + - command + - webhook + example: webhook + type: string + style: form + FilterCallLegId: + description: The unique identifier of an individual call leg. + explode: true + in: query + name: filter[call_leg_id] + required: false + schema: + format: uuid + type: string + style: form + FilterCallSessionId: + description: The unique identifier of the call control session. A session may + include multiple call leg events. + explode: true + in: query + name: filter[call_session_id] + required: false + schema: + format: uuid + type: string + style: form + FilterConferenceName: + description: If present, conferences will be filtered to those with a matching + `name` attribute. Matching is case-sensitive + explode: true + in: query + name: filter[name] + required: false + schema: + type: string + style: form + FilterConnectionName: + description: If present, connections with connection_name containing + the given value will be returned. Matching is not case-sensitive. Requires + at least three characters. + explode: true + in: query + name: filter[connection_name][contains] + required: false + schema: + default: "null" + type: string + style: form + FilterInnerOutboundVoiceProfileId: + description: Identifies the associated outbound voice profile. + explode: true + in: query + name: filter[outbound.outbound_voice_profile_id] + required: false + schema: + example: "1293384261075731499" + format: int64 + type: string + style: form + FilterOutboundVoiceProfileId: + description: Identifies the associated outbound voice profile. + explode: true + in: query + name: filter[outbound_voice_profile_id] + required: false + schema: + example: "1293384261075731499" + format: int64 + type: string + style: form + FqdnId: + description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1517907029795014409" + format: int64 + type: string + style: simple + IntId: + description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + IpId: + description: Identifies the type of resource. + explode: false + in: path + name: id + required: true + schema: + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: uuid + type: string + style: simple + MessagingProfileId: + description: The id of the messaging profile to retrieve + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + MessagingProfileMetric: + description: The id of the messaging profile(s) to retrieve + explode: true + in: query + name: id + required: false + schema: + format: uuid + type: string + style: form + MessagingProfileMetricTimeFrame: + description: The timeframe for which you'd like to retrieve metrics. + explode: true + in: query + name: time_frame + required: false + schema: + default: 24h + enum: + - 1h + - 3h + - 24h + - 3d + - 7d + - 30d + type: string + style: form + NameFilter: + description: Optional filter on outbound voice profile name. + explode: true + in: query + name: filter[name][contains] + required: false + schema: + example: office-profile + type: string + style: form + PageNumber: + description: The page number to load. + explode: true + in: query + name: page[number] + required: false + schema: + default: 1 + minimum: 1 + type: integer + style: form + PageSize: + description: The size of the page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 20 + maximum: 250 + minimum: 1 + type: integer + style: form + ShortCodeId: + description: The id of the short code + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + SortConnection: + description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
If not given, results are sorted by created_at in descending order. + explode: true + in: query + name: sort + required: false + schema: + default: created_at + enum: + - created_at + - connection_name + - active + example: connection_name + type: string + style: form + SortOutboundVoiceProfile: + description: |- + Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

+ That is:
+ explode: true + in: query + name: sort + required: false + schema: + default: -created_at + enum: + - enabled + - -enabled + - created_at + - -created_at + - name + - -name + - service_plan + - -service_plan + - traffic_type + - -traffic_type + - usage_payment_method + - -usage_payment_method + example: name + type: string + style: form + id: + description: Identifies the resource. + explode: false + in: path + name: id + required: true + schema: + example: "1293384261075731499" + format: int64 + type: string + style: simple + requestBodies: {} + responses: + CallControlApplicationResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Call_Control_Application_Response' + description: Successful response with details about a call control application. + CallControlCommandResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Call_Control_Command_Response' + description: Successful response upon making a call control command. + ConferenceCommandResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Conference_Command_Response' + description: Successful response upon making a conference command. + ConferenceResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Conference_Response' + description: Successful response with details about a conference. + ConnectionResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Connection_Response' + description: Successful response with details about a connection. + CredentialConnectionResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Credential_Connection_Response' + description: Successful response with details about a credential connection. + CsvDownloadResponse: + content: + application/json: schema: $ref: '#/components/schemas/CSV_Download_Response' description: Successful response with details about a CSV download. + FaxApplicationResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201' + description: Successful response + FqdnConnectionResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Fqdn_Connection_Response' + description: Successful response with details about an FQDN connection. + FqdnResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Fqdn_Response' + description: Successful response with details about an FQDN connection. GenericErrorResponse: content: application/json: schema: $ref: '#/components/schemas/Errors' description: Unexpected error + GetAllFaxApplicationsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + description: Successful response + GetAllTexmlApplicationsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + description: Successful response + IpConnectionResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Ip_Connection_Response' + description: Successful response with details about an IP connection. + IpResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Ip_Response' + description: Successful response with details about an IP. ListAvailablePhoneNumbersResponse: content: application/json: @@ -5784,12 +7973,48 @@ components: schema: $ref: '#/components/schemas/List_Conferences_Response' description: Successful response with a list of conferences. + ListConnectionsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Connections_Response' + description: Successful response with a list of connections. + ListCredentialConnectionsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Credential_Connections_Response' + description: Successful response with a list of credential connections. ListCsvDownloadsResponse: content: application/json: schema: $ref: '#/components/schemas/List_CSV_Downloads_Response' description: Successful response with a list of CSV downloads. + ListFqdnConnectionsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Fqdn_Connections_Response' + description: Successful response with a list of FQDN connections. + ListFqdnsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Fqdns_Response' + description: Successful response with a list of FQDN connections. + ListIpConnectionsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Ip_Connections_Response' + description: Successful response with a list of IP connections. + ListIpsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Ips_Response' + description: Successful response with a list of IPs. ListMessagingHostedNumberOrdersResponse: content: application/json: @@ -5850,6 +8075,12 @@ components: schema: $ref: '#/components/schemas/List_Number_Reservations_Response' description: Successful response with a list of number reservations. + ListOutboundVoiceProfilesResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Outbound_Voice_Profiles_Response' + description: Successful response ListParticipantsResponse: content: application/json: @@ -5862,6 +8093,12 @@ components: schema: $ref: '#/components/schemas/List_Phone_Number_Regulatory_Requirements_Response' description: Successful response with a list of phone number regulatory requirements. + ListPhoneNumbersJobsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/List_Phone_Numbers_Background_Jobs_Response' + description: Successful response with a list of phone numbers background jobs. ListPhoneNumbersResponse: content: application/json: @@ -5945,6 +8182,12 @@ components: schema: $ref: '#/components/schemas/Number_Reservation_Response' description: Successful response with details about a number reservation. + OutboundVoiceProfileResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/Outbound_Voice_Profile_Response' + description: Successful response PhoneNumberResponse: content: application/json: @@ -5989,123 +8232,1596 @@ components: schema: $ref: '#/components/schemas/Short_Code_Response' description: Successful response with details about a short code. + TexmlApplicationResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_201_1' + description: Successful response UnauthorizedResponse: description: Unauthorized UnprocessableEntityResponse: description: Unprocessable entity schemas: + AnchorsiteOverride: + default: Latency + description: '`Latency` directs Telnyx to route media through the site with + the lowest round-trip time to the user''s connection. Telnyx calculates this + time using ICMP ping messages. This can be disabled by specifying a site to + handle all media.' + enum: + - Latency + - Chicago, IL + - Ashburn, VA + - San Jose, CA + - Sydney, Australia + - Amsterdam, Netherlands + - London, UK + - Toronto, Canada + - Vancouver, Canada + - Frankfurt, Germany + example: Amsterdam, Netherlands + title: Anchorsite Override + type: string AnswerRequest: example: - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - webhook_url: https://www.example.com/server-b/ - webhook_url_method: POST + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + webhook_url: https://www.example.com/server-b/ + webhook_url_method: POST + properties: + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + webhook_url: + description: Use this field to override the URL for which Telnyx will send + subsuqeunt webhooks to for this call. + example: https://www.example.com/server-b/ + type: string + webhook_url_method: + default: POST + description: HTTP request type used for `webhook_url`. + enum: + - POST + - GET + example: GET + type: string + title: Answer Request + type: object + ApplicationName: + description: A user-assigned name to help manage the application. + example: call-router + title: Application Name + type: string + AvailablePhoneNumber: + example: + record_type: available_phone_number + phone_number: +19705555098 + vanity_format: "" + best_effort: false + quickship: true + reservable: true + region_information: + - region_type: country_code + region_name: US + cost_information: + upfront_cost: "3.21" + monthly_cost: "6.54" + currency: USD + regulatory_requirements: + - requirement_type: end user proof of address + label: Proof of Address + field_type: address + description: Requirement for providing Proof of Address. + properties: + record_type: + enum: + - available_phone_number + example: available_phone_number + type: string + phone_number: + example: +19705555098 + type: string + vanity_format: + type: string + best_effort: + description: Specifies whether the phone number is an exact match based + on the search criteria or not. + example: false + type: boolean + quickship: + description: Specifies whether the phone number can receive calls immediately + after purchase or not. + example: true + type: boolean + reservable: + description: Specifies whether the phone number can be reserved before purchase + or not. + example: true + type: boolean + region_information: + items: + $ref: '#/components/schemas/RegionInformation' + type: array + cost_information: + $ref: '#/components/schemas/CostInformation' + regulatory_requirements: + items: + $ref: '#/components/schemas/RegulatoryRequirement' + type: array + type: object + AvailablePhoneNumbersMetadata: + example: + total_results: 100 + best_effort_results: 50 + properties: + total_results: + example: 1 + type: integer + best_effort_results: + example: 0 + type: integer + type: object + BridgeRequest: + example: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + park_after_unbridge: self + properties: + call_control_id: + description: The Call Control ID of the call you want to bridge with. + example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + type: string + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + park_after_unbridge: + description: Specifies behavior after the bridge ends (i.e. the opposite + leg either hangs up or is transferred). If supplied with the value `self`, + the current leg will be parked after unbridge. If not set, the default + behavior is to hang up the leg. + example: self + type: string + required: + - call_control_id + title: Bridge Request + type: object + Call: + example: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + call_leg_id: 2dc6fc34-f9e0-11ea-b68e-02420a0f7768 + call_session_id: 2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768 + is_alive: false + record_type: call + properties: + record_type: + enum: + - call + example: call + type: string + call_session_id: + description: ID that is unique to the call session and can be used to correlate + webhook events + example: 428c31b6-7af4-4bcb-b68e-5013ef9657c1 + type: string + call_leg_id: + description: ID that is unique to the call and can be used to correlate + webhook events + example: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + type: string + call_control_id: + description: Unique identifier and token for controlling the call. + example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + type: string + is_alive: + description: Indicates whether the call is alive or not. For Dial command + it will always be `false` (dialing is asynchronous). + example: true + type: boolean + required: + - call_control_id + - call_leg_id + - call_session_id + - is_alive + - record_type + title: Call + type: object + CallAnswered: + example: + record_type: event + event_type: call.answered + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + state: answered + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.answered + example: call.answered + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallAnswered_payload' + title: Call Answered + type: object + CallAnsweredEvent: + example: + data: + record_type: event + event_type: call.answered + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + state: answered + properties: + data: + $ref: '#/components/schemas/CallAnswered' + title: Call Answered Event + type: object + CallBridged: + example: + record_type: event + event_type: call.bridged + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + state: bridged + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.bridged + example: call.bridged + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallBridged_payload' + title: Call Bridged + type: object + CallBridgedEvent: + example: + data: + record_type: event + event_type: call.bridged + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + state: bridged + properties: + data: + $ref: '#/components/schemas/CallBridged' + title: Call Bridged Event + type: object + CallControlApplication: + example: + active: false + anchorsite_override: '"Latency"' + application_name: call-router + created_at: 2018-02-02T22:25:27.521Z + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + id: "1293384261075731499" + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + record_type: call_control_application + updated_at: 2018-02-02T22:25:27.521Z + webhook_api_version: "1" + webhook_event_failover_url: https://failover.example.com + webhook_event_url: https://example.com + webhook_timeout_secs: 25 + properties: + active: + default: true + description: Specifies whether the connection can be used. + type: boolean + anchorsite_override: + default: '"Latency"' + description: | + `Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. + enum: + - '"Latency"' + - '"Chicago, IL"' + - '"Ashburn, VA"' + - '"San Jose, CA"' + example: '"Amsterdam, Netherlands"' + type: string + application_name: + description: A user-assigned name to help manage the application. + example: call-router + type: string + created_at: + description: ISO 8601 formatted date of when the resource was created + example: 2018-02-02T22:25:27.521Z + type: string + dtmf_type: + default: RFC 2833 + description: Sets the type of DTMF digits sent from Telnyx to this Connection. + Note that DTMF digits sent to Telnyx will be accepted in all formats. + enum: + - RFC 2833 + - Inband + - SIP INFO + example: Inband + type: string + first_command_timeout: + default: false + description: Specifies whether calls to phone numbers associated with this + connection should hangup after timing out. + example: true + type: boolean + first_command_timeout_secs: + default: 30 + description: Specifies how many seconds to wait before timing out a dial + command. + example: 10 + type: integer + id: + example: "1293384261075731499" + format: int64 + type: string + inbound: + $ref: '#/components/schemas/CallControlApplicationInbound' + outbound: + $ref: '#/components/schemas/CallControlApplicationOutbound' + record_type: + default: call_control_application + enum: + - call_control_application + type: string + updated_at: + description: ISO 8601 formatted date of when the resource was last updated + example: 2018-02-02T22:25:27.521Z + type: string + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" + type: string + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as `https`. + example: https://failover.example.com + format: url + nullable: true + type: string + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as `https`. + example: https://example.com + format: url + type: string + webhook_timeout_secs: + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + title: Call Control Application + type: object + CallControlApplicationInbound: + properties: + channel_limit: + description: When set, this will limit the total number of inbound calls + to phone numbers associated with this connection. + example: 10 + type: integer + sip_subdomain: + default: "null" + description: 'Specifies a subdomain that can be used to receive Inbound + calls to a Connection, in the same way a phone number is used, from a + SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called + from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" + where the user part can be any alphanumeric value. Please note TLS encrypted + calls are not allowed for subdomain calls.' + example: example + type: string + sip_subdomain_receive_settings: + default: from_anyone + description: 'This option can be enabled to receive calls from: "Anyone" + (any SIP endpoint in the public Internet) or "Only my connections" (any + connection assigned to the same Telnyx user).' + enum: + - only_my_connections + - from_anyone + example: only_my_connections + type: string + title: Call Control Application Inbound + type: object + CallControlApplicationOutbound: + properties: + channel_limit: + description: When set, this will limit the total number of outbound calls + to phone numbers associated with this connection. + example: 10 + type: integer + outbound_voice_profile_id: + description: Identifies the associated outbound voice profile. + example: "1293384261075731499" + format: int64 + type: string + title: Call Control Application Outbound + type: object + CallControlCommandResult: + example: + result: ok + properties: + result: + example: ok + type: string + title: Call Control Command Result + type: object + CallDtmfReceived: + example: + record_type: event + event_type: call.dtmf.received + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + digit: '#' + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.dtmf.received + example: call.dtmf.received + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallDtmfReceived_payload' + title: Call DTMF Received + type: object + CallDtmfReceivedEvent: + example: + data: + record_type: event + event_type: call.dtmf.received + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + digit: '#' + properties: + data: + $ref: '#/components/schemas/CallDtmfReceived' + title: Call DTMF Received Event + type: object + CallEvent: + example: + record_type: call_event + call_leg_id: 308fe500-5213-11e9-ace7-02420a0f0668 + call_session_id: 308fec30-5213-11e9-9d3f-02420a0f0668 + event_timestamp: 2019-03-29T11:10:19.127783Z + name: call.hangup + type: webhook + metadata: {} + properties: + record_type: + enum: + - call_event + example: call_event + type: string + call_leg_id: + description: Uniquely identifies an individual call leg. + example: 308fe500-5213-11e9-ace7-02420a0f0668 + type: string + call_session_id: + description: Uniquely identifies the call control session. A session may + include multiple call leg events. + example: 308fec30-5213-11e9-9d3f-02420a0f0668 + type: string + event_timestamp: + description: Event timestamp + example: 2019-03-29T11:10:19.127783Z + type: string + name: + description: Event name + example: call.hangup + type: string + type: + description: Event type + enum: + - command + - webhook + example: webhook + type: string + metadata: + description: Event metadata, which includes raw event, and extra information + based on event type + type: object + required: + - call_leg_id + - call_session_id + - event_timestamp + - metadata + - name + - record_type + - type + title: Call Event + type: object + CallForkStarted: + example: + record_type: event + event_type: call.fork.started + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.fork.started + example: call.fork.started + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallForkStarted_payload' + title: Call Fork Started + type: object + CallForkStartedEvent: + example: + data: + record_type: event + event_type: call.fork.started + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + properties: + data: + $ref: '#/components/schemas/CallForkStarted' + title: Call Fork Started Event + type: object + CallForkStopped: + example: + record_type: event + event_type: call.fork.stopped + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.fork.stopped + example: call.fork.stopped + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallForkStarted_payload' + title: Call Fork Stopped + type: object + CallForkStoppedEvent: + example: + data: + record_type: event + event_type: call.fork.stopped + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + properties: + data: + $ref: '#/components/schemas/CallForkStopped' + title: Call Fork Stopped Event + type: object + CallForwarding: + description: The call forwarding settings for a phone number. + example: + call_forwarding_enabled: true + forwards_to: +13035559123 + forwarding_type: always + properties: + call_forwarding_enabled: + default: true + description: Indicates if call forwarding will be enabled for this number + if forwards_to and forwarding_type are filled in. Defaults to true for + backwards compatibility with APIV1 use of numbers endpoints. + example: true + type: boolean + forwards_to: + description: The phone number to which inbound calls to this number are + forwarded. Inbound calls will not be forwarded if this field is left blank. + If set, must be a +E.164-formatted phone number. + type: string + forwarding_type: + description: Call forwarding type. 'forwards_to' must be set for this to + have an effect. + enum: + - always + - on_failure + example: always + type: string + type: object + CallGatherEnded: + example: + record_type: event + event_type: call.gather.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + digits: "123" + status: valid + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.gather.ended + example: call.gather.ended + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallGatherEnded_payload' + title: Call Gather Ended + type: object + CallGatherEndedEvent: + example: + data: + record_type: event + event_type: call.gather.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + digits: "123" + status: valid + properties: + data: + $ref: '#/components/schemas/CallGatherEnded' + title: Call Gather Ended Event + type: object + CallHangup: + example: + record_type: event + event_type: call.hangup + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + state: hangup + hangup_cause: call_rejected + hangup_source: caller + sip_hangup_cause: "603" + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.hangup + example: call.hangup + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallHangup_payload' + title: Call Hangup + type: object + CallHangupEvent: + example: + data: + record_type: event + event_type: call.hangup + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + state: hangup + hangup_cause: call_rejected + hangup_source: caller + sip_hangup_cause: "603" + properties: + data: + $ref: '#/components/schemas/CallHangup' + title: Call Hangup Event + type: object + CallInitiated: + example: + record_type: event + event_type: call.initiated + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + direction: incoming + state: parked + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.initiated + example: call.initiated + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallInitiated_payload' + title: Call Initiated + type: object + CallInitiatedEvent: + example: + data: + record_type: event + event_type: call.initiated + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + direction: incoming + state: parked + properties: + data: + $ref: '#/components/schemas/CallInitiated' + title: Call Initiated Event + type: object + CallMachineDetectionEnded: + example: + record_type: event + event_type: call.machine.detection.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + result: human + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.machine.detection.ended + example: call.machine.detection.ended + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallMachineDetectionEnded_payload' + title: Call Machine Detection Ended + type: object + CallMachineDetectionEndedEvent: + example: + data: + record_type: event + event_type: call.machine.detection.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + result: human + properties: + data: + $ref: '#/components/schemas/CallMachineDetectionEnded' + title: Call Machine Detection Ended Event + type: object + CallMachineGreetingEnded: + example: + record_type: event + event_type: call.machine.greeting.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + result: ended + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.machine.greeting.ended + example: call.machine.greeting.ended + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallMachineGreetingEnded_payload' + title: Call Machine Greeting Ended + type: object + CallMachineGreetingEndedEvent: + example: + data: + record_type: event + event_type: call.machine.greeting.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + from: +35319605860 + to: +35319605860 + result: ended + properties: + data: + $ref: '#/components/schemas/CallMachineGreetingEnded' + title: Call Machine Greeting Ended Event + type: object + CallPlaybackEnded: + example: + record_type: event + event_type: call.playback.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + media_url: http://example.com/audio.wav + overlay: false + status: valid + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.playback.ended + example: call.playback.ended + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallPlaybackEnded_payload' + title: Call Playback Ended + type: object + CallPlaybackEndedEvent: + example: + data: + record_type: event + event_type: call.playback.ended + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + media_url: http://example.com/audio.wav + overlay: false + status: valid + properties: + data: + $ref: '#/components/schemas/CallPlaybackEnded' + title: Call Playback Ended Event + type: object + CallPlaybackStarted: + example: + record_type: event + event_type: call.playback.started + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + media_url: http://example.com/audio.wav + overlay: false + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.playback.started + example: call.playback.started + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallPlaybackStarted_payload' + title: Call Playback Started + type: object + CallPlaybackStartedEvent: + example: + data: + record_type: event + event_type: call.playback.started + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + media_url: http://example.com/audio.wav + overlay: false + properties: + data: + $ref: '#/components/schemas/CallPlaybackStarted' + title: Call Playback Started Event + type: object + CallRecording: + description: The call recording settings for a phone number. + example: + inbound_call_recording_enabled: true + inbound_call_recording_format: wav + inbound_call_recording_channels: single + properties: + inbound_call_recording_enabled: + default: false + description: When enabled, any inbound call to this number will be recorded. + type: boolean + inbound_call_recording_format: + default: wav + description: The audio file format for calls being recorded. + enum: + - wav + - mp3 + type: string + inbound_call_recording_channels: + default: single + description: When using 'dual' channels, final audio file will be stereo + recorded with the first leg on channel A, and the rest on channel B. + enum: + - single + - dual + type: string + type: object + CallRecordingSaved: + example: + record_type: event + event_type: call.recording.saved + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + recording_started_at: 2018-02-02T22:20:27.521992Z + recording_ended_at: 2018-02-02T22:20:27.521992Z + channels: single + recording_urls: + mp3: http://example.com/recording.mp3 + wav: http://example.com/recording.wav + public_recording_urls: + mp3: http://example.com/recording.mp3 + wav: http://example.com/recording.wav properties: - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + event_type: + description: The type of event being delivered. + enum: + - call.recording.saved + example: call.recording.saved type: string - webhook_url: - description: Use this field to override the URL for which Telnyx will send - subsuqeunt webhooks to for this call. - example: https://www.example.com/server-b/ + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid type: string - webhook_url_method: - default: POST - description: HTTP request type used for `webhook_url`. + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallRecordingSaved_payload' + title: Call Recording Saved + type: object + CallRecordingSavedEvent: + example: + data: + record_type: event + event_type: call.recording.saved + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z + payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + connection_id: 7267xxxxxxxxxxxxxx + call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + recording_started_at: 2018-02-02T22:20:27.521992Z + recording_ended_at: 2018-02-02T22:20:27.521992Z + channels: single + recording_urls: + mp3: http://example.com/recording.mp3 + wav: http://example.com/recording.wav + public_recording_urls: + mp3: http://example.com/recording.mp3 + wav: http://example.com/recording.wav + properties: + data: + $ref: '#/components/schemas/CallRecordingSaved' + title: Call Recording Saved Event + type: object + CallReferCompleted: + example: + record_type: event + event_type: call.refer.completed + id: 4ce4366d-8d87-44be-a00b-942154e9c5f5 + occurred_at: 2020-03-30T13:29:44.650000Z + payload: + call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 + call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + connection_id: "1289082222292239760" + from: +35319605860 + sip_notify_response: 200 + to: +13129457420 + properties: + record_type: + description: Identifies the type of the resource. enum: - - POST - - GET - example: GET + - event + example: event type: string - title: Answer Request + event_type: + description: The type of event being delivered. + enum: + - call.refer.completed + example: call.refer.completed + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallReferCompleted_payload' type: object - AvailablePhoneNumber: + CallReferCompletedEvent: example: - record_type: available_phone_number - phone_number: +19705555098 - vanity_format: "" - best_effort: false - quickship: true - reservable: true - region_information: - - region_type: country_code - region_name: US - cost_information: - upfront_cost: "3.21" - monthly_cost: "6.54" - currency: USD - regulatory_requirements: - - requirement_type: end user proof of address - label: Proof of Address - field_type: address - description: Requirement for providing Proof of Address. + data: + record_type: event + event_type: call.refer.completed + id: 4ce4366d-8d87-44be-a00b-942154e9c5f5 + occurred_at: 2020-03-30T13:29:44.650000Z + payload: + call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 + call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + connection_id: "1289082222292239760" + from: +35319605860 + sip_notify_response: 200 + to: +13129457420 + properties: + data: + $ref: '#/components/schemas/CallReferCompleted' + title: Call Recording Saved Event + type: object + CallReferFailed: + example: + record_type: event + event_type: call.refer.failed + id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 + occurred_at: 2020-03-30T13:29:42.130013Z + payload: + call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 + call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + connection_id: "1289082222292239760" + from: +35319605860 + sip_notify_response: 603 + to: +13129457420 + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + event_type: + description: The type of event being delivered. + enum: + - call.refer.failed + example: call.refer.failed + type: string + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid + type: string + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallReferFailed_payload' + type: object + CallReferFailedEvent: + example: + data: + record_type: event + event_type: call.refer.failed + id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 + occurred_at: 2020-03-30T13:29:42.130013Z + payload: + call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 + call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + connection_id: "1289082222292239760" + from: +35319605860 + sip_notify_response: 603 + to: +13129457420 + properties: + data: + $ref: '#/components/schemas/CallReferFailed' + title: Call Recording Saved Event + type: object + CallReferStarted: + example: + record_type: event + event_type: call.refer.started + id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 + occurred_at: 2020-03-30T13:29:42.130013Z + payload: + call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 + call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + connection_id: "1289082222292239760" + from: +35319605860 + sip_notify_response: 100 + to: +13129457420 properties: record_type: + description: Identifies the type of the resource. enum: - - available_phone_number - example: available_phone_number + - event + example: event type: string - phone_number: - example: +19705555098 + event_type: + description: The type of event being delivered. + enum: + - call.refer.started + example: call.refer.started type: string - vanity_format: + id: + description: Identifies the type of resource. + example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + format: uuid type: string - best_effort: - description: Specifies whether the phone number is an exact match based - on the search criteria or not. - example: false - type: boolean - quickship: - description: Specifies whether the phone number can receive calls immediately - after purchase or not. - example: true - type: boolean - reservable: - description: Specifies whether the phone number can be reserved before purchase - or not. - example: true - type: boolean - region_information: - items: - $ref: '#/components/schemas/RegionInformation' - type: array - cost_information: - $ref: '#/components/schemas/CostInformation' - regulatory_requirements: - items: - $ref: '#/components/schemas/RegulatoryRequirement' - type: array + occurred_at: + description: ISO 8601 datetime of when the event occurred. + example: 2018-02-02T22:25:27.521992Z + format: date-time + type: string + payload: + $ref: '#/components/schemas/CallReferStarted_payload' + title: Call Refer Started type: object - AvailablePhoneNumbersMetadata: + CallReferStartedEvent: example: - total_results: 100 - best_effort_results: 50 + data: + record_type: event + event_type: call.refer.started + id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 + occurred_at: 2020-03-30T13:29:42.130013Z + payload: + call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA + call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 + call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + connection_id: "1289082222292239760" + from: +35319605860 + sip_notify_response: 100 + to: +13129457420 properties: - total_results: - example: 1 - type: integer - best_effort_results: - example: 0 - type: integer + data: + $ref: '#/components/schemas/CallReferStarted' + title: Call Refer Started Event type: object - BridgeRequest: + CallRequest: example: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + to: +18005550100 or sip:username@sip.telnyx.com + from: +18005550101 + connection_id: 7267xxxxxxxxxxxxxx + audio_url: http://www.example.com/sounds/greeting.wav + timeout_secs: 60 + timeout_limit_secs: 60 + webhook_url: https://www.example.com/server-b/ + webhook_url_method: POST + answering_machine_detection: detect + answering_machine_detection_config: + total_analysis_time_millis: 5000 + after_greeting_silence_millis: 1000 + between_words_silence_millis: 1000 + greeting_duration_millis: 1000 + initial_silence_millis: 1000 + maximum_number_of_words: 1000 + maximum_word_length_millis: 2000 + silence_threshold: 512 + greeting_total_analysis_time_millis: 50000 + greeting_silence_duration_millis: 2000 + custom_headers: + - name: head_1 + value: val_1 + - name: head_2 + value: val_2 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - park_after_unbridge: self + link_to: ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg== + sip_auth_username: username + sip_auth_password: password properties: - call_control_id: - description: The Call Control ID of the call you want to bridge with. - example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + to: + description: The DID or SIP URI to dial out to. + example: +18005550100 or sip:username@sip.telnyx.com + type: string + from: + description: The `from` number to be used as the caller id presented to + the destination (`to` number). The number should be in +E164 format. This + attribute will default to the `from` number of the original call if omitted. + example: +18005550101 + type: string + connection_id: + description: The ID of the connection to be used when dialing the destination. + type: string + audio_url: + description: The URL of a file to be played back to the callee when the + call is answered. The URL can point to either a WAV or MP3 file. + example: http://example.com/message.wav + type: string + timeout_secs: + default: 30 + description: The number of seconds that Telnyx will wait for the call to + be answered by the destination to which it is being called. If the timeout + is reached before an answer is received, the call will hangup and a `call.hangup` + webhook with a `hangup_cause` of `timeout` will be sent. Minimum value + is 5 seconds. Maximum value is 120 seconds. + example: 60 + format: int32 + type: integer + time_limit_secs: + default: 14400 + description: Sets the maximum duration of a Call Control Leg in seconds. + If the time limit is reached, the call will hangup and a `call.hangup` + webhook with a `hangup_cause` of `time_limit` will be sent. For example, + by setting a time limit of 120 seconds, a Call Leg will be automatically + terminated two minutes after being answered. The default time limit is + 14400 seconds or 4 hours and this is also the maximum allowed call length. + example: 600 + format: int32 + type: integer + answering_machine_detection: + default: disabled + description: Enables Answering Machine Detection. When a call is answered, + Telnyx runs real-time detection to determine if it was picked up by a + human or a machine and sends an `call.machine.detection.ended` webhook + with the analysis result. If 'greeting_end' or 'detect_words' is used + and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' + webhook when the answering machine greeting ends with a beep or silence. + If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' + if a beep is detected. + enum: + - detect + - detect_beep + - detect_words + - greeting_end + - disabled type: string + answering_machine_detection_config: + $ref: '#/components/schemas/CallRequest_answering_machine_detection_config' + custom_headers: + description: Custom headers to be added to the SIP INVITE. + example: + - name: head_1 + value: val_1 + - name: head_2 + value: val_2 + items: + $ref: '#/components/schemas/CustomSipHeader' + type: array client_state: description: Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. @@ -6116,61 +9832,40 @@ components: commands with the same `command_id`. example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - park_after_unbridge: - description: Specifies behavior after the bridge ends (i.e. the opposite - leg either hangs up or is transferred). If supplied with the value `self`, - the current leg will be parked after unbridge. If not set, the default - behavior is to hang up the leg. - example: self + link_to: + description: Use another call's control id for sharing the same call session + id + example: ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg== type: string - required: - - call_control_id - title: Bridge Request - type: object - Call: - example: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - call_leg_id: 2dc6fc34-f9e0-11ea-b68e-02420a0f7768 - call_session_id: 2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768 - is_alive: false - record_type: call - properties: - record_type: - enum: - - call - example: call + sip_auth_username: + description: SIP Authentication username used for SIP challenges. type: string - call_session_id: - description: ID that is unique to the call session and can be used to correlate - webhook events - example: 428c31b6-7af4-4bcb-b68e-5013ef9657c1 + sip_auth_password: + description: SIP Authentication password used for SIP challenges. type: string - call_leg_id: - description: ID that is unique to the call and can be used to correlate - webhook events - example: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + webhook_url: + description: Use this field to override the URL for which Telnyx will send + subsuqeunt webhooks to for this call. + example: https://www.example.com/server-b/ type: string - call_control_id: - description: Unique identifier and token for controlling the call. - example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + webhook_url_method: + default: POST + description: HTTP request type used for `webhook_url`. + enum: + - POST + - GET + example: GET type: string - is_alive: - description: Indicates whether the call is alive or not. For Dial command - it will always be `false` (dialing is asynchronous). - example: true - type: boolean required: - - call_control_id - - call_leg_id - - call_session_id - - is_alive - - record_type - title: Call + - connection_id + - from + - to + title: Dial Request type: object - CallAnswered: + CallSpeakEnded: example: record_type: event - event_type: call.answered + event_type: call.speak.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6179,9 +9874,7 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - state: answered + status: completed properties: record_type: description: Identifies the type of the resource. @@ -6192,8 +9885,8 @@ components: event_type: description: The type of event being delivered. enum: - - call.answered - example: call.answered + - call.speak.ended + example: call.speak.ended type: string id: description: Identifies the type of resource. @@ -6206,14 +9899,14 @@ components: format: date-time type: string payload: - $ref: '#/components/schemas/CallAnswered_payload' - title: Call Answered + $ref: '#/components/schemas/CallSpeakEnded_payload' + title: Call Speak Ended type: object - CallAnsweredEvent: + CallSpeakEndedEvent: example: data: record_type: event - event_type: call.answered + event_type: call.speak.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6222,18 +9915,16 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - state: answered + status: completed properties: data: - $ref: '#/components/schemas/CallAnswered' - title: Call Answered Event + $ref: '#/components/schemas/CallSpeakEnded' + title: Call Speak Ended Event type: object - CallBridged: + CallSpeakStarted: example: record_type: event - event_type: call.bridged + event_type: call.speak.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6242,9 +9933,6 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - state: bridged properties: record_type: description: Identifies the type of the resource. @@ -6255,8 +9943,8 @@ components: event_type: description: The type of event being delivered. enum: - - call.bridged - example: call.bridged + - call.speak.started + example: call.speak.started type: string id: description: Identifies the type of resource. @@ -6269,14 +9957,14 @@ components: format: date-time type: string payload: - $ref: '#/components/schemas/CallBridged_payload' - title: Call Bridged + $ref: '#/components/schemas/CallSpeakStarted_payload' + title: Call Speak Started type: object - CallBridgedEvent: + CallSpeakStartedEvent: example: data: record_type: event - event_type: call.bridged + event_type: call.speak.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6285,188 +9973,213 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - state: bridged properties: data: - $ref: '#/components/schemas/CallBridged' - title: Call Bridged Event + $ref: '#/components/schemas/CallSpeakStarted' + title: Call Speak Started Event type: object - CallControlApplication: + CnamListing: + description: The CNAM listing settings for a phone number. example: - active: false - anchorsite_override: '"Latency"' - application_name: call-router - created_at: 2018-02-02T22:25:27.521Z - dtmf_type: Inband - first_command_timeout: true - first_command_timeout_secs: 10 - id: "1293384261075731499" - inbound: - channel_limit: 10 - sip_subdomain: example - sip_subdomain_receive_settings: only_my_connections - outbound: - channel_limit: 10 - outbound_voice_profile_id: "1293384261075731499" - record_type: call_control_application - updated_at: 2018-02-02T22:25:27.521Z - webhook_api_version: "1" - webhook_event_failover_url: https://failover.example.com - webhook_event_url: https://example.com - webhook_timeout_secs: 25 + cnam_listing_enabled: true + cnam_listing_details: example properties: - active: - default: true - description: Specifies whether the connection can be used. + cnam_listing_enabled: + default: false + description: Enables CNAM listings for this number. Requires cnam_listing_details + to also be set. type: boolean - anchorsite_override: - default: '"Latency"' - description: | - `Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. + cnam_listing_details: + description: The CNAM listing details for this number. Must be alphanumeric + characters or spaces with a maximum length of 15. Requires cnam_listing_enabled + to also be set to true. + type: string + type: object + Conference: + example: + record_type: conference + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + name: All hands meeting + created_at: 2019-01-23T18:10:02.574Z + expires_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + region: sv1 + status: completed + end_reason: all_left + ended_by: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 + properties: + record_type: enum: - - '"Latency"' - - '"Chicago, IL"' - - '"Ashburn, VA"' - - '"San Jose, CA"' - example: '"Amsterdam, Netherlands"' + - conference + example: conference type: string - application_name: - description: A user-assigned name to help manage the application. - example: call-router + id: + description: Uniquely identifies the conference + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: string + name: + description: Name of the conference + example: All hands meeting type: string created_at: - description: ISO 8601 formatted date of when the resource was created - example: 2018-02-02T22:25:27.521Z + description: ISO 8601 formatted date of when the conference was created + example: 2019-01-23T18:10:02.574Z type: string - dtmf_type: - default: RFC 2833 - description: Sets the type of DTMF digits sent from Telnyx to this Connection. - Note that DTMF digits sent to Telnyx will be accepted in all formats. - enum: - - RFC 2833 - - Inband - - SIP INFO - example: Inband + expires_at: + description: ISO 8601 formatted date of when the conference will expire + example: 2019-01-23T18:10:02.574Z type: string - first_command_timeout: - default: false - description: Specifies whether calls to phone numbers associated with this - connection should hangup after timing out. - example: true - type: boolean - first_command_timeout_secs: - default: 30 - description: Specifies how many seconds to wait before timing out a dial - command. - example: 10 - type: integer - id: - example: "1293384261075731499" - format: int64 + updated_at: + description: ISO 8601 formatted date of when the conference was last updated + example: 2019-01-23T18:10:02.574Z type: string - inbound: - $ref: '#/components/schemas/CallControlApplicationInbound' - outbound: - $ref: '#/components/schemas/CallControlApplicationOutbound' - record_type: - default: call_control_application - enum: - - call_control_application + region: + description: Region where the conference is hosted + example: sv1 type: string - updated_at: - description: ISO 8601 formatted date of when the resource was last updated - example: 2018-02-02T22:25:27.521Z + status: + description: Status of the conference + enum: + - init + - in_progress + - completed + example: completed type: string - webhook_api_version: - default: "1" - description: Determines which webhook format will be used, Telnyx API v1 - or v2. + end_reason: + description: Reason why the conference ended enum: - - "1" - - "2" - example: "1" + - all_left + - ended_via_api + - host_left + - time_exceeded + example: all_left type: string - webhook_event_failover_url: - default: "" - description: The failover URL where webhooks related to this connection - will be sent if sending to the primary URL fails. Must include a scheme, - such as `https`. - example: https://failover.example.com - format: url - nullable: true + ended_by: + $ref: '#/components/schemas/Conference_ended_by' + connection_id: + description: Identifies the connection associated with the conference + example: 3fa85f64-9191-4567-b3fc-2c963f66afa6 type: string - webhook_event_url: - description: The URL where webhooks related to this connection will be sent. - Must include a scheme, such as `https`. - example: https://example.com - format: url + required: + - created_at + - expires_at + - id + - name + - record_type + title: Conference + type: object + ConferenceCallRequest: + example: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + hold: true + hold_audio_url: http://www.example.com/audio.wav + mute: true + from: +18005550101 + to: +18005550100 + start_conference_on_enter: true + supervisor_role: whisper + whisper_call_control_ids: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + properties: + call_control_id: + description: Unique identifier and token for controlling the call + example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + type: string + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid execution of duplicate commands. Telnyx + will ignore subsequent commands with the same `command_id` as one that + has already been executed. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + from: + description: The `from` number to be used as the caller id presented to + the destination (`to` number). + example: +18005550101 type: string - webhook_timeout_secs: - example: 25 - maximum: 30 - minimum: 0 - nullable: true - type: integer - title: Call Control Application - type: object - CallControlApplicationInbound: - properties: - channel_limit: - description: When set, this will limit the total number of inbound calls - to phone numbers associated with this connection. - example: 10 - type: integer - sip_subdomain: - default: "null" - description: 'Specifies a subdomain that can be used to receive Inbound - calls to a Connection, in the same way a phone number is used, from a - SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called - from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" - where the user part can be any alphanumeric value. Please note TLS encrypted - calls are not allowed for subdomain calls.' - example: example + hold: + default: false + description: Whether the participant should be put on hold immediately after + joining the conference. + example: true + type: boolean + hold_audio_url: + description: The URL of an audio file to be played to the participant when + they are put on hold after joining the conference. This property takes + effect only if "hold" is set to "true". + example: http://www.example.com/audio.wav type: string - sip_subdomain_receive_settings: - default: from_anyone - description: 'This option can be enabled to receive calls from: "Anyone" - (any SIP endpoint in the public Internet) or "Only my connections" (any - connection assigned to the same Telnyx user).' + mute: + default: false + description: Whether the participant should be muted immediately after joining + the conference. + example: false + type: boolean + start_conference_on_enter: + default: false + description: Whether the conference should be started after the participant + joins the conference. + example: true + type: boolean + supervisor_role: + description: Sets the joining participant as a supervisor for the conference. + A conference can have multiple supervisors. "barge" means the supervisor + enters the conference as a normal participant. This is the same as "none". + "monitor" means the supervisor is muted but can hear all participants. + "whisper" means that only the specified "whisper_call_control_ids" can + hear the supervisor. Defaults to "none". enum: - - only_my_connections - - from_anyone - example: only_my_connections + - barge + - monitor + - none + - whisper + example: whisper type: string - title: Call Control Application Inbound - type: object - CallControlApplicationOutbound: - properties: - channel_limit: - description: When set, this will limit the total number of outbound calls - to phone numbers associated with this connection. - example: 10 - type: integer - outbound_voice_profile_id: - description: Identifies the associated outbound voice profile. - example: "1293384261075731499" - format: int64 + to: + description: The DID or SIP URI to dial out and bridge to the given call. + example: +18005550100 or sip:username@sip.telnyx.com type: string - title: Call Control Application Outbound + whisper_call_control_ids: + description: Array of unique call_control_ids the joining supervisor can + whisper to. If none provided, the supervisor will join the conference + as a monitoring participant only. + example: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + items: + type: string + type: array + required: + - call_control_id + - from + - to + title: Conference Dial Request type: object - CallControlCommandResult: + ConferenceCommandResult: example: result: ok properties: result: example: ok type: string - title: Call Control Command Result + required: + - result + title: Conference Command Result type: object - CallDtmfReceived: + ConferenceCreated: example: record_type: event - event_type: call.dtmf.received + event_type: conference.created id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6475,9 +10188,8 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - digit: '#' + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -6488,28 +10200,23 @@ components: event_type: description: The type of event being delivered. enum: - - call.dtmf.received - example: call.dtmf.received + - conference.created + example: conference.created type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallDtmfReceived_payload' - title: Call DTMF Received + $ref: '#/components/schemas/ConferenceCreated_payload' + title: Conference Created type: object - CallDtmfReceivedEvent: + ConferenceCreatedEvent: example: data: record_type: event - event_type: call.dtmf.received + event_type: conference.created id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6518,77 +10225,28 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - digit: '#' + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallDtmfReceived' - title: Call DTMF Received Event - type: object - CallEvent: - example: - record_type: call_event - call_leg_id: 308fe500-5213-11e9-ace7-02420a0f0668 - call_session_id: 308fec30-5213-11e9-9d3f-02420a0f0668 - event_timestamp: 2019-03-29T11:10:19.127783Z - name: call.hangup - type: webhook - metadata: {} - properties: - record_type: - enum: - - call_event - example: call_event - type: string - call_leg_id: - description: Uniquely identifies an individual call leg. - example: 308fe500-5213-11e9-ace7-02420a0f0668 - type: string - call_session_id: - description: Uniquely identifies the call control session. A session may - include multiple call leg events. - example: 308fec30-5213-11e9-9d3f-02420a0f0668 - type: string - event_timestamp: - description: Event timestamp - example: 2019-03-29T11:10:19.127783Z - type: string - name: - description: Event name - example: call.hangup - type: string - type: - description: Event type - enum: - - command - - webhook - example: webhook - type: string - metadata: - description: Event metadata, which includes raw event, and extra information - based on event type - type: object - required: - - call_leg_id - - call_session_id - - event_timestamp - - metadata - - name - - record_type - - type - title: Call Event + $ref: '#/components/schemas/ConferenceCreated' + title: Conference Created Event type: object - CallForkStarted: + ConferenceEnded: example: record_type: event - event_type: call.fork.started + event_type: conference.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z + reason: host_left properties: record_type: description: Identifies the type of the resource. @@ -6599,49 +10257,84 @@ components: event_type: description: The type of event being delivered. enum: - - call.fork.started - example: call.fork.started + - conference.ended + example: conference.ended type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallForkStarted_payload' - title: Call Fork Started + $ref: '#/components/schemas/ConferenceEnded_payload' + title: Conference Ended type: object - CallForkStartedEvent: + ConferenceEndedEvent: example: data: record_type: event - event_type: call.fork.started + event_type: conference.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z + reason: host_left properties: data: - $ref: '#/components/schemas/CallForkStarted' - title: Call Fork Started Event + $ref: '#/components/schemas/ConferenceEnded' + title: Conference Ended Event + type: object + ConferenceHoldRequest: + example: + call_control_ids: + - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + audio_url: http://example.com/message.wav + properties: + call_control_ids: + description: List of unique identifiers and tokens for controlling the call. + When empty all participants will be placed on hold. + items: + type: string + type: array + audio_url: + description: The URL of a file to be played back at the beginning of each + prompt. The URL can point to either a WAV or MP3 file. + example: http://example.com/message.wav + type: string + title: Conference Hold Request + type: object + ConferenceMuteRequest: + example: + call_control_ids: + - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + properties: + call_control_ids: + description: Array of unique identifiers and tokens for controlling the + call. When empty all participants will be muted. + items: + type: string + type: array + title: Conference Mute Request type: object - CallForkStopped: + ConferenceParticipantJoined: example: record_type: event - event_type: call.fork.stopped + event_type: conference.participant.joined id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 properties: record_type: description: Identifies the type of the resource. @@ -6652,8 +10345,8 @@ components: event_type: description: The type of event being delivered. enum: - - call.fork.stopped - example: call.fork.stopped + - conference.participant.joined + example: conference.participant.joined type: string id: description: Identifies the type of resource. @@ -6662,61 +10355,36 @@ components: type: string occurred_at: description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z + example: 2018-02-02T22:25:27.521Z format: date-time type: string payload: - $ref: '#/components/schemas/CallForkStarted_payload' - title: Call Fork Stopped + $ref: '#/components/schemas/ConferenceParticipantJoined_payload' + title: Conference Participant Joined type: object - CallForkStoppedEvent: + ConferenceParticipantJoinedEvent: example: data: record_type: event - event_type: call.fork.stopped + event_type: conference.participant.joined id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 properties: data: - $ref: '#/components/schemas/CallForkStopped' - title: Call Fork Stopped Event - type: object - CallForwarding: - description: The call forwarding settings for a phone number. - example: - call_forwarding_enabled: true - forwards_to: +13035559123 - forwarding_type: always - properties: - call_forwarding_enabled: - default: true - description: Indicates if call forwarding will be enabled for this number - if forwards_to and forwarding_type are filled in. Defaults to true for - backwards compatibility with APIV1 use of numbers endpoints. - example: true - type: boolean - forwards_to: - description: The phone number to which inbound calls to this number are - forwarded. Inbound calls will not be forwarded if this field is left blank. - If set, must be a +E.164-formatted phone number. - type: string - forwarding_type: - description: Call forwarding type. 'forwards_to' must be set for this to - have an effect. - enum: - - always - - on_failure - example: always - type: string + $ref: '#/components/schemas/ConferenceParticipantJoined' + title: Conference Participant Joined Event type: object - CallGatherEnded: + ConferenceParticipantLeft: example: record_type: event - event_type: call.gather.ended + event_type: conference.participant.left id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6725,10 +10393,7 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - digits: "123" - status: valid + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 properties: record_type: description: Identifies the type of the resource. @@ -6739,8 +10404,8 @@ components: event_type: description: The type of event being delivered. enum: - - call.gather.ended - example: call.gather.ended + - conference.participant.left + example: conference.participant.left type: string id: description: Identifies the type of resource. @@ -6749,18 +10414,18 @@ components: type: string occurred_at: description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z + example: 2018-02-02T22:25:27.521Z format: date-time type: string payload: - $ref: '#/components/schemas/CallGatherEnded_payload' - title: Call Gather Ended + $ref: '#/components/schemas/ConferenceParticipantJoined_payload' + title: Conference Participant Left type: object - CallGatherEndedEvent: + ConferenceParticipantLeftEvent: example: data: record_type: event - event_type: call.gather.ended + event_type: conference.participant.left id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6769,19 +10434,16 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - digits: "123" - status: valid + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 properties: data: - $ref: '#/components/schemas/CallGatherEnded' - title: Call Gather Ended Event + $ref: '#/components/schemas/ConferenceParticipantLeft' + title: Conference Participant Left Event type: object - CallHangup: + ConferenceParticipantPlaybackEnded: example: record_type: event - event_type: call.hangup + event_type: conference.participant.playback.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6790,12 +10452,10 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - state: hangup - hangup_cause: call_rejected - hangup_source: caller - sip_hangup_cause: "603" + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -6806,28 +10466,23 @@ components: event_type: description: The type of event being delivered. enum: - - call.hangup - example: call.hangup + - conference.participant.playback.ended + example: conference.participant.playback.ended type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallHangup_payload' - title: Call Hangup + $ref: '#/components/schemas/ConferenceParticipantPlaybackEnded_payload' + title: Conference Participant Playback Ended type: object - CallHangupEvent: + ConferenceParticipantPlaybackEndedEvent: example: data: record_type: event - event_type: call.hangup + event_type: conference.participant.playback.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6836,21 +10491,19 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - state: hangup - hangup_cause: call_rejected - hangup_source: caller - sip_hangup_cause: "603" + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallHangup' - title: Call Hangup Event + $ref: '#/components/schemas/ConferenceParticipantPlaybackEnded' + title: Conference Participant Playback Ended Event type: object - CallInitiated: + ConferenceParticipantPlaybackStarted: example: record_type: event - event_type: call.initiated + event_type: conference.participant.playback.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6859,10 +10512,10 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - direction: incoming - state: parked + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -6873,28 +10526,23 @@ components: event_type: description: The type of event being delivered. enum: - - call.initiated - example: call.initiated + - conference.participant.playback.started + example: conference.participant.playback.started type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallInitiated_payload' - title: Call Initiated + $ref: '#/components/schemas/ConferenceParticipantPlaybackEnded_payload' + title: Conference Participant Playback Started type: object - CallInitiatedEvent: + ConferenceParticipantPlaybackStartedEvent: example: data: record_type: event - event_type: call.initiated + event_type: conference.participant.playback.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: @@ -6903,29 +10551,30 @@ components: call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - direction: incoming - state: parked + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallInitiated' - title: Call Initiated Event + $ref: '#/components/schemas/ConferenceParticipantPlaybackStarted' + title: Conference Participant Playback Started Event type: object - CallMachineDetectionEnded: + ConferenceParticipantSpeakEnded: example: record_type: event - event_type: call.machine.detection.ended + event_type: conference.participant.speak.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - result: human + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -6936,57 +10585,54 @@ components: event_type: description: The type of event being delivered. enum: - - call.machine.detection.ended - example: call.machine.detection.ended + - conference.participant.speak.ended + example: conference.participant.speak.ended type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallMachineDetectionEnded_payload' - title: Call Machine Detection Ended + $ref: '#/components/schemas/ConferenceParticipantSpeakEnded_payload' + title: Conference Participant Speak Ended type: object - CallMachineDetectionEndedEvent: + ConferenceParticipantSpeakEndedEvent: example: data: record_type: event - event_type: call.machine.detection.ended + event_type: conference.participant.speak.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - result: human + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallMachineDetectionEnded' - title: Call Machine Detection Ended Event + $ref: '#/components/schemas/ConferenceParticipantSpeakEnded' + title: Conference Participant Speak Ended Event type: object - CallMachineGreetingEnded: + ConferenceParticipantSpeakStarted: example: record_type: event - event_type: call.machine.greeting.ended + event_type: conference.participant.speak.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - result: ended + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -6997,58 +10643,73 @@ components: event_type: description: The type of event being delivered. enum: - - call.machine.greeting.ended - example: call.machine.greeting.ended + - conference.participant.speak.started + example: conference.participant.speak.started type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallMachineGreetingEnded_payload' - title: Call Machine Greeting Ended + $ref: '#/components/schemas/ConferenceParticipantSpeakEnded_payload' + title: Conference Participant Speak Started type: object - CallMachineGreetingEndedEvent: + ConferenceParticipantSpeakStartedEvent: example: data: record_type: event - event_type: call.machine.greeting.ended + event_type: conference.participant.speak.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - from: +35319605860 - to: +35319605860 - result: ended + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallMachineGreetingEnded' - title: Call Machine Greeting Ended Event + $ref: '#/components/schemas/ConferenceParticipantSpeakStarted' + title: Conference Participant Speak Started Event type: object - CallPlaybackEnded: + ConferencePlayRequest: + example: + audio_url: http://www.example.com/sounds/greeting.wav + properties: + audio_url: + description: The URL of the file to be played back in the conference. The + URL can point to either a WAV or MP3 file. + example: http://www.example.com/sounds/greeting.wav + type: string + loop: + $ref: '#/components/schemas/Loopcount' + call_control_ids: + description: List of call control ids identifying participants the audio + file should be played to. If not given, the audio file will be played + to the entire conference. + items: + type: string + type: array + required: + - audio_url + title: Conference Play Request + type: object + ConferencePlaybackEnded: example: record_type: event - event_type: call.playback.ended + event_type: conference.playback.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - media_url: http://example.com/audio.wav - overlay: false - status: valid + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -7059,58 +10720,48 @@ components: event_type: description: The type of event being delivered. enum: - - call.playback.ended - example: call.playback.ended + - conference.playback.ended + example: conference.playback.ended type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallPlaybackEnded_payload' - title: Call Playback Ended + $ref: '#/components/schemas/ConferencePlaybackEnded_payload' + title: Conference Playback Ended type: object - CallPlaybackEndedEvent: + ConferencePlaybackEndedEvent: example: data: record_type: event - event_type: call.playback.ended + event_type: conference.playback.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - media_url: http://example.com/audio.wav - overlay: false - status: valid + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallPlaybackEnded' - title: Call Playback Ended Event + $ref: '#/components/schemas/ConferencePlaybackEnded' + title: Conference Playback Ended Event type: object - CallPlaybackStarted: + ConferencePlaybackStarted: example: record_type: event - event_type: call.playback.started + event_type: conference.playback.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - media_url: http://example.com/audio.wav - overlay: false + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -7121,91 +10772,47 @@ components: event_type: description: The type of event being delivered. enum: - - call.playback.started - example: call.playback.started + - conference.playback.started + example: conference.playback.started type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallPlaybackStarted_payload' - title: Call Playback Started + $ref: '#/components/schemas/ConferencePlaybackEnded_payload' + title: Conference Playback Started type: object - CallPlaybackStartedEvent: + ConferencePlaybackStartedEvent: example: data: record_type: event - event_type: call.playback.started + event_type: conference.playback.started id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - media_url: http://example.com/audio.wav - overlay: false + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + media_url: https://www.example.com/audio.mp3 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallPlaybackStarted' - title: Call Playback Started Event - type: object - CallRecording: - description: The call recording settings for a phone number. - example: - inbound_call_recording_enabled: true - inbound_call_recording_format: wav - inbound_call_recording_channels: single - properties: - inbound_call_recording_enabled: - default: false - description: When enabled, any inbound call to this number will be recorded. - type: boolean - inbound_call_recording_format: - default: wav - description: The audio file format for calls being recorded. - enum: - - wav - - mp3 - type: string - inbound_call_recording_channels: - default: single - description: When using 'dual' channels, final audio file will be stereo - recorded with the first leg on channel A, and the rest on channel B. - enum: - - single - - dual - type: string + $ref: '#/components/schemas/ConferencePlaybackStarted' + title: Conference Playback Started Event type: object - CallRecordingSaved: + ConferenceSpeakEnded: example: record_type: event - event_type: call.recording.saved + event_type: conference.speak.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - recording_started_at: 2018-02-02T22:20:27.521992Z - recording_ended_at: 2018-02-02T22:20:27.521992Z - channels: single - recording_urls: - mp3: http://example.com/recording.mp3 - wav: http://example.com/recording.wav - public_recording_urls: - mp3: http://example.com/recording.mp3 - wav: http://example.com/recording.wav + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -7216,65 +10823,129 @@ components: event_type: description: The type of event being delivered. enum: - - call.recording.saved - example: call.recording.saved + - conference.speak.ended + example: conference.speak.ended type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallRecordingSaved_payload' - title: Call Recording Saved + $ref: '#/components/schemas/ConferenceSpeakEnded_payload' + title: Conference Speak Ended type: object - CallRecordingSavedEvent: + ConferenceSpeakEndedEvent: example: data: record_type: event - event_type: call.recording.saved + event_type: conference.speak.ended id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - recording_started_at: 2018-02-02T22:20:27.521992Z - recording_ended_at: 2018-02-02T22:20:27.521992Z - channels: single - recording_urls: - mp3: http://example.com/recording.mp3 - wav: http://example.com/recording.wav - public_recording_urls: - mp3: http://example.com/recording.mp3 - wav: http://example.com/recording.wav + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallRecordingSaved' - title: Call Recording Saved Event + $ref: '#/components/schemas/ConferenceSpeakEnded' + title: Conference Speak Ended Event + type: object + ConferenceSpeakRequest: + example: + call_control_ids: + - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + payload: Say this to participants + payload_type: text + voice: female + language: en-US + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + properties: + call_control_ids: + description: Call Control IDs of participants who will hear the spoken text. + When empty all participants will hear the spoken text. + items: + type: string + type: array + payload: + description: The text or SSML to be converted into speech. There is a 5,000 + character limit. + example: Say this to participants + type: string + payload_type: + default: text + description: The type of the provided payload. The payload can either be + plain text, or Speech Synthesis Markup Language (SSML). + enum: + - text + - ssml + example: ssml + type: string + voice: + description: The gender of the voice used to speak the text. + enum: + - male + - female + example: female + type: string + language: + description: The language used to speak the text. + enum: + - arb + - cmn-CN + - cy-GB + - da-DK + - de-DE + - en-AU + - en-GB + - en-GB-WLS + - en-IN + - en-US + - es-ES + - es-MX + - es-US + - fr-CA + - fr-FR + - hi-IN + - is-IS + - it-IT + - ja-JP + - ko-KR + - nb-NO + - nl-NL + - pl-PL + - pt-BR + - pt-PT + - ro-RO + - ru-RU + - sv-SE + - tr-TR + example: en-US + type: string + command_id: + description: Use this field to avoid execution of duplicate commands. Telnyx + will ignore subsequent commands with the same `command_id` as one that + has already been executed. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + required: + - language + - payload + - voice + title: Conference Speak Request type: object - CallReferCompleted: + ConferenceSpeakStarted: example: record_type: event - event_type: call.refer.completed - id: 4ce4366d-8d87-44be-a00b-942154e9c5f5 - occurred_at: 2020-03-30T13:29:44.650000Z + event_type: conference.speak.started + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA - call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 - call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - connection_id: "1289082222292239760" - from: +35319605860 - sip_notify_response: 200 - to: +13129457420 + connection_id: 7267xxxxxxxxxxxxxx + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: record_type: description: Identifies the type of the resource. @@ -7285,1487 +10956,2180 @@ components: event_type: description: The type of event being delivered. enum: - - call.refer.completed - example: call.refer.completed + - conference.speak.started + example: conference.speak.started type: string id: description: Identifies the type of resource. example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 format: uuid type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time - type: string payload: - $ref: '#/components/schemas/CallReferCompleted_payload' + $ref: '#/components/schemas/ConferenceSpeakEnded_payload' + title: Conference Speak Started type: object - CallReferCompletedEvent: + ConferenceSpeakStartedEvent: example: data: record_type: event - event_type: call.refer.completed - id: 4ce4366d-8d87-44be-a00b-942154e9c5f5 - occurred_at: 2020-03-30T13:29:44.650000Z + event_type: conference.speak.started + id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + occurred_at: 2018-02-02T22:25:27.521992Z payload: - call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA - call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 - call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - connection_id: "1289082222292239760" - from: +35319605860 - sip_notify_response: 200 - to: +13129457420 + connection_id: 7267xxxxxxxxxxxxxx + creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 + conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + occured_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/CallReferCompleted' - title: Call Recording Saved Event + $ref: '#/components/schemas/ConferenceSpeakStarted' + title: Conference Speak Started Event type: object - CallReferFailed: + ConferenceUnholdRequest: example: - record_type: event - event_type: call.refer.failed - id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 - occurred_at: 2020-03-30T13:29:42.130013Z - payload: - call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA - call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 - call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - connection_id: "1289082222292239760" - from: +35319605860 - sip_notify_response: 603 - to: +13129457420 + call_control_ids: + - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + properties: + call_control_ids: + description: List of unique identifiers and tokens for controlling the call. + Enter each call control ID to be unheld. + items: + type: string + type: array + required: + - call_control_ids + title: Conference Unhold Request + type: object + ConferenceUnmuteRequest: + example: + call_control_ids: + - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + properties: + call_control_ids: + description: List of unique identifiers and tokens for controlling the call. + Enter each call control ID to be unmuted. When empty all participants + will be unmuted. + items: + type: string + type: array + title: Conference Unmute Request + type: object + Connection: + example: + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + outbound_voice_profile_id: "1293384261075731499" properties: + id: + description: Identifies the specific resource. + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: int64 + type: string record_type: description: Identifies the type of the resource. - enum: - - event - example: event + example: ip_connection type: string - event_type: - description: The type of event being delivered. + active: + description: Defaults to true + example: true + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: + example: string + type: string + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2018-02-02T22:25:27.521Z + type: string + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2018-02-02T22:25:27.521Z + type: string + webhook_event_url: + default: "null" + description: The URL where webhooks related to this connection will be sent. + example: https://example.com + format: url + nullable: true + type: string + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. + example: https://failover.example.com + format: url + nullable: true + type: string + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. enum: - - call.refer.failed - example: call.refer.failed + - "1" + - "2" + example: "1" type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + outbound_voice_profile_id: + description: Identifies the associated outbound voice profile. + example: "1293384261075731499" + format: int64 + title: Outbound Voice Profile ID type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time + title: Connection + type: object + ConnectionActive: + default: true + description: Specifies whether the connection can be used. + example: false + title: Connection Active + type: boolean + ConnectionName: + description: A user-assigned name to help manage the connection. + example: office-connection + title: Connection Name + type: string + ConnectionRtcpSettings: + example: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + properties: + port: + default: rtp+1 + description: RTCP port by default is rtp+1, it can also be set to rtcp-mux + enum: + - rtcp-mux + - rtp+1 type: string - payload: - $ref: '#/components/schemas/CallReferFailed_payload' + capture_enabled: + default: false + description: BETA - Enable the capture and storage of RTCP messages to create + QoS reports on the Telnyx Mission Control Portal. + example: true + type: boolean + report_frequency_secs: + default: 5 + description: RTCP reports are sent to customers based on the frequency set. + Frequency is in seconds and it can be set to values from 5 to 3000 seconds. + example: 10 + type: integer + title: Connection RTCP Settings type: object - CallReferFailedEvent: + CostInformation: example: - data: - record_type: event - event_type: call.refer.failed - id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 - occurred_at: 2020-03-30T13:29:42.130013Z - payload: - call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA - call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 - call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - connection_id: "1289082222292239760" - from: +35319605860 - sip_notify_response: 603 - to: +13129457420 + upfront_cost: "3.21" + monthly_cost: "6.54" + currency: USD properties: - data: - $ref: '#/components/schemas/CallReferFailed' - title: Call Recording Saved Event + upfront_cost: + example: "3.21" + type: string + monthly_cost: + example: "6.54" + type: string + currency: + description: The ISO 4217 code for the currency. + example: USD + type: string type: object - CallReferStarted: + CreateCallControlApplicationRequest: example: - record_type: event - event_type: call.refer.started - id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 - occurred_at: 2020-03-30T13:29:42.130013Z - payload: - call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA - call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 - call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - connection_id: "1289082222292239760" - from: +35319605860 - sip_notify_response: 100 - to: +13129457420 + application_name: call-router + webhook_event_url: https://example.com + active: false + anchorsite_override: '"Latency"' + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + webhook_api_version: "1" + webhook_event_failover_url: https://failover.example.com + webhook_timeout_secs: 25 properties: - record_type: - description: Identifies the type of the resource. + application_name: + description: A user-assigned name to help manage the application. + example: call-router + type: string + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url + type: string + active: + default: true + description: Specifies whether the connection can be used. + type: boolean + anchorsite_override: + default: '"Latency"' + description: | + Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. enum: - - event - example: event + - '"Latency"' + - '"Chicago, IL"' + - '"Ashburn, VA"' + - '"San Jose, CA"' + example: '"Amsterdam, Netherlands"' type: string - event_type: - description: The type of event being delivered. + dtmf_type: + default: RFC 2833 + description: Sets the type of DTMF digits sent from Telnyx to this Connection. + Note that DTMF digits sent to Telnyx will be accepted in all formats. enum: - - call.refer.started - example: call.refer.started + - RFC 2833 + - Inband + - SIP INFO + example: Inband type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + first_command_timeout: + default: false + description: Specifies whether calls to phone numbers associated with this + connection should hangup after timing out. + example: true + type: boolean + first_command_timeout_secs: + default: 30 + description: Specifies how many seconds to wait before timing out a dial + command. + example: 10 + type: integer + inbound: + $ref: '#/components/schemas/CallControlApplicationInbound' + outbound: + $ref: '#/components/schemas/CallControlApplicationOutbound' + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - payload: - $ref: '#/components/schemas/CallReferStarted_payload' - title: Call Refer Started - type: object - CallReferStartedEvent: - example: - data: - record_type: event - event_type: call.refer.started - id: fbeb70e0-54eb-4e26-8d19-56b43e66f754 - occurred_at: 2020-03-30T13:29:42.130013Z - payload: - call_control_id: v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA - call_leg_id: 817f7de8-728a-11ea-9ce6-02420a0f8969 - call_session_id: 817f8c2a-728a-11ea-9cbe-02420a0f8969 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - connection_id: "1289082222292239760" - from: +35319605860 - sip_notify_response: 100 - to: +13129457420 - properties: - data: - $ref: '#/components/schemas/CallReferStarted' - title: Call Refer Started Event + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + required: + - application_name + - webhook_event_url + title: Create Call Control Application Request type: object - CallRequest: + CreateConferenceRequest: example: - to: +18005550100 or sip:username@sip.telnyx.com - from: +18005550101 - connection_id: 7267xxxxxxxxxxxxxx - audio_url: http://www.example.com/sounds/greeting.wav - timeout_secs: 60 - timeout_limit_secs: 60 - webhook_url: https://www.example.com/server-b/ - webhook_url_method: POST - answering_machine_detection: detect - answering_machine_detection_config: - total_analysis_time_millis: 5000 - after_greeting_silence_millis: 1000 - between_words_silence_millis: 1000 - greeting_duration_millis: 1000 - initial_silence_millis: 1000 - maximum_number_of_words: 1000 - maximum_word_length_millis: 2000 - silence_threshold: 512 - greeting_total_analysis_time_millis: 50000 - greeting_silence_duration_millis: 2000 - custom_headers: - - name: head_1 - value: val_1 - - name: head_2 - value: val_2 + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + name: Business + beep_enabled: always client_state: aGF2ZSBhIG5pY2UgZGF5ID1d command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - link_to: ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg== - sip_auth_username: username - sip_auth_password: password + duration_minutes: 5 + hold_audio_url: http://www.example.com/audio.wav + start_conference_on_create: false properties: - to: - description: The DID or SIP URI to dial out to. - example: +18005550100 or sip:username@sip.telnyx.com - type: string - from: - description: The `from` number to be used as the caller id presented to - the destination (`to` number). The number should be in +E164 format. This - attribute will default to the `from` number of the original call if omitted. - example: +18005550101 - type: string - connection_id: - description: The ID of the connection to be used when dialing the destination. + call_control_id: + description: Unique identifier and token for controlling the call + example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== type: string - audio_url: - description: The URL of a file to be played back to the callee when the - call is answered. The URL can point to either a WAV or MP3 file. - example: http://example.com/message.wav + name: + description: Name of the conference + example: Business type: string - timeout_secs: - default: 30 - description: The number of seconds that Telnyx will wait for the call to - be answered by the destination to which it is being called. If the timeout - is reached before an answer is received, the call will hangup and a `call.hangup` - webhook with a `hangup_cause` of `timeout` will be sent. Minimum value - is 5 seconds. Maximum value is 120 seconds. - example: 60 - format: int32 - type: integer - time_limit_secs: - default: 14400 - description: Sets the maximum duration of a Call Control Leg in seconds. - If the time limit is reached, the call will hangup and a `call.hangup` - webhook with a `hangup_cause` of `time_limit` will be sent. For example, - by setting a time limit of 120 seconds, a Call Leg will be automatically - terminated two minutes after being answered. The default time limit is - 14400 seconds or 4 hours and this is also the maximum allowed call length. - example: 600 - format: int32 - type: integer - answering_machine_detection: - default: disabled - description: Enables Answering Machine Detection. When a call is answered, - Telnyx runs real-time detection to determine if it was picked up by a - human or a machine and sends an `call.machine.detection.ended` webhook - with the analysis result. If 'greeting_end' or 'detect_words' is used - and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' - webhook when the answering machine greeting ends with a beep or silence. - If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' - if a beep is detected. + beep_enabled: + default: never + description: Whether a beep sound should be played when participants join + and/or leave the conference. enum: - - detect - - detect_beep - - detect_words - - greeting_end - - disabled + - always + - never + - on_enter + - on_exit + example: on_exit type: string - answering_machine_detection_config: - $ref: '#/components/schemas/CallRequest_answering_machine_detection_config' - custom_headers: - description: Custom headers to be added to the SIP INVITE. - example: - - name: head_1 - value: val_1 - - name: head_2 - value: val_2 - items: - $ref: '#/components/schemas/CustomSipHeader' - type: array client_state: description: Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 - type: string - link_to: - description: Use another call's control id for sharing the same call session - id - example: ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg== - type: string - sip_auth_username: - description: SIP Authentication username used for SIP challenges. - type: string - sip_auth_password: - description: SIP Authentication password used for SIP challenges. - type: string - webhook_url: - description: Use this field to override the URL for which Telnyx will send - subsuqeunt webhooks to for this call. - example: https://www.example.com/server-b/ + comfort_noise: + default: true + description: Toggle background comfort noise. + example: false + type: boolean + command_id: + description: Use this field to avoid execution of duplicate commands. Telnyx + will ignore subsequent commands with the same `command_id` as one that + has already been executed. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - webhook_url_method: - default: POST - description: HTTP request type used for `webhook_url`. - enum: - - POST - - GET - example: GET + duration_minutes: + description: Time length (minutes) after which the conference will end. + example: 5 + type: integer + hold_audio_url: + description: The URL to an audio file to be played to participants joining + the conference. Takes effect only when "start_conference_on_create" is + set to "false". + example: http://www.example.com/audio.wav type: string + start_conference_on_create: + description: Whether the conference should be started on creation. If the + conference isn't started all participants that join are automatically + put on hold. Defaults to "true". + example: false + type: boolean required: - - connection_id - - from - - to - title: Dial Request + - call_control_id + - name + title: Create Conference Request type: object - CallSpeakEnded: + CreateCredentialConnectionRequest: example: - record_type: event - event_type: call.speak.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - status: completed + active: true + password: my123secure456password789 + user_name: myusername123 + anchorsite_override: Latency + connection_name: my name + sip_uri_calling_preference: ' disabled' + default_on_hold_comfort_noise_enabled: false + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_seconds: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 + outbound: + call_parking_enabled: true + ani_override: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: US + t38_reinvite_source: telnyx + outbound_voice_profile_id: "1293384261075731499" properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event - type: string - event_type: - description: The type of event being delivered. - enum: - - call.speak.ended - example: call.speak.ended + active: + description: Defaults to true + type: boolean + user_name: + description: The user name to be used as part of the credentials. Must be + 4-32 characters long and alphanumeric values only (no spaces or special + characters). + example: myusername123 type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + password: + description: The password to be used as part of the credentials. Must be + 8 to 128 characters long. + example: my123secure456password789 type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: type: string - payload: - $ref: '#/components/schemas/CallSpeakEnded_payload' - title: Call Speak Ended - type: object - CallSpeakEndedEvent: - example: - data: - record_type: event - event_type: call.speak.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - status: completed - properties: - data: - $ref: '#/components/schemas/CallSpeakEnded' - title: Call Speak Ended Event - type: object - CallSpeakStarted: - example: - record_type: event - event_type: call.speak.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - properties: - record_type: - description: Identifies the type of the resource. + sip_uri_calling_preference: + default: disabled + description: This feature enables inbound SIP URI calls to your Credential + Auth Connection. If enabled for all (unrestricted) then anyone who calls + the SIP URI @telnyx.com will be connected to your Connection. + You can also choose to allow only calls that are originated on any Connections + under your account (internal). enum: - - event - example: event + - disabled + - unrestricted + - internal type: string - event_type: - description: The type of event being delivered. - enum: - - call.speak.started - example: call.speak.started + default_on_hold_comfort_noise_enabled: + default: false + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + type: boolean + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: + default: false + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. + type: boolean + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer the sender and receiver negotiating + T38 directly if both are on the Telnyx network. If this is disabled, Telnyx + will be able to use T38 on just one leg of the call depending on each + leg's settings. + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521992Z - format: date-time + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - payload: - $ref: '#/components/schemas/CallSpeakStarted_payload' - title: Call Speak Started + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + inbound: + $ref: '#/components/schemas/CredentialInbound' + outbound: + $ref: '#/components/schemas/CredentialOutbound' + required: + - connection_name + - password + - user_name + title: Create Credential Connection Request type: object - CallSpeakStartedEvent: + CreateFaxApplicationRequest: example: - data: - record_type: event - event_type: call.speak.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + application_name: fax-router + active: false + anchorsite_override: Amsterdam, Netherlands + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_timeout_secs: 25 + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" properties: - data: - $ref: '#/components/schemas/CallSpeakStarted' - title: Call Speak Started Event + application_name: + description: A user-assigned name to help manage the application. + example: call-router + title: Application Name + type: string + active: + default: true + description: Specifies whether the connection can be used. + example: false + title: Connection Active + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url + title: Webhook Event URL + type: string + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true + title: Webhook Event Failover URL + type: string + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + title: Webhook Timeout Secs + type: integer + inbound: + $ref: '#/components/schemas/CreateFaxApplicationRequest_inbound' + outbound: + $ref: '#/components/schemas/CreateFaxApplicationRequest_outbound' + required: + - application_name + - webhook_event_url + title: Create Fax Application Request type: object - CnamListing: - description: The CNAM listing settings for a phone number. + CreateFqdnConnectionRequest: example: - cnam_listing_enabled: true - cnam_listing_details: example + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 properties: - cnam_listing_enabled: + active: + default: true + description: Defaults to true + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: + type: string + transport_protocol: + $ref: '#/components/schemas/FqdnConnectionTransportProtocol' + default_on_hold_comfort_noise_enabled: + default: true + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + type: boolean + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: default: false - description: Enables CNAM listings for this number. Requires cnam_listing_details - to also be set. + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. type: boolean - cnam_listing_details: - description: The CNAM listing details for this number. Must be alphanumeric - characters or spaces with a maximum length of 15. Requires cnam_listing_enabled - to also be set to true. + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer the sender and receiver negotiating + T38 directly if both are on the Telnyx network. If this is disabled, Telnyx + will be able to use T38 on just one leg of the call depending on each + leg's settings. + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - type: object - Conference: - example: - record_type: conference - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - name: All hands meeting - created_at: 2019-01-23T18:10:02.574Z - expires_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - region: sv1 - status: completed - end_reason: all_left - ended_by: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== - call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 - properties: - record_type: - enum: - - conference - example: conference + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - id: - description: Uniquely identifies the conference - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - name: - description: Name of the conference - example: All hands meeting + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + inbound: + $ref: '#/components/schemas/InboundFqdn' + required: + - connection_name + title: Create Fqdn Connection Request + CreateFqdnRequest: + example: + connection_id: "1516447646313612565" + fqdn: example.com + port: 8080 + dns_record_type: a + properties: + connection_id: + description: ID of the FQDN connection to which this IP should be attached. type: string - created_at: - description: ISO 8601 formatted date of when the conference was created - example: 2019-01-23T18:10:02.574Z + fqdn: + description: FQDN represented by this resource. + example: example.com type: string - expires_at: - description: ISO 8601 formatted date of when the conference will expire - example: 2019-01-23T18:10:02.574Z + port: + default: 5060 + description: Port to use when connecting to this FQDN. + example: 5060 + nullable: true + type: integer + dns_record_type: + description: The DNS record type for the FQDN. For cases where a port is + not set, the DNS record type must be 'srv'. For cases where a port is + set, the DNS record type must be 'a'. If the DNS record type is 'a' and + a port is not specified, 5060 will be used. + example: a type: string - updated_at: - description: ISO 8601 formatted date of when the conference was last updated - example: 2019-01-23T18:10:02.574Z + required: + - connection_id + - dns_record_type + - fqdn + title: Create Fqdn Request + type: object + CreateInboundIpRequest: + example: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: test + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 + properties: + ani_number_format: + default: E.164-national + description: This setting allows you to set the format with which the caller's + number (ANI) is sent for inbound phone calls. + enum: + - +E.164 + - E.164 + - +E.164-national + - E.164-national type: string - region: - description: Region where the conference is hosted - example: sv1 + dnis_number_format: + default: e164 + enum: + - +e164 + - e164 + - national type: string - status: - description: Status of the conference + codecs: + default: + - G722 + - G711U + - G711A + - G729 + - OPUS + - H.264 + description: 'Defines the list of codecs that Telnyx will send for inbound + calls to a specific number on your portal account, in priority order. + This only works when the Connection the number is assigned to uses Media + Handling mode: default. OPUS and H.264 codecs are available only when + using TCP or TLS transport for SIP.' + items: + type: string + type: array + default_routing_method: + description: Default routing method to be used when a number is associated + with the connection. Must be one of the routing method types or left blank, + other values are not allowed. enum: - - init - - in_progress - - completed - example: completed + - sequential + - round-robin type: string - end_reason: - description: Reason why the conference ended + channel_limit: + description: When set, this will limit the total number of inbound calls + to phone numbers associated with this connection. + type: integer + generate_ringback_tone: + default: false + description: Generate ringback tone through 183 session progress message + with early media. + type: boolean + isup_headers_enabled: + default: false + description: When set, inbound phone calls will receive ISUP parameters + via SIP headers. (Only when available and only when using TCP or TLS transport.) + type: boolean + prack_enabled: + default: false + description: Enable PRACK messages as defined in RFC3262. + type: boolean + privacy_zone_enabled: + default: false + description: By default, Telnyx does not send caller-id information when + the caller has chosen to hide this information. When this option is enabled, + Telnyx will send the SIP header Privacy:id plus the caller-id information + so that the receiver side can choose when to hide it. + type: boolean + sip_compact_headers_enabled: + default: true + description: Defaults to true. + type: boolean + sip_region: + default: US + description: Selects which `sip_region` to receive inbound calls from. If + null, the default region (US) will be used. enum: - - all_left - - ended_via_api - - host_left - - time_exceeded - example: all_left + - US + - Europe + - Australia type: string - ended_by: - $ref: '#/components/schemas/Conference_ended_by' - connection_id: - description: Identifies the connection associated with the conference - example: 3fa85f64-9191-4567-b3fc-2c963f66afa6 + sip_subdomain: + description: 'Specifies a subdomain that can be used to receive Inbound + calls to a Connection, in the same way a phone number is used, from a + SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called + from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" + where the user part can be any alphanumeric value. Please note TLS encrypted + calls are not allowed for subdomain calls.' type: string - required: - - created_at - - expires_at - - id - - name - - record_type - title: Conference + sip_subdomain_receive_settings: + description: 'This option can be enabled to receive calls from: "Anyone" + (any SIP endpoint in the public Internet) or "Only my connections" (any + connection assigned to the same Telnyx user).' + enum: + - only_my_connections + - from_anyone + type: string + timeout_1xx_secs: + default: 3 + description: Time(sec) before aborting if connection is not made. + maximum: 120 + minimum: 1 + type: integer + timeout_2xx_secs: + default: 90 + description: 'Time(sec) before aborting if call is unanswered (min: 1, max: + 600).' + type: integer + title: Create Inbound Ip Request type: object - ConferenceCallRequest: + CreateIpConnectionRequest: example: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - hold: true - hold_audio_url: http://www.example.com/audio.wav - mute: true - from: +18005550101 - to: +18005550100 - start_conference_on_enter: true - supervisor_role: whisper - whisper_call_control_ids: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: false + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + 'inbound:': + ani_number_format: +E.164 + dns_number_format: +e164 + codecs: G722 + default_primary_ip_id: 192.168.0.0 + default_tertiary_ip_id: 192.168.0.0 + default_secondary_ip_id: 192.168.0.0 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: test + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + tech_prefix: string + ip_authentication_method: token + ip_authentication_token: string + outbound_voice_profile_id: "1293384261075731499" properties: - call_control_id: - description: Unique identifier and token for controlling the call - example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== - type: string - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d - type: string - command_id: - description: Use this field to avoid execution of duplicate commands. Telnyx - will ignore subsequent commands with the same `command_id` as one that - has already been executed. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + active: + description: Defaults to true + example: true + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: + example: string type: string - from: - description: The `from` number to be used as the caller id presented to - the destination (`to` number). - example: +18005550101 + transport_protocol: + default: UDP + description: One of UDP, TLS, or TCP. Applies only to connections with IP + authentication or FQDN authentication. + enum: + - UDP + - TCP + - TLS + example: UDP type: string - hold: - default: false - description: Whether the participant should be put on hold immediately after - joining the conference. + default_on_hold_comfort_noise_enabled: + default: true + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. example: true type: boolean - hold_audio_url: - description: The URL of an audio file to be played to the participant when - they are put on hold after joining the conference. This property takes - effect only if "hold" is set to "true". - example: http://www.example.com/audio.wav - type: string - mute: + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: default: false - description: Whether the participant should be muted immediately after joining - the conference. - example: false + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. + example: true type: boolean - start_conference_on_enter: + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: default: false - description: Whether the conference should be started after the participant - joins the conference. - example: true + description: Enable on-net T38 if you prefer the sender and receiver negotiating + T38 directly if both are on the Telnyx network. If this is disabled, Telnyx + will be able to use T38 on just one leg of the call depending on each + leg's settings. + example: false type: boolean - supervisor_role: - description: Sets the joining participant as a supervisor for the conference. - A conference can have multiple supervisors. "barge" means the supervisor - enters the conference as a normal participant. This is the same as "none". - "monitor" means the supervisor is muted but can hear all participants. - "whisper" means that only the specified "whisper_call_control_ids" can - hear the supervisor. Defaults to "none". - enum: - - barge - - monitor - - none - - whisper - example: whisper + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url + type: string + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - to: - description: The DID or SIP URI to dial out and bridge to the given call. - example: +18005550100 or sip:username@sip.telnyx.com + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - whisper_call_control_ids: - description: Array of unique call_control_ids the joining supervisor can - whisper to. If none provided, the supervisor will join the conference - as a monitoring participant only. - example: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw - items: - type: string - type: array - required: - - call_control_id - - from - - to - title: Conference Dial Request - type: object - ConferenceCommandResult: + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + inbound: + $ref: '#/components/schemas/CreateInboundIpRequest' + outbound: + $ref: '#/components/schemas/OutboundIp' + title: Create IP Connection Request + CreateIpRequest: example: - result: ok + connection_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + ip_address: 192.168.0.0 + port: 5060 properties: - result: - example: ok + connection_id: + description: ID of the IP Connection to which this IP should be attached. type: string + ip_address: + description: IP adddress represented by this resource. + example: 192.168.0.0 + type: string + port: + default: 5060 + description: Port to use when connecting to this IP. + example: 5060 + type: integer required: - - result - title: Conference Command Result + - ip_address + title: Create Ip Request type: object - ConferenceCreated: + CreateLongCodeMessageRequest: example: - record_type: event - event_type: conference.created - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z + from: +18445550001 + to: +13125550002 + text: Hello, World! + subject: From Telnyx! + media_urls: + - http://example.com + webhook_url: http://example.com/webhooks + webhook_failover_url: https://backup.example.com/hooks + use_profile_webhooks: true + type: MMS properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + from: + description: Phone number, in +E.164 format, used to send the message. + format: address type: string - event_type: - description: The type of event being delivered. - enum: - - conference.created - example: conference.created + to: + description: Receiving address (+E.164 formatted phone number or short code). + example: +E.164 + format: address type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + text: + description: |- + Message body (i.e., content) as a non-empty string. + + **Required for SMS** type: string - payload: - $ref: '#/components/schemas/ConferenceCreated_payload' - title: Conference Created - type: object - ConferenceCreatedEvent: - example: - data: - record_type: event - event_type: conference.created - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferenceCreated' - title: Conference Created Event - type: object - ConferenceEnded: - example: - record_type: event - event_type: conference.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z - reason: host_left - properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + subject: + description: Subject of multimedia message type: string - event_type: - description: The type of event being delivered. - enum: - - conference.ended - example: conference.ended + media_urls: + description: |- + A list of media URLs. The total media size must be less than 1 MB. + + **Required for MMS** + items: + format: url + type: string + type: array + webhook_url: + description: The URL where webhooks related to this message will be sent. + format: url type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + webhook_failover_url: + description: The failover URL where webhooks related to this message will + be sent if sending to the primary URL fails. + format: url type: string - payload: - $ref: '#/components/schemas/ConferenceEnded_payload' - title: Conference Ended - type: object - ConferenceEndedEvent: - example: - data: - record_type: event - event_type: conference.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z - reason: host_left - properties: - data: - $ref: '#/components/schemas/ConferenceEnded' - title: Conference Ended Event + use_profile_webhooks: + default: true + description: If the profile this number is associated with has webhooks, + use them for delivery notifications. If webhooks are also specified on + the message itself, they will be attempted first, then those on the profile. + type: boolean + type: + description: The protocol for sending the message, either SMS or MMS. + enum: + - SMS + - MMS + type: string + auto_detect: + default: false + description: Automatically detect if an SMS message is unusually long and + exceeds a recommended limit of message parts. + type: boolean + required: + - from + - to type: object - ConferenceHoldRequest: + CreateMessageRequest: example: - call_control_ids: - - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - audio_url: http://example.com/message.wav + from: +18445550001 + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 + to: +18445550001 + text: Hello, World! + subject: From Telnyx! + media_urls: + - http://example.com + webhook_url: http://example.com/webhooks + webhook_failover_url: https://backup.example.com/hooks + use_profile_webhooks: true + type: MMS properties: - call_control_ids: - description: List of unique identifiers and tokens for controlling the call. - When empty all participants will be placed on hold. + from: + description: | + Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). + + **Required if sending with a phone number, short code, or alphanumeric sender ID.** + format: address + type: string + messaging_profile_id: + description: | + Unique identifier for a messaging profile. + + **Required if sending via number pool or with an alphanumeric sender ID.** + type: string + to: + description: Receiving address (+E.164 formatted phone number or short code). + example: +E.164 + format: address + type: string + text: + description: |- + Message body (i.e., content) as a non-empty string. + + **Required for SMS** + type: string + subject: + description: Subject of multimedia message + type: string + media_urls: + description: |- + A list of media URLs. The total media size must be less than 1 MB. + + **Required for MMS** items: + format: url type: string type: array - audio_url: - description: The URL of a file to be played back at the beginning of each - prompt. The URL can point to either a WAV or MP3 file. - example: http://example.com/message.wav + webhook_url: + description: The URL where webhooks related to this message will be sent. + format: url type: string - title: Conference Hold Request + webhook_failover_url: + description: The failover URL where webhooks related to this message will + be sent if sending to the primary URL fails. + format: url + type: string + use_profile_webhooks: + default: true + description: If the profile this number is associated with has webhooks, + use them for delivery notifications. If webhooks are also specified on + the message itself, they will be attempted first, then those on the profile. + type: boolean + type: + description: The protocol for sending the message, either SMS or MMS. + enum: + - SMS + - MMS + type: string + auto_detect: + default: false + description: Automatically detect if an SMS message is unusually long and + exceeds a recommended limit of message parts. + type: boolean + required: + - to type: object - ConferenceMuteRequest: + CreateMessagingHostedNumberOrderRequest: example: - call_control_ids: - - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + messaging_profile_id: dc8f39ac-953d-4520-b93b-786ae87db0da + phone_numbers: + - +18665550001 + - +18665550002 properties: - call_control_ids: - description: Array of unique identifiers and tokens for controlling the - call. When empty all participants will be muted. + phone_numbers: + description: Phone numbers to be used for hosted messaging. items: + format: +E.164 type: string type: array - title: Conference Mute Request + messaging_profile_id: + description: Automatically associate the number with this messaging profile + ID when the order is complete. + type: string type: object - ConferenceParticipantJoined: + CreateMessagingProfileRequest: example: - record_type: event - event_type: conference.participant.joined - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + name: My name + enabled: true + webhook_url: https://www.example.com/hooks + webhook_failover_url: https://backup.example.com/hooks + webhook_api_version: "2" + number_pool_settings: + toll_free_weight: 10 + long_code_weight: 1 + skip_unhealthy: true + sticky_sender: false + geomatch: false + url_shortener_settings: + domain: example.ex + prefix: "" + replace_blacklist_only: true + send_webhooks: false properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + name: + description: A user friendly name for the messaging profile. type: string - event_type: - description: The type of event being delivered. - enum: - - conference.participant.joined - example: conference.participant.joined + enabled: + default: true + description: Specifies whether the messaging profile is enabled or not. + type: boolean + webhook_url: + default: "" + description: The URL where webhooks related to this messaging profile will + be sent. + format: url + nullable: true type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + webhook_failover_url: + default: "" + description: The failover URL where webhooks related to this messaging profile + will be sent if sending to the primary URL fails. + format: url + nullable: true type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521Z - format: date-time + webhook_api_version: + default: "2" + description: Determines which webhook format will be used, Telnyx API v1, + v2, or a legacy 2010-04-01 format. + enum: + - "1" + - "2" + - 2010-04-01 type: string - payload: - $ref: '#/components/schemas/ConferenceParticipantJoined_payload' - title: Conference Participant Joined - type: object - ConferenceParticipantJoinedEvent: - example: - data: - record_type: event - event_type: conference.participant.joined - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - properties: - data: - $ref: '#/components/schemas/ConferenceParticipantJoined' - title: Conference Participant Joined Event + number_pool_settings: + $ref: '#/components/schemas/NumberPoolSettings' + url_shortener_settings: + $ref: '#/components/schemas/UrlShortenerSettings' + required: + - name type: object - ConferenceParticipantLeft: + CreateNumberOrderDocumentRequest: example: - record_type: event - event_type: conference.participant.left - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + id: 387d1e31-a218-4375-8151-103f2d5e2d2c + record_type: number_order_document + file_id: 1e3c5822-0362-4702-8e46-5a129f0d3976 + requirements_id: 36aaf27d-986b-493c-bd1b-de16af2e4292 + customer_reference: MY REF 001 + requirement_type: address_proof + created_at: 2018-01-01T00:00:00.000000Z properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event - type: string - event_type: - description: The type of event being delivered. - enum: - - conference.participant.left - example: conference.participant.left - type: string id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 + example: 387d1e31-a218-4375-8151-103f2d5e2d2c format: uuid + readOnly: true type: string - occurred_at: - description: ISO 8601 datetime of when the event occurred. - example: 2018-02-02T22:25:27.521Z - format: date-time - type: string - payload: - $ref: '#/components/schemas/ConferenceParticipantJoined_payload' - title: Conference Participant Left - type: object - ConferenceParticipantLeftEvent: - example: - data: - record_type: event - event_type: conference.participant.left - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - properties: - data: - $ref: '#/components/schemas/ConferenceParticipantLeft' - title: Conference Participant Left Event - type: object - ConferenceParticipantPlaybackEnded: - example: - record_type: event - event_type: conference.participant.playback.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z - properties: record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + example: number_order_document + readOnly: true + type: string + file_id: + description: The id of the file to associate as a number order document. + example: 1e3c5822-0362-4702-8e46-5a129f0d3976 + type: string + requirements_id: + description: Unique id for a requirement. + example: 36aaf27d-986b-493c-bd1b-de16af2e4292 type: string - event_type: - description: The type of event being delivered. + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 + type: string + requirement_type: enum: - - conference.participant.playback.ended - example: conference.participant.playback.ended + - address_proof + - identification + - reg_form + readOnly: true type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + created_at: + description: An ISO 8901 datetime string denoting when the number order + document was uploaded. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true type: string - payload: - $ref: '#/components/schemas/ConferenceParticipantPlaybackEnded_payload' - title: Conference Participant Playback Ended - type: object - ConferenceParticipantPlaybackEndedEvent: - example: - data: - record_type: event - event_type: conference.participant.playback.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferenceParticipantPlaybackEnded' - title: Conference Participant Playback Ended Event - type: object - ConferenceParticipantPlaybackStarted: + CreateNumberOrderRequest: example: - record_type: event - event_type: conference.participant.playback.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + phone_numbers: + - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + record_type: number_order_phone_number + phone_number: +19705555098 + regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + regulatory_requirements: + - record_type: phone_number_regulatory_requirement + requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 + field_type: address_id + requirements_met: true + status: success + record_type: number_order + phone_numbers_count: 1 + connection_id: "346789098765567" + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 + status: pending + customer_reference: MY REF 001 + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + requirements_met: true properties: + id: + example: 12ade33a-21c0-473b-b055-b3c836e1c292 + format: uuid + readOnly: true + type: string record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + example: number_order + readOnly: true type: string - event_type: - description: The type of event being delivered. + phone_numbers: + items: + $ref: '#/components/schemas/PhoneNumber' + type: array + writeOnly: true + phone_numbers_count: + description: The count of phone numbers in the number order. + example: 1 + readOnly: true + type: integer + connection_id: + description: Identifies the connection associated with this phone number. + example: "346789098765567" + type: string + messaging_profile_id: + description: Identifies the messaging profile associated with the phone + number. + example: abc85f64-5717-4562-b3fc-2c9600 + type: string + status: + description: The status of the order. enum: - - conference.participant.playback.started - example: conference.participant.playback.started + - pending + - success + - failure + readOnly: true type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 type: string - payload: - $ref: '#/components/schemas/ConferenceParticipantPlaybackEnded_payload' - title: Conference Participant Playback Started - type: object - ConferenceParticipantPlaybackStartedEvent: - example: - data: - record_type: event - event_type: conference.participant.playback.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferenceParticipantPlaybackStarted' - title: Conference Participant Playback Started Event - type: object - ConferenceParticipantSpeakEnded: + created_at: + description: An ISO 8901 datetime string denoting when the number order + was created. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + updated_at: + description: An ISO 8901 datetime string for when the number order was updated. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + requirements_met: + description: True if all requirements are met for every phone number, false + otherwise. + example: true + readOnly: true + type: boolean + CreateNumberPoolMessageRequest: example: - record_type: event - event_type: conference.participant.speak.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z + from: +18445550001 + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 + to: + - +13125550002 + text: Hello, World! + subject: From Telnyx! + media_urls: + - http://example.com + webhook_url: http://example.com/webhooks + webhook_failover_url: https://backup.example.com/hooks + use_profile_webhooks: true + type: MMS properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + messaging_profile_id: + description: Unique identifier for a messaging profile. type: string - event_type: - description: The type of event being delivered. + to: + description: Receiving address (+E.164 formatted phone number or short code). + example: +E.164 + format: address + type: string + text: + description: |- + Message body (i.e., content) as a non-empty string. + + **Required for SMS** + type: string + subject: + description: Subject of multimedia message + type: string + media_urls: + description: |- + A list of media URLs. The total media size must be less than 1 MB. + + **Required for MMS** + items: + format: url + type: string + type: array + webhook_url: + description: The URL where webhooks related to this message will be sent. + format: url + type: string + webhook_failover_url: + description: The failover URL where webhooks related to this message will + be sent if sending to the primary URL fails. + format: url + type: string + use_profile_webhooks: + default: true + description: If the profile this number is associated with has webhooks, + use them for delivery notifications. If webhooks are also specified on + the message itself, they will be attempted first, then those on the profile. + type: boolean + type: + description: The protocol for sending the message, either SMS or MMS. enum: - - conference.participant.speak.ended - example: conference.participant.speak.ended - type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + - SMS + - MMS type: string - payload: - $ref: '#/components/schemas/ConferenceParticipantSpeakEnded_payload' - title: Conference Participant Speak Ended - type: object - ConferenceParticipantSpeakEndedEvent: - example: - data: - record_type: event - event_type: conference.participant.speak.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferenceParticipantSpeakEnded' - title: Conference Participant Speak Ended Event + auto_detect: + default: false + description: Automatically detect if an SMS message is unusually long and + exceeds a recommended limit of message parts. + type: boolean + required: + - messaging_profile_id + - to type: object - ConferenceParticipantSpeakStarted: + CreateNumberReservationRequest: example: - record_type: event - event_type: conference.participant.speak.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + record_type: number_reservation + phone_numbers: + - id: 12ade33a-21c0-473b-b055-b3c836e1c292 + record_type: reserved_phone_number + phone_number: +19705555098 + status: pending + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + expired_at: 2018-01-01T00:00:00.000000Z + status: pending + customer_reference: MY REF 001 + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z properties: + id: + example: 12ade33a-21c0-473b-b055-b3c836e1c292 + format: uuid + readOnly: true + type: string record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + example: number_reservation + readOnly: true type: string - event_type: - description: The type of event being delivered. + phone_numbers: + items: + $ref: '#/components/schemas/ReservedPhoneNumber' + type: array + status: + description: The status of the entire reservation. enum: - - conference.participant.speak.started - example: conference.participant.speak.started + - pending + - success + - failure + readOnly: true type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 type: string - payload: - $ref: '#/components/schemas/ConferenceParticipantSpeakEnded_payload' - title: Conference Participant Speak Started - type: object - ConferenceParticipantSpeakStartedEvent: - example: - data: - record_type: event - event_type: conference.participant.speak.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - connection_id: 7267xxxxxxxxxxxxxx - call_leg_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferenceParticipantSpeakStarted' - title: Conference Participant Speak Started Event - type: object - ConferencePlayRequest: + created_at: + description: An ISO 8901 datetime string denoting when the numbers reservation + was created. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + updated_at: + description: An ISO 8901 datetime string for when the number reservation + was updated. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + CreateOutboundVoiceProfileRequest: example: - audio_url: http://www.example.com/sounds/greeting.wav + name: office + traffic_type: conversational + service_plan: global + concurrent_call_limit: 10 + enabled: true + tags: + - office-profile + usage_payment_method: rate-deck + whitelisted_destinations: + - US + - BR + - AU + max_destination_rate: 10 + daily_spend_limit: "100.00" + daily_spend_limit_enabled: true + billing_group_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 properties: - audio_url: - description: The URL of the file to be played back in the conference. The - URL can point to either a WAV or MP3 file. - example: http://www.example.com/sounds/greeting.wav + name: + default: "" + description: A user-supplied name to help with organization. + example: office type: string - loop: - $ref: '#/components/schemas/Loopcount' - call_control_ids: - description: List of call control ids identifying participants the audio - file should be played to. If not given, the audio file will be played - to the entire conference. + traffic_type: + $ref: '#/components/schemas/TrafficType' + service_plan: + $ref: '#/components/schemas/ServicePlan' + concurrent_call_limit: + description: Must be no more than your global concurrent call limit. Null + means no limit. + example: 10 + nullable: true + type: integer + enabled: + default: true + description: Specifies whether the outbound voice profile can be used. Disabled + profiles will result in outbound calls being blocked for the associated + Connections. + example: true + type: boolean + tags: + example: + - office-profile items: type: string type: array - required: - - audio_url - title: Conference Play Request + usage_payment_method: + $ref: '#/components/schemas/UsagePaymentMethod' + whitelisted_destinations: + default: + - US + - CA + description: The list of destinations you want to be able to call using + this outbound voice profile formatted in alpha2. + example: + - US + - BR + - AU + items: + type: string + type: array + max_destination_rate: + description: Maximum rate (price per minute) for a Destination to be allowed + when making outbound calls. + type: number + daily_spend_limit: + description: The maximum amount of usage charges, in USD, you want Telnyx + to allow on this outbound voice profile in a day before disallowing new + calls. + example: "100.00" + type: string + daily_spend_limit_enabled: + default: false + description: Specifies whether to enforce the daily_spend_limit on this + outbound voice profile. + example: true + type: boolean + call_recording: + $ref: '#/components/schemas/OutboundCallRecording' + billing_group_id: + description: The ID of the billing group associated with the outbound proflile. + Defaults to null (for no group assigned). + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: uuid + nullable: true + type: string + title: Outbound Voice Profile type: object - ConferencePlaybackEnded: + CreateShortCodeMessageRequest: example: - record_type: event - event_type: conference.playback.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z + from: +18445550001 + to: +18445550001 + text: Hello, World! + subject: From Telnyx! + media_urls: + - http://example.com + webhook_url: http://example.com/webhooks + webhook_failover_url: https://backup.example.com/hooks + use_profile_webhooks: true + type: MMS properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + from: + description: Phone number, in +E.164 format, used to send the message. + format: address type: string - event_type: - description: The type of event being delivered. - enum: - - conference.playback.ended - example: conference.playback.ended + to: + description: Receiving address (+E.164 formatted phone number or short code). + example: +E.164 + format: address + type: string + text: + description: |- + Message body (i.e., content) as a non-empty string. + + **Required for SMS** + type: string + subject: + description: Subject of multimedia message + type: string + media_urls: + description: |- + A list of media URLs. The total media size must be less than 1 MB. + + **Required for MMS** + items: + format: url + type: string + type: array + webhook_url: + description: The URL where webhooks related to this message will be sent. + format: url + type: string + webhook_failover_url: + description: The failover URL where webhooks related to this message will + be sent if sending to the primary URL fails. + format: url type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + use_profile_webhooks: + default: true + description: If the profile this number is associated with has webhooks, + use them for delivery notifications. If webhooks are also specified on + the message itself, they will be attempted first, then those on the profile. + type: boolean + type: + description: The protocol for sending the message, either SMS or MMS. + enum: + - SMS + - MMS type: string - payload: - $ref: '#/components/schemas/ConferencePlaybackEnded_payload' - title: Conference Playback Ended - type: object - ConferencePlaybackEndedEvent: - example: - data: - record_type: event - event_type: conference.playback.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferencePlaybackEnded' - title: Conference Playback Ended Event + auto_detect: + default: false + description: Automatically detect if an SMS message is unusually long and + exceeds a recommended limit of message parts. + type: boolean + required: + - from + - to type: object - ConferencePlaybackStarted: + CreateTexmlApplicationRequest: example: - record_type: event - event_type: conference.playback.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z + friendly_name: call-router + active: false + anchorsite_override: Amsterdam, Netherlands + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + voice_url: https://example.com + voice_fallback_url: https://fallback.example.com + voice_method: get + status_callback: https://example.com + status_callback_method: get + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event + friendly_name: + description: A user-assigned name to help manage the application. + example: call-router + title: Application Name type: string - event_type: - description: The type of event being delivered. + active: + default: true + description: Specifies whether the connection can be used. + example: false + title: Connection Active + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + dtmf_type: + $ref: '#/components/schemas/DtmfType' + first_command_timeout: + default: false + description: Specifies whether calls to phone numbers associated with this + connection should hangup after timing out. + example: true + title: First Command Timeout + type: boolean + first_command_timeout_secs: + default: 30 + description: Specifies how many seconds to wait before timing out a dial + command. + example: 10 + title: First Command Timeout Secs + type: integer + voice_url: + description: URL to which Telnyx will deliver your XML Translator webhooks. + example: https://example.com + format: url + type: string + voice_fallback_url: + default: "null" + description: URL to which Telnyx will deliver your XML Translator webhooks + if we get an error response from your voice_url. + example: https://fallback.example.com + format: url + type: string + voice_method: + default: post + description: HTTP request method Telnyx will use to interact with your XML + Translator webhooks. Either 'get' or 'post'. enum: - - conference.playback.started - example: conference.playback.started + - get + - post + example: get type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + status_callback: + default: "null" + description: URL for Telnyx to send requests to containing information about + call progress events. + example: https://example.com + format: url type: string - payload: - $ref: '#/components/schemas/ConferencePlaybackEnded_payload' - title: Conference Playback Started - type: object - ConferencePlaybackStartedEvent: - example: - data: - record_type: event - event_type: conference.playback.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - media_url: https://www.example.com/audio.mp3 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferencePlaybackStarted' - title: Conference Playback Started Event + status_callback_method: + default: post + description: HTTP request method Telnyx should use when requesting the status_callback + URL. + enum: + - get + - post + example: get + type: string + inbound: + $ref: '#/components/schemas/CreateTexmlApplicationRequest_inbound' + outbound: + $ref: '#/components/schemas/CreateTexmlApplicationRequest_outbound' + required: + - friendly_name + - voice_url + title: Create Texml Application Request type: object - ConferenceSpeakEnded: + CreatedAt: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2020-02-02T22:25:27.521Z + title: Created At + type: string + CredentialConnection: example: - record_type: event - event_type: conference.speak.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: credential_connection + active: true + user_name: myusername123 + password: my123secure456password789 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + anchorsite_override: Latency + connection_name: string + sip_uri_calling_preference: disabled + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtp+1 + capture_enabled: true + report_frequency_seconds: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + timeout_1xx_secs: 10 + timeout_2xx_secs: "15" + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + outbound_voice_profile_id: "1293384261075731499" properties: + id: + description: Identifies the type of resource. + example: "1293384261075731499" + format: int64 + type: string record_type: description: Identifies the type of the resource. - enum: - - event - example: event + example: credential_connection type: string - event_type: - description: The type of event being delivered. + active: + description: Defaults to true + type: boolean + user_name: + description: The user name to be used as part of the credentials. Must be + 4-32 characters long and alphanumeric values only (no spaces or special + characters). + example: myusername123 + type: string + password: + description: The password to be used as part of the credentials. Must be + 8 to 128 characters long. + example: my123secure456password789 + type: string + created_at: + description: ISO-8601 formatted date indicating when the resource was created. + example: 2018-02-02T22:25:27.521Z + type: string + updated_at: + description: ISO-8601 formatted date indicating when the resource was updated. + example: 2018-02-02T22:25:27.521Z + type: string + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: + type: string + sip_uri_calling_preference: + default: "null" + description: This feature enables inbound SIP URI calls to your Credential + Auth Connection. If enabled for all (unrestricted) then anyone who calls + the SIP URI @telnyx.com will be connected to your Connection. + You can also choose to allow only calls that are originated on any Connections + under your account (internal). enum: - - conference.speak.ended - example: conference.speak.ended + - disabled + - unrestricted + - internal + example: disabled type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + default_on_hold_comfort_noise_enabled: + default: true + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + type: boolean + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: + default: false + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. + type: boolean + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer the sender and receiver negotiating + T38 directly if both are on the Telnyx network. If this is disabled, Telnyx + will be able to use T38 on just one leg of the call depending on each + leg's settings. + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - payload: - $ref: '#/components/schemas/ConferenceSpeakEnded_payload' - title: Conference Speak Ended - type: object - ConferenceSpeakEndedEvent: - example: - data: - record_type: event - event_type: conference.speak.ended - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferenceSpeakEnded' - title: Conference Speak Ended Event - type: object - ConferenceSpeakRequest: - example: - call_control_ids: - - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - payload: Say this to participants - payload_type: text - voice: female - language: en-US - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true + type: string + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" + type: string + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + inbound: + $ref: '#/components/schemas/CredentialInbound' + outbound: + $ref: '#/components/schemas/CredentialOutbound' + title: Credential Connection + type: object + CredentialInbound: + example: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 properties: - call_control_ids: - description: Call Control IDs of participants who will hear the spoken text. - When empty all participants will hear the spoken text. + ani_number_format: + default: E.164-national + description: This setting allows you to set the format with which the caller's + number (ANI) is sent for inbound phone calls. + enum: + - +E.164 + - E.164 + - +E.164-national + - E.164-national + type: string + dnis_number_format: + default: e164 + enum: + - +e164 + - e164 + - national + type: string + codecs: + default: + - G722 + - G711U + - G711A + - G729 + - OPUS + - H.264 + description: 'Defines the list of codecs that Telnyx will send for inbound + calls to a specific number on your portal account, in priority order. + This only works when the Connection the number is assigned to uses Media + Handling mode: default. OPUS and H.264 codecs are available only when + using TCP or TLS transport for SIP.' items: type: string type: array - payload: - description: The text or SSML to be converted into speech. There is a 5,000 - character limit. - example: Say this to participants + channel_limit: + description: When set, this will limit the total number of inbound calls + to phone numbers associated with this connection. + type: integer + generate_ringback_tone: + default: false + description: Generate ringback tone through 183 session progress message + with early media. + type: boolean + isup_headers_enabled: + default: false + description: When set, inbound phone calls will receive ISUP parameters + via SIP headers. (Only when available and only when using TCP or TLS transport.) + type: boolean + prack_enabled: + default: false + description: Enable PRACK messages as defined in RFC3262. + type: boolean + privacy_zone_enabled: + default: false + description: By default, Telnyx does not send caller-id information when + the caller has chosen to hide this information. When this option is enabled, + Telnyx will send the SIP header Privacy:id plus the caller-id information + so that the receiver side can choose when to hide it. + type: boolean + sip_compact_headers_enabled: + default: true + description: Defaults to true. + type: boolean + timeout_1xx_secs: + default: 3 + description: Time(sec) before aborting if connection is not made. + maximum: 120 + minimum: 1 + type: integer + timeout_2xx_secs: + default: "90" + description: 'Time(sec) before aborting if call is unanswered (min: 1, max: + 600).' + maximum: 600 + minimum: 1 type: string - payload_type: - default: text - description: The type of the provided payload. The payload can either be - plain text, or Speech Synthesis Markup Language (SSML). - enum: - - text - - ssml - example: ssml + title: Credential Inbound + type: object + CredentialOutbound: + example: + call_parking_enabled: true + ani_override: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: US + t38_reinvite_source: telnyx + outbound_voice_profile_id: "1293384261075731499" + properties: + call_parking_enabled: + default: false + description: Forces all SIP calls originated on this connection to be "parked" + instead of "bridged" to the destination specified on the URI. Parked calls + will return ringback to the caller and will await for a Call Control command + to define which action will be taken next. + type: boolean + ani_override: + default: "" + description: Set a phone number as the ani_override value to override caller + id number on outbound calls. type: string - voice: - description: The gender of the voice used to speak the text. + ani_override_type: + default: always + description: Specifies when we apply your ani_override setting. Only applies + when ani_override is not blank. enum: - - male - - female - example: female + - always + - normal + - emergency type: string - language: - description: The language used to speak the text. + channel_limit: + description: When set, this will limit the total number of outbound calls + to phone numbers associated with this connection. + type: integer + instant_ringback_enabled: + default: true + description: When set, ringback will not wait for indication before sending + ringback tone to calling party. + type: boolean + generate_ringback_tone: + default: false + description: Generate ringback tone through 183 session progress message + with early media. + type: boolean + localization: + default: US + description: A 2-character country code specifying the country whose national + dialing rules should be used. For example, if set to `US` then any US + number can be dialed without preprending +1 to the number. When left blank, + Telnyx will try US and GB dialing rules, in that order, by default. + example: US + type: string + t38_reinvite_source: + default: telnyx + description: This setting only affects connections with Fax-type Outbound + Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 + reinvite.

By default, Telnyx will send the re-invite. If set + to `customer`, the caller is expected to send the t.38 reinvite. enum: - - arb - - cmn-CN - - cy-GB - - da-DK - - de-DE - - en-AU - - en-GB - - en-GB-WLS - - en-IN - - en-US - - es-ES - - es-MX - - es-US - - fr-CA - - fr-FR - - hi-IN - - is-IS - - it-IT - - ja-JP - - ko-KR - - nb-NO - - nl-NL - - pl-PL - - pt-BR - - pt-PT - - ro-RO - - ru-RU - - sv-SE - - tr-TR - example: en-US + - telnyx + - customer + - disabled + - passthru + - caller-passthru + - callee-passthru type: string - command_id: - description: Use this field to avoid execution of duplicate commands. Telnyx - will ignore subsequent commands with the same `command_id` as one that - has already been executed. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + outbound_voice_profile_id: + description: Identifies the associated outbound voice profile. + example: "1293384261075731499" + format: int64 + title: Outbound Voice Profile ID type: string - required: - - language - - payload - - voice - title: Conference Speak Request + title: Credential Outbound type: object - ConferenceSpeakStarted: + CsvDownload: example: - record_type: event - event_type: conference.speak.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z + id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + record_type: csv_download + url: https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + status: pending properties: + id: + description: Identifies the resource. + example: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + readOnly: true + type: string record_type: description: Identifies the type of the resource. - enum: - - event - example: event + example: csv_download + readOnly: true type: string - event_type: - description: The type of event being delivered. - enum: - - conference.speak.started - example: conference.speak.started + url: + description: The URL at which the CSV file can be retrieved. + example: https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7 type: string - id: - description: Identifies the type of resource. - example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - format: uuid + status: + default: pending + description: Indicates the completion level of the CSV report. Only complete + CSV download requests will be able to be retrieved. + enum: + - pending + - complete + - failed + - expired + example: pending type: string - payload: - $ref: '#/components/schemas/ConferenceSpeakEnded_payload' - title: Conference Speak Started type: object - ConferenceSpeakStartedEvent: - example: - data: - record_type: event - event_type: conference.speak.started - id: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0 - occurred_at: 2018-02-02T22:25:27.521992Z - payload: - connection_id: 7267xxxxxxxxxxxxxx - creator_call_session_id: 428c31b6-7af4-4bcb-b7f5-5013ef9657c1 - conference_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - occured_at: 2018-02-02T22:25:27.521Z - properties: - data: - $ref: '#/components/schemas/ConferenceSpeakStarted' - title: Conference Speak Started Event - type: object - ConferenceUnholdRequest: + CustomSipHeader: example: - call_control_ids: - - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + name: head_1 + value: val_1 properties: - call_control_ids: - description: List of unique identifiers and tokens for controlling the call. - Enter each call control ID to be unheld. - items: - type: string - type: array + name: + description: The name of the header to add. + example: head_1 + type: string + value: + description: The value of the header. + example: val_1 + type: string required: - - call_control_ids - title: Conference Unhold Request + - name + - value + title: Custom SIP Header type: object - ConferenceUnmuteRequest: + DtmfType: + default: RFC 2833 + description: Sets the type of DTMF digits sent from Telnyx to this Connection. + Note that DTMF digits sent to Telnyx will be accepted in all formats. + enum: + - RFC 2833 + - Inband + - SIP INFO + example: Inband + title: DTMF Type + type: string + EmergencySettings: + description: The emergency services settings for a phone number. example: - call_control_ids: - - v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + emergency_enabled: true + emergency_address_id: "1315261609962112019" properties: - call_control_ids: - description: List of unique identifiers and tokens for controlling the call. - Enter each call control ID to be unmuted. When empty all participants - will be unmuted. - items: - type: string - type: array - title: Conference Unmute Request + emergency_enabled: + default: false + description: Allows you to enable or disable emergency services on the phone + number. In order to enable emergency services, you must also set an emergency_address_id. + type: boolean + emergency_address_id: + description: Identifies the address to be used with emergency services. + format: int64 + type: string + emergency_status: + default: disabled + description: Represents the state of the number regarding emergency activation. + enum: + - disabled + - active + - provisioning + - deprovisioning + type: string type: object - CostInformation: - example: - upfront_cost: "3.21" - monthly_cost: "6.54" - currency: USD + EncryptedMedia: + description: Enable use of SRTP or ZRTP for encryption. Valid values are those + listed or null. Cannot be set to non-null if the transport_portocol is TLS. + enum: + - SRTP + - ZRTP + example: SRTP + nullable: true + type: string + Error: properties: - upfront_cost: - example: "3.21" + code: + example: "10015" + format: integer type: string - monthly_cost: - example: "6.54" + title: + example: Invalid sorting value type: string - currency: - description: The ISO 4217 code for the currency. - example: USD + detail: + example: The value provided for sorting is not valid. Check the value used + and try again. type: string - type: object - CreateCallControlApplicationRequest: + source: + $ref: '#/components/schemas/Error_source' + meta: + $ref: '#/components/schemas/Error_meta' + required: + - code + - title + Errors: + properties: + errors: + items: + $ref: '#/components/schemas/Error' + type: array + FaxApplication: example: - application_name: call-router - webhook_event_url: https://example.com + id: "1293384261075731499" + record_type: fax_application + application_name: fax-router active: false - anchorsite_override: '"Latency"' - dtmf_type: Inband - first_command_timeout: true - first_command_timeout_secs: 10 + anchorsite_override: Amsterdam, Netherlands + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_timeout_secs: 25 inbound: channel_limit: 10 sip_subdomain: example @@ -8773,69 +13137,219 @@ components: outbound: channel_limit: 10 outbound_voice_profile_id: "1293384261075731499" - webhook_api_version: "1" - webhook_event_failover_url: https://failover.example.com - webhook_timeout_secs: 25 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z properties: + id: + description: Identifies the resource. + example: "1293384261075731499" + format: int64 + readOnly: true + type: string + record_type: + description: Identifies the type of the resource. + example: fax_application + type: string application_name: description: A user-assigned name to help manage the application. example: call-router + title: Application Name type: string + active: + default: true + description: Specifies whether the connection can be used. + example: false + title: Connection Active + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' webhook_event_url: description: The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. example: https://example.com format: url + title: Webhook Event URL + type: string + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true + title: Webhook Event Failover URL + type: string + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + title: Webhook Timeout Secs + type: integer + inbound: + $ref: '#/components/schemas/CreateFaxApplicationRequest_inbound' + outbound: + $ref: '#/components/schemas/CreateFaxApplicationRequest_outbound' + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2018-02-02T22:25:27.521Z + type: string + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2018-02-02T22:25:27.521Z + type: string + title: Fax Application + type: object + FirstCommandTimeout: + default: false + description: Specifies whether calls to phone numbers associated with this connection + should hangup after timing out. + example: true + title: First Command Timeout + type: boolean + FirstCommandTimeoutSecs: + default: 30 + description: Specifies how many seconds to wait before timing out a dial command. + example: 10 + title: First Command Timeout Secs + type: integer + Fqdn: + example: + id: "1293384261075731499" + record_type: fqdn + connection_id: "1516447646313612565" + fqdn: example.com + port: 5060 + dns_record_type: a + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + properties: + id: + description: Identifies the resource. + example: "1293384261075731499" + format: int64 + type: string + record_type: + description: Identifies the type of the resource. + example: fqdn + type: string + connection_id: + description: ID of the FQDN connection to which this FQDN is attached. + type: string + fqdn: + description: FQDN represented by this resource. + example: example.com + type: string + port: + default: 5060 + description: Port to use when connecting to this FQDN. + example: 5060 + type: integer + dns_record_type: + description: The DNS record type for the FQDN. For cases where a port is + not set, the DNS record type must be 'srv'. For cases where a port is + set, the DNS record type must be 'a'. If the DNS record type is 'a' and + a port is not specified, 5060 will be used. + example: a + type: string + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2018-02-02T22:25:27.521Z + type: string + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2018-02-02T22:25:27.521Z + type: string + title: Fqdn + type: object + FqdnConnection: + example: + id: "1293384261075731499" + record_type: fqdn_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 + properties: + id: + description: Identifies the resource. + example: "1293384261075731499" + format: int64 + type: string + record_type: + description: Identifies the type of the resource. + example: fqdn_connection type: string active: - default: true - description: Specifies whether the connection can be used. + description: Defaults to true type: boolean anchorsite_override: - default: '"Latency"' - description: | - Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. - enum: - - '"Latency"' - - '"Chicago, IL"' - - '"Ashburn, VA"' - - '"San Jose, CA"' - example: '"Amsterdam, Netherlands"' + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: type: string + transport_protocol: + $ref: '#/components/schemas/FqdnConnectionTransportProtocol' + default_on_hold_comfort_noise_enabled: + default: true + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + type: boolean dtmf_type: - default: RFC 2833 - description: Sets the type of DTMF digits sent from Telnyx to this Connection. - Note that DTMF digits sent to Telnyx will be accepted in all formats. - enum: - - RFC 2833 - - Inband - - SIP INFO - example: Inband - type: string - first_command_timeout: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: default: false - description: Specifies whether calls to phone numbers associated with this - connection should hangup after timing out. - example: true + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. type: boolean - first_command_timeout_secs: - default: 30 - description: Specifies how many seconds to wait before timing out a dial - command. - example: 10 - type: integer - inbound: - $ref: '#/components/schemas/CallControlApplicationInbound' - outbound: - $ref: '#/components/schemas/CallControlApplicationOutbound' - webhook_api_version: - default: "1" - description: Determines which webhook format will be used, Telnyx API v1 - or v2. - enum: - - "1" - - "2" - example: "1" + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer that the sender and receiver + negotiate T38 directly when both are on the Telnyx network. If this is + disabled, Telnyx will be able to use T38 on just one leg of the call according + to each leg's settings. + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string webhook_event_failover_url: default: "" @@ -8846,6 +13360,15 @@ components: format: url nullable: true type: string + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" + type: string webhook_timeout_secs: description: Specifies how many seconds to wait before timing out a webhook. example: 25 @@ -8853,2394 +13376,3335 @@ components: minimum: 0 nullable: true type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2018-02-02T22:25:27.521Z + type: string + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2018-02-02T22:25:27.521Z + type: string + inbound: + $ref: '#/components/schemas/InboundFqdn' required: - - application_name - - webhook_event_url - title: Create Call Control Application Request + - connection_name + title: Fqdn Connection type: object - CreateConferenceRequest: + FqdnConnectionTransportProtocol: + default: UDP + description: One of UDP, TLS, or TCP. Applies only to connections with IP authentication + or FQDN authentication. + enum: + - UDP + - TCP + - TLS + type: string + GatherUsingAudioRequest: example: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - name: Business - beep_enabled: always + audio_url: http://example.com/message.wav + invalid_audio_url: http://example.com/message.wav + minimum_digits: 1 + maximum_digits: 10 + timeout_millis: 10000 + terminating_digit: '#' + valid_digits: "123" + inter_digit_timeout_millis: 10000 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - duration_minutes: 5 - hold_audio_url: http://www.example.com/audio.wav - start_conference_on_create: false properties: - call_control_id: - description: Unique identifier and token for controlling the call - example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + audio_url: + description: The URL of a file to be played back at the beginning of each + prompt. The URL can point to either a WAV or MP3 file. + example: http://example.com/message.wav type: string - name: - description: Name of the conference - example: Business + invalid_audio_url: + description: The URL of a file to play when digits don't match the `valid_digits` + parameter or the number of digits is not between `min` and `max`. The + URL can point to either a WAV or MP3 file. + example: http://example.com/invalid.wav + type: string + minimum_digits: + default: 1 + description: The minimum number of digits to fetch. This parameter has a + minimum value of 1. + example: 1 + format: int32 + type: integer + maximum_digits: + default: 128 + description: The maximum number of digits to fetch. This parameter has a + maximum value of 128. + example: 10 + format: int32 + type: integer + maximum_tries: + default: 3 + description: The maximum number of times the file should be played if there + is no input from the user on the call. + example: 3 + format: int32 + type: integer + timeout_millis: + default: 60000 + description: The number of milliseconds to wait for a DTMF response after + file playback ends before a replaying the sound file. + example: 60000 + format: int32 + type: integer + terminating_digit: + default: '#' + description: The digit used to terminate input if fewer than `maximum_digits` + digits have been gathered. + example: '#' type: string - beep_enabled: - description: Whether a beep sound should be played when participants join - and/or leave the conference. - enum: - - always - - never - - on_enter - - on_exit - example: on_exit + valid_digits: + default: 0123456789#* + description: A list of all digits accepted as valid. + example: "123" type: string + inter_digit_timeout_millis: + default: 5000 + description: The number of milliseconds to wait for input between digits. + example: 10000 + format: int32 + type: integer client_state: description: Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - comfort_noise: - default: true - description: Toggle background comfort noise. - example: false - type: boolean command_id: - description: Use this field to avoid execution of duplicate commands. Telnyx - will ignore subsequent commands with the same `command_id` as one that - has already been executed. + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - duration_minutes: - description: Time length (minutes) after which the conference will end. - example: 5 - type: integer - hold_audio_url: - description: The URL to an audio file to be played to participants joining - the conference. Takes effect only when "start_conference_on_create" is - set to "false". - example: http://www.example.com/audio.wav - type: string - start_conference_on_create: - description: Whether the conference should be started on creation. If the - conference isn't started all participants that join are automatically - put on hold. Defaults to "true". - example: false - type: boolean required: - - call_control_id - - name - title: Create Conference Request + - audio_url + title: Gather Using Audio Request type: object - CreateLongCodeMessageRequest: + GatherUsingSpeakRequest: example: - from: +18445550001 - to: +13125550002 - text: Hello, World! - subject: From Telnyx! - media_urls: - - http://example.com - webhook_url: http://example.com/webhooks - webhook_failover_url: https://backup.example.com/hooks - use_profile_webhooks: true - type: MMS + payload: say this on call + invalid_payload: say this on call + payload_type: text + service_level: premium + voice: male + language: arb + minimum_digits: 1 + maximum_digits: 10 + terminating_digit: '#' + valid_digits: "123" + inter_digit_timeout_millis: 10000 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 properties: - from: - description: Phone number, in +E.164 format, used to send the message. - format: address - type: string - to: - description: Receiving address (+E.164 formatted phone number or short code). - example: +E.164 - format: address - type: string - text: - description: |- - Message body (i.e., content) as a non-empty string. - - **Required for SMS** - type: string - subject: - description: Subject of multimedia message - type: string - media_urls: - description: |- - A list of media URLs. The total media size must be less than 1 MB. - - **Required for MMS** - items: - format: url - type: string - type: array - webhook_url: - description: The URL where webhooks related to this message will be sent. - format: url + payload: + description: The text or SSML to be converted into speech. There is a 5,000 + character limit. + example: Say this on the call type: string - webhook_failover_url: - description: The failover URL where webhooks related to this message will - be sent if sending to the primary URL fails. - format: url + invalid_payload: + description: The text or SSML to be converted into speech when digits don't + match the `valid_digits` parameter or the number of digits is not between + `min` and `max`. There is a 5,000 character limit. + example: Say this on the call type: string - use_profile_webhooks: - default: true - description: If the profile this number is associated with has webhooks, - use them for delivery notifications. If webhooks are also specified on - the message itself, they will be attempted first, then those on the profile. - type: boolean - type: - description: The protocol for sending the message, either SMS or MMS. + payload_type: + default: text + description: The type of the provided payload. The payload can either be + plain text, or Speech Synthesis Markup Language (SSML). enum: - - SMS - - MMS - type: string - auto_detect: - default: false - description: Automatically detect if an SMS message is unusually long and - exceeds a recommended limit of message parts. - type: boolean - required: - - from - - to - type: object - CreateMessageRequest: - example: - from: +18445550001 - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 - to: +18445550001 - text: Hello, World! - subject: From Telnyx! - media_urls: - - http://example.com - webhook_url: http://example.com/webhooks - webhook_failover_url: https://backup.example.com/hooks - use_profile_webhooks: true - type: MMS - properties: - from: - description: | - Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). - - **Required if sending with a phone number, short code, or alphanumeric sender ID.** - format: address + - text + - ssml + example: ssml type: string - messaging_profile_id: - description: | - Unique identifier for a messaging profile. - - **Required if sending via number pool or with an alphanumeric sender ID.** + service_level: + default: premium + description: This parameter impacts speech quality, language options and + payload types. When using `basic`, only the `en-US` language and payload + type `text` are allowed. + enum: + - basic + - premium + example: premium type: string - to: - description: Receiving address (+E.164 formatted phone number or short code). - example: +E.164 - format: address + voice: + description: The gender of the voice used to speak back the text. + enum: + - male + - female + example: female type: string - text: - description: |- - Message body (i.e., content) as a non-empty string. - - **Required for SMS** + language: + description: The language you want spoken. + enum: + - arb + - cmn-CN + - cy-GB + - da-DK + - de-DE + - en-AU + - en-GB + - en-GB-WLS + - en-IN + - en-US + - es-ES + - es-MX + - es-US + - fr-CA + - fr-FR + - hi-IN + - is-IS + - it-IT + - ja-JP + - ko-KR + - nb-NO + - nl-NL + - pl-PL + - pt-BR + - pt-PT + - ro-RO + - ru-RU + - sv-SE + - tr-TR + example: en-US type: string - subject: - description: Subject of multimedia message + minimum_digits: + default: 1 + description: The minimum number of digits to fetch. This parameter has a + minimum value of 1. + example: 1 + format: int32 + type: integer + maximum_digits: + default: 128 + description: The maximum number of digits to fetch. This parameter has a + maximum value of 128. + example: 10 + format: int32 + type: integer + maximum_tries: + default: 3 + description: The maximum number of times that a file should be played back + if there is no input from the user on the call. + example: 3 + format: int32 + type: integer + timeout_millis: + default: 60000 + description: The number of milliseconds to wait for a DTMF response after + speak ends before a replaying the sound file. + example: 60000 + format: int32 + type: integer + terminating_digit: + default: '#' + description: The digit used to terminate input if fewer than `maximum_digits` + digits have been gathered. + example: '#' type: string - media_urls: - description: |- - A list of media URLs. The total media size must be less than 1 MB. - - **Required for MMS** - items: - format: url - type: string - type: array - webhook_url: - description: The URL where webhooks related to this message will be sent. - format: url + valid_digits: + default: 0123456789#* + description: A list of all digits accepted as valid. + example: "123" type: string - webhook_failover_url: - description: The failover URL where webhooks related to this message will - be sent if sending to the primary URL fails. - format: url + inter_digit_timeout_millis: + default: 5000 + description: The number of milliseconds to wait for input between digits. + example: 10000 + format: int32 + type: integer + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - use_profile_webhooks: - default: true - description: If the profile this number is associated with has webhooks, - use them for delivery notifications. If webhooks are also specified on - the message itself, they will be attempted first, then those on the profile. - type: boolean - type: - description: The protocol for sending the message, either SMS or MMS. - enum: - - SMS - - MMS + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - auto_detect: - default: false - description: Automatically detect if an SMS message is unusually long and - exceeds a recommended limit of message parts. - type: boolean required: - - to + - language + - payload + - voice + title: Gather Using Speak Request type: object - CreateMessagingHostedNumberOrderRequest: + HangupRequest: example: - messaging_profile_id: dc8f39ac-953d-4520-b93b-786ae87db0da - phone_numbers: - - +18665550001 - - +18665550002 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 properties: - phone_numbers: - description: Phone numbers to be used for hosted messaging. - items: - format: +E.164 - type: string - type: array - messaging_profile_id: - description: Automatically associate the number with this messaging profile - ID when the order is complete. + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string + title: Hangup Request type: object - CreateMessagingProfileRequest: + HostedNumber: example: - name: My name - enabled: true - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - webhook_api_version: "2" - number_pool_settings: - toll_free_weight: 10 - long_code_weight: 1 - skip_unhealthy: true - sticky_sender: false - geomatch: false - url_shortener_settings: - domain: example.ex - prefix: "" - replace_blacklist_only: true - send_webhooks: false + - record_type: messaging_hosted_number + id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c + phone_number: +18665550001 + status: successful properties: - name: - description: A user friendly name for the messaging profile. + record_type: + example: messaging_hosted_number type: string - enabled: - default: true - description: Specifies whether the messaging profile is enabled or not. - type: boolean - webhook_url: - default: "" - description: The URL where webhooks related to this messaging profile will - be sent. - format: url - nullable: true + id: + description: Identifies the type of resource. + format: uuid + readOnly: true type: string - webhook_failover_url: - default: "" - description: The failover URL where webhooks related to this messaging profile - will be sent if sending to the primary URL fails. - format: url - nullable: true + phone_number: + description: The messaging hosted phone number (+E.164 format) + format: +E.164 type: string - webhook_api_version: - default: "2" - description: Determines which webhook format will be used, Telnyx API v1, - v2, or a legacy 2010-04-01 format. + status: enum: - - "1" - - "2" - - 2010-04-01 + - deleted + - failed + - pending + - successful type: string - number_pool_settings: - $ref: '#/components/schemas/NumberPoolSettings' - url_shortener_settings: - $ref: '#/components/schemas/UrlShortenerSettings' - required: - - name type: object - CreateNumberOrderDocumentRequest: + InboundFqdn: example: - id: 387d1e31-a218-4375-8151-103f2d5e2d2c - record_type: number_order_document - file_id: 1e3c5822-0362-4702-8e46-5a129f0d3976 - requirements_id: 36aaf27d-986b-493c-bd1b-de16af2e4292 - customer_reference: MY REF 001 - requirement_type: address_proof - created_at: 2018-01-01T00:00:00.000000Z + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: test + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 properties: - id: - example: 387d1e31-a218-4375-8151-103f2d5e2d2c - format: uuid - readOnly: true - type: string - record_type: - example: number_order_document - readOnly: true - type: string - file_id: - description: The id of the file to associate as a number order document. - example: 1e3c5822-0362-4702-8e46-5a129f0d3976 - type: string - requirements_id: - description: Unique id for a requirement. - example: 36aaf27d-986b-493c-bd1b-de16af2e4292 + ani_number_format: + default: E.164-national + description: This setting allows you to set the format with which the caller's + number (ANI) is sent for inbound phone calls. + enum: + - +E.164 + - E.164 + - +E.164-national + - E.164-national type: string - customer_reference: - description: A customer reference string for customer look ups. - example: MY REF 001 + dnis_number_format: + default: e164 + enum: + - +e164 + - e164 + - national type: string - requirement_type: + codecs: + default: + - G722 + - G711U + - G711A + - G729 + - OPUS + - H.264 + description: 'Defines the list of codecs that Telnyx will send for inbound + calls to a specific number on your portal account, in priority order. + This only works when the Connection the number is assigned to uses Media + Handling mode: default. OPUS and H.264 codecs are available only when + using TCP or TLS transport for SIP.' + items: + type: string + type: array + default_routing_method: + default: "null" + description: Default routing method to be used when a number is associated + with the connection. Must be one of the routing method types or null, + other values are not allowed. enum: - - address_proof - - identification - - reg_form - readOnly: true + - sequential + - round-robin + nullable: true type: string - created_at: - description: An ISO 8901 datetime string denoting when the number order - document was uploaded. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true + channel_limit: + description: When set, this will limit the total number of inbound calls + to phone numbers associated with this connection. + nullable: true + type: integer + generate_ringback_tone: + default: false + description: Generate ringback tone through 183 session progress message + with early media. + type: boolean + isup_headers_enabled: + default: false + description: When set, inbound phone calls will receive ISUP parameters + via SIP headers. (Only when available and only when using TCP or TLS transport.) + type: boolean + prack_enabled: + default: false + description: Enable PRACK messages as defined in RFC3262. + type: boolean + privacy_zone_enabled: + default: false + description: By default, Telnyx does not send caller-id information when + the caller has chosen to hide this information. When this option is enabled, + Telnyx will send the SIP header Privacy:id plus the caller-id information + so that the receiver side can choose when to hide it. + type: boolean + sip_compact_headers_enabled: + default: true + description: Defaults to true. + type: boolean + sip_region: + default: US + description: Selects which `sip_region` to receive inbound calls from. If + null, the default region (US) will be used. + enum: + - US + - Europe + - Australia type: string - CreateNumberOrderRequest: - example: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - phone_numbers: - - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - record_type: number_order_phone_number - phone_number: +19705555098 - regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - regulatory_requirements: - - record_type: phone_number_regulatory_requirement - requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 - field_type: address_id - requirements_met: true - status: success - record_type: number_order - phone_numbers_count: 1 - connection_id: "346789098765567" - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 - status: pending - customer_reference: MY REF 001 - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - requirements_met: true + sip_subdomain: + default: "null" + description: 'Specifies a subdomain that can be used to receive Inbound + calls to a Connection, in the same way a phone number is used, from a + SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called + from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" + where the user part can be any alphanumeric value. Please note TLS encrypted + calls are not allowed for subdomain calls.' + nullable: true + type: string + sip_subdomain_receive_settings: + default: from_anyone + description: 'This option can be enabled to receive calls from: "Anyone" + (any SIP endpoint in the public Internet) or "Only my connections" (any + connection assigned to the same Telnyx user).' + enum: + - only_my_connections + - from_anyone + type: string + timeout_1xx_secs: + default: 3 + description: Time(sec) before aborting if connection is not made. + maximum: 120 + minimum: 1 + type: integer + timeout_2xx_secs: + default: 90 + description: 'Time(sec) before aborting if call is unanswered (min: 1, max: + 600).' + type: integer + title: Inbound Fqdn + type: object + InboundIp: + example: + ani_number_format: +E.164 + dns_number_format: +e164 + codecs: G722 + default_primary_ip_id: 192.168.0.0 + default_tertiary_ip_id: 192.168.0.0 + default_secondary_ip_id: 192.168.0.0 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: test + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 properties: - id: - example: 12ade33a-21c0-473b-b055-b3c836e1c292 - format: uuid - readOnly: true + ani_number_format: + default: E.164-national + description: This setting allows you to set the format with which the caller's + number (ANI) is sent for inbound phone calls. + enum: + - +E.164 + - E.164 + - +E.164-national + - E.164-national type: string - record_type: - example: number_order - readOnly: true + dnis_number_format: + default: e164 + enum: + - +e164 + - e164 + - national type: string - phone_numbers: + codecs: + default: + - G722 + - G711U + - G711A + - G729 + - OPUS + - H.264 + description: 'Defines the list of codecs that Telnyx will send for inbound + calls to a specific number on your portal account, in priority order. + This only works when the Connection the number is assigned to uses Media + Handling mode: default. OPUS and H.264 codecs are available only when + using TCP or TLS transport for SIP.' items: - $ref: '#/components/schemas/PhoneNumber' + type: string type: array - writeOnly: true - phone_numbers_count: - description: The count of phone numbers in the number order. - example: 1 - readOnly: true + default_primary_ip_id: + description: |- + The default primary IP to use for the number. Only settable if the connection is + of IP authentication type. Value must be the ID of an authorized IP set on the connection. + example: 192.168.0.0 + type: string + default_secondary_ip_id: + description: |- + The default secondary IP to use for the number. Only settable if the connection is + of IP authentication type. Value must be the ID of an authorized IP set on the connection. + example: 192.168.0.0 + type: string + default_tertiary_ip_id: + description: |- + The default tertiary IP to use for the number. Only settable if the connection is + of IP authentication type. Value must be the ID of an authorized IP set on the connection. + example: 192.168.0.0 + type: string + default_routing_method: + description: Default routing method to be used when a number is associated + with the connection. Must be one of the routing method types or left blank, + other values are not allowed. + enum: + - sequential + - round-robin + type: string + channel_limit: + description: When set, this will limit the total number of inbound calls + to phone numbers associated with this connection. + example: 10 type: integer - connection_id: - description: Identifies the connection associated with this phone number. - example: "346789098765567" + generate_ringback_tone: + default: false + description: Generate ringback tone through 183 session progress message + with early media. + type: boolean + isup_headers_enabled: + default: false + description: When set, inbound phone calls will receive ISUP parameters + via SIP headers. (Only when available and only when using TCP or TLS transport.) + type: boolean + prack_enabled: + default: false + description: Enable PRACK messages as defined in RFC3262. + type: boolean + privacy_zone_enabled: + default: false + description: By default, Telnyx does not send caller-id information when + the caller has chosen to hide this information. When this option is enabled, + Telnyx will send the SIP header Privacy:id plus the caller-id information + so that the receiver side can choose when to hide it. + type: boolean + sip_compact_headers_enabled: + default: true + description: Defaults to true. + type: boolean + sip_region: + default: US + description: Selects which `sip_region` to receive inbound calls from. If + null, the default region (US) will be used. + enum: + - US + - Europe + - Australia type: string - messaging_profile_id: - description: Identifies the messaging profile associated with the phone - number. - example: abc85f64-5717-4562-b3fc-2c9600 + sip_subdomain: + description: 'Specifies a subdomain that can be used to receive Inbound + calls to a Connection, in the same way a phone number is used, from a + SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called + from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" + where the user part can be any alphanumeric value. Please note TLS encrypted + calls are not allowed for subdomain calls.' type: string - status: - description: The status of the order. + sip_subdomain_receive_settings: + description: 'This option can be enabled to receive calls from: "Anyone" + (any SIP endpoint in the public Internet) or "Only my connections" (any + connection assigned to the same Telnyx user).' enum: - - pending - - success - - failure - readOnly: true + - only_my_connections + - from_anyone type: string - customer_reference: - description: A customer reference string for customer look ups. - example: MY REF 001 + timeout_1xx_secs: + default: 3 + description: Time(sec) before aborting if connection is not made. + maximum: 120 + minimum: 1 + type: integer + timeout_2xx_secs: + default: 90 + description: 'Time(sec) before aborting if call is unanswered (min: 1, max: + 600).' + type: integer + title: Inbound Ip + type: object + InboundMessage: + example: + record_type: event + id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c + event_type: message.received + occurred_at: date-time + payload: + record_type: message + direction: inbound + id: 7ee4241c-f127-47e5-9c34-3aac291f8058 + type: SMS + messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 + from: + phone_number: +18665550001 + carrier: T-MOBILE USA, INC. + line_type: Wireless + to: + - phone_number: +18445550001 + status: delivered + carrier: TELNYX LLC + line_type: VoIP + text: Hello, World! + subject: From Telnyx! + media: [] + webhook_url: https://www.example.com/hooks + webhook_failover_url: https://backup.example.com/hooks + encoding: GSM-7 + parts: 1 + tags: + - Greetings + cost: null + received_at: 2019-01-23T18:10:02.574Z + sent_at: null + completed_at: null + valid_until: null + errors: [] + properties: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event type: string - created_at: - description: An ISO 8901 datetime string denoting when the number order - was created. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true + id: + description: Identifies the type of resource. + format: uuid type: string - updated_at: - description: An ISO 8901 datetime string for when the number order was updated. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true + event_type: + description: The type of event being delivered. + enum: + - message.received + example: message.received type: string - requirements_met: - description: True if all requirements are met for every phone number, false - otherwise. - example: true - readOnly: true - type: boolean - CreateNumberPoolMessageRequest: + occurred_at: + description: ISO 8601 formatted date indicating when the resource was created. + format: date-time + type: string + payload: + $ref: '#/components/schemas/InboundMessagePayload' + type: object + InboundMessageEvent: example: - from: +18445550001 - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 + data: + record_type: event + id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c + event_type: message.received + occurred_at: date-time + payload: + record_type: message + direction: inbound + id: 7ee4241c-f127-47e5-9c34-3aac291f8058 + type: SMS + messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 + from: + phone_number: +18665550001 + carrier: T-MOBILE USA, INC. + line_type: Wireless + to: + - phone_number: +18445550001 + status: delivered + carrier: TELNYX LLC + line_type: VoIP + text: Hello, World! + subject: From Telnyx! + media: [] + webhook_url: https://www.example.com/hooks + webhook_failover_url: https://backup.example.com/hooks + encoding: GSM-7 + parts: 1 + tags: + - Greetings + cost: null + received_at: 2019-01-23T18:10:02.574Z + sent_at: null + completed_at: null + valid_until: null + errors: [] + properties: + data: + $ref: '#/components/schemas/InboundMessage' + type: object + InboundMessagePayload: + example: + record_type: message + direction: inbound + id: 7ee4241c-f127-47e5-9c34-3aac291f8058 + type: SMS + messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 + from: + phone_number: +18665550001 + status: delivered + carrier: T-MOBILE USA, INC. + line_type: Wireless to: - - +13125550002 + - phone_number: +18445550001 + status: delivered + carrier: TELNYX LLC + line_type: VoIP text: Hello, World! subject: From Telnyx! - media_urls: - - http://example.com - webhook_url: http://example.com/webhooks + media: [] + webhook_url: https://www.example.com/hooks webhook_failover_url: https://backup.example.com/hooks - use_profile_webhooks: true - type: MMS - properties: - messaging_profile_id: - description: Unique identifier for a messaging profile. - type: string - to: - description: Receiving address (+E.164 formatted phone number or short code). - example: +E.164 - format: address - type: string - text: - description: |- - Message body (i.e., content) as a non-empty string. - - **Required for SMS** - type: string - subject: - description: Subject of multimedia message + encoding: GSM-7 + parts: 1 + tags: + - Greetings + cost: null + received_at: 2019-01-23T18:10:02.574Z + sent_at: null + completed_at: null + valid_until: null + errors: [] + properties: + record_type: + description: Identifies the type of the resource. + enum: + - message + example: message type: string - media_urls: - description: |- - A list of media URLs. The total media size must be less than 1 MB. - - **Required for MMS** - items: - format: url - type: string - type: array - webhook_url: - description: The URL where webhooks related to this message will be sent. - format: url + direction: + description: The direction of the message. Inbound messages are sent to + you whereas outbound messages are sent from you. + enum: + - inbound + example: inbound type: string - webhook_failover_url: - description: The failover URL where webhooks related to this message will - be sent if sending to the primary URL fails. - format: url + id: + description: Identifies the type of resource. + format: uuid type: string - use_profile_webhooks: - default: true - description: If the profile this number is associated with has webhooks, - use them for delivery notifications. If webhooks are also specified on - the message itself, they will be attempted first, then those on the profile. - type: boolean type: - description: The protocol for sending the message, either SMS or MMS. + description: The type of message. This value can be either 'sms' or 'mms'. enum: - SMS - MMS type: string - auto_detect: - default: false - description: Automatically detect if an SMS message is unusually long and - exceeds a recommended limit of message parts. - type: boolean - required: - - messaging_profile_id - - to - type: object - CreateNumberReservationRequest: - example: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - record_type: number_reservation - phone_numbers: - - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - record_type: reserved_phone_number - phone_number: +19705555098 - status: pending - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - expired_at: 2018-01-01T00:00:00.000000Z - status: pending - customer_reference: MY REF 001 - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - properties: - id: - example: 12ade33a-21c0-473b-b055-b3c836e1c292 - format: uuid - readOnly: true - type: string - record_type: - example: number_reservation - readOnly: true + messaging_profile_id: + description: Unique identifier for a messaging profile. type: string - phone_numbers: + to: items: - $ref: '#/components/schemas/ReservedPhoneNumber' + $ref: '#/components/schemas/InboundMessagePayload_to' + type: array + cc: + items: + $ref: '#/components/schemas/InboundMessagePayload_cc' type: array - status: - description: The status of the entire reservation. - enum: - - pending - - success - - failure - readOnly: true - type: string - customer_reference: - description: A customer reference string for customer look ups. - example: MY REF 001 - type: string - created_at: - description: An ISO 8901 datetime string denoting when the numbers reservation - was created. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - updated_at: - description: An ISO 8901 datetime string for when the number reservation - was updated. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - CreateShortCodeMessageRequest: - example: - from: +18445550001 - to: +18445550001 - text: Hello, World! - subject: From Telnyx! - media_urls: - - http://example.com - webhook_url: http://example.com/webhooks - webhook_failover_url: https://backup.example.com/hooks - use_profile_webhooks: true - type: MMS - properties: from: - description: Phone number, in +E.164 format, used to send the message. - format: address - type: string - to: - description: Receiving address (+E.164 formatted phone number or short code). - example: +E.164 - format: address - type: string + $ref: '#/components/schemas/InboundMessagePayload_from' text: description: |- Message body (i.e., content) as a non-empty string. **Required for SMS** type: string - subject: - description: Subject of multimedia message - type: string - media_urls: - description: |- - A list of media URLs. The total media size must be less than 1 MB. - - **Required for MMS** + media: items: - format: url - type: string + $ref: '#/components/schemas/InboundMessagePayload_media' type: array webhook_url: description: The URL where webhooks related to this message will be sent. format: url + nullable: true type: string webhook_failover_url: description: The failover URL where webhooks related to this message will be sent if sending to the primary URL fails. format: url + nullable: true type: string - use_profile_webhooks: - default: true - description: If the profile this number is associated with has webhooks, - use them for delivery notifications. If webhooks are also specified on - the message itself, they will be attempted first, then those on the profile. - type: boolean - type: - description: The protocol for sending the message, either SMS or MMS. - enum: - - SMS - - MMS + encoding: + description: Encoding scheme used for the message body. type: string - auto_detect: - default: false - description: Automatically detect if an SMS message is unusually long and - exceeds a recommended limit of message parts. - type: boolean - required: - - from - - to - type: object - CsvDownload: + parts: + description: Number of parts into which the message's body must be split. + maximum: 10 + minimum: 1 + type: integer + tags: + description: Tags associated with the resource. + items: + type: string + type: array + cost: + $ref: '#/components/schemas/InboundMessagePayload_cost' + received_at: + description: ISO 8601 formatted date indicating when the message request + was received. + format: date-time + type: string + sent_at: + description: Not used for inbound messages. + format: date-time + nullable: true + type: string + completed_at: + description: Not used for inbound messages. + format: date-time + nullable: true + type: string + valid_until: + description: Not used for inbound messages. + format: date-time + nullable: true + type: string + errors: + description: These errors may point at addressees when referring to unsuccessful/unconfirmed + delivery statuses. + items: + $ref: '#/components/schemas/Error' + type: array + IntId: + description: Identifies the resource. + example: "1293384261075731499" + format: int64 + readOnly: true + type: string + Ip: example: - id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 - record_type: csv_download - url: https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7 - status: pending + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip + connection_id: "3456789987654" + ip_address: 192.168.0.0 + port: 5060 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z properties: id: - description: Identifies the resource. - example: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 - readOnly: true + description: Identifies the type of resource. + example: "1293384261075731499" + format: int64 type: string record_type: description: Identifies the type of the resource. - example: csv_download - readOnly: true + example: ip type: string - url: - description: The URL at which the CSV file can be retrieved. - example: https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + connection_id: + description: ID of the IP Connection to which this IP should be attached. type: string - status: - default: pending - description: Indicates the completion level of the CSV report. Only complete - CSV download requests will be able to be retrieved. - enum: - - pending - - complete - - failed - - expired - example: pending + ip_address: + description: IP adddress represented by this resource. + example: 192.168.0.0 type: string - type: object - CustomSipHeader: - example: - name: head_1 - value: val_1 - properties: - name: - description: The name of the header to add. - example: head_1 + port: + default: 5060 + description: Port to use when connecting to this IP. + example: 5060 + type: integer + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2018-02-02T22:25:27.521Z type: string - value: - description: The value of the header. - example: val_1 + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2018-02-02T22:25:27.521Z type: string - required: - - name - - value - title: Custom SIP Header + title: Ip type: object - EmergencySettings: - description: The emergency services settings for a phone number. + IpConnection: example: - emergency_enabled: true - emergency_address_id: "1315261609962112019" + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_primary_ip_id: 192.0.2.1 + default_secondary_ip_id: 198.51.100.1 + default_tertiary_ip_id: 203.0.113.1 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + tech_prefix: string + ip_authentication_method: token + ip_authentication_token: string + outbound_voice_profile_id: "1293384261075731499" properties: - emergency_enabled: - default: false - description: Allows you to enable or disable emergency services on the phone - number. In order to enable emergency services, you must also set an emergency_address_id. - type: boolean - emergency_address_id: - description: Identifies the address to be used with emergency services. + id: + description: Identifies the type of resource. + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 format: int64 type: string - emergency_status: - default: disabled - description: Represents the state of the number regarding emergency activation. + record_type: + description: Identifies the type of the resource. + example: ip_connection + type: string + active: + description: Defaults to true + example: true + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: + example: string + type: string + transport_protocol: + default: UDP + description: One of UDP, TLS, or TCP. Applies only to connections with IP + authentication or FQDN authentication. enum: - - disabled - - active - - provisioning - - deprovisioning + - UDP + - TCP + - TLS + example: UDP type: string - type: object - Error: - properties: - code: - example: "10015" - format: integer + default_on_hold_comfort_noise_enabled: + default: true + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + example: true + type: boolean + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: + default: false + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. + example: true + type: boolean + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer the sender and receiver negotiating + T38 directly if both are on the Telnyx network. If this is disabled, Telnyx + will be able to use T38 on just one leg of the call depending on each + leg's settings. + example: false + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - title: - example: Invalid sorting value + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - detail: - example: The value provided for sorting is not valid. Check the value used - and try again. + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - source: - $ref: '#/components/schemas/Error_source' - meta: - $ref: '#/components/schemas/Error_meta' - required: - - code - - title - Errors: - properties: - errors: - items: - $ref: '#/components/schemas/Error' - type: array - GatherUsingAudioRequest: + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2018-02-02T22:25:27.521Z + type: string + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2018-02-02T22:25:27.521Z + type: string + inbound: + $ref: '#/components/schemas/InboundIp' + outbound: + $ref: '#/components/schemas/OutboundIp' + title: Ip Connection + type: object + JoinConferenceRequest: example: - audio_url: http://example.com/message.wav - invalid_audio_url: http://example.com/message.wav - minimum_digits: 1 - maximum_digits: 10 - timeout_millis: 10000 - terminating_digit: '#' - valid_digits: "123" - inter_digit_timeout_millis: 10000 + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ client_state: aGF2ZSBhIG5pY2UgZGF5ID1d command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + end_conference_on_exit: true + hold: true + hold_audio_url: http://www.example.com/audio.wav + mute: true + start_conference_on_enter: true + supervisor_role: whisper + whisper_call_control_ids: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw properties: - audio_url: - description: The URL of a file to be played back at the beginning of each - prompt. The URL can point to either a WAV or MP3 file. - example: http://example.com/message.wav - type: string - invalid_audio_url: - description: The URL of a file to play when digits don't match the `valid_digits` - parameter or the number of digits is not between `min` and `max`. The - URL can point to either a WAV or MP3 file. - example: http://example.com/invalid.wav - type: string - minimum_digits: - default: 1 - description: The minimum number of digits to fetch. This parameter has a - minimum value of 1. - example: 1 - format: int32 - type: integer - maximum_digits: - default: 128 - description: The maximum number of digits to fetch. This parameter has a - maximum value of 128. - example: 10 - format: int32 - type: integer - maximum_tries: - default: 3 - description: The maximum number of times the file should be played if there - is no input from the user on the call. - example: 3 - format: int32 - type: integer - timeout_millis: - default: 60000 - description: The number of milliseconds to wait for a DTMF response after - file playback ends before a replaying the sound file. - example: 60000 - format: int32 - type: integer - terminating_digit: - default: '#' - description: The digit used to terminate input if fewer than `maximum_digits` - digits have been gathered. - example: '#' - type: string - valid_digits: - default: 0123456789#* - description: A list of all digits accepted as valid. - example: "123" + call_control_id: + description: Unique identifier and token for controlling the call + example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== type: string - inter_digit_timeout_millis: - default: 5000 - description: The number of milliseconds to wait for input between digits. - example: 10000 - format: int32 - type: integer client_state: description: Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. + description: Use this field to avoid execution of duplicate commands. Telnyx + will ignore subsequent commands with the same `command_id` as one that + has already been executed. example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string + end_conference_on_exit: + description: Whether the conference should end and all remaining participants + be hung up after the participant leaves the conference. Defaults to "false". + example: true + type: boolean + soft_end_conference_on_exit: + description: Whether the conference should end after the participant leaves + the conference. NOTE this doesn't hang up the other participants. Defaults + to "false". + example: true + type: boolean + hold: + description: Whether the participant should be put on hold immediately after + joining the conference. Defaults to "false". + example: true + type: boolean + hold_audio_url: + description: The URL of an audio file to be played to the participant when + they are put on hold after joining the conference. This property takes + effect only if "hold" is set to "true". + example: http://www.example.com/audio.wav + type: string + mute: + description: Whether the participant should be muted immediately after joining + the conference. Defaults to "false". + example: true + type: boolean + start_conference_on_enter: + description: Whether the conference should be started after the participant + joins the conference. Defaults to "false". + example: true + type: boolean + supervisor_role: + description: Sets the joining participant as a supervisor for the conference. + A conference can have multiple supervisors. "barge" means the supervisor + enters the conference as a normal participant. This is the same as "none". + "monitor" means the supervisor is muted but can hear all participants. + "whisper" means that only the specified "whisper_call_control_ids" can + hear the supervisor. Defaults to "none". + enum: + - barge + - monitor + - none + - whisper + example: whisper + type: string + whisper_call_control_ids: + description: Array of unique call_control_ids the joining supervisor can + whisper to. If none provided, the supervisor will join the conference + as a monitoring participant only. + example: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + items: + type: string + type: array + required: + - call_control_id + title: Join Conference Request + type: object + Loopcount: + oneOf: + - type: string + - type: integer + MediaFeatures: + description: The media features settings for a phone number. + example: + rtp_auto_adjust_enabled: true + media_handling_mode: default + accept_any_rtp_packets_enabled: true + t38_fax_gateway_enabled: true + properties: + rtp_auto_adjust_enabled: + default: true + description: When RTP Auto-Adjust is enabled, the destination RTP address + port will be automatically changed to match the source of the incoming + RTP packets. + type: boolean + media_handling_mode: + default: default + description: 'Controls how media is handled for the phone number. default: + media routed through Telnyx with transcode support. proxy: media routed + through Telnyx with no transcode support.' + enum: + - default + - proxy + type: string + accept_any_rtp_packets_enabled: + default: false + description: When enabled, Telnyx will accept RTP packets from any customer-side + IP address and port, not just those to which Telnyx is sending RTP. + type: boolean + t38_fax_gateway_enabled: + default: false + description: Controls whether Telnyx will accept a T.38 re-INVITE for this + phone number. Note that Telnyx will not send a T.38 re-INVITE; this option + only controls whether one will be accepted. + type: boolean + type: object + MessagingFeatureSet: + description: | + The set of features available for a specific messaging use case (SMS or MMS). Features + can vary depending on the characteristics the phone number, as well as its current + product configuration. + example: + domestic_two_way: true + international_inbound: false + international_outbound: true + nullable: true + properties: + domestic_two_way: + description: Send messages to and receive messages from numbers in the same + country. + type: boolean + international_inbound: + description: Receive messages from numbers in other countries. + type: boolean + international_outbound: + description: Send messages to numbers in other countries. + type: boolean required: - - audio_url - title: Gather Using Audio Request + - domestic_two_way + - international_inbound + - international_outbound type: object - GatherUsingSpeakRequest: + MessagingHostedNumberOrder: example: - payload: say this on call - invalid_payload: say this on call - payload_type: text - service_level: premium - voice: male - language: arb - minimum_digits: 1 - maximum_digits: 10 - terminating_digit: '#' - valid_digits: "123" - inter_digit_timeout_millis: 10000 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 + record_type: messaging_hosted_number_order + profile_id: dc8f39ac-953d-4520-b93b-786ae87db0da + status: pending + phone_numbers: + - record_type: messaging_hosted_number + id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c + phone_number: +18665550001 + status: pending + - record_type: messaging_hosted_number + id: 464bd54e-a328-4b11-a131-28e6793cb6f2 + phone_number: +18665550002 + status: pending properties: - payload: - description: The text or SSML to be converted into speech. There is a 5,000 - character limit. - example: Say this on the call + record_type: + description: Identifies the type of the resource. + example: messaging_hosted_number_order + readOnly: true type: string - invalid_payload: - description: The text or SSML to be converted into speech when digits don't - match the `valid_digits` parameter or the number of digits is not between - `min` and `max`. There is a 5,000 character limit. - example: Say this on the call + id: + description: Resource unique identifier. + format: uuid + readOnly: true type: string - payload_type: - default: text - description: The type of the provided payload. The payload can either be - plain text, or Speech Synthesis Markup Language (SSML). - enum: - - text - - ssml - example: ssml + messaging_profile_id: + description: Automatically associate the number with this messaging profile + ID when the order is complete. + nullable: true type: string - service_level: - default: premium - description: This parameter impacts speech quality, language options and - payload types. When using `basic`, only the `en-US` language and payload - type `text` are allowed. + status: enum: - - basic - - premium - example: premium + - failed + - pending + - successful type: string - voice: - description: The gender of the voice used to speak back the text. + phone_numbers: + items: + $ref: '#/components/schemas/HostedNumber' + type: array + type: object + MessagingProfile: + example: + record_type: messaging_profile + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + name: Profile for Messages + webhook_url: https://www.example.com/hooks + webhook_failover_url: https://backup.example.com/hooks + enabled: true + webhook_api_version: "2" + whitelisted_destinations: + - US + created_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + number_pool_settings: + toll_free_weight: 10 + long_code_weight: 2 + skip_unhealthy: false + sticky_sender: true + geomatch: false + url_shortener_settings: + domain: example.ex + prefix: cmpny + replace_blacklist_only: true + send_webhooks: false + v1_secret: rP1VamejkU2v0qIUxntqLW2c + properties: + record_type: + description: Identifies the type of the resource. enum: - - male - - female - example: female + - messaging_profile + readOnly: true type: string - language: - description: The language you want spoken. - enum: - - arb - - cmn-CN - - cy-GB - - da-DK - - de-DE - - en-AU - - en-GB - - en-GB-WLS - - en-IN - - en-US - - es-ES - - es-MX - - es-US - - fr-CA - - fr-FR - - hi-IN - - is-IS - - it-IT - - ja-JP - - ko-KR - - nb-NO - - nl-NL - - pl-PL - - pt-BR - - pt-PT - - ro-RO - - ru-RU - - sv-SE - - tr-TR - example: en-US + id: + description: Identifies the type of resource. + format: uuid + readOnly: true type: string - minimum_digits: - default: 1 - description: The minimum number of digits to fetch. This parameter has a - minimum value of 1. - example: 1 - format: int32 - type: integer - maximum_digits: - default: 128 - description: The maximum number of digits to fetch. This parameter has a - maximum value of 128. - example: 10 - format: int32 - type: integer - maximum_tries: - default: 3 - description: The maximum number of times that a file should be played back - if there is no input from the user on the call. - example: 3 - format: int32 - type: integer - timeout_millis: - default: 60000 - description: The number of milliseconds to wait for a DTMF response after - speak ends before a replaying the sound file. - example: 60000 - format: int32 - type: integer - terminating_digit: - default: '#' - description: The digit used to terminate input if fewer than `maximum_digits` - digits have been gathered. - example: '#' + name: + description: A user friendly name for the messaging profile. type: string - valid_digits: - default: 0123456789#* - description: A list of all digits accepted as valid. - example: "123" + enabled: + description: Specifies whether the messaging profile is enabled or not. + type: boolean + webhook_url: + description: The URL where webhooks related to this messaging profile will + be sent. + format: url + nullable: true type: string - inter_digit_timeout_millis: - default: 5000 - description: The number of milliseconds to wait for input between digits. - example: 10000 - format: int32 - type: integer - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + webhook_failover_url: + description: The failover URL where webhooks related to this messaging profile + will be sent if sending to the primary URL fails. + format: url + nullable: true type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + webhook_api_version: + description: Determines which webhook format will be used, Telnyx API v1, + v2, or a legacy 2010-04-01 format. + enum: + - "1" + - "2" + - 2010-04-01 type: string - required: - - language - - payload - - voice - title: Gather Using Speak Request + whitelisted_destinations: + description: Destinations to which the messaging profile is allowed to send. + If set to `null`, all destinations will be allowed. Setting a value of + `["*"]` has the equivalent effect. The elements in the list must be valid + ISO 3166-1 alpha-2 country codes. + items: + description: ISO 3166-1 alpha-2 country code. + pattern: ^[A-Z]{2}$ + type: string + nullable: true + type: array + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + format: date-time + readOnly: true + type: string + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + format: date-time + readOnly: true + type: string + v1_secret: + description: Secret used to authenticate with v1 endpoints. + type: string + number_pool_settings: + $ref: '#/components/schemas/NumberPoolSettings' + url_shortener_settings: + $ref: '#/components/schemas/UrlShortenerSettings' type: object - HangupRequest: + MessagingProfileDetailedMetric: + properties: + timestamp: + description: The timestamp of the aggregated data. + example: 2019-01-23T18:10:02.574Z + readOnly: true + type: string + metrics: + items: + $ref: '#/components/schemas/MessagingProfileMessageTypeMetrics' + type: array + type: object + MessagingProfileDetailedMetrics: example: - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + detailed: + - metrics: + - label: longcode + sent: 1000 + delivered: 990 + errors: 0.01 + received: 750 + timestamp: 2019-01-23T18:10:02.574Z + overview: + record_type: messaging_profile_metrics + messaging_profile_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + phone_numbers: 250 + outbound: + sent: 1000 + delivered: 990 + errors: 0.01 + inbound: + received: 850 properties: - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + overview: + $ref: '#/components/schemas/MessagingProfileHighLevelMetrics' + detailed: + items: + $ref: '#/components/schemas/MessagingProfileDetailedMetric' + type: array + type: object + MessagingProfileHighLevelMetrics: + example: + record_type: messaging_profile_metrics + messaging_profile_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + phone_numbers: 250 + outbound: + sent: 1000 + delivered: 990 + errors: 0.01 + inbound: + received: 850 + properties: + record_type: + description: Identifies the type of the resource. + enum: + - messaging_profile_metrics + example: messaging_profile_metrics + readOnly: true type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + messaging_profile_id: + description: Identifies the type of resource. + format: uuid + readOnly: true type: string - title: Hangup Request + phone_numbers: + description: The number of phone numbers associated with the messaging profile. + readOnly: true + type: number + outbound: + $ref: '#/components/schemas/MessagingProfileHighLevelMetrics_outbound' + inbound: + $ref: '#/components/schemas/MessagingProfileHighLevelMetrics_inbound' type: object - HostedNumber: + MessagingProfileMessageTypeMetrics: example: - - record_type: messaging_hosted_number - id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c - phone_number: +18665550001 - status: successful + label: longcode + sent: 1000 + delivered: 990 + errors: 0.01 + received: 750 + properties: + label: + description: The metric type. + readOnly: true + type: string + sent: + description: The number of outbound messages sent. + readOnly: true + type: number + delivered: + description: The number of outbound messages successfully delivered. + readOnly: true + type: number + outbound_error_ratio: + description: The ratio of outbound messages sent that resulted in errors. + readOnly: true + type: number + received: + description: The number of inbound messages received. + readOnly: true + type: number + type: object + MessagingUrlDomain: + example: + record_type: messaging_url_domain + id: 464bd54e-a328-4b11-a131-28e6793cb6f2 + url_domain: http://example.com + use_case: test properties: record_type: - example: messaging_hosted_number type: string id: - description: Identifies the type of resource. + type: string + url_domain: + type: string + use_case: + type: string + type: object + NumberHealthMetrics: + description: | + High level health metrics about the number and it's messaging sending patterns. + example: + message_count: 10 + inbound_outbound_ratio: 1 + success_ratio: 2 + spam_ratio: 10 + nullable: false + properties: + message_count: + description: The number of messages analyzed for the health metrics. + type: integer + inbound_outbound_ratio: + description: The ratio of messages received to the number of messages sent. + format: float + type: number + success_ratio: + description: The ratio of messages sucessfully delivered to the number of + messages attempted. + format: float + type: number + spam_ratio: + description: The ratio of messages blocked for spam to the number of messages + attempted. + format: float + type: number + required: + - inbound_outbound_ratio + - message_count + - spam_ratio + - success_ratio + type: object + NumberOrder: + example: + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + phone_numbers: + - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + record_type: number_order_phone_number + phone_number: +19705555098 + regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + regulatory_requirements: + - record_type: phone_number_regulatory_requirement + requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 + field_type: address_id + requirements_met: true + status: success + record_type: number_order + connection_id: "346789098765567" + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 + phone_numbers_count: 1 + status: pending + customer_reference: MY REF 001 + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + requirements_met: true + properties: + id: + example: 12ade33a-21c0-473b-b055-b3c836e1c292 format: uuid readOnly: true type: string - phone_number: - description: The messaging hosted phone number (+E.164 format) - format: +E.164 + record_type: + example: number_order + readOnly: true + type: string + phone_numbers: + items: + $ref: '#/components/schemas/PhoneNumber' + type: array + writeOnly: true + phone_numbers_count: + description: The count of phone numbers in the number order. + example: 1 + readOnly: true + type: integer + connection_id: + description: Identifies the connection associated with this phone number. + example: "346789098765567" + type: string + messaging_profile_id: + description: Identifies the messaging profile associated with the phone + number. + example: abc85f64-5717-4562-b3fc-2c9600 type: string status: + description: The status of the order. enum: - - deleted - - failed - pending - - successful + - success + - failure + readOnly: true type: string - type: object - InboundMessage: + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 + type: string + created_at: + description: An ISO 8901 datetime string denoting when the number order + was created. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + updated_at: + description: An ISO 8901 datetime string for when the number order was updated. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + requirements_met: + description: True if all requirements are met for every phone number, false + otherwise. + example: true + readOnly: true + type: boolean + NumberOrderDocument: example: - record_type: event - id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c - event_type: message.received - occurred_at: date-time - payload: - record_type: message - direction: inbound - id: 7ee4241c-f127-47e5-9c34-3aac291f8058 - type: SMS - messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 - from: - phone_number: +18665550001 - carrier: T-MOBILE USA, INC. - line_type: Wireless - to: - - phone_number: +18445550001 - status: delivered - carrier: TELNYX LLC - line_type: VoIP - text: Hello, World! - subject: From Telnyx! - media: [] - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - encoding: GSM-7 - parts: 1 - tags: - - Greetings - cost: null - received_at: 2019-01-23T18:10:02.574Z - sent_at: null - completed_at: null - valid_until: null - errors: [] + id: 387d1e31-a218-4375-8151-103f2d5e2d2c + record_type: number_order_document + file_id: 1e3c5822-0362-4702-8e46-5a129f0d3976 + requirements_id: 36aaf27d-986b-493c-bd1b-de16af2e4292 + customer_reference: MY REF 001 + requirement_type: address_proof + created_at: 2018-01-01T00:00:00.000000Z properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event - type: string id: - description: Identifies the type of resource. + example: 387d1e31-a218-4375-8151-103f2d5e2d2c format: uuid + readOnly: true type: string - event_type: - description: The type of event being delivered. - enum: - - message.received - example: message.received + record_type: + example: number_order_document + readOnly: true type: string - occurred_at: - description: ISO 8601 formatted date indicating when the resource was created. - format: date-time + file_id: + description: The id of the file to associate as a number order document. + example: 1e3c5822-0362-4702-8e46-5a129f0d3976 type: string - payload: - $ref: '#/components/schemas/InboundMessagePayload' - type: object - InboundMessageEvent: - example: - data: - record_type: event - id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c - event_type: message.received - occurred_at: date-time - payload: - record_type: message - direction: inbound - id: 7ee4241c-f127-47e5-9c34-3aac291f8058 - type: SMS - messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 - from: - phone_number: +18665550001 - carrier: T-MOBILE USA, INC. - line_type: Wireless - to: - - phone_number: +18445550001 - status: delivered - carrier: TELNYX LLC - line_type: VoIP - text: Hello, World! - subject: From Telnyx! - media: [] - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - encoding: GSM-7 - parts: 1 - tags: - - Greetings - cost: null - received_at: 2019-01-23T18:10:02.574Z - sent_at: null - completed_at: null - valid_until: null - errors: [] - properties: - data: - $ref: '#/components/schemas/InboundMessage' - type: object - InboundMessagePayload: - example: - record_type: message - direction: inbound - id: 7ee4241c-f127-47e5-9c34-3aac291f8058 - type: SMS - messaging_profile_id: 0f512bda-ae1e-4597-8e11-e5f5686b97d3 - from: - phone_number: +18665550001 - status: delivered - carrier: T-MOBILE USA, INC. - line_type: Wireless - to: - - phone_number: +18445550001 - status: delivered - carrier: TELNYX LLC - line_type: VoIP - text: Hello, World! - subject: From Telnyx! - media: [] - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - encoding: GSM-7 - parts: 1 - tags: - - Greetings - cost: null - received_at: 2019-01-23T18:10:02.574Z - sent_at: null - completed_at: null - valid_until: null - errors: [] - properties: - record_type: - description: Identifies the type of the resource. + requirements_id: + description: Unique id for a requirement. + example: 36aaf27d-986b-493c-bd1b-de16af2e4292 + type: string + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 + type: string + requirement_type: enum: - - message - example: message + - address_proof + - identification + - reg_form + readOnly: true type: string - direction: - description: The direction of the message. Inbound messages are sent to - you whereas outbound messages are sent from you. + created_at: + description: An ISO 8901 datetime string denoting when the number order + document was uploaded. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + NumberOrdered: + example: + occurred_at: 2000-01-23T04:56:07.000+00:00 + event_type: number_order.complete + payload: + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + phone_numbers: + - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + record_type: number_order_phone_number + phone_number: +19705555098 + regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + regulatory_requirements: + - record_type: phone_number_regulatory_requirement + requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 + field_type: address_id + requirements_met: true + status: success + record_type: number_order + connection_id: "346789098765567" + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 + phone_numbers_count: 1 + status: pending + customer_reference: MY REF 001 + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + requirements_met: true + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + record_type: event + properties: + record_type: + description: Identifies the type of the resource. enum: - - inbound - example: inbound + - event + example: event type: string id: description: Identifies the type of resource. format: uuid type: string - type: - description: The type of message. This value can be either 'sms' or 'mms'. - enum: - - SMS - - MMS - type: string - messaging_profile_id: - description: Unique identifier for a messaging profile. - type: string - to: - items: - $ref: '#/components/schemas/InboundMessagePayload_to' - type: array - cc: - items: - $ref: '#/components/schemas/InboundMessagePayload_cc' - type: array - from: - $ref: '#/components/schemas/InboundMessagePayload_from' - text: - description: |- - Message body (i.e., content) as a non-empty string. - - **Required for SMS** - type: string - media: - items: - $ref: '#/components/schemas/InboundMessagePayload_media' - type: array - webhook_url: - description: The URL where webhooks related to this message will be sent. - format: url - nullable: true - type: string - webhook_failover_url: - description: The failover URL where webhooks related to this message will - be sent if sending to the primary URL fails. - format: url - nullable: true - type: string - encoding: - description: Encoding scheme used for the message body. - type: string - parts: - description: Number of parts into which the message's body must be split. - maximum: 10 - minimum: 1 - type: integer - tags: - description: Tags associated with the resource. - items: - type: string - type: array - cost: - $ref: '#/components/schemas/InboundMessagePayload_cost' - received_at: - description: ISO 8601 formatted date indicating when the message request - was received. - format: date-time + event_type: + description: The type of event being delivered. + example: number_order.complete type: string - sent_at: - description: Not used for inbound messages. + occurred_at: + description: ISO 8601 formatted date indicating when the resource was created. format: date-time - nullable: true type: string - completed_at: - description: Not used for inbound messages. - format: date-time - nullable: true + payload: + $ref: '#/components/schemas/NumberOrder' + title: Number Order Event Data + type: object + NumberOrderedEvent: + example: + data: + occurred_at: 2000-01-23T04:56:07.000+00:00 + event_type: number_order.complete + payload: + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + phone_numbers: + - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + record_type: number_order_phone_number + phone_number: +19705555098 + regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + regulatory_requirements: + - record_type: phone_number_regulatory_requirement + requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 + field_type: address_id + requirements_met: true + status: success + record_type: number_order + connection_id: "346789098765567" + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 + phone_numbers_count: 1 + status: pending + customer_reference: MY REF 001 + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + requirements_met: true + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + record_type: event + properties: + data: + $ref: '#/components/schemas/NumberOrdered' + title: Number Order Event + type: object + NumberPoolSettings: + description: | + Number Pool allows you to send messages from a pool of numbers of different types, assigning + weights to each type. The pool consists of all the long code and toll free numbers + assigned to the messaging profile. + + To disable this feature, set the object field to `null`. + example: + toll_free_weight: 10 + long_code_weight: 1 + skip_unhealthy: true + sticky_sender: false + geomatch: false + nullable: true + properties: + toll_free_weight: + description: | + Defines the probability weight for a Toll Free number to be selected when sending a message. + The higher the weight the higher the probability. The sum of the weights for all number types + does not necessarily need to add to 100. Weight must be a non-negative number, and when equal + to zero it will remove the number type from the pool. + example: 10 + type: number + long_code_weight: + description: | + Defines the probability weight for a Long Code number to be selected when sending a message. + The higher the weight the higher the probability. The sum of the weights for all number types + does not necessarily need to add to 100. Weight must be a non-negative number, and when equal + to zero it will remove the number type from the pool. + example: 1 + type: number + skip_unhealthy: + description: | + If set to true all unhealthy numbers will be automatically excluded from the pool. + Health metrics per number are calculated on a regular basis, taking into account the deliverability + rate and the amount of messages marked as spam by upstream carriers. + Numbers with a deliverability rate below 25% or spam ratio over 75% will be considered unhealthy. + example: true + type: boolean + sticky_sender: + default: false + description: | + If set to true, Number Pool will try to choose the same sending number for all messages to a particular + recipient. If the sending number becomes unhealthy and `skip_unhealthy` is set to true, a new + number will be chosen. + type: boolean + geomatch: + default: false + description: | + If set to true, Number Pool will try to choose a sending number with the same area code as the destination + number. If there are no such numbers available, a nunber with a different area code will be chosen. Currently + only NANP numbers are supported. + type: boolean + required: + - long_code_weight + - skip_unhealthy + - toll_free_weight + type: object + NumberReservation: + example: + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + record_type: number_reservation + phone_numbers: + - id: 12ade33a-21c0-473b-b055-b3c836e1c292 + record_type: reserved_phone_number + phone_number: +19705555098 + status: pending + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + expired_at: 2018-01-01T00:00:00.000000Z + errors: "" + status: pending + customer_reference: MY REF 001 + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + properties: + id: + example: 12ade33a-21c0-473b-b055-b3c836e1c292 + format: uuid + readOnly: true type: string - valid_until: - description: Not used for inbound messages. - format: date-time - nullable: true + record_type: + example: number_reservation + readOnly: true type: string - errors: - description: These errors may point at addressees when referring to unsuccessful/unconfirmed - delivery statuses. + phone_numbers: items: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/ReservedPhoneNumber' type: array - IntId: - description: Identifies the resource. - example: "1293384261075731499" - format: int64 - readOnly: true - type: string - JoinConferenceRequest: - example: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - end_conference_on_exit: true - hold: true - hold_audio_url: http://www.example.com/audio.wav - mute: true - start_conference_on_enter: true - supervisor_role: whisper - whisper_call_control_ids: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw - properties: - call_control_id: - description: Unique identifier and token for controlling the call - example: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + status: + description: The status of the entire reservation. + enum: + - pending + - success + - failure + readOnly: true type: string - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 type: string - command_id: - description: Use this field to avoid execution of duplicate commands. Telnyx - will ignore subsequent commands with the same `command_id` as one that - has already been executed. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + created_at: + description: An ISO 8901 datetime string denoting when the numbers reservation + was created. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true type: string - end_conference_on_exit: - description: Whether the conference should end and all remaining participants - be hung up after the participant leaves the conference. Defaults to "false". - example: true - type: boolean - soft_end_conference_on_exit: - description: Whether the conference should end after the participant leaves - the conference. NOTE this doesn't hang up the other participants. Defaults - to "false". - example: true - type: boolean - hold: - description: Whether the participant should be put on hold immediately after - joining the conference. Defaults to "false". - example: true - type: boolean - hold_audio_url: - description: The URL of an audio file to be played to the participant when - they are put on hold after joining the conference. This property takes - effect only if "hold" is set to "true". - example: http://www.example.com/audio.wav + updated_at: + description: An ISO 8901 datetime string for when the number reservation + was updated. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true type: string - mute: - description: Whether the participant should be muted immediately after joining - the conference. Defaults to "false". - example: true - type: boolean - start_conference_on_enter: - description: Whether the conference should be started after the participant - joins the conference. Defaults to "false". - example: true - type: boolean - supervisor_role: - description: Sets the joining participant as a supervisor for the conference. - A conference can have multiple supervisors. "barge" means the supervisor - enters the conference as a normal participant. This is the same as "none". - "monitor" means the supervisor is muted but can hear all participants. - "whisper" means that only the specified "whisper_call_control_ids" can - hear the supervisor. Defaults to "none". + OutboundCallRecording: + example: + call_recording_type: by_caller_phone_number + call_recording_caller_phone_numbers: + - +19705555098 + call_recording_channels: dual + call_recording_format: mp3 + properties: + call_recording_type: + description: Specifies which calls are recorded. enum: - - barge - - monitor + - all - none - - whisper - example: whisper + - by_caller_phone_number type: string - whisper_call_control_ids: - description: Array of unique call_control_ids the joining supervisor can - whisper to. If none provided, the supervisor will join the conference - as a monitoring participant only. + call_recording_caller_phone_numbers: + description: When call_recording_type is 'by_caller_phone_number', only + outbound calls using one of these numbers will be recorded. Numbers must + be specified in E164 format. example: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + - +19705555098 items: type: string type: array - required: - - call_control_id - title: Join Conference Request + call_recording_channels: + default: single + description: When using 'dual' channels, the final audio file will be a + stereo recording with the first leg on channel A, and the rest on channel + B. + enum: + - single + - dual + example: dual + type: string + call_recording_format: + default: wav + description: The audio file format for calls being recorded. + enum: + - wav + - mp3 + example: mp3 + type: string type: object - Loopcount: - oneOf: - - type: string - - type: integer - MediaFeatures: - description: The media features settings for a phone number. + OutboundIp: example: - rtp_auto_adjust_enabled: true - media_handling_mode: default - accept_any_rtp_packets_enabled: true - t38_fax_gateway_enabled: true + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + tech_prefix: string + ip_authentication_method: token + ip_authentication_token: string + outbound_voice_profile_id: "1293384261075731499" properties: - rtp_auto_adjust_enabled: - default: true - description: When RTP Auto-Adjust is enabled, the destination RTP address - port will be automatically changed to match the source of the incoming - RTP packets. + call_parking_enabled: + default: false + description: Forces all SIP calls originated on this connection to be "parked" + instead of "bridged" to the destination specified on the URI. Parked calls + will return ringback to the caller and will await for a Call Control command + to define which action will be taken next. type: boolean - media_handling_mode: - default: default - description: 'Controls how media is handled for the phone number. default: - media routed through Telnyx with transcode support. proxy: media routed - through Telnyx with no transcode support.' + ani_override: + default: "" + description: Set a phone number as the ani_override value to override caller + id number on outbound calls. + type: string + ani_override_type: + default: always + description: Specifies when we apply your ani_override setting. Only applies + when ani_override is not blank. enum: - - default - - proxy + - always + - normal + - emergency type: string - accept_any_rtp_packets_enabled: - default: false - description: When enabled, Telnyx will accept RTP packets from any customer-side - IP address and port, not just those to which Telnyx is sending RTP. + channel_limit: + description: When set, this will limit the total number of outbound calls + to phone numbers associated with this connection. + type: integer + instant_ringback_enabled: + default: true + description: When set, ringback will not wait for indication before sending + ringback tone to calling party. type: boolean - t38_fax_gateway_enabled: + generate_ringback_tone: default: false - description: Controls whether Telnyx will accept a T.38 re-INVITE for this - phone number. Note that Telnyx will not send a T.38 re-INVITE; this option - only controls whether one will be accepted. + description: Generate ringback tone through 183 session progress message + with early media. type: boolean + localization: + default: "null" + description: A 2-character country code specifying the country whose national + dialing rules should be used. For example, if set to `US` then any US + number can be dialed without preprending +1 to the number. When left blank, + Telnyx will try US and GB dialing rules, in that order, by default. + type: string + t38_reinvite_source: + default: telnyx + description: This setting only affects connections with Fax-type Outbound + Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 + reinvite.

By default, Telnyx will send the re-invite. If set + to `customer`, the caller is expected to send the t.38 reinvite. + enum: + - telnyx + - customer + - disabled + - passthru + - caller-passthru + - callee-passthru + type: string + tech_prefix: + default: "" + description: Numerical chars only, exactly 4 characters. + type: string + ip_authentication_method: + default: tech-prefixp-charge-info + enum: + - tech-prefixp-charge-info + - token + example: tech-prefixp-charge-info + type: string + ip_authentication_token: + default: "null" + type: string + outbound_voice_profile_id: + description: Identifies the associated outbound voice profile. + example: "1293384261075731499" + format: int64 + title: Outbound Voice Profile ID + type: string + title: Outband Ip type: object - MessagingFeatureSet: - description: | - The set of features available for a specific messaging use case (SMS or MMS). Features - can vary depending on the characteristics the phone number, as well as its current - product configuration. + OutboundMessage: example: - domestic_two_way: true - international_inbound: false - international_outbound: true - nullable: true + record_type: event + id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 + event_type: message.sent + occurred_at: date-time + payload: + record_type: message + direction: outbound + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: MMS + messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + from: + phone_number: +18445550001 + carrier: TELNYX LLC + line_type: VoIP + to: + - phone_number: +18665550001 + status: queued + carrier: T-MOBILE USA, INC. + line_type: Wireless + text: Hello, World! + subject: From Telnyx! + media: + - url: https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png + content_type: null + sha256: null + size: null + webhook_url: https://www.example.com/hooks + webhook_failover_url: https://backup.example.com/hooks + encoding: GSM-7 + parts: 1 + tags: + - Greetings + cost: null + received_at: 2019-01-23T18:10:02.574Z + sent_at: null + completed_at: null + valid_until: null + errors: [] properties: - domestic_two_way: - description: Send messages to and receive messages from numbers in the same - country. - type: boolean - international_inbound: - description: Receive messages from numbers in other countries. - type: boolean - international_outbound: - description: Send messages to numbers in other countries. - type: boolean - required: - - domestic_two_way - - international_inbound - - international_outbound - type: object - MessagingHostedNumberOrder: + record_type: + description: Identifies the type of the resource. + enum: + - event + example: event + type: string + id: + description: Identifies the type of resource. + format: uuid + type: string + event_type: + description: The type of event being delivered. + enum: + - message.sent + - message.finalized + example: message.sent + type: string + occurred_at: + description: ISO 8601 formatted date indicating when the resource was created. + format: date-time + type: string + payload: + $ref: '#/components/schemas/OutboundMessagePayload' + OutboundMessageEvent: example: - id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 - record_type: messaging_hosted_number_order - profile_id: dc8f39ac-953d-4520-b93b-786ae87db0da - status: pending - phone_numbers: - - record_type: messaging_hosted_number - id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c - phone_number: +18665550001 - status: pending - - record_type: messaging_hosted_number - id: 464bd54e-a328-4b11-a131-28e6793cb6f2 - phone_number: +18665550002 - status: pending + data: + record_type: event + id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 + event_type: message.sent + occurred_at: date-time + payload: + record_type: message + direction: outbound + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: MMS + messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + from: + phone_number: +18445550001 + carrier: TELNYX LLC + line_type: VoIP + to: + - phone_number: +18665550001 + status: queued + carrier: T-MOBILE USA, INC. + line_type: Wireless + text: Hello, World! + subject: From Telnyx! + media: + - url: https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png + content_type: null + sha256: null + size: null + webhook_url: https://www.example.com/hooks + webhook_failover_url: https://backup.example.com/hooks + encoding: GSM-7 + parts: 1 + tags: + - Greetings + cost: null + received_at: 2019-01-23T18:10:02.574Z + sent_at: null + completed_at: null + valid_until: null + errors: [] properties: - record_type: - description: Identifies the type of the resource. - example: messaging_hosted_number_order - readOnly: true - type: string - id: - description: Resource unique identifier. - format: uuid - readOnly: true - type: string - messaging_profile_id: - description: Automatically associate the number with this messaging profile - ID when the order is complete. - nullable: true - type: string - status: - enum: - - failed - - pending - - successful - type: string - phone_numbers: - items: - $ref: '#/components/schemas/HostedNumber' - type: array + data: + $ref: '#/components/schemas/OutboundMessage' type: object - MessagingProfile: + OutboundMessagePayload: example: - record_type: messaging_profile + record_type: message + direction: outbound id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - name: Profile for Messages + type: MMS + messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + from: + phone_number: +18445550001 + carrier: TELNYX LLC + line_type: VoIP + to: + - phone_number: +18665550001 + status: queued + carrier: T-MOBILE USA, INC. + line_type: Wireless + text: Hello, World! + subject: From Telnyx! + media: + - url: https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png + content_type: null + sha256: null + size: null webhook_url: https://www.example.com/hooks webhook_failover_url: https://backup.example.com/hooks - enabled: true - webhook_api_version: "2" - whitelisted_destinations: - - US - created_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - number_pool_settings: - toll_free_weight: 10 - long_code_weight: 2 - skip_unhealthy: false - sticky_sender: true - geomatch: false - url_shortener_settings: - domain: example.ex - prefix: cmpny - replace_blacklist_only: true - send_webhooks: false - v1_secret: rP1VamejkU2v0qIUxntqLW2c + encoding: GSM-7 + parts: 1 + tags: + - Greetings + cost: null + received_at: 2019-01-23T18:10:02.574Z + sent_at: null + completed_at: null + valid_until: null + errors: [] properties: record_type: description: Identifies the type of the resource. enum: - - messaging_profile - readOnly: true + - message + example: message + type: string + direction: + description: The direction of the message. Inbound messages are sent to + you whereas outbound messages are sent from you. + enum: + - outbound + example: outbound type: string id: description: Identifies the type of resource. format: uuid - readOnly: true type: string - name: - description: A user friendly name for the messaging profile. + type: + description: The type of message. + enum: + - SMS + - MMS type: string - enabled: - description: Specifies whether the messaging profile is enabled or not. - type: boolean + messaging_profile_id: + description: Unique identifier for a messaging profile. + type: string + from: + $ref: '#/components/schemas/OutboundMessagePayload_from' + to: + items: + $ref: '#/components/schemas/OutboundMessagePayload_to' + type: array + text: + description: |- + Message body (i.e., content) as a non-empty string. + + **Required for SMS** + type: string + subject: + description: Subject of multimedia message + nullable: true + type: string + media: + items: + $ref: '#/components/schemas/OutboundMessagePayload_media' + type: array webhook_url: - description: The URL where webhooks related to this messaging profile will - be sent. + description: The URL where webhooks related to this message will be sent. format: url nullable: true type: string webhook_failover_url: - description: The failover URL where webhooks related to this messaging profile - will be sent if sending to the primary URL fails. + description: The failover URL where webhooks related to this message will + be sent if sending to the primary URL fails. format: url nullable: true type: string - webhook_api_version: - description: Determines which webhook format will be used, Telnyx API v1, - v2, or a legacy 2010-04-01 format. - enum: - - "1" - - "2" - - 2010-04-01 + encoding: + description: Encoding scheme used for the message body. type: string - whitelisted_destinations: - description: Destinations to which the messaging profile is allowed to send. - If set to `null`, all destinations will be allowed. Setting a value of - `["*"]` has the equivalent effect. The elements in the list must be valid - ISO 3166-1 alpha-2 country codes. + parts: + description: Number of parts into which the message's body must be split. + maximum: 10 + minimum: 1 + type: integer + tags: + description: Tags associated with the resource. items: - description: ISO 3166-1 alpha-2 country code. - pattern: ^[A-Z]{2}$ type: string - nullable: true type: array - created_at: - description: ISO 8601 formatted date indicating when the resource was created. + cost: + $ref: '#/components/schemas/InboundMessagePayload_cost' + received_at: + description: ISO 8601 formatted date indicating when the message request + was received. format: date-time - readOnly: true type: string - updated_at: - description: ISO 8601 formatted date indicating when the resource was updated. + sent_at: + description: ISO 8601 formatted date indicating when the message was sent. format: date-time - readOnly: true type: string - v1_secret: - description: Secret used to authenticate with v1 endpoints. + completed_at: + description: ISO 8601 formatted date indicating when the message was finalized. + format: date-time type: string - number_pool_settings: - $ref: '#/components/schemas/NumberPoolSettings' - url_shortener_settings: - $ref: '#/components/schemas/UrlShortenerSettings' - type: object - MessagingProfileDetailedMetric: - properties: - timestamp: - description: The timestamp of the aggregated data. - example: 2019-01-23T18:10:02.574Z - readOnly: true + valid_until: + description: Message must be out of the queue by this time or else it will + be discarded and marked as 'sending_failed'. Once the message moves out + of the queue, this field will be nulled + format: date-time + nullable: true type: string - metrics: - items: - $ref: '#/components/schemas/MessagingProfileMessageTypeMetrics' - type: array - type: object - MessagingProfileDetailedMetrics: - example: - detailed: - - metrics: - - label: longcode - sent: 1000 - delivered: 990 - errors: 0.01 - received: 750 - timestamp: 2019-01-23T18:10:02.574Z - overview: - record_type: messaging_profile_metrics - messaging_profile_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - phone_numbers: 250 - outbound: - sent: 1000 - delivered: 990 - errors: 0.01 - inbound: - received: 850 - properties: - overview: - $ref: '#/components/schemas/MessagingProfileHighLevelMetrics' - detailed: + errors: + description: These errors may point at addressees when referring to unsuccessful/unconfirmed + delivery statuses. items: - $ref: '#/components/schemas/MessagingProfileDetailedMetric' + $ref: '#/components/schemas/Error' type: array type: object - MessagingProfileHighLevelMetrics: + OutboundVoiceProfile: example: - record_type: messaging_profile_metrics - messaging_profile_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - phone_numbers: 250 - outbound: - sent: 1000 - delivered: 990 - errors: 0.01 - inbound: - received: 850 + id: "1293384261075731499" + record_type: outbound_voice_profile + name: office + connections_count: 12 + traffic_type: conversational + service_plan: global + concurrent_call_limit: 10 + enabled: true + tags: + - office-profile + usage_payment_method: rate-deck + whitelisted_destinations: + - US + - BR + - AU + max_destination_rate: 10 + daily_spend_limit: "100.00" + daily_spend_limit_enabled: true + call_recording: + call_recording_type: by_caller_phone_number + call_recording_caller_phone_numbers: + - +19705555098 + call_recording_channels: dual + call_recording_format: mp3 + billing_group_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z properties: + id: + description: Identifies the resource. + example: "1293384261075731499" + format: int64 + type: string record_type: description: Identifies the type of the resource. - enum: - - messaging_profile_metrics - example: messaging_profile_metrics - readOnly: true + example: outbound_voice_profile type: string - messaging_profile_id: - description: Identifies the type of resource. - format: uuid - readOnly: true + name: + default: "" + description: A user-supplied name to help with organization. + example: office type: string - phone_numbers: - description: The number of phone numbers associated with the messaging profile. - readOnly: true + connections_count: + description: Amount of connections associated with this outbound voice profile. + example: 12 + type: integer + traffic_type: + $ref: '#/components/schemas/TrafficType' + service_plan: + $ref: '#/components/schemas/ServicePlan' + concurrent_call_limit: + description: Must be no more than your global concurrent call limit. Null + means no limit. + example: 10 + nullable: true + type: integer + enabled: + default: true + description: Specifies whether the outbound voice profile can be used. Disabled + profiles will result in outbound calls being blocked for the associated + Connections. + example: true + type: boolean + tags: + example: + - office-profile + items: + type: string + type: array + usage_payment_method: + $ref: '#/components/schemas/UsagePaymentMethod' + whitelisted_destinations: + default: + - US + - CA + description: The list of destinations you want to be able to call using + this outbound voice profile formatted in alpha2. + example: + - US + - BR + - AU + items: + type: string + type: array + max_destination_rate: + description: Maximum rate (price per minute) for a Destination to be allowed + when making outbound calls. type: number - outbound: - $ref: '#/components/schemas/MessagingProfileHighLevelMetrics_outbound' - inbound: - $ref: '#/components/schemas/MessagingProfileHighLevelMetrics_inbound' + daily_spend_limit: + description: The maximum amount of usage charges, in USD, you want Telnyx + to allow on this outbound voice profile in a day before disallowing new + calls. + example: "100.00" + type: string + daily_spend_limit_enabled: + default: false + description: Specifies whether to enforce the daily_spend_limit on this + outbound voice profile. + example: true + type: boolean + call_recording: + $ref: '#/components/schemas/OutboundCallRecording' + billing_group_id: + description: The ID of the billing group associated with the outbound proflile. + Defaults to null (for no group assigned). + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: uuid + nullable: true + type: string + created_at: + description: ISO 8601 formatted date-time indicating when the resource was + created. + example: 2018-02-02T22:25:27.521Z + type: string + updated_at: + description: ISO 8601 formatted date-time indicating when the resource was + updated. + example: 2018-02-02T22:25:27.521Z + type: string + title: Outbound Voice Profile type: object - MessagingProfileMessageTypeMetrics: + OutboundVoiceProfileId: + description: Identifies the associated outbound voice profile. + example: "1293384261075731499" + format: int64 + title: Outbound Voice Profile ID + type: string + PaginationMeta: example: - label: longcode - sent: 1000 - delivered: 990 - errors: 0.01 - received: 750 + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 properties: - label: - description: The metric type. - readOnly: true - type: string - sent: - description: The number of outbound messages sent. - readOnly: true - type: number - delivered: - description: The number of outbound messages successfully delivered. - readOnly: true - type: number - outbound_error_ratio: - description: The ratio of outbound messages sent that resulted in errors. - readOnly: true - type: number - received: - description: The number of inbound messages received. - readOnly: true - type: number + total_pages: + example: 3 + type: integer + total_results: + example: 55 + type: integer + page_number: + example: 2 + type: integer + page_size: + example: 25 + type: integer type: object - MessagingUrlDomain: + PaginationMetaSimple: + properties: + page_number: + example: 2 + type: integer + page_size: + example: 25 + type: integer + total_pages: + example: 3 + type: integer + total_results: + example: 55 + type: integer + type: object + Participant: example: - record_type: messaging_url_domain - id: 464bd54e-a328-4b11-a131-28e6793cb6f2 - url_domain: http://example.com - use_case: test + record_type: participant + created_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + end_conference_on_exit: true + soft_end_conference_on_exit: true + status: joining + muted: false + on_hold: true + call_control_id: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ + whisper_call_control_ids: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + id: dfadada7-af74-47bc-83a4-554275f55f5c + call_leg_id: 3a15df2d-c801-4729-adf5-b56dd42e2abb + conference: + id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 + name: "1" properties: record_type: + enum: + - participant + example: participant type: string id: + description: Uniquely identifies the participant + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 type: string - url_domain: + call_leg_id: + description: Uniquely identifies the call leg associated with the participant + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 type: string - use_case: + call_control_id: + description: Call Control ID associated with the partiipant of the conference + example: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ + type: string + conference: + $ref: '#/components/schemas/Participant_conference' + whisper_call_control_ids: + description: Array of unique call_control_ids the participant can whisper + to.. + example: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + items: + type: string + type: array + created_at: + description: ISO 8601 formatted date of when the participant was created + example: 2019-01-23T18:10:02.574Z + type: string + updated_at: + description: ISO 8601 formatted date of when the participant was last updated + example: 2019-01-23T18:10:02.574Z + type: string + end_conference_on_exit: + description: Whether the conference will end and all remaining participants + be hung up after the participant leaves the conference. + example: true + type: boolean + soft_end_conference_on_exit: + description: Whether the conference will end after the participant leaves + the conference. + example: true + type: boolean + status: + description: The status of the participant with respect to the lifecycle + within the conference + enum: + - joining + - joined + - left + example: joining type: string + muted: + description: Whether the participant is muted. + example: true + type: boolean + on_hold: + description: Whether the participant is put on_hold. + example: true + type: boolean + required: + - call_control_id + - call_leg_id + - conference + - created_at + - end_conference_on_exit + - id + - muted + - on_hold + - record_type + - soft_end_conference_on_exit + - status + - updated_at + - whisper_call_control_ids + title: Participant type: object - NumberHealthMetrics: - description: | - High level health metrics about the number and it's messaging sending patterns. + PauseRecordingRequest: example: - message_count: 10 - inbound_outbound_ratio: 1 - success_ratio: 2 - spam_ratio: 10 - nullable: false + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d properties: - message_count: - description: The number of messages analyzed for the health metrics. - type: integer - inbound_outbound_ratio: - description: The ratio of messages received to the number of messages sent. - format: float - type: number - success_ratio: - description: The ratio of messages sucessfully delivered to the number of - messages attempted. - format: float - type: number - spam_ratio: - description: The ratio of messages blocked for spam to the number of messages - attempted. - format: float - type: number - required: - - inbound_outbound_ratio - - message_count - - spam_ratio - - success_ratio + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + title: Pause Recording Request type: object - NumberOrder: + PhoneNumber: example: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - phone_numbers: - - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - record_type: number_order_phone_number - phone_number: +19705555098 - regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - regulatory_requirements: - - record_type: phone_number_regulatory_requirement - requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 - field_type: address_id - requirements_met: true - status: success - record_type: number_order - connection_id: "346789098765567" - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 - phone_numbers_count: 1 - status: pending - customer_reference: MY REF 001 - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z + id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + record_type: number_order_phone_number + phone_number: +19705555098 + regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + regulatory_requirements: + - record_type: phone_number_regulatory_requirement + requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 + field_type: address_id requirements_met: true + status: success properties: id: - example: 12ade33a-21c0-473b-b055-b3c836e1c292 + example: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 format: uuid readOnly: true type: string record_type: - example: number_order + example: number_order_phone_number readOnly: true type: string - phone_numbers: + phone_number: + example: +19705555098 + format: e164_phone_number + type: string + regulatory_group_id: + example: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + readOnly: true + type: string + regulatory_requirements: items: - $ref: '#/components/schemas/PhoneNumber' + $ref: '#/components/schemas/PhoneNumberRegulatoryRequirement' type: array - writeOnly: true - phone_numbers_count: - description: The count of phone numbers in the number order. - example: 1 + requirements_met: + description: True if all requirements are met for a phone number, false + otherwise. + example: true readOnly: true - type: integer - connection_id: - description: Identifies the connection associated with this phone number. - example: "346789098765567" - type: string - messaging_profile_id: - description: Identifies the messaging profile associated with the phone - number. - example: abc85f64-5717-4562-b3fc-2c9600 - type: string + type: boolean status: - description: The status of the order. + description: The status of the phone number in the order. enum: - pending - success - failure readOnly: true type: string + PhoneNumberDetailed: + example: + id: "1293384261075731499" + record_type: phone_number + phone_number: +19705555098 + status: active + tags: + - tag_1 + - tag_2 + external_pin: "1234" + connection_id: "1293384261075731499" + connection_name: connection-name + customer_reference: customer-reference + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 + messaging_profile_name: regional-customers + billing_group_id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 + emergency_enabled: true + emergency_address_id: "1315261609962112019" + call_forwarding_enabled: true + cnam_listing_enabled: true + caller_id_name_enabled: true + call_recording_enabled: true + t38_fax_gateway_enabled: true + purchased_at: 2019-10-23T18:10:00.000Z + created_at: 2019-10-23T18:10:00.000Z + updated_at: 2019-10-24T18:10:00.000Z + properties: + id: + description: Identifies the resource. + example: "1293384261075731499" + format: int64 + readOnly: true + type: string + record_type: + description: Identifies the type of the resource. + example: phone_number + readOnly: true + type: string + phone_number: + description: The +E.164-formatted phone number associated with this record. + readOnly: true + type: string + status: + description: The phone number's current status. + enum: + - purchase-pending + - purchase-failed + - port-pending + - port-failed + - active + - deleted + - emergency-only + - ported-out + - port-out-pending + readOnly: true + type: string + tags: + description: A list of user-assigned tags to help manage the phone number. + items: + type: string + type: array + external_pin: + description: If someone attempts to port your phone number away from Telnyx + and your phone number has an external PIN set, Telnyx will attempt to + verify that you provided the correct external PIN to the winning carrier. + Note that not all carriers cooperate with this security mechanism. + type: string + connection_name: + description: The user-assigned name of the connection to be associated with + this phone number. + readOnly: true + type: string customer_reference: description: A customer reference string for customer look ups. example: MY REF 001 type: string + connection_id: + description: Identifies the connection associated with the phone number. + type: string + messaging_profile_id: + description: Identifies the messaging profile associated with the phone + number. + type: string + messaging_profile_name: + description: The name of the messaging profile associated with the phone + number. + example: regional-customers + type: string + billing_group_id: + description: Identifies the billing group associated with the phone number. + type: string + emergency_enabled: + description: Indicates whether emergency services are enabled for this number. + readOnly: true + type: boolean + emergency_address_id: + description: Identifies the emergency address associated with the phone + number. + format: int64 + readOnly: true + type: string + call_forwarding_enabled: + default: true + description: Indicates if call forwarding will be enabled for this number + if forwards_to and forwarding_type are filled in. Defaults to true for + backwards compatibility with APIV1 use of numbers endpoints. + readOnly: true + type: boolean + cnam_listing_enabled: + description: Indicates whether a CNAM listing is enabled for this number. + readOnly: true + type: boolean + caller_id_name_enabled: + description: Indicates whether caller ID is enabled for this number. + readOnly: true + type: boolean + call_recording_enabled: + description: Indicates whether call recording is enabled for this number. + readOnly: true + type: boolean + t38_fax_gateway_enabled: + description: Indicates whether T38 Fax Gateway for inbound calls to this + number. + readOnly: true + type: boolean + purchased_at: + description: ISO 8601 formatted date indicating when the resource was purchased. + readOnly: true + type: string created_at: - description: An ISO 8901 datetime string denoting when the number order - was created. - example: 2018-01-01T00:00:00.000000Z - format: datetime + description: ISO 8601 formatted date indicating when the resource was created. readOnly: true type: string updated_at: - description: An ISO 8901 datetime string for when the number order was updated. - example: 2018-01-01T00:00:00.000000Z - format: datetime + description: ISO 8601 formatted date indicating when the resource was updated. readOnly: true type: string - requirements_met: - description: True if all requirements are met for every phone number, false - otherwise. - example: true - readOnly: true + type: object + PhoneNumberEnableEmergencyRequest: + example: + emergency_enabled: true + emergency_address_id: "53829456729313" + properties: + emergency_enabled: + description: Indicates whether to enable emergency services on this number. type: boolean - NumberOrderDocument: + emergency_address_id: + description: Identifies the address to be used with emergency services. + format: int64 + type: string + required: + - emergency_address_id + - emergency_enabled + type: object + PhoneNumberRegulatoryGroup: example: - id: 387d1e31-a218-4375-8151-103f2d5e2d2c - record_type: number_order_document - file_id: 1e3c5822-0362-4702-8e46-5a129f0d3976 - requirements_id: 36aaf27d-986b-493c-bd1b-de16af2e4292 - customer_reference: MY REF 001 - requirement_type: address_proof - created_at: 2018-01-01T00:00:00.000000Z + record_type: phone_number_regulatory_requirement + phone_number: +19705555098 + regulatory_group_id: d70873cd-7c98-401a-81b6-b1ae08246995 + regulatory_requirements: + - record_type: regulatory_requirement + requirement_type: end user proof of address + label: Proof of Address + field_type: address + description: Requirement for providing Proof of Address. properties: - id: - example: 387d1e31-a218-4375-8151-103f2d5e2d2c + record_type: + example: phone_number_regulatory_requirement + readOnly: true + type: string + phone_number: + example: +19705555098 + format: e164_phone_number + type: string + regulatory_group_id: + example: d70873cd-7c98-401a-81b6-b1ae08246995 format: uuid - readOnly: true type: string + regulatory_requirements: + items: + $ref: '#/components/schemas/RegulatoryRequirement' + type: array + PhoneNumberRegulatoryRequirement: + example: + record_type: phone_number_regulatory_requirement + requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 + field_type: address_id + properties: record_type: - example: number_order_document + example: phone_number_regulatory_requirement readOnly: true type: string - file_id: - description: The id of the file to associate as a number order document. - example: 1e3c5822-0362-4702-8e46-5a129f0d3976 - type: string - requirements_id: + requirement_id: description: Unique id for a requirement. - example: 36aaf27d-986b-493c-bd1b-de16af2e4292 + example: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + format: uuid type: string - customer_reference: - description: A customer reference string for customer look ups. - example: MY REF 001 + field_value: + description: The value of the requirement, this could be an id to a resource + or a string value. + example: 45f45a04-b4be-4592-95b1-9306b9db2b21 type: string - requirement_type: + field_type: enum: - - address_proof - - identification - - reg_form - readOnly: true - type: string - created_at: - description: An ISO 8901 datetime string denoting when the number order - document was uploaded. - example: 2018-01-01T00:00:00.000000Z - format: datetime + - string + - datetime + - address_id + - number_order_document_id + example: address_id readOnly: true type: string - NumberOrdered: + PhoneNumberWithMessagingSettings: example: - occurred_at: 2000-01-23T04:56:07.000+00:00 - event_type: number_order.complete - payload: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - phone_numbers: - - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - record_type: number_order_phone_number - phone_number: +19705555098 - regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - regulatory_requirements: - - record_type: phone_number_regulatory_requirement - requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 - field_type: address_id - requirements_met: true - status: success - record_type: number_order - connection_id: "346789098765567" - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 - phone_numbers_count: 1 - status: pending - customer_reference: MY REF 001 - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - requirements_met: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - record_type: event + record_type: messaging_settings + id: "1293384261075731499" + phone_number: +18005550001 + messaging_profile_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + created_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + country_code: US + type: toll-free + health: + message_count: 122 + inbound_outbound_ratio: 0.43 + success_ratio: 0.94 + spam_ratio: 0.06 + eligible_messaging_products: + - A2P + traffic_type: A2P + messaging_product: A2P + features: + sms: + domestic_two_way: true + international_inbound: true + international_outbound: true + mms: null properties: record_type: description: Identifies the type of the resource. enum: - - event - example: event + - messaging_phone_number + - messaging_settings + example: messaging_settings + readOnly: true type: string id: description: Identifies the type of resource. - format: uuid + readOnly: true type: string - event_type: - description: The type of event being delivered. - example: number_order.complete + phone_number: + description: +E.164 formatted phone number. + format: e164 + readOnly: true type: string - occurred_at: + messaging_profile_id: + description: Unique identifier for a messaging profile. + nullable: true + type: string + created_at: description: ISO 8601 formatted date indicating when the resource was created. format: date-time + readOnly: true type: string - payload: - $ref: '#/components/schemas/NumberOrder' - title: Number Order Event Data - type: object - NumberOrderedEvent: - example: - data: - occurred_at: 2000-01-23T04:56:07.000+00:00 - event_type: number_order.complete - payload: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - phone_numbers: - - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - record_type: number_order_phone_number - phone_number: +19705555098 - regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - regulatory_requirements: - - record_type: phone_number_regulatory_requirement - requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 - field_type: address_id - requirements_met: true - status: success - record_type: number_order - connection_id: "346789098765567" - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600 - phone_numbers_count: 1 - status: pending - customer_reference: MY REF 001 - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - requirements_met: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - record_type: event - properties: - data: - $ref: '#/components/schemas/NumberOrdered' - title: Number Order Event - type: object - NumberPoolSettings: - description: | - Number Pool allows you to send messages from a pool of numbers of different types, assigning - weights to each type. The pool consists of all the long code and toll free numbers - assigned to the messaging profile. - - To disable this feature, set the object field to `null`. - example: - toll_free_weight: 10 - long_code_weight: 1 - skip_unhealthy: true - sticky_sender: false - geomatch: false - nullable: true - properties: - toll_free_weight: - description: | - Defines the probability weight for a Toll Free number to be selected when sending a message. - The higher the weight the higher the probability. The sum of the weights for all number types - does not necessarily need to add to 100. Weight must be a non-negative number, and when equal - to zero it will remove the number type from the pool. - example: 10 - type: number - long_code_weight: - description: | - Defines the probability weight for a Long Code number to be selected when sending a message. - The higher the weight the higher the probability. The sum of the weights for all number types - does not necessarily need to add to 100. Weight must be a non-negative number, and when equal - to zero it will remove the number type from the pool. - example: 1 - type: number - skip_unhealthy: - description: | - If set to true all unhealthy numbers will be automatically excluded from the pool. - Health metrics per number are calculated on a regular basis, taking into account the deliverability - rate and the amount of messages marked as spam by upstream carriers. - Numbers with a deliverability rate below 25% or spam ratio over 75% will be considered unhealthy. - example: true - type: boolean - sticky_sender: - default: false - description: | - If set to true, Number Pool will try to choose the same sending number for all messages to a particular - recipient. If the sending number becomes unhealthy and `skip_unhealthy` is set to true, a new - number will be chosen. - type: boolean - geomatch: - default: false - description: | - If set to true, Number Pool will try to choose a sending number with the same area code as the destination - number. If there are no such numbers available, a nunber with a different area code will be chosen. Currently - only NANP numbers are supported. - type: boolean - required: - - long_code_weight - - skip_unhealthy - - toll_free_weight + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + format: date-time + readOnly: true + type: string + country_code: + description: ISO 3166-1 alpha-2 country code. + example: US + pattern: ^[A-Z]{2}$ + readOnly: true + type: string + type: + description: The type of the phone number + enum: + - long-code + - toll-free + - short-code + - longcode + - tollfree + - shortcode + readOnly: true + type: string + health: + $ref: '#/components/schemas/NumberHealthMetrics' + eligible_messaging_products: + description: The messaging products that this number can be registered to + use + items: + type: string + readOnly: true + type: array + traffic_type: + description: The messaging traffic or use case for which the number is currently + configured. + example: P2P + readOnly: true + type: string + messaging_product: + description: The messaging product that the number is registered to use + example: P2P + type: string + features: + $ref: '#/components/schemas/PhoneNumberWithMessagingSettings_features' type: object - NumberReservation: + PhoneNumberWithVoiceSettings: example: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - record_type: number_reservation - phone_numbers: - - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - record_type: reserved_phone_number - phone_number: +19705555098 - status: pending - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - expired_at: 2018-01-01T00:00:00.000000Z - errors: "" - status: pending - customer_reference: MY REF 001 - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z + id: "1293384261075731499" + record_type: voice_settings + connection_id: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b + customer_reference: customer_reference + tech_prefix_enabled: false + translated_number: +13035559999 + call_forwarding: + call_forwarding_enabled: true + forwards_to: +13035559123 + forwarding_type: always + cnam_listing: + cnam_listing_enabled: true + cnam_listing_details: example + emergency: + emergency_enabled: true + emergency_address_id: "1315261609962112019" + usage_payment_method: pay-per-minute + media_features: + rtp_auto_adjust_enabled: true + media_handling_mode: default + accept_any_rtp_packets_enabled: true + t38_fax_gateway_enabled: true + call_recording: + inbound_call_recording_enabled: true + inbound_call_recording_format: wav + inbound_call_recording_channels: single properties: id: - example: 12ade33a-21c0-473b-b055-b3c836e1c292 - format: uuid + description: Identifies the type of resource. + example: "1293384261075731499" readOnly: true type: string record_type: - example: number_reservation + description: Identifies the type of the resource. + example: voice_settings readOnly: true type: string - phone_numbers: - items: - $ref: '#/components/schemas/ReservedPhoneNumber' - type: array - status: - description: The status of the entire reservation. - enum: - - pending - - success - - failure + phone_number: + description: The phone number in +E164 format. + example: +13035551234 readOnly: true type: string + connection_id: + description: Identifies the connection associated with this phone number. + example: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b + type: string customer_reference: description: A customer reference string for customer look ups. example: MY REF 001 type: string - created_at: - description: An ISO 8901 datetime string denoting when the numbers reservation - was created. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - updated_at: - description: An ISO 8901 datetime string for when the number reservation - was updated. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - OutboundMessage: - example: - record_type: event - id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 - event_type: message.sent - occurred_at: date-time - payload: - record_type: message - direction: outbound - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: MMS - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 - from: - phone_number: +18445550001 - carrier: TELNYX LLC - line_type: VoIP - to: - - phone_number: +18665550001 - status: queued - carrier: T-MOBILE USA, INC. - line_type: Wireless - text: Hello, World! - subject: From Telnyx! - media: - - url: https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png - content_type: null - sha256: null - size: null - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - encoding: GSM-7 - parts: 1 - tags: - - Greetings - cost: null - received_at: 2019-01-23T18:10:02.574Z - sent_at: null - completed_at: null - valid_until: null - errors: [] - properties: - record_type: - description: Identifies the type of the resource. - enum: - - event - example: event - type: string - id: - description: Identifies the type of resource. - format: uuid + tech_prefix_enabled: + default: false + description: Controls whether a tech prefix is enabled for this phone number. + example: false + type: boolean + translated_number: + default: "" + description: This field allows you to rewrite the destination number of + an inbound call before the call is routed to you. The value of this field + may be any alphanumeric value, and the value will replace the number originally + dialed. + example: +13035559999 type: string - event_type: - description: The type of event being delivered. + call_forwarding: + $ref: '#/components/schemas/CallForwarding' + cnam_listing: + $ref: '#/components/schemas/CnamListing' + emergency: + $ref: '#/components/schemas/EmergencySettings' + usage_payment_method: + default: pay-per-minute + description: Controls whether a number is billed per minute or uses your + concurrent channels. enum: - - message.sent - - message.finalized - example: message.sent - type: string - occurred_at: - description: ISO 8601 formatted date indicating when the resource was created. - format: date-time + - pay-per-minute + - channel + example: pay-per-minute type: string - payload: - $ref: '#/components/schemas/OutboundMessagePayload' - OutboundMessageEvent: - example: - data: - record_type: event - id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 - event_type: message.sent - occurred_at: date-time - payload: - record_type: message - direction: outbound - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: MMS - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 - from: - phone_number: +18445550001 - carrier: TELNYX LLC - line_type: VoIP - to: - - phone_number: +18665550001 - status: queued - carrier: T-MOBILE USA, INC. - line_type: Wireless - text: Hello, World! - subject: From Telnyx! - media: - - url: https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png - content_type: null - sha256: null - size: null - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - encoding: GSM-7 - parts: 1 - tags: - - Greetings - cost: null - received_at: 2019-01-23T18:10:02.574Z - sent_at: null - completed_at: null - valid_until: null - errors: [] - properties: - data: - $ref: '#/components/schemas/OutboundMessage' + media_features: + $ref: '#/components/schemas/MediaFeatures' + call_recording: + $ref: '#/components/schemas/CallRecording' type: object - OutboundMessagePayload: + PhoneNumbersJob: example: - record_type: message - direction: outbound - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: MMS - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 - from: - phone_number: +18445550001 - carrier: TELNYX LLC - line_type: VoIP - to: - - phone_number: +18665550001 - status: queued - carrier: T-MOBILE USA, INC. - line_type: Wireless - text: Hello, World! - subject: From Telnyx! - media: - - url: https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png - content_type: null - sha256: null - size: null - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - encoding: GSM-7 - parts: 1 - tags: - - Greetings - cost: null - received_at: 2019-01-23T18:10:02.574Z - sent_at: null - completed_at: null - valid_until: null - errors: [] + id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + record_type: phone_numbers_job + status: pending + type: update_emergency_settings + etc: 2020-10-30T18:10:00.000Z + created_at: 2020-10-23T18:10:00.000Z + updated_at: 2020-10-23T18:10:01.000Z + created_by: 015e81fc-11b7-4170-974d-5592ce987da7 + successful_operations: + - id: "2637816387126861836" + phone_number: +19705555098 + - id: "33081887126861836" + phone_number: +19715555098 + failed_operations: + - id: "3388768018273" + phone_number: +19705551234 + errors: + - code: "10015" + title: Bad Request + detail: The field is invalid. + source: /emergency_address_id properties: + id: + description: Identifies the resource. + example: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + format: uuid + readOnly: true + type: string record_type: description: Identifies the type of the resource. - enum: - - message - example: message + example: phone_numbers_job + readOnly: true type: string - direction: - description: The direction of the message. Inbound messages are sent to - you whereas outbound messages are sent from you. + status: + default: pending + description: Indicates the completion status of the background update. enum: - - outbound - example: outbound - type: string - id: - description: Identifies the type of resource. - format: uuid + - pending + - in_progress + - completed + - failed + - expired + example: pending + readOnly: true type: string type: - description: The type of message. + description: Identifies the type of the background job. enum: - - SMS - - MMS + - update_emergency_settings + - delete_phone_numbers + example: update_emergency_settings + readOnly: true type: string - messaging_profile_id: - description: Unique identifier for a messaging profile. + etc: + description: ISO 8601 formatted date indicating when the estimated time + of completion of the background job. + format: date-time + readOnly: true type: string - from: - $ref: '#/components/schemas/OutboundMessagePayload_from' - to: - items: - $ref: '#/components/schemas/OutboundMessagePayload_to' - type: array - text: - description: |- - Message body (i.e., content) as a non-empty string. - - **Required for SMS** + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + readOnly: true type: string - subject: - description: Subject of multimedia message - nullable: true + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + readOnly: true type: string - media: + created_by: + description: Identifies the user which created the resource. + example: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + format: uuid + readOnly: true + type: string + successful_operations: items: - $ref: '#/components/schemas/OutboundMessagePayload_media' + $ref: '#/components/schemas/PhoneNumbersJobSuccessfulOperation' + readOnly: true type: array - webhook_url: - description: The URL where webhooks related to this message will be sent. - format: url - nullable: true - type: string - webhook_failover_url: - description: The failover URL where webhooks related to this message will - be sent if sending to the primary URL fails. - format: url - nullable: true - type: string - encoding: - description: Encoding scheme used for the message body. - type: string - parts: - description: Number of parts into which the message's body must be split. - maximum: 10 - minimum: 1 - type: integer - tags: - description: Tags associated with the resource. + failed_operations: + items: + $ref: '#/components/schemas/PhoneNumbersJobFailedOperation' + readOnly: true + type: array + type: object + PhoneNumbersJobDeletePhoneNumbersRequest: + example: + phone_numbers: + - +19705555098 + - +19715555098 + - "32873127836" + properties: + phone_numbers: items: + description: The phone numbers or IDs to be updated. type: string type: array - cost: - $ref: '#/components/schemas/InboundMessagePayload_cost' - received_at: - description: ISO 8601 formatted date indicating when the message request - was received. - format: date-time - type: string - sent_at: - description: ISO 8601 formatted date indicating when the message was sent. - format: date-time - type: string - completed_at: - description: ISO 8601 formatted date indicating when the message was finalized. - format: date-time + required: + - phone_numbers + type: object + PhoneNumbersJobFailedOperation: + properties: + phone_number: + description: The phone number in e164 format. + format: e164 type: string - valid_until: - description: Message must be out of the queue by this time or else it will - be discarded and marked as 'sending_failed'. Once the message moves out - of the queue, this field will be nulled - format: date-time - nullable: true + id: + description: The phone number's ID + format: int64 type: string errors: - description: These errors may point at addressees when referring to unsuccessful/unconfirmed - delivery statuses. items: $ref: '#/components/schemas/Error' type: array - type: object - PaginationMeta: + PhoneNumbersJobSuccessfulOperation: + properties: + phone_number: + description: The phone number in e164 format. + format: e164 + type: string + id: + description: The phone number's ID + format: int64 + type: string + PhoneNumbersJobUpdateEmergencySettingsRequest: example: - page_number: 2 - total_pages: 3 - total_results: 55 - page_size: 25 + emergency_enabled: true + emergency_address_id: "53829456729313" + phone_numbers: + - +19705555098 + - +19715555098 + - "32873127836" properties: - total_pages: - example: 3 - type: integer - total_results: - example: 55 - type: integer - page_number: - example: 2 - type: integer - page_size: - example: 25 - type: integer + phone_numbers: + items: + description: The phone numbers or IDs to be updated. + type: string + type: array + emergency_enabled: + description: Indicates whether to enable emergency services on this number. + type: boolean + emergency_address_id: + description: Identifies the address to be used with emergency services. + format: int64 + type: string + required: + - emergency_address_id + - emergency_enabled + - phone_numbers type: object - PaginationMetaSimple: + PlayAudioUrlRequest: + example: + audio_url: http://www.example.com/sounds/greeting.wav + loop: infinity + overlay: true + stop: current + target_legs: self + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 properties: - page_number: - example: 2 - type: integer - page_size: - example: 25 - type: integer - total_pages: - example: 3 - type: integer - total_results: - example: 55 - type: integer + audio_url: + description: The URL of the file to be played back on the call. The URL + can point to either a WAV or MP3 file. + example: http://www.example.com/sounds/greeting.wav + type: string + loop: + $ref: '#/components/schemas/Loopcount' + overlay: + default: false + description: 'When enabled, audio will be mixed on top of any other audio + that is actively being played back. Note that `overlay: true` will only + work if there is another audio file already being played on the call.' + example: true + type: boolean + stop: + description: When specified, it stops the current audio being played. Specify + `current` to stop the current audio being played, and to play the next + file in the queue. Specify `all` to stop the current audio file being + played and to also clear all audio files from the queue. + example: current + type: string + target_legs: + default: self + description: Specifies the leg or legs on which audio will be played. If + supplied, the value must be either `self`, `opposite` or `both`. + example: self + type: string + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + required: + - audio_url + title: Play Audio URL Request type: object - Participant: + PlaybackStopRequest: example: - record_type: participant - created_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - end_conference_on_exit: true - soft_end_conference_on_exit: true - status: joining - muted: false - on_hold: true - call_control_id: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ - whisper_call_control_ids: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + stop: all + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + properties: + stop: + default: all + description: Use `current` to stop only the current audio or `all` to stop + all audios in the queue. + example: current + type: string + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + title: Playback Stop Request + type: object + Recording: + example: + record_type: recording id: dfadada7-af74-47bc-83a4-554275f55f5c - call_leg_id: 3a15df2d-c801-4729-adf5-b56dd42e2abb - conference: - id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 - name: "1" + created_at: 2019-03-29T13:10:00Z + updated_at: 2019-03-29T14:10:00Z + recording_started_at: 2019-03-29T11:10:00Z + recording_ended_at: 2019-03-29T12:10:00Z + duration_millis: 50000 + status: completed + channels: single + source: conference + conference_id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 + call_leg_id: 11111111-5717-4562-b3fc-2c963f66afa6 + call_session_id: 22222222-5717-4562-b3fc-2c963f66afa6 + download_urls: + mp3: https://s3.amazonaws.com/some/path properties: record_type: enum: - - participant - example: participant + - recording + example: recording type: string id: - description: Uniquely identifies the participant - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: string - call_leg_id: - description: Uniquely identifies the call leg associated with the participant + description: Uniquely identifies the recording example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 type: string - call_control_id: - description: Call Control ID associated with the partiipant of the conference - example: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ - type: string - conference: - $ref: '#/components/schemas/Participant_conference' - whisper_call_control_ids: - description: Array of unique call_control_ids the participant can whisper - to.. - example: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw - items: - type: string - type: array created_at: - description: ISO 8601 formatted date of when the participant was created + description: ISO 8601 formatted date of when the recording was created example: 2019-01-23T18:10:02.574Z type: string updated_at: - description: ISO 8601 formatted date of when the participant was last updated + description: ISO 8601 formatted date of when the recording was last updated example: 2019-01-23T18:10:02.574Z type: string - end_conference_on_exit: - description: Whether the conference will end and all remaining participants - be hung up after the participant leaves the conference. - example: true - type: boolean - soft_end_conference_on_exit: - description: Whether the conference will end after the participant leaves - the conference. - example: true - type: boolean + recording_started_at: + description: ISO 8601 formatted date of when the recording started + example: 2019-01-23T18:10:02.574Z + type: string + recording_ended_at: + description: ISO 8601 formatted date of when the recording ended + example: 2019-01-23T18:10:02.574Z + type: string + duration_millis: + description: The duration of the recording in milliseconds + example: 60000 + format: int32 + type: integer status: - description: The status of the participant with respect to the lifecycle - within the conference + description: The status of the recording. Only resources for `completed` + recordings are currently supported enum: - - joining - - joined - - left - example: joining + - completed + example: completed type: string - muted: - description: Whether the participant is muted. - example: true - type: boolean - on_hold: - description: Whether the participant is put on_hold. - example: true - type: boolean + channels: + description: When `dual`, final audio file has the first leg on channel + A, and the rest on channel B. + enum: + - single + - dual + example: single + type: string + source: + description: The kind of event that led to this recording being created + enum: + - conference + - call + example: conference + type: string + conference_id: + description: If a conference recording, uniquely identifies the recorded + conference + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: string + call_leg_id: + description: If a call recording, uniquely identifies the recorded call + leg + example: 11111111-5717-4562-b3fc-2c963f66afa6 + type: string + call_session_id: + description: If a call recording, uniquely identifies the recorded call + session + example: 22222222-5717-4562-b3fc-2c963f66afa6 + type: string + download_urls: + $ref: '#/components/schemas/Recording_download_urls' required: - - call_control_id - - call_leg_id - - conference + - channels - created_at - - end_conference_on_exit + - download_urls + - duration_millis - id - - muted - - on_hold - record_type - - soft_end_conference_on_exit + - recording_ended_at + - recording_started_at + - source - status - updated_at - - whisper_call_control_ids - title: Participant + title: Recording type: object - PauseRecordingRequest: + ReferRequest: + example: + sip_address: sip:username@sip.non-telnyx-address.com + properties: + sip_address: + description: The SIP URI to which the call will be referred to. + example: sip:username@sip.non-telnyx-address.com + type: string + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d + type: string + command_id: + description: Use this field to avoid execution of duplicate commands. Telnyx + will ignore subsequent commands with the same `command_id` as one that + has already been executed. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + custom_headers: + description: Custom headers to be added to the SIP INVITE. + example: + - name: head_1 + value: val_1 + - name: head_2 + value: val_2 + items: + $ref: '#/components/schemas/CustomSipHeader' + type: array + sip_auth_username: + description: SIP Authentication username used for SIP challenges. + type: string + sip_auth_password: + description: SIP Authentication password used for SIP challenges. + type: string + required: + - sip_address + title: Refer request + type: object + RegionInformation: + example: + region_type: country_code + region_name: US + properties: + region_type: + enum: + - country_code + - rate_center + - state + - location + example: country_code + type: string + region_name: + example: US + type: string + RegulatoryRequirement: + example: + record_type: regulatory_requirement + requirement_type: end user proof of address + label: Proof of Address + field_type: address + description: Requirement for providing Proof of Address. + properties: + record_type: + description: Identifies the type of the resource. + example: regulatory_requirement + readOnly: true + type: string + requirement_type: + enum: + - end user proof of address + - entity identification + - end user address + type: string + label: + example: Proof of Address + type: string + field_type: + enum: + - file upload + - text field + - address + - datetime + type: string + description: + example: Requirement for providing Proof of Address. + type: string + RegulatoryRequirementCriteria: + example: + record_type: phone_number_regulatory_requirement_criteria + criteria_type: country + criteria_value: AU + properties: + record_type: + example: phone_number_regulatory_requirement_criteria + readOnly: true + type: string + criteria_type: + enum: + - country + - phone_number_type + readOnly: true + type: string + criteria_value: + example: AU + readOnly: true + type: string + RejectRequest: example: - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + cause: USER_BUSY properties: client_state: description: Use this field to add state to every subsequent webhook. It @@ -11252,305 +16716,208 @@ components: commands with the same `command_id`. example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - title: Pause Recording Request + cause: + description: Cause for call rejection. + enum: + - CALL_REJECTED + - USER_BUSY + example: USER_BUSY + type: string + required: + - cause + title: Reject Request type: object - PhoneNumber: + ReplacedLinkClick: example: - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - record_type: number_order_phone_number - phone_number: +19705555098 - regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - regulatory_requirements: - - record_type: phone_number_regulatory_requirement - requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 - field_type: address_id - requirements_met: true - status: success + record_type: link_clicked + url: https://telnyx.com + to: "18445550001" + message_id: 7ee4241c-f127-47e5-9c34-3aac291f8058 + time_clicked: 2019-04-01T14:45:45.450Z properties: - id: - example: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - format: uuid - readOnly: true - type: string record_type: - example: number_order_phone_number - readOnly: true + description: Identifies the type of the resource. + example: link_clicked type: string - phone_number: - example: +19705555098 - format: e164_phone_number + url: + description: The original link that was sent in the message. + example: link_clicked type: string - regulatory_group_id: - example: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - readOnly: true + to: + description: Sending address (+E.164 formatted phone number, alphanumeric + sender ID, or short code). + format: address type: string - regulatory_requirements: - items: - $ref: '#/components/schemas/PhoneNumberRegulatoryRequirement' - type: array - requirements_met: - description: True if all requirements are met for a phone number, false - otherwise. - example: true - readOnly: true - type: boolean - status: - description: The status of the phone number in the order. - enum: - - pending - - success - - failure - readOnly: true + message_id: + description: The message ID associated with the clicked link. + format: uuid type: string - PhoneNumberDetailed: + time_clicked: + description: ISO 8601 formatted date indicating when the message request + was received. + format: date-time + type: string + type: object + ReplacedLinkClickEvent: example: - id: "1293384261075731499" - record_type: phone_number + data: + record_type: link_clicked + url: https://telnyx.com + to: "18445550001" + message_id: 7ee4241c-f127-47e5-9c34-3aac291f8058 + time_clicked: 2019-04-01T14:45:45.450Z + properties: + data: + $ref: '#/components/schemas/ReplacedLinkClick' + type: object + ReservedPhoneNumber: + example: + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + record_type: reserved_phone_number phone_number: +19705555098 - status: active - tags: - - tag_1 - - tag_2 - external_pin: "1234" - connection_id: "1293384261075731499" - connection_name: connection-name - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 - messaging_profile_name: regional-customers - billing_group_id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 - emergency_enabled: true - emergency_address_id: "1315261609962112019" - call_forwarding_enabled: true - cnam_listing_enabled: true - caller_id_name_enabled: true - call_recording_enabled: true - t38_fax_gateway_enabled: true - purchased_at: 2019-10-23T18:10:00.000Z - created_at: 2019-10-23T18:10:00.000Z - updated_at: 2019-10-24T18:10:00.000Z + status: pending + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + expired_at: 2018-01-01T00:00:00.000000Z properties: id: - description: Identifies the resource. - example: "1293384261075731499" - format: int64 + example: 12ade33a-21c0-473b-b055-b3c836e1c292 + format: uuid readOnly: true type: string record_type: - description: Identifies the type of the resource. - example: phone_number + example: reserved_phone_number readOnly: true type: string phone_number: - description: The +E.164-formatted phone number associated with this record. - readOnly: true + example: +19705555098 + format: e164_phone_number type: string status: - description: The phone number's current status. + description: The status of the phone number's reservation. enum: - - purchase-pending - - purchase-failed - - port-pending - - port-failed - - active - - deleted - - emergency-only - - ported-out - - port-out-pending - readOnly: true - type: string - tags: - description: A list of user-assigned tags to help manage the phone number. - items: - type: string - type: array - external_pin: - description: If someone attempts to port your phone number away from Telnyx - and your phone number has an external PIN set, Telnyx will attempt to - verify that you provided the correct external PIN to the winning carrier. - Note that not all carriers cooperate with this security mechanism. - type: string - connection_name: - description: The user-assigned name of the connection to be associated with - this phone number. - readOnly: true - type: string - connection_id: - description: Identifies the connection associated with the phone number. - type: string - messaging_profile_id: - description: Identifies the messaging profile associated with the phone - number. - type: string - messaging_profile_name: - description: The name of the messaging profile associated with the phone - number. - example: regional-customers - type: string - billing_group_id: - description: Identifies the billing group associated with the phone number. - type: string - emergency_enabled: - description: Indicates whether emergency services are enabled for this number. - readOnly: true - type: boolean - emergency_address_id: - description: Identifies the emergency address associated with the phone - number. - format: int64 - readOnly: true - type: string - call_forwarding_enabled: - default: true - description: Indicates if call forwarding will be enabled for this number - if forwards_to and forwarding_type are filled in. Defaults to true for - backwards compatibility with APIV1 use of numbers endpoints. - readOnly: true - type: boolean - cnam_listing_enabled: - description: Indicates whether a CNAM listing is enabled for this number. - readOnly: true - type: boolean - caller_id_name_enabled: - description: Indicates whether caller ID is enabled for this number. - readOnly: true - type: boolean - call_recording_enabled: - description: Indicates whether call recording is enabled for this number. - readOnly: true - type: boolean - t38_fax_gateway_enabled: - description: Indicates whether T38 Fax Gateway for inbound calls to this - number. - readOnly: true - type: boolean - purchased_at: - description: ISO 8601 formatted date indicating when the resource was purchased. + - pending + - success + - failure readOnly: true type: string created_at: - description: ISO 8601 formatted date indicating when the resource was created. + description: An ISO 8901 datetime string denoting when the individual number + reservation was created. + example: 2018-01-01T00:00:00.000000Z + format: datetime readOnly: true type: string updated_at: - description: ISO 8601 formatted date indicating when the resource was updated. - readOnly: true - type: string - type: object - PhoneNumberEnableEmergencyRequest: - example: - emergency_enabled: true - emergency_address_id: "53829456729313" - properties: - emergency_enabled: - description: Indicates whether to enable emergency services on this number. - type: boolean - emergency_address_id: - description: Identifies the address to be used with emergency services. - format: int64 - type: string - required: - - emergency_address_id - - emergency_enabled - type: object - PhoneNumberRegulatoryGroup: - example: - record_type: phone_number_regulatory_requirement - phone_number: +19705555098 - regulatory_group_id: d70873cd-7c98-401a-81b6-b1ae08246995 - regulatory_requirements: - - record_type: regulatory_requirement - requirement_type: end user proof of address - label: Proof of Address - field_type: address - description: Requirement for providing Proof of Address. - properties: - record_type: - example: phone_number_regulatory_requirement + description: An ISO 8901 datetime string for when the the individual number + reservation was updated. + example: 2018-01-01T00:00:00.000000Z + format: datetime readOnly: true type: string - phone_number: - example: +19705555098 - format: e164_phone_number + expired_at: + description: An ISO 8901 datetime string for when the individual number + reservation is going to expire + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true type: string - regulatory_group_id: - example: d70873cd-7c98-401a-81b6-b1ae08246995 - format: uuid + errors: + description: Errors the reservation could happen upon + example: Number is already on hold + readOnly: true type: string - regulatory_requirements: - items: - $ref: '#/components/schemas/RegulatoryRequirement' - type: array - PhoneNumberRegulatoryRequirement: + ResumeRecordingRequest: example: - record_type: phone_number_regulatory_requirement - requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 - field_type: address_id + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d properties: - record_type: - example: phone_number_regulatory_requirement - readOnly: true + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - requirement_id: - description: Unique id for a requirement. - example: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - format: uuid + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - field_value: - description: The value of the requirement, this could be an id to a resource - or a string value. - example: 45f45a04-b4be-4592-95b1-9306b9db2b21 + title: Pause Recording Request + type: object + SendDTMFRequest: + example: + digits: 1www2WABCDw9 + duration_millis: 500 + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + properties: + digits: + description: 'DTMF digits to send. Valid digits are 0-9, A-D, *, and #. + Pauses can be added using w (0.5s) and W (1s).' + example: 1www2WABCDw9 type: string - field_type: - enum: - - string - - datetime - - address_id - - number_order_document_id - example: address_id - readOnly: true + duration_millis: + default: 250 + description: Specifies for how many milliseconds each digit will be played + in the audio stream. Ranges from 100 to 500ms + example: 500 + format: int32 + type: integer + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - PhoneNumberWithMessagingSettings: + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 + type: string + required: + - digits + title: Send DTMF Request + type: object + ServicePlan: + default: global + description: Indicates the coverage of the termination regions. International + and Global are the same but International may only be used for high volume/short + duration Outbound Voice Profiles. + enum: + - us + - international + - global + example: global + type: string + ShortCode: example: - record_type: messaging_settings - id: "1293384261075731499" - phone_number: +18005550001 + record_type: short_code + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + short_code: "12345" + country_code: US messaging_profile_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 created_at: 2019-01-23T18:10:02.574Z updated_at: 2019-01-23T18:10:02.574Z - country_code: US - type: toll-free - health: - message_count: 122 - inbound_outbound_ratio: 0.43 - success_ratio: 0.94 - spam_ratio: 0.06 - eligible_messaging_products: - - A2P - traffic_type: A2P - messaging_product: A2P - features: - sms: - domestic_two_way: true - international_inbound: true - international_outbound: true - mms: null properties: record_type: description: Identifies the type of the resource. enum: - - messaging_phone_number - - messaging_settings - example: messaging_settings + - short_code + example: short_code readOnly: true type: string id: description: Identifies the type of resource. + format: uuid readOnly: true type: string - phone_number: - description: +E.164 formatted phone number. - format: e164 + short_code: + description: Short digit sequence used to address messages. + readOnly: true + type: string + country_code: + description: ISO 3166-1 alpha-2 country code. + example: US + pattern: ^[A-Z]{2}$ readOnly: true type: string messaging_profile_id: @@ -11564,164 +16931,95 @@ components: type: string updated_at: description: ISO 8601 formatted date indicating when the resource was updated. - format: date-time - readOnly: true - type: string - country_code: - description: ISO 3166-1 alpha-2 country code. - example: US - pattern: ^[A-Z]{2}$ - readOnly: true - type: string - type: - description: The type of the phone number - enum: - - long-code - - toll-free - - short-code - - longcode - - tollfree - - shortcode - readOnly: true - type: string - health: - $ref: '#/components/schemas/NumberHealthMetrics' - eligible_messaging_products: - description: The messaging products that this number can be registered to - use - items: - type: string - readOnly: true - type: array - traffic_type: - description: The messaging traffic or use case for which the number is currently - configured. - example: P2P - readOnly: true - type: string - messaging_product: - description: The messaging product that the number is registered to use - example: P2P - type: string - features: - $ref: '#/components/schemas/PhoneNumberWithMessagingSettings_features' - type: object - PhoneNumberWithVoiceSettings: - example: - id: "1293384261075731499" - record_type: voice_settings - connection_id: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b - tech_prefix_enabled: false - translated_number: +13035559999 - call_forwarding: - call_forwarding_enabled: true - forwards_to: +13035559123 - forwarding_type: always - cnam_listing: - cnam_listing_enabled: true - cnam_listing_details: example - emergency: - emergency_enabled: true - emergency_address_id: "1315261609962112019" - usage_payment_method: pay-per-minute - media_features: - rtp_auto_adjust_enabled: true - media_handling_mode: default - accept_any_rtp_packets_enabled: true - t38_fax_gateway_enabled: true - call_recording: - inbound_call_recording_enabled: true - inbound_call_recording_format: wav - inbound_call_recording_channels: single - properties: - id: - description: Identifies the type of resource. - example: "1293384261075731499" - readOnly: true - type: string - record_type: - description: Identifies the type of the resource. - example: voice_settings - readOnly: true - type: string - phone_number: - description: The phone number in +E164 format. - example: +13035551234 - readOnly: true - type: string - connection_id: - description: Identifies the connection associated with this phone number. - example: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b - type: string - tech_prefix_enabled: - default: false - description: Controls whether a tech prefix is enabled for this phone number. - example: false - type: boolean - translated_number: - default: "" - description: This field allows you to rewrite the destination number of - an inbound call before the call is routed to you. The value of this field - may be any alphanumeric value, and the value will replace the number originally - dialed. - example: +13035559999 - type: string - call_forwarding: - $ref: '#/components/schemas/CallForwarding' - cnam_listing: - $ref: '#/components/schemas/CnamListing' - emergency: - $ref: '#/components/schemas/EmergencySettings' - usage_payment_method: - default: pay-per-minute - description: Controls whether a number is billed per minute or uses your - concurrent channels. - enum: - - pay-per-minute - - channel - example: pay-per-minute - type: string - media_features: - $ref: '#/components/schemas/MediaFeatures' - call_recording: - $ref: '#/components/schemas/CallRecording' + format: date-time + readOnly: true + type: string + required: + - messaging_profile_id type: object - PlayAudioUrlRequest: + SpeakRequest: example: - audio_url: http://www.example.com/sounds/greeting.wav - loop: infinity - overlay: true + payload: Say this on the call + payload_type: text + service_level: basic stop: current - target_legs: self + voice: female + language: arb client_state: aGF2ZSBhIG5pY2UgZGF5ID1d command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 properties: - audio_url: - description: The URL of the file to be played back on the call. The URL - can point to either a WAV or MP3 file. - example: http://www.example.com/sounds/greeting.wav + payload: + description: The text or SSML to be converted into speech. There is a 5,000 + character limit. + example: Say this on the call + type: string + payload_type: + default: text + description: The type of the provided payload. The payload can either be + plain text, or Speech Synthesis Markup Language (SSML). + enum: + - text + - ssml + example: ssml + type: string + service_level: + default: premium + description: This parameter impacts speech quality, language options and + payload types. When using `basic`, only the `en-US` language and payload + type `text` are allowed. + enum: + - basic + - premium + example: premium type: string - loop: - $ref: '#/components/schemas/Loopcount' - overlay: - default: false - description: 'When enabled, audio will be mixed on top of any other audio - that is actively being played back. Note that `overlay: true` will only - work if there is another audio file already being played on the call.' - example: true - type: boolean stop: + default: "null" description: When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue. example: current type: string - target_legs: - default: self - description: Specifies the leg or legs on which audio will be played. If - supplied, the value must be either `self`, `opposite` or `both`. - example: self + voice: + description: The gender of the voice used to speak back the text. + enum: + - male + - female + example: female + type: string + language: + description: The language you want spoken. + enum: + - arb + - cmn-CN + - cy-GB + - da-DK + - de-DE + - en-AU + - en-GB + - en-GB-WLS + - en-IN + - en-US + - es-ES + - es-MX + - es-US + - fr-CA + - fr-FR + - hi-IN + - is-IS + - it-IT + - ja-JP + - ko-KR + - nb-NO + - nl-NL + - pl-PL + - pt-BR + - pt-PT + - ro-RO + - ru-RU + - sv-SE + - tr-TR + example: en-US type: string client_state: description: Use this field to add state to every subsequent webhook. It @@ -11734,20 +17032,47 @@ components: example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string required: - - audio_url - title: Play Audio URL Request + - language + - payload + - voice + title: Speak Request type: object - PlaybackStopRequest: + StartForkingRequest: example: - stop: all + target: udp:192.0.2.1:9000 + rx: 192.0.2.1:9000 + tx: 192.0.2.1:9001 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 properties: - stop: - default: all - description: Use `current` to stop only the current audio or `all` to stop - all audios in the queue. - example: current + target: + description: The network target, , where the call's + RTP media packets should be forwarded. Both incoming and outgoing media + packets will be delivered to the specified target, and information about + the stream will be included in the encapsulation protocol header, including + the direction (0 = inbound; 1 = outbound), leg (0 = A-leg; 1 = B-leg), + and call_leg_id. + example: udp:192.0.2.1:9000 + type: string + rx: + description: The network target, , where the call's + incoming RTP media packets should be forwarded. + example: 192.0.2.1:9000 + type: string + stream_type: + default: raw + description: Optionally specify a media type to stream. If `decrpyted` selected, + Telnyx will decrypt incoming SIP media before forking to the target. `rx` + and `tx` are required fields if `decrypted` selected. + enum: + - raw + - decrypted + example: decrypted + type: string + tx: + description: The network target, , where the call's + outgoing RTP media packets should be forwarded. + example: 192.0.2.1:9001 type: string client_state: description: Use this field to add state to every subsequent webhook. It @@ -11759,222 +17084,328 @@ components: commands with the same `command_id`. example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - title: Playback Stop Request + title: Start Forking Request type: object - Recording: + StartRecordingRequest: example: - record_type: recording - id: dfadada7-af74-47bc-83a4-554275f55f5c - created_at: 2019-03-29T13:10:00Z - updated_at: 2019-03-29T14:10:00Z - recording_started_at: 2019-03-29T11:10:00Z - recording_ended_at: 2019-03-29T12:10:00Z - duration_millis: 50000 - status: completed + format: wav channels: single - source: conference - conference_id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 - call_leg_id: 11111111-5717-4562-b3fc-2c963f66afa6 - call_session_id: 22222222-5717-4562-b3fc-2c963f66afa6 - download_urls: - mp3: https://s3.amazonaws.com/some/path + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + play_beep: true properties: - record_type: - enum: - - recording - example: recording - type: string - id: - description: Uniquely identifies the recording - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: string - created_at: - description: ISO 8601 formatted date of when the recording was created - example: 2019-01-23T18:10:02.574Z - type: string - updated_at: - description: ISO 8601 formatted date of when the recording was last updated - example: 2019-01-23T18:10:02.574Z - type: string - recording_started_at: - description: ISO 8601 formatted date of when the recording started - example: 2019-01-23T18:10:02.574Z - type: string - recording_ended_at: - description: ISO 8601 formatted date of when the recording ended - example: 2019-01-23T18:10:02.574Z - type: string - duration_millis: - description: The duration of the recording in milliseconds - example: 60000 - format: int32 - type: integer - status: - description: The status of the recording. Only resources for `completed` - recordings are currently supported + format: + description: The audio file format used when storing the call recording. + Can be either `mp3` or `wav`. enum: - - completed - example: completed + - wav + - mp3 + example: mp3 type: string channels: - description: When `dual`, final audio file has the first leg on channel - A, and the rest on channel B. + description: When `dual`, final audio file will be stereo recorded with + the first leg on channel A, and the rest on channel B. enum: - single - dual example: single type: string - source: - description: The kind of event that led to this recording being created - enum: - - conference - - call - example: conference - type: string - conference_id: - description: If a conference recording, uniquely identifies the recorded - conference - example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - type: string - call_leg_id: - description: If a call recording, uniquely identifies the recorded call - leg - example: 11111111-5717-4562-b3fc-2c963f66afa6 + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - call_session_id: - description: If a call recording, uniquely identifies the recorded call - session - example: 22222222-5717-4562-b3fc-2c963f66afa6 + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - download_urls: - $ref: '#/components/schemas/Recording_download_urls' + play_beep: + description: If enabled, a beep sound will be played at the start of a recording. + example: true + type: boolean required: - - channels - - created_at - - download_urls - - duration_millis - - id - - record_type - - recording_ended_at - - recording_started_at - - source - - status - - updated_at - title: Recording + - channels + - format + title: Start Recording Request type: object - ReferRequest: + StopForkingRequest: example: - sip_address: sip:username@sip.non-telnyx-address.com + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 properties: - sip_address: - description: The SIP URI to which the call will be referred to. - example: sip:username@sip.non-telnyx-address.com - type: string client_state: description: Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string command_id: - description: Use this field to avoid execution of duplicate commands. Telnyx - will ignore subsequent commands with the same `command_id` as one that - has already been executed. + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - custom_headers: - description: Custom headers to be added to the SIP INVITE. - example: - - name: head_1 - value: val_1 - - name: head_2 - value: val_2 - items: - $ref: '#/components/schemas/CustomSipHeader' - type: array - sip_auth_username: - description: SIP Authentication username used for SIP challenges. + title: Stop Forking Request + type: object + StopGatherRequest: + example: + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + properties: + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - sip_auth_password: - description: SIP Authentication password used for SIP challenges. + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - required: - - sip_address - title: Refer request + title: Stop Gather Request type: object - RegionInformation: + StopRecordingRequest: example: - region_type: country_code - region_name: US + client_state: aGF2ZSBhIG5pY2UgZGF5ID1d + command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 properties: - region_type: - enum: - - country_code - - rate_center - - state - - location - example: country_code + client_state: + description: Use this field to add state to every subsequent webhook. It + must be a valid Base-64 encoded string. + example: aGF2ZSBhIG5pY2UgZGF5ID1d type: string - region_name: - example: US + command_id: + description: Use this field to avoid duplicate commands. Telnyx will ignore + commands with the same `command_id`. + example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - RegulatoryRequirement: + title: Stop Recording Request + type: object + TexmlApplication: example: - record_type: regulatory_requirement - requirement_type: end user proof of address - label: Proof of Address - field_type: address - description: Requirement for providing Proof of Address. + id: "1293384261075731499" + record_type: texml_application + active: false + friendly_name: call-router + anchorsite_override: Amsterdam, Netherlands + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + voice_url: https://example.com + voice_fallback_url: https://fallback.example.com + voice_method: get + status_callback: https://example.com + status_callback_method: get + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + created_at: 2020-02-02T22:25:27.521Z + updated_at: 2020-02-03T22:25:27.521Z properties: + id: + description: Identifies the resource. + example: "1293384261075731499" + format: int64 + readOnly: true + type: string record_type: description: Identifies the type of the resource. - example: regulatory_requirement - readOnly: true + example: texml_application type: string - requirement_type: - enum: - - end user proof of address - - entity identification - - end user address + friendly_name: + description: A user-assigned name to help manage the application. + example: call-router + title: Application Name type: string - label: - example: Proof of Address + active: + default: true + description: Specifies whether the connection can be used. + example: false + title: Connection Active + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + dtmf_type: + $ref: '#/components/schemas/DtmfType' + first_command_timeout: + default: false + description: Specifies whether calls to phone numbers associated with this + connection should hangup after timing out. + example: true + title: First Command Timeout + type: boolean + first_command_timeout_secs: + default: 30 + description: Specifies how many seconds to wait before timing out a dial + command. + example: 10 + title: First Command Timeout Secs + type: integer + voice_url: + description: URL to which Telnyx will deliver your XML Translator webhooks. + example: https://example.com + format: url type: string - field_type: - enum: - - file upload - - text field - - address - - datetime + voice_fallback_url: + default: "null" + description: URL to which Telnyx will deliver your XML Translator webhooks + if we get an error response from your voice_url. + example: https://fallback.example.com + format: url type: string - description: - example: Requirement for providing Proof of Address. + voice_method: + default: post + description: HTTP request method Telnyx will use to interact with your XML + Translator webhooks. Either 'get' or 'post'. + enum: + - get + - post + example: get type: string - RegulatoryRequirementCriteria: - example: - record_type: phone_number_regulatory_requirement_criteria - criteria_type: country - criteria_value: AU - properties: - record_type: - example: phone_number_regulatory_requirement_criteria - readOnly: true + status_callback: + default: "null" + description: URL for Telnyx to send requests to containing information about + call progress events. + example: https://example.com + format: url type: string - criteria_type: + status_callback_method: + default: post + description: HTTP request method Telnyx should use when requesting the status_callback + URL. enum: - - country - - phone_number_type - readOnly: true + - get + - post + example: get type: string - criteria_value: - example: AU - readOnly: true + inbound: + $ref: '#/components/schemas/CreateTexmlApplicationRequest_inbound' + outbound: + $ref: '#/components/schemas/CreateTexmlApplicationRequest_outbound' + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + example: 2020-02-02T22:25:27.521Z + title: Created At type: string - RejectRequest: + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2020-02-03T22:25:27.521Z + title: Updated At + type: string + title: Texml Application + type: object + ToNumber: + description: Receiving address (+E.164 formatted phone number or short code). + example: +E.164 + format: address + type: string + TrafficType: + default: conversational + description: Specifies the type of traffic allowed in this profile. + enum: + - conversational + - short_duration + example: conversational + type: string + TransferCallRequest: example: + to: +18005550100 or sip:username@sip.telnyx.com + from: +18005550101 + audio_url: http://www.example.com/sounds/greeting.wav + timeout_secs: 60 + timeout_limit_secs: 60 + webhook_url: https://www.example.com/server-b/ + webhook_url_method: POST + answering_machine_detection: detect + answering_machine_detection_config: + total_analysis_time_millis: 5000 + after_greeting_silence_millis: 1000 + between_words_silence_millis: 1000 + greeting_duration_millis: 1000 + initial_silence_millis: 1000 + maximum_number_of_words: 1000 + maximum_word_length_millis: 2000 + silence_threshold: 512 + greeting_total_analysis_time_millis: 50000 + greeting_silence_duration_millis: 2000 + custom_headers: + - name: head_1 + value: val_1 + - name: head_2 + value: val_2 client_state: aGF2ZSBhIG5pY2UgZGF5ID1d command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - cause: USER_BUSY + sip_auth_username: username + sip_auth_password: password properties: + to: + description: The DID or SIP URI to dial out and bridge to the given call. + example: +18005550100 or sip:username@sip.telnyx.com + type: string + from: + description: The `from` number to be used as the caller id presented to + the destination (`to` number). The number should be in +E164 format. This + attribute will default to the `from` number of the original call if omitted. + example: +18005550101 + type: string + audio_url: + description: Audio URL to be played back when the transfer destination answers + before bridging the call. The URL can point to either a WAV or MP3 file. + example: http://www.example.com/sounds/greeting.wav + type: string + timeout_secs: + default: 30 + description: The number of seconds that Telnyx will wait for the call to + be answered by the destination to which it is being transferred. If the + timeout is reached before an answer is received, the call will hangup + and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be + sent. Minimum value is 5 seconds. Maximum value is 120 seconds. + example: 60 + format: int32 + type: integer + time_limit_secs: + default: 14400 + description: Sets the maximum duration of a Call Control Leg in seconds. + If the time limit is reached, the call will hangup and a `call.hangup` + webhook with a `hangup_cause` of `time_limit` will be sent. For example, + by setting a time limit of 120 seconds, a Call Leg will be automatically + terminated two minutes after being answered. The default time limit is + 14400 seconds or 4 hours and this is also the maximum allowed call length. + example: 600 + format: int32 + type: integer + answering_machine_detection: + default: disabled + description: Enables Answering Machine Detection. When a call is answered, + Telnyx runs real-time detection to determine if it was picked up by a + human or a machine and sends an `call.machine.detection.ended` webhook + with the analysis result. If 'greeting_end' or 'detect_words' is used + and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' + webhook when the answering machine greeting ends with a beep or silence. + If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' + if a beep is detected. + enum: + - detect + - detect_beep + - detect_words + - greeting_end + - disabled + type: string + answering_machine_detection_config: + $ref: '#/components/schemas/CallRequest_answering_machine_detection_config' + custom_headers: + description: Custom headers to be added to the SIP INVITE. + example: + - name: head_1 + value: val_1 + - name: head_2 + value: val_2 + items: + $ref: '#/components/schemas/CustomSipHeader' + type: array client_state: description: Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string. @@ -11985,1121 +17416,1762 @@ components: commands with the same `command_id`. example: 891510ac-f3e4-11e8-af5b-de00688a4901 type: string - cause: - description: Cause for call rejection. - enum: - - CALL_REJECTED - - USER_BUSY - example: USER_BUSY - type: string - required: - - cause - title: Reject Request - type: object - ReplacedLinkClick: - example: - record_type: link_clicked - url: https://telnyx.com - to: "18445550001" - message_id: 7ee4241c-f127-47e5-9c34-3aac291f8058 - time_clicked: 2019-04-01T14:45:45.450Z - properties: - record_type: - description: Identifies the type of the resource. - example: link_clicked - type: string - url: - description: The original link that was sent in the message. - example: link_clicked + sip_auth_username: + description: SIP Authentication username used for SIP challenges. + example: username type: string - to: - description: Sending address (+E.164 formatted phone number, alphanumeric - sender ID, or short code). - format: address + sip_auth_password: + description: SIP Authentication password used for SIP challenges. + example: password type: string - message_id: - description: The message ID associated with the clicked link. - format: uuid + webhook_url: + description: Use this field to override the URL for which Telnyx will send + subsuqeunt webhooks to for this call. + example: https://www.example.com/server-b/ type: string - time_clicked: - description: ISO 8601 formatted date indicating when the message request - was received. - format: date-time + webhook_url_method: + default: POST + description: HTTP request type used for `webhook_url`. + enum: + - POST + - GET + example: GET type: string + required: + - to + title: Transfer Call Request type: object - ReplacedLinkClickEvent: - example: - data: - record_type: link_clicked - url: https://telnyx.com - to: "18445550001" - message_id: 7ee4241c-f127-47e5-9c34-3aac291f8058 - time_clicked: 2019-04-01T14:45:45.450Z - properties: - data: - $ref: '#/components/schemas/ReplacedLinkClick' - type: object - ReservedPhoneNumber: + UpdateCallControlApplicationRequest: example: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - record_type: reserved_phone_number - phone_number: +19705555098 - status: pending - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - expired_at: 2018-01-01T00:00:00.000000Z + application_name: call-router + webhook_event_url: https://example.com + active: false + anchorsite_override: '"Latency"' + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + webhook_api_version: "1" + webhook_event_failover_url: https://failover.example.com + webhook_timeout_secs: 25 properties: - id: - example: 12ade33a-21c0-473b-b055-b3c836e1c292 - format: uuid - readOnly: true - type: string - record_type: - example: reserved_phone_number - readOnly: true + application_name: + description: A user-assigned name to help manage the application. + example: call-router type: string - phone_number: - example: +19705555098 - format: e164_phone_number + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - status: - description: The status of the phone number's reservation. + active: + default: true + description: Specifies whether the connection can be used. + type: boolean + anchorsite_override: + default: '"Latency"' + description: | + Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. enum: - - pending - - success - - failure - readOnly: true - type: string - created_at: - description: An ISO 8901 datetime string denoting when the individual number - reservation was created. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - updated_at: - description: An ISO 8901 datetime string for when the the individual number - reservation was updated. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - expired_at: - description: An ISO 8901 datetime string for when the individual number - reservation is going to expire - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - errors: - description: Errors the reservation could happen upon - example: Number is already on hold - readOnly: true - type: string - ResumeRecordingRequest: - example: - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - properties: - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d - type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + - '"Latency"' + - '"Chicago, IL"' + - '"Ashburn, VA"' + - '"San Jose, CA"' + example: '"Amsterdam, Netherlands"' type: string - title: Pause Recording Request - type: object - SendDTMFRequest: - example: - digits: 1www2WABCDw9 - duration_millis: 500 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - properties: - digits: - description: 'DTMF digits to send. Valid digits are 0-9, A-D, *, and #. - Pauses can be added using w (0.5s) and W (1s).' - example: 1www2WABCDw9 + dtmf_type: + default: RFC 2833 + description: Sets the type of DTMF digits sent from Telnyx to this Connection. + Note that DTMF digits sent to Telnyx will be accepted in all formats. + enum: + - RFC 2833 + - Inband + - SIP INFO + example: Inband type: string - duration_millis: - default: 250 - description: Specifies for how many milliseconds each digit will be played - in the audio stream. Ranges from 100 to 500ms - example: 500 - format: int32 + first_command_timeout: + default: false + description: Specifies whether calls to phone numbers associated with this + connection should hangup after timing out. + example: true + type: boolean + first_command_timeout_secs: + default: 30 + description: Specifies how many seconds to wait before timing out a dial + command. + example: 10 type: integer - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + inbound: + $ref: '#/components/schemas/CallControlApplicationInbound' + outbound: + $ref: '#/components/schemas/CallControlApplicationOutbound' + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer required: - - digits - title: Send DTMF Request + - application_name + - webhook_event_url + title: Update Call Control Application Request type: object - ShortCode: + UpdateCredentialConnectionRequest: example: - record_type: short_code - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - short_code: "12345" - country_code: US - messaging_profile_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - created_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z + active: true + password: my123secure456password789 + user_name: myusername123 + anchorsite_override: Latency + connection_name: my name + sip_uri_calling_preference: ' disabled' + default_on_hold_comfort_noise_enabled: false + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_seconds: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 + outbound: + call_parking_enabled: true + ani_override: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: US + t38_reinvite_source: telnyx + outbound_voice_profile_id: "1293384261075731499" properties: - record_type: - description: Identifies the type of the resource. - enum: - - short_code - example: short_code - readOnly: true + active: + description: Defaults to true + type: boolean + user_name: + description: The user name to be used as part of the credentials. Must be + 4-32 characters long and alphanumeric values only (no spaces or special + characters). + example: myusername123 type: string - id: - description: Identifies the type of resource. - format: uuid - readOnly: true + password: + description: The password to be used as part of the credentials. Must be + 8 to 128 characters long. + example: my123secure456password789 type: string - short_code: - description: Short digit sequence used to address messages. - readOnly: true + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: type: string - country_code: - description: ISO 3166-1 alpha-2 country code. - example: US - pattern: ^[A-Z]{2}$ - readOnly: true + sip_uri_calling_preference: + default: disabled + description: This feature enables inbound SIP URI calls to your Credential + Auth Connection. If enabled for all (unrestricted) then anyone who calls + the SIP URI @telnyx.com will be connected to your Connection. + You can also choose to allow only calls that are originated on any Connections + under your account (internal). + enum: + - disabled + - unrestricted + - internal type: string - messaging_profile_id: - description: Unique identifier for a messaging profile. - nullable: true + default_on_hold_comfort_noise_enabled: + default: false + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + type: boolean + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: + default: false + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. + type: boolean + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer the sender and receiver negotiating + T38 directly if both are on the Telnyx network. If this is disabled, Telnyx + will be able to use T38 on just one leg of the call depending on each + leg's settings. + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - created_at: - description: ISO 8601 formatted date indicating when the resource was created. - format: date-time - readOnly: true + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - updated_at: - description: ISO 8601 formatted date indicating when the resource was updated. - format: date-time - readOnly: true + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - required: - - messaging_profile_id + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + inbound: + $ref: '#/components/schemas/CredentialInbound' + outbound: + $ref: '#/components/schemas/CredentialOutbound' + title: Update Credential Connection Request type: object - SpeakRequest: + UpdateFaxApplicationRequest: example: - payload: Say this on the call - payload_type: text - service_level: basic - stop: current - voice: female - language: arb - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + application_name: fax-router + active: false + anchorsite_override: Amsterdam, Netherlands + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_timeout_secs: 25 + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" properties: - payload: - description: The text or SSML to be converted into speech. There is a 5,000 - character limit. - example: Say this on the call + application_name: + description: A user-assigned name to help manage the application. + example: call-router + title: Application Name type: string - payload_type: - default: text - description: The type of the provided payload. The payload can either be - plain text, or Speech Synthesis Markup Language (SSML). - enum: - - text - - ssml - example: ssml + active: + default: true + description: Specifies whether the connection can be used. + example: false + title: Connection Active + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url + title: Webhook Event URL type: string - service_level: - default: premium - description: This parameter impacts speech quality, language options and - payload types. When using `basic`, only the `en-US` language and payload - type `text` are allowed. - enum: - - basic - - premium - example: premium + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true + title: Webhook Event Failover URL type: string - stop: - default: "null" - description: When specified, it stops the current audio being played. Specify - `current` to stop the current audio being played, and to play the next - file in the queue. Specify `all` to stop the current audio file being - played and to also clear all audio files from the queue. - example: current + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + title: Webhook Timeout Secs + type: integer + inbound: + $ref: '#/components/schemas/CreateFaxApplicationRequest_inbound' + outbound: + $ref: '#/components/schemas/CreateFaxApplicationRequest_outbound' + required: + - application_name + - webhook_event_url + title: Update Fax Application Request + type: object + UpdateFqdnConnectionRequest: + example: + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 + properties: + active: + description: Defaults to true + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: type: string - voice: - description: The gender of the voice used to speak back the text. - enum: - - male - - female - example: female + transport_protocol: + $ref: '#/components/schemas/FqdnConnectionTransportProtocol' + default_on_hold_comfort_noise_enabled: + default: true + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + type: boolean + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: + default: false + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. + type: boolean + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer that the sender and receiver + negotiate T38 directly when both are on the Telnyx network. If this is + disabled, Telnyx will be able to use T38 on just one leg of the call according + to each leg's settings. + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - language: - description: The language you want spoken. - enum: - - arb - - cmn-CN - - cy-GB - - da-DK - - de-DE - - en-AU - - en-GB - - en-GB-WLS - - en-IN - - en-US - - es-ES - - es-MX - - es-US - - fr-CA - - fr-FR - - hi-IN - - is-IS - - it-IT - - ja-JP - - ko-KR - - nb-NO - - nl-NL - - pl-PL - - pt-BR - - pt-PT - - ro-RO - - ru-RU - - sv-SE - - tr-TR - example: en-US + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + inbound: + $ref: '#/components/schemas/InboundFqdn' + title: Update Fqdn Connection Request + UpdateFqdnRequest: + example: + connection_id: "1516447646313612565" + fqdn: example.com + port: 8080 + dns_record_type: a + properties: + connection_id: + description: ID of the FQDN connection to which this IP should be attached. type: string - required: - - language - - payload - - voice - title: Speak Request + fqdn: + description: FQDN represented by this resource. + example: example.com + type: string + port: + default: 5060 + description: Port to use when connecting to this FQDN. + example: 5060 + nullable: true + type: integer + dns_record_type: + description: The DNS record type for the FQDN. For cases where a port is + not set, the DNS record type must be 'srv'. For cases where a port is + set, the DNS record type must be 'a'. If the DNS record type is 'a' and + a port is not specified, 5060 will be used. + example: a + type: string + title: Update Fqdn Request type: object - StartForkingRequest: + UpdateIpConnectionRequest: example: - target: udp:192.0.2.1:9000 - rx: 192.0.2.1:9000 - tx: 192.0.2.1:9001 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: false + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + 'inbound:': + ani_number_format: +E.164 + dns_number_format: +e164 + codecs: G722 + default_primary_ip_id: 192.168.0.0 + default_tertiary_ip_id: 192.168.0.0 + default_secondary_ip_id: 192.168.0.0 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: test + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 20 + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + tech_prefix: string + ip_authentication_method: token + ip_authentication_token: string + outbound_voice_profile_id: "1293384261075731499" properties: - target: - description: The network target, , where the call's - RTP media packets should be forwarded. Both incoming and outgoing media - packets will be delivered to the specified target, and information about - the stream will be included in the encapsulation protocol header, including - the direction (0 = inbound; 1 = outbound), leg (0 = A-leg; 1 = B-leg), - and call_leg_id. - example: udp:192.0.2.1:9000 - type: string - rx: - description: The network target, , where the call's - incoming RTP media packets should be forwarded. - example: 192.0.2.1:9000 + active: + description: Defaults to true + type: boolean + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + connection_name: type: string - stream_type: - default: raw - description: Optionally specify a media type to stream. If `decrpyted` selected, - Telnyx will decrypt incoming SIP media before forking to the target. `rx` - and `tx` are required fields if `decrypted` selected. + transport_protocol: + default: UDP + description: One of UDP, TLS, or TCP. Applies only to connections with IP + authentication or FQDN authentication. enum: - - raw - - decrypted - example: decrypted + - UDP + - TCP + - TLS type: string - tx: - description: The network target, , where the call's - outgoing RTP media packets should be forwarded. - example: 192.0.2.1:9001 + default_on_hold_comfort_noise_enabled: + default: true + description: When enabled, Telnyx will generate comfort noise when you place + the call on hold. If disabled, you will need to generate comfort noise + or on hold music to avoid RTP timeout. + type: boolean + dtmf_type: + $ref: '#/components/schemas/DtmfType' + encode_contact_header_enabled: + default: false + description: Encode the SIP contact header sent by Telnyx to avoid issues + for NAT or ALG scenarios. + type: boolean + encrypted_media: + $ref: '#/components/schemas/EncryptedMedia' + onnet_t38_passthrough_enabled: + default: false + description: Enable on-net T38 if you prefer the sender and receiver negotiating + T38 directly if both are on the Telnyx network. If this is disabled, Telnyx + will be able to use T38 on just one leg of the call depending on each + leg's settings. + type: boolean + webhook_event_url: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url type: string - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + webhook_event_failover_url: + default: "" + description: The failover URL where webhooks related to this connection + will be sent if sending to the primary URL fails. Must include a scheme, + such as 'https'. + example: https://failover.example.com + format: url + nullable: true type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + webhook_api_version: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 + or v2. + enum: + - "1" + - "2" + example: "1" type: string - title: Start Forking Request - type: object - StartRecordingRequest: + webhook_timeout_secs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + type: integer + rtcp_settings: + $ref: '#/components/schemas/ConnectionRtcpSettings' + inbound: + $ref: '#/components/schemas/InboundIp' + outbound: + $ref: '#/components/schemas/OutboundIp' + title: Update Ip Connection Request + UpdateIpRequest: example: - format: wav - channels: single - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - play_beep: true + connection_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + ip_address: 192.168.0.0 + port: 5060 properties: - format: - description: The audio file format used when storing the call recording. - Can be either `mp3` or `wav`. - enum: - - wav - - mp3 - example: mp3 - type: string - channels: - description: When `dual`, final audio file will be stereo recorded with - the first leg on channel A, and the rest on channel B. - enum: - - single - - dual - example: single - type: string - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + connection_id: + description: ID of the IP Connection to which this IP should be attached. type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + ip_address: + description: IP adddress represented by this resource. + example: 192.168.0.0 type: string - play_beep: - description: If enabled, a beep sound will be played at the start of a recording. - example: true - type: boolean + port: + default: 5060 + description: Port to use when connecting to this IP. + example: 5060 + type: integer required: - - channels - - format - title: Start Recording Request + - ip_address + title: Update Ip Request type: object - StopForkingRequest: + UpdateMessagingProfileRequest: example: - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + name: Updated Profile for Messages + webhook_url: https://www.example.com/hooks + webhook_failover_url: https://backup.example.com/hooks + enabled: true + webhook_api_version: "2" + whitelisted_destinations: + - US + number_pool_settings: + toll_free_weight: 10 + long_code_weight: 2 + skip_unhealthy: false + sticky_sender: true + geomatch: false + url_shortener_settings: + domain: example.ex + prefix: cmpny + replace_blacklist_only: true + send_webhooks: false + v1_secret: rP1VamejkU2v0qIUxntqLW2c properties: - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + record_type: + description: Identifies the type of the resource. + enum: + - messaging_profile + readOnly: true type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + id: + description: Identifies the type of resource. + format: uuid + readOnly: true + type: string + name: + description: A user friendly name for the messaging profile. + type: string + enabled: + description: Specifies whether the messaging profile is enabled or not. + type: boolean + webhook_url: + description: The URL where webhooks related to this messaging profile will + be sent. + format: url + nullable: true + type: string + webhook_failover_url: + description: The failover URL where webhooks related to this messaging profile + will be sent if sending to the primary URL fails. + format: url + nullable: true + type: string + webhook_api_version: + description: Determines which webhook format will be used, Telnyx API v1, + v2, or a legacy 2010-04-01 format. + enum: + - "1" + - "2" + - 2010-04-01 + type: string + whitelisted_destinations: + description: Destinations to which the messaging profile is allowed to send. + If set to `null`, all destinations will be allowed. Setting a value of + `["*"]` has the equivalent effect. The elements in the list must be valid + ISO 3166-1 alpha-2 country codes. + items: + description: ISO 3166-1 alpha-2 country code. + pattern: ^[A-Z]{2}$ + type: string + nullable: true + type: array + created_at: + description: ISO 8601 formatted date indicating when the resource was created. + format: date-time + readOnly: true + type: string + updated_at: + description: ISO 8601 formatted date indicating when the resource was updated. + format: date-time + readOnly: true + type: string + v1_secret: + description: Secret used to authenticate with v1 endpoints. type: string - title: Stop Forking Request + number_pool_settings: + $ref: '#/components/schemas/NumberPoolSettings' + url_shortener_settings: + $ref: '#/components/schemas/UrlShortenerSettings' type: object - StopGatherRequest: + UpdateNumberOrderDocumentRequest: example: - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 + id: 387d1e31-a218-4375-8151-103f2d5e2d2c + record_type: number_order_document + file_id: 1e3c5822-0362-4702-8e46-5a129f0d3976 + requirements_id: 36aaf27d-986b-493c-bd1b-de16af2e4292 + customer_reference: MY REF 001 + requirement_type: address_proof + created_at: 2018-01-01T00:00:00.000000Z properties: - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + id: + example: 387d1e31-a218-4375-8151-103f2d5e2d2c + format: uuid + readOnly: true type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + record_type: + example: number_order_document + readOnly: true type: string - title: Stop Gather Request - type: object - StopRecordingRequest: - example: - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - properties: - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d + file_id: + description: The id of the file to associate as a number order document. + example: 1e3c5822-0362-4702-8e46-5a129f0d3976 type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 + requirements_id: + description: Unique id for a requirement. + example: 36aaf27d-986b-493c-bd1b-de16af2e4292 type: string - title: Stop Recording Request - type: object - ToNumber: - description: Receiving address (+E.164 formatted phone number or short code). - example: +E.164 - format: address - type: string - TransferCallRequest: + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 + type: string + requirement_type: + enum: + - address_proof + - identification + - reg_form + readOnly: true + type: string + created_at: + description: An ISO 8901 datetime string denoting when the number order + document was uploaded. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + UpdateNumberOrderRequest: example: - to: +18005550100 or sip:username@sip.telnyx.com - from: +18005550101 - audio_url: http://www.example.com/sounds/greeting.wav - timeout_secs: 60 - timeout_limit_secs: 60 - webhook_url: https://www.example.com/server-b/ - webhook_url_method: POST - answering_machine_detection: detect - answering_machine_detection_config: - total_analysis_time_millis: 5000 - after_greeting_silence_millis: 1000 - between_words_silence_millis: 1000 - greeting_duration_millis: 1000 - initial_silence_millis: 1000 - maximum_number_of_words: 1000 - maximum_word_length_millis: 2000 - silence_threshold: 512 - greeting_total_analysis_time_millis: 50000 - greeting_silence_duration_millis: 2000 - custom_headers: - - name: head_1 - value: val_1 - - name: head_2 - value: val_2 - client_state: aGF2ZSBhIG5pY2UgZGF5ID1d - command_id: 891510ac-f3e4-11e8-af5b-de00688a4901 - sip_auth_username: username - sip_auth_password: password + id: 12ade33a-21c0-473b-b055-b3c836e1c292 + phone_numbers: + - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + record_type: number_order_phone_number + phone_number: +19705555098 + regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + regulatory_requirements: + - record_type: phone_number_regulatory_requirement + requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 + field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 + field_type: address_id + requirements_met: true + status: success + record_type: number_order + phone_numbers_count: 1 + status: pending + customer_reference: MY REF 001 + created_at: 2018-01-01T00:00:00.000000Z + updated_at: 2018-01-01T00:00:00.000000Z + requirements_met: true properties: - to: - description: The DID or SIP URI to dial out and bridge to the given call. - example: +18005550100 or sip:username@sip.telnyx.com - type: string - from: - description: The `from` number to be used as the caller id presented to - the destination (`to` number). The number should be in +E164 format. This - attribute will default to the `from` number of the original call if omitted. - example: +18005550101 + id: + example: 12ade33a-21c0-473b-b055-b3c836e1c292 + format: uuid + readOnly: true type: string - audio_url: - description: Audio URL to be played back when the transfer destination answers - before bridging the call. The URL can point to either a WAV or MP3 file. - example: http://www.example.com/sounds/greeting.wav + record_type: + example: number_order + readOnly: true type: string - timeout_secs: - default: 30 - description: The number of seconds that Telnyx will wait for the call to - be answered by the destination to which it is being transferred. If the - timeout is reached before an answer is received, the call will hangup - and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be - sent. Minimum value is 5 seconds. Maximum value is 120 seconds. - example: 60 - format: int32 - type: integer - time_limit_secs: - default: 14400 - description: Sets the maximum duration of a Call Control Leg in seconds. - If the time limit is reached, the call will hangup and a `call.hangup` - webhook with a `hangup_cause` of `time_limit` will be sent. For example, - by setting a time limit of 120 seconds, a Call Leg will be automatically - terminated two minutes after being answered. The default time limit is - 14400 seconds or 4 hours and this is also the maximum allowed call length. - example: 600 - format: int32 + phone_numbers: + items: + $ref: '#/components/schemas/PhoneNumber' + type: array + writeOnly: true + phone_numbers_count: + description: The count of phone numbers in the number order. + example: 1 + readOnly: true type: integer - answering_machine_detection: - default: disabled - description: Enables Answering Machine Detection. When a call is answered, - Telnyx runs real-time detection to determine if it was picked up by a - human or a machine and sends an `call.machine.detection.ended` webhook - with the analysis result. If 'greeting_end' or 'detect_words' is used - and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' - webhook when the answering machine greeting ends with a beep or silence. - If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' - if a beep is detected. + status: + description: The status of the order. enum: - - detect - - detect_beep - - detect_words - - greeting_end - - disabled + - pending + - success + - failure + readOnly: true type: string - answering_machine_detection_config: - $ref: '#/components/schemas/CallRequest_answering_machine_detection_config' - custom_headers: - description: Custom headers to be added to the SIP INVITE. + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 + type: string + created_at: + description: An ISO 8901 datetime string denoting when the number order + was created. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + updated_at: + description: An ISO 8901 datetime string for when the number order was updated. + example: 2018-01-01T00:00:00.000000Z + format: datetime + readOnly: true + type: string + requirements_met: + description: True if all requirements are met for every phone number, false + otherwise. + example: true + readOnly: true + type: boolean + UpdateOutboundVoiceProfileRequest: + example: + name: office + traffic_type: conversational + service_plan: global + concurrent_call_limit: 10 + enabled: true + tags: + - office-profile + usage_payment_method: rate-deck + whitelisted_destinations: + - US + - BR + - AU + max_destination_rate: 10 + daily_spend_limit: "100.00" + daily_spend_limit_enabled: true + billing_group_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + properties: + name: + default: "" + description: A user-supplied name to help with organization. + example: office + type: string + traffic_type: + $ref: '#/components/schemas/TrafficType' + service_plan: + $ref: '#/components/schemas/ServicePlan' + concurrent_call_limit: + description: Must be no more than your global concurrent call limit. Null + means no limit. + example: 10 + nullable: true + type: integer + enabled: + default: true + description: Specifies whether the outbound voice profile can be used. Disabled + profiles will result in outbound calls being blocked for the associated + Connections. + example: true + type: boolean + tags: example: - - name: head_1 - value: val_1 - - name: head_2 - value: val_2 + - office-profile items: - $ref: '#/components/schemas/CustomSipHeader' + type: string + type: array + usage_payment_method: + $ref: '#/components/schemas/UsagePaymentMethod' + whitelisted_destinations: + default: + - US + - CA + description: The list of destinations you want to be able to call using + this outbound voice profile formatted in alpha2. + example: + - US + - BR + - AU + items: + type: string type: array - client_state: - description: Use this field to add state to every subsequent webhook. It - must be a valid Base-64 encoded string. - example: aGF2ZSBhIG5pY2UgZGF5ID1d - type: string - command_id: - description: Use this field to avoid duplicate commands. Telnyx will ignore - commands with the same `command_id`. - example: 891510ac-f3e4-11e8-af5b-de00688a4901 - type: string - sip_auth_username: - description: SIP Authentication username used for SIP challenges. - example: username + max_destination_rate: + description: Maximum rate (price per minute) for a Destination to be allowed + when making outbound calls. + type: number + daily_spend_limit: + description: The maximum amount of usage charges, in USD, you want Telnyx + to allow on this outbound voice profile in a day before disallowing new + calls. + example: "100.00" type: string - sip_auth_password: - description: SIP Authentication password used for SIP challenges. - example: password + daily_spend_limit_enabled: + default: false + description: Specifies whether to enforce the daily_spend_limit on this + outbound voice profile. + example: true + type: boolean + call_recording: + $ref: '#/components/schemas/OutboundCallRecording' + billing_group_id: + description: The ID of the billing group associated with the outbound proflile. + Defaults to null (for no group assigned). + example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + format: uuid + nullable: true type: string - webhook_url: - description: Use this field to override the URL for which Telnyx will send - subsuqeunt webhooks to for this call. - example: https://www.example.com/server-b/ + title: Outbound Voice Profile + type: object + UpdatePhoneNumberMessagingSettingsRequest: + example: + messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 + messaging_product: P2P + properties: + messaging_profile_id: + description: Unique identifier for a messaging profile. type: string - webhook_url_method: - default: POST - description: HTTP request type used for `webhook_url`. - enum: - - POST - - GET - example: GET + messaging_product: + description: The requested messaging product the number should be on + example: P2P type: string - required: - - to - title: Transfer Call Request type: object - UpdateCallControlApplicationRequest: + UpdatePhoneNumberRequest: example: - application_name: call-router - webhook_event_url: https://example.com - active: false - anchorsite_override: '"Latency"' - dtmf_type: Inband - first_command_timeout: true - first_command_timeout_secs: 10 - inbound: - channel_limit: 10 - sip_subdomain: example - sip_subdomain_receive_settings: only_my_connections - outbound: - channel_limit: 10 - outbound_voice_profile_id: "1293384261075731499" - webhook_api_version: "1" - webhook_event_failover_url: https://failover.example.com - webhook_timeout_secs: 25 + id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + tags: + - tag + address_id: dc8f39ac-953d-4520-b93b-786ae87db0da + external_pin: "1234" + customer_reference: customer-reference + connection_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + billing_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 properties: - application_name: - description: A user-assigned name to help manage the application. - example: call-router + id: + description: Identifies the type of resource. + readOnly: true type: string - webhook_event_url: - description: The URL where webhooks related to this connection will be sent. - Must include a scheme, such as 'https'. - example: https://example.com - format: url + tags: + description: A list of user-assigned tags to help organize phone numbers. + items: + type: string + type: array + external_pin: + description: If someone attempts to port your phone number away from Telnyx + and your phone number has an external PIN set, we will attempt to verify + that you provided the correct external PIN to the winning carrier. Note + that not all carriers cooperate with this security mechanism. type: string - active: - default: true - description: Specifies whether the connection can be used. - type: boolean - anchorsite_override: - default: '"Latency"' - description: | - Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. - enum: - - '"Latency"' - - '"Chicago, IL"' - - '"Ashburn, VA"' - - '"San Jose, CA"' - example: '"Amsterdam, Netherlands"' + customer_reference: + description: A customer reference string for customer look ups. + example: MY REF 001 type: string - dtmf_type: - default: RFC 2833 - description: Sets the type of DTMF digits sent from Telnyx to this Connection. - Note that DTMF digits sent to Telnyx will be accepted in all formats. - enum: - - RFC 2833 - - Inband - - SIP INFO - example: Inband + connection_id: + description: Identifies the connection associated with the phone number. type: string - first_command_timeout: + billing_group_id: + description: Identifies the billing group associated with the phone number. + type: string + type: object + UpdatePhoneNumberVoiceSettingsRequest: + example: + tech_prefix_enabled: true + translated_number: +13035559999 + call_forwarding: + call_forwarding_enabled: true + forwards_to: +13035559123 + forwarding_type: always + cnam_listing: + cnam_listing_enabled: true + cnam_listing_details: example + usage_payment_method: pay-per-minute + media_features: + rtp_auto_adjust_enabled: true + media_handling_mode: default + accept_any_rtp_packets_enabled: true + t38_fax_gateway_enabled: true + call_recording: + inbound_call_recording_enabled: true + inbound_call_recording_format: wav + inbound_call_recording_channels: single + properties: + tech_prefix_enabled: default: false - description: Specifies whether calls to phone numbers associated with this - connection should hangup after timing out. - example: true + description: Controls whether a tech prefix is enabled for this phone number. type: boolean - first_command_timeout_secs: - default: 30 - description: Specifies how many seconds to wait before timing out a dial - command. - example: 10 - type: integer - inbound: - $ref: '#/components/schemas/CallControlApplicationInbound' - outbound: - $ref: '#/components/schemas/CallControlApplicationOutbound' - webhook_api_version: - default: "1" - description: Determines which webhook format will be used, Telnyx API v1 - or v2. - enum: - - "1" - - "2" - example: "1" + translated_number: + description: This field allows you to rewrite the destination number of + an inbound call before the call is routed to you. The value of this field + may be any alphanumeric value, and the value will replace the number originally + dialed. type: string - webhook_event_failover_url: - default: "" - description: The failover URL where webhooks related to this connection - will be sent if sending to the primary URL fails. Must include a scheme, - such as 'https'. - example: https://failover.example.com - format: url - nullable: true + call_forwarding: + $ref: '#/components/schemas/CallForwarding' + cnam_listing: + $ref: '#/components/schemas/CnamListing' + usage_payment_method: + default: pay-per-minute + description: Controls whether a number is billed per minute or uses your + concurrent channels. + enum: + - pay-per-minute + - channel type: string - webhook_timeout_secs: - description: Specifies how many seconds to wait before timing out a webhook. - example: 25 - maximum: 30 - minimum: 0 - nullable: true - type: integer - required: - - application_name - - webhook_event_url - title: Update Call Control Application Request + media_features: + $ref: '#/components/schemas/MediaFeatures' + call_recording: + $ref: '#/components/schemas/CallRecording' type: object - UpdateMessagingProfileRequest: + UpdateShortCodeRequest: example: - name: Updated Profile for Messages - webhook_url: https://www.example.com/hooks - webhook_failover_url: https://backup.example.com/hooks - enabled: true - webhook_api_version: "2" - whitelisted_destinations: - - US - number_pool_settings: - toll_free_weight: 10 - long_code_weight: 2 - skip_unhealthy: false - sticky_sender: true - geomatch: false - url_shortener_settings: - domain: example.ex - prefix: cmpny - replace_blacklist_only: true - send_webhooks: false - v1_secret: rP1VamejkU2v0qIUxntqLW2c + messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 properties: - record_type: - description: Identifies the type of the resource. - enum: - - messaging_profile - readOnly: true - type: string - id: - description: Identifies the type of resource. - format: uuid - readOnly: true + messaging_profile_id: + description: Unique identifier for a messaging profile. type: string - name: - description: A user friendly name for the messaging profile. + required: + - messaging_profile_id + type: object + UpdateTexmlApplicationRequest: + example: + friendly_name: call-router + active: false + anchorsite_override: Amsterdam, Netherlands + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + voice_url: https://example.com + voice_fallback_url: https://fallback.example.com + voice_method: get + status_callback: https://example.com + status_callback_method: get + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + properties: + friendly_name: + description: A user-assigned name to help manage the application. + example: call-router + title: Application Name type: string - enabled: - description: Specifies whether the messaging profile is enabled or not. + active: + default: true + description: Specifies whether the connection can be used. + example: false + title: Connection Active type: boolean - webhook_url: - description: The URL where webhooks related to this messaging profile will - be sent. + anchorsite_override: + $ref: '#/components/schemas/AnchorsiteOverride' + dtmf_type: + $ref: '#/components/schemas/DtmfType' + first_command_timeout: + default: false + description: Specifies whether calls to phone numbers associated with this + connection should hangup after timing out. + example: true + title: First Command Timeout + type: boolean + first_command_timeout_secs: + default: 30 + description: Specifies how many seconds to wait before timing out a dial + command. + example: 10 + title: First Command Timeout Secs + type: integer + voice_url: + description: URL to which Telnyx will deliver your XML Translator webhooks. + example: https://example.com format: url - nullable: true type: string - webhook_failover_url: - description: The failover URL where webhooks related to this messaging profile - will be sent if sending to the primary URL fails. + voice_fallback_url: + default: "null" + description: URL to which Telnyx will deliver your XML Translator webhooks + if we get an error response from your voice_url. + example: https://fallback.example.com format: url - nullable: true type: string - webhook_api_version: - description: Determines which webhook format will be used, Telnyx API v1, - v2, or a legacy 2010-04-01 format. + voice_method: + default: post + description: HTTP request method Telnyx will use to interact with your XML + Translator webhooks. Either 'get' or 'post'. enum: - - "1" - - "2" - - 2010-04-01 + - get + - post + example: get type: string - whitelisted_destinations: - description: Destinations to which the messaging profile is allowed to send. - If set to `null`, all destinations will be allowed. Setting a value of - `["*"]` has the equivalent effect. The elements in the list must be valid - ISO 3166-1 alpha-2 country codes. - items: - description: ISO 3166-1 alpha-2 country code. - pattern: ^[A-Z]{2}$ - type: string - nullable: true - type: array - created_at: - description: ISO 8601 formatted date indicating when the resource was created. - format: date-time - readOnly: true + status_callback: + default: "null" + description: URL for Telnyx to send requests to containing information about + call progress events. + example: https://example.com + format: url type: string - updated_at: - description: ISO 8601 formatted date indicating when the resource was updated. - format: date-time - readOnly: true + status_callback_method: + default: post + description: HTTP request method Telnyx should use when requesting the status_callback + URL. + enum: + - get + - post + example: get type: string - v1_secret: - description: Secret used to authenticate with v1 endpoints. + inbound: + $ref: '#/components/schemas/CreateTexmlApplicationRequest_inbound' + outbound: + $ref: '#/components/schemas/CreateTexmlApplicationRequest_outbound' + required: + - friendly_name + - voice_url + title: Update Texml Application Request + type: object + UpdatedAt: + description: ISO 8601 formatted date indicating when the resource was updated. + example: 2020-02-03T22:25:27.521Z + title: Updated At + type: string + UploadFileMessagingHostedNumberOrderRequest: + example: + loa: example loa + bill: bill example + properties: + loa: + description: Must be a signed LOA for the numbers in the order in PDF format. + format: binary + type: string + bill: + description: Must be the last month's bill with proof of ownership of all + of the numbers in the order in PDF format. + format: binary type: string - number_pool_settings: - $ref: '#/components/schemas/NumberPoolSettings' - url_shortener_settings: - $ref: '#/components/schemas/UrlShortenerSettings' type: object - UpdateNumberOrderDocumentRequest: + UrlShortenerSettings: + description: | + The URL shortener feature allows automatic replacement of URLs that were generated using + a public URL shortener service. Some examples include bit.do, bit.ly, goo.gl, ht.ly, + is.gd, ow.ly, rebrand.ly, t.co, tiny.cc, and tinyurl.com. Such URLs are replaced with + with links generated by Telnyx. The use of custom links can improve branding and message + deliverability. + + To disable this feature, set the object field to `null`. example: - id: 387d1e31-a218-4375-8151-103f2d5e2d2c - record_type: number_order_document - file_id: 1e3c5822-0362-4702-8e46-5a129f0d3976 - requirements_id: 36aaf27d-986b-493c-bd1b-de16af2e4292 - customer_reference: MY REF 001 - requirement_type: address_proof - created_at: 2018-01-01T00:00:00.000000Z + domain: example.ex + prefix: "" + replace_blacklist_only: true + send_webhooks: false + nullable: true + properties: + domain: + description: | + One of the domains provided by the Telnyx URL shortener service. + example: acct.fyi + type: string + prefix: + description: | + Optional prefix that can be used to identify your brand, and will appear in the Telnyx generated URLs after the domain name. + type: string + replace_blacklist_only: + description: | + Use the link replacement tool only for links that are specifically blacklisted by Telnyx. + example: true + type: boolean + send_webhooks: + description: | + Receive webhooks for when your replaced links are clicked. Webhooks are sent to the webhooks on the messaging profile. + example: false + type: boolean + required: + - domain + type: object + UsagePaymentMethod: + default: rate-deck + description: Setting for how costs for outbound profile are calculated. + enum: + - tariff + - rate-deck + example: tariff + type: string + WebhookApiVersion: + default: "1" + description: Determines which webhook format will be used, Telnyx API v1 or + v2. + enum: + - "1" + - "2" + example: "1" + title: Webhook API Version + type: string + WebhookEventFailoverUrl: + default: "" + description: The failover URL where webhooks related to this connection will + be sent if sending to the primary URL fails. Must include a scheme, such as + 'https'. + example: https://failover.example.com + format: url + nullable: true + title: Webhook Event Failover URL + type: string + WebhookEventUrl: + description: The URL where webhooks related to this connection will be sent. + Must include a scheme, such as 'https'. + example: https://example.com + format: url + title: Webhook Event URL + type: string + WebhookTimeoutSecs: + description: Specifies how many seconds to wait before timing out a webhook. + example: 25 + maximum: 30 + minimum: 0 + nullable: true + title: Webhook Timeout Secs + type: integer + List_Available_Phone_Numbers_Response: + example: + data: + - record_type: available_phone_number + phone_number: +19705555098 + vanity_format: "" + best_effort: false + quickship: true + reservable: true + region_information: + - region_type: country_code + region_name: US + cost_information: + upfront_cost: "3.21" + monthly_cost: "6.54" + currency: USD + regulatory_requirements: + - requirement_type: end user proof of address + label: Proof of Address + field_type: address + description: Requirement for providing Proof of Address. + - record_type: available_phone_number + phone_number: +19705555098 + vanity_format: "" + best_effort: false + quickship: true + reservable: true + region_information: + - region_type: country_code + region_name: US + cost_information: + upfront_cost: "3.21" + monthly_cost: "6.54" + currency: USD + regulatory_requirements: + - requirement_type: end user proof of address + label: Proof of Address + field_type: address + description: Requirement for providing Proof of Address. + meta: + total_results: 100 + best_effort_results: 50 + properties: + data: + items: + $ref: '#/components/schemas/AvailablePhoneNumber' + type: array + meta: + $ref: '#/components/schemas/AvailablePhoneNumbersMetadata' + title: List Available Phone Numbers Response + type: object + List_Call_Control_Applications_Response: + example: + data: + - active: false + anchorsite_override: '"Latency"' + application_name: call-router + created_at: 2018-02-02T22:25:27.521Z + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + id: "1293384261075731499" + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + record_type: call_control_application + updated_at: 2018-02-02T22:25:27.521Z + webhook_api_version: "1" + webhook_event_failover_url: https://failover.example.com + webhook_event_url: https://example.com + webhook_timeout_secs: 25 + - active: false + anchorsite_override: '"Latency"' + application_name: call-router + created_at: 2018-02-02T22:25:27.521Z + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + id: "1293384261075731499" + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + record_type: call_control_application + updated_at: 2018-02-02T22:25:27.521Z + webhook_api_version: "1" + webhook_event_failover_url: https://failover.example.com + webhook_event_url: https://example.com + webhook_timeout_secs: 25 + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 + properties: + data: + items: + $ref: '#/components/schemas/CallControlApplication' + type: array + meta: + $ref: '#/components/schemas/PaginationMeta' + title: List Call Control Applications Response + type: object + Call_Control_Application_Response: + example: + data: + active: false + anchorsite_override: '"Latency"' + application_name: call-router + created_at: 2018-02-02T22:25:27.521Z + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + id: "1293384261075731499" + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + record_type: call_control_application + updated_at: 2018-02-02T22:25:27.521Z + webhook_api_version: "1" + webhook_event_failover_url: https://failover.example.com + webhook_event_url: https://example.com + webhook_timeout_secs: 25 properties: - id: - example: 387d1e31-a218-4375-8151-103f2d5e2d2c - format: uuid - readOnly: true - type: string - record_type: - example: number_order_document - readOnly: true - type: string - file_id: - description: The id of the file to associate as a number order document. - example: 1e3c5822-0362-4702-8e46-5a129f0d3976 - type: string - requirements_id: - description: Unique id for a requirement. - example: 36aaf27d-986b-493c-bd1b-de16af2e4292 - type: string - customer_reference: - description: A customer reference string for customer look ups. - example: MY REF 001 - type: string - requirement_type: - enum: - - address_proof - - identification - - reg_form - readOnly: true - type: string - created_at: - description: An ISO 8901 datetime string denoting when the number order - document was uploaded. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - UpdateNumberOrderRequest: + data: + $ref: '#/components/schemas/CallControlApplication' + title: Call Control Application Response + type: object + List_Call_Events_Response: example: - id: 12ade33a-21c0-473b-b055-b3c836e1c292 - phone_numbers: - - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - record_type: number_order_phone_number - phone_number: +19705555098 - regulatory_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - regulatory_requirements: - - record_type: phone_number_regulatory_requirement - requirement_id: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576 - field_value: 45f45a04-b4be-4592-95b1-9306b9db2b21 - field_type: address_id - requirements_met: true - status: success - record_type: number_order - phone_numbers_count: 1 - status: pending - customer_reference: MY REF 001 - created_at: 2018-01-01T00:00:00.000000Z - updated_at: 2018-01-01T00:00:00.000000Z - requirements_met: true + data: + - record_type: call_event + call_leg_id: 308fe500-5213-11e9-ace7-02420a0f0668 + call_session_id: 308fec30-5213-11e9-9d3f-02420a0f0668 + event_timestamp: 2019-03-29T11:10:19.127783Z + name: call.hangup + type: webhook + metadata: {} + - record_type: call_event + call_leg_id: 308fe500-5213-11e9-ace7-02420a0f0668 + call_session_id: 308fec30-5213-11e9-9d3f-02420a0f0668 + event_timestamp: 2019-03-29T11:10:19.127783Z + name: call.hangup + type: webhook + metadata: {} + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 properties: - id: - example: 12ade33a-21c0-473b-b055-b3c836e1c292 - format: uuid - readOnly: true - type: string - record_type: - example: number_order - readOnly: true - type: string - phone_numbers: + data: items: - $ref: '#/components/schemas/PhoneNumber' + $ref: '#/components/schemas/CallEvent' type: array - writeOnly: true - phone_numbers_count: - description: The count of phone numbers in the number order. - example: 1 - readOnly: true - type: integer - status: - description: The status of the order. - enum: - - pending - - success - - failure - readOnly: true - type: string - customer_reference: - description: A customer reference string for customer look ups. - example: MY REF 001 - type: string - created_at: - description: An ISO 8901 datetime string denoting when the number order - was created. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - updated_at: - description: An ISO 8901 datetime string for when the number order was updated. - example: 2018-01-01T00:00:00.000000Z - format: datetime - readOnly: true - type: string - requirements_met: - description: True if all requirements are met for every phone number, false - otherwise. - example: true - readOnly: true - type: boolean - UpdatePhoneNumberMessagingSettingsRequest: + meta: + $ref: '#/components/schemas/PaginationMeta' + title: List Call Events Response + type: object + Retrieve_Call_Status_Response: example: - messaging_profile_id: dd50eba1-a0c0-4563-9925-b25e842a7cb6 - messaging_product: P2P + data: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ + call_leg_id: 2dc6fc34-f9e0-11ea-b68e-02420a0f7768 + call_session_id: 2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768 + is_alive: false + record_type: call properties: - messaging_profile_id: - description: Unique identifier for a messaging profile. - type: string - messaging_product: - description: The requested messaging product the number should be on - example: P2P - type: string + data: + $ref: '#/components/schemas/Call' + title: Retrieve Call Status Response type: object - UpdatePhoneNumberRequest: + Call_Control_Command_Response: example: - id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - tags: - - tag - address_id: dc8f39ac-953d-4520-b93b-786ae87db0da - external_pin: "1234" - connection_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 - billing_group_id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494 + data: + result: ok properties: - id: - description: Identifies the type of resource. - readOnly: true - type: string - tags: - description: A list of user-assigned tags to help organize phone numbers. + data: + $ref: '#/components/schemas/CallControlCommandResult' + title: Call Control Command Response + type: object + List_Conferences_Response: + example: + data: + - record_type: conference + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + name: All hands meeting + created_at: 2019-01-23T18:10:02.574Z + expires_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + region: sv1 + status: completed + end_reason: all_left + ended_by: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 + - record_type: conference + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + name: All hands meeting + created_at: 2019-01-23T18:10:02.574Z + expires_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + region: sv1 + status: completed + end_reason: all_left + ended_by: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 + properties: + data: items: - type: string + $ref: '#/components/schemas/Conference' type: array - external_pin: - description: If someone attempts to port your phone number away from Telnyx - and your phone number has an external PIN set, we will attempt to verify - that you provided the correct external PIN to the winning carrier. Note - that not all carriers cooperate with this security mechanism. - type: string - connection_id: - description: Identifies the connection associated with the phone number. - type: string - billing_group_id: - description: Identifies the billing group associated with the phone number. - type: string + meta: + $ref: '#/components/schemas/PaginationMeta' + title: List Conferences Response + type: object + Conference_Response: + example: + data: + record_type: conference + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + name: All hands meeting + created_at: 2019-01-23T18:10:02.574Z + expires_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + region: sv1 + status: completed + end_reason: all_left + ended_by: + call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== + call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 + connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 + properties: + data: + $ref: '#/components/schemas/Conference' + title: Conference Response type: object - UpdatePhoneNumberVoiceSettingsRequest: + List_Participants_Response: example: - tech_prefix_enabled: true - translated_number: +13035559999 - call_forwarding: - call_forwarding_enabled: true - forwards_to: +13035559123 - forwarding_type: always - cnam_listing: - cnam_listing_enabled: true - cnam_listing_details: example - usage_payment_method: pay-per-minute - media_features: - rtp_auto_adjust_enabled: true - media_handling_mode: default - accept_any_rtp_packets_enabled: true - t38_fax_gateway_enabled: true - call_recording: - inbound_call_recording_enabled: true - inbound_call_recording_format: wav - inbound_call_recording_channels: single + data: + - record_type: participant + created_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + end_conference_on_exit: true + soft_end_conference_on_exit: true + status: joining + muted: false + on_hold: true + call_control_id: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ + whisper_call_control_ids: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + id: dfadada7-af74-47bc-83a4-554275f55f5c + call_leg_id: 3a15df2d-c801-4729-adf5-b56dd42e2abb + conference: + id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 + name: "1" + - record_type: participant + created_at: 2019-01-23T18:10:02.574Z + updated_at: 2019-01-23T18:10:02.574Z + end_conference_on_exit: true + soft_end_conference_on_exit: true + status: joining + muted: false + on_hold: true + call_control_id: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ + whisper_call_control_ids: + - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ + - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw + id: dfadada7-af74-47bc-83a4-554275f55f5c + call_leg_id: 3a15df2d-c801-4729-adf5-b56dd42e2abb + conference: + id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 + name: "1" + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 properties: - tech_prefix_enabled: - default: false - description: Controls whether a tech prefix is enabled for this phone number. - type: boolean - translated_number: - description: This field allows you to rewrite the destination number of - an inbound call before the call is routed to you. The value of this field - may be any alphanumeric value, and the value will replace the number originally - dialed. - type: string - call_forwarding: - $ref: '#/components/schemas/CallForwarding' - cnam_listing: - $ref: '#/components/schemas/CnamListing' - usage_payment_method: - default: pay-per-minute - description: Controls whether a number is billed per minute or uses your - concurrent channels. - enum: - - pay-per-minute - - channel - type: string - media_features: - $ref: '#/components/schemas/MediaFeatures' - call_recording: - $ref: '#/components/schemas/CallRecording' + data: + items: + $ref: '#/components/schemas/Participant' + type: array + meta: + $ref: '#/components/schemas/PaginationMeta' + title: List Participants Response type: object - UpdateShortCodeRequest: + Conference_Command_Response: example: - messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 + data: + result: ok properties: - messaging_profile_id: - description: Unique identifier for a messaging profile. - type: string - required: - - messaging_profile_id + data: + $ref: '#/components/schemas/ConferenceCommandResult' + title: Conference Command Response type: object - UploadFileMessagingHostedNumberOrderRequest: + List_Connections_Response: example: - loa: example loa - bill: bill example + data: + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + outbound_voice_profile_id: "1293384261075731499" + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + outbound_voice_profile_id: "1293384261075731499" + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 properties: - loa: - description: Must be a signed LOA for the numbers in the order in PDF format. - format: binary - type: string - bill: - description: Must be the last month's bill with proof of ownership of all - of the numbers in the order in PDF format. - format: binary - type: string + data: + items: + $ref: '#/components/schemas/Connection' + type: array + meta: + $ref: '#/components/schemas/PaginationMeta' + title: List Connections Response type: object - UrlShortenerSettings: - description: | - The URL shortener feature allows automatic replacement of URLs that were generated using - a public URL shortener service. Some examples include bit.do, bit.ly, goo.gl, ht.ly, - is.gd, ow.ly, rebrand.ly, t.co, tiny.cc, and tinyurl.com. Such URLs are replaced with - with links generated by Telnyx. The use of custom links can improve branding and message - deliverability. - - To disable this feature, set the object field to `null`. + Connection_Response: example: - domain: example.ex - prefix: "" - replace_blacklist_only: true - send_webhooks: false - nullable: true + data: + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + outbound_voice_profile_id: "1293384261075731499" properties: - domain: - description: | - One of the domains provided by the Telnyx URL shortener service. - example: acct.fyi - type: string - prefix: - description: | - Optional prefix that can be used to identify your brand, and will appear in the Telnyx generated URLs after the domain name. - type: string - replace_blacklist_only: - description: | - Use the link replacement tool only for links that are specifically blacklisted by Telnyx. - example: true - type: boolean - send_webhooks: - description: | - Receive webhooks for when your replaced links are clicked. Webhooks are sent to the webhooks on the messaging profile. - example: false - type: boolean - required: - - domain + data: + $ref: '#/components/schemas/Connection' + title: Connection Response type: object - List_Available_Phone_Numbers_Response: + List_Credential_Connections_Response: example: data: - - record_type: available_phone_number - phone_number: +19705555098 - vanity_format: "" - best_effort: false - quickship: true - reservable: true - region_information: - - region_type: country_code - region_name: US - cost_information: - upfront_cost: "3.21" - monthly_cost: "6.54" - currency: USD - regulatory_requirements: - - requirement_type: end user proof of address - label: Proof of Address - field_type: address - description: Requirement for providing Proof of Address. - - record_type: available_phone_number - phone_number: +19705555098 - vanity_format: "" - best_effort: false - quickship: true - reservable: true - region_information: - - region_type: country_code - region_name: US - cost_information: - upfront_cost: "3.21" - monthly_cost: "6.54" - currency: USD - regulatory_requirements: - - requirement_type: end user proof of address - label: Proof of Address - field_type: address - description: Requirement for providing Proof of Address. + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: credential_connection + active: true + user_name: myusername123 + password: my123secure456password789 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + anchorsite_override: Latency + connection_name: string + sip_uri_calling_preference: disabled + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtp+1 + capture_enabled: true + report_frequency_seconds: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + timeout_1xx_secs: 10 + timeout_2xx_secs: "15" + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + outbound_voice_profile_id: "1293384261075731499" + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: credential_connection + active: true + user_name: myusername123 + password: my123secure456password789 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + anchorsite_override: Latency + connection_name: string + sip_uri_calling_preference: disabled + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtp+1 + capture_enabled: true + report_frequency_seconds: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + timeout_1xx_secs: 10 + timeout_2xx_secs: "15" + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + outbound_voice_profile_id: "1293384261075731499" meta: - total_results: 100 - best_effort_results: 50 + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 properties: data: items: - $ref: '#/components/schemas/AvailablePhoneNumber' + $ref: '#/components/schemas/CredentialConnection' type: array meta: - $ref: '#/components/schemas/AvailablePhoneNumbersMetadata' - title: List Available Phone Numbers Response + $ref: '#/components/schemas/PaginationMeta' + title: List Credential Connections Response type: object - List_Call_Control_Applications_Response: + Credential_Connection_Response: example: data: - - active: false - anchorsite_override: '"Latency"' - application_name: call-router + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: credential_connection + active: true + user_name: myusername123 + password: my123secure456password789 created_at: 2018-02-02T22:25:27.521Z - dtmf_type: Inband - first_command_timeout: true - first_command_timeout_secs: 10 - id: "1293384261075731499" + updated_at: 2018-02-02T22:25:27.521Z + anchorsite_override: Latency + connection_name: string + sip_uri_calling_preference: disabled + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtp+1 + capture_enabled: true + report_frequency_seconds: 10 + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + timeout_1xx_secs: 10 + timeout_2xx_secs: "15" + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + outbound_voice_profile_id: "1293384261075731499" + properties: + data: + $ref: '#/components/schemas/CredentialConnection' + title: Credential Connection Response + type: object + inline_response_200: + example: + data: + - id: "1293384261075731499" + record_type: fax_application + application_name: fax-router + active: false + anchorsite_override: Amsterdam, Netherlands + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_timeout_secs: 25 inbound: channel_limit: 10 sip_subdomain: example @@ -13107,20 +19179,16 @@ components: outbound: channel_limit: 10 outbound_voice_profile_id: "1293384261075731499" - record_type: call_control_application + created_at: 2018-02-02T22:25:27.521Z updated_at: 2018-02-02T22:25:27.521Z - webhook_api_version: "1" - webhook_event_failover_url: https://failover.example.com + - id: "1293384261075731499" + record_type: fax_application + application_name: fax-router + active: false + anchorsite_override: Amsterdam, Netherlands webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com webhook_timeout_secs: 25 - - active: false - anchorsite_override: '"Latency"' - application_name: call-router - created_at: 2018-02-02T22:25:27.521Z - dtmf_type: Inband - first_command_timeout: true - first_command_timeout_secs: 10 - id: "1293384261075731499" inbound: channel_limit: 10 sip_subdomain: example @@ -13128,12 +19196,8 @@ components: outbound: channel_limit: 10 outbound_voice_profile_id: "1293384261075731499" - record_type: call_control_application + created_at: 2018-02-02T22:25:27.521Z updated_at: 2018-02-02T22:25:27.521Z - webhook_api_version: "1" - webhook_event_failover_url: https://failover.example.com - webhook_event_url: https://example.com - webhook_timeout_secs: 25 meta: page_number: 2 total_pages: 3 @@ -13142,23 +19206,22 @@ components: properties: data: items: - $ref: '#/components/schemas/CallControlApplication' + $ref: '#/components/schemas/FaxApplication' type: array meta: $ref: '#/components/schemas/PaginationMeta' - title: List Call Control Applications Response type: object - Call_Control_Application_Response: + inline_response_201: example: data: - active: false - anchorsite_override: '"Latency"' - application_name: call-router - created_at: 2018-02-02T22:25:27.521Z - dtmf_type: Inband - first_command_timeout: true - first_command_timeout_secs: 10 id: "1293384261075731499" + record_type: fax_application + application_name: fax-router + active: false + anchorsite_override: Amsterdam, Netherlands + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_timeout_secs: 25 inbound: channel_limit: 10 sip_subdomain: example @@ -13166,34 +19229,91 @@ components: outbound: channel_limit: 10 outbound_voice_profile_id: "1293384261075731499" - record_type: call_control_application + created_at: 2018-02-02T22:25:27.521Z updated_at: 2018-02-02T22:25:27.521Z - webhook_api_version: "1" - webhook_event_failover_url: https://failover.example.com - webhook_event_url: https://example.com - webhook_timeout_secs: 25 properties: data: - $ref: '#/components/schemas/CallControlApplication' - title: Call Control Application Response + $ref: '#/components/schemas/FaxApplication' type: object - List_Call_Events_Response: + List_Fqdn_Connections_Response: example: data: - - record_type: call_event - call_leg_id: 308fe500-5213-11e9-ace7-02420a0f0668 - call_session_id: 308fec30-5213-11e9-9d3f-02420a0f0668 - event_timestamp: 2019-03-29T11:10:19.127783Z - name: call.hangup - type: webhook - metadata: {} - - record_type: call_event - call_leg_id: 308fe500-5213-11e9-ace7-02420a0f0668 - call_session_id: 308fec30-5213-11e9-9d3f-02420a0f0668 - event_timestamp: 2019-03-29T11:10:19.127783Z - name: call.hangup - type: webhook - metadata: {} + - id: "1293384261075731499" + record_type: fqdn_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 + - id: "1293384261075731499" + record_type: fqdn_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 meta: page_number: 2 total_pages: 3 @@ -13202,63 +19322,77 @@ components: properties: data: items: - $ref: '#/components/schemas/CallEvent' + $ref: '#/components/schemas/FqdnConnection' type: array meta: $ref: '#/components/schemas/PaginationMeta' - title: List Call Events Response - type: object - Retrieve_Call_Status_Response: - example: - data: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ - call_leg_id: 2dc6fc34-f9e0-11ea-b68e-02420a0f7768 - call_session_id: 2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768 - is_alive: false - record_type: call - properties: - data: - $ref: '#/components/schemas/Call' - title: Retrieve Call Status Response + title: List Fqdn Connections Response type: object - Call_Control_Command_Response: + Fqdn_Connection_Response: example: data: - result: ok + id: "1293384261075731499" + record_type: fqdn_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 properties: data: - $ref: '#/components/schemas/CallControlCommandResult' - title: Call Control Command Response + $ref: '#/components/schemas/FqdnConnection' + title: Fqdn Connection Response type: object - List_Conferences_Response: + List_Fqdns_Response: example: data: - - record_type: conference - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - name: All hands meeting - created_at: 2019-01-23T18:10:02.574Z - expires_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - region: sv1 - status: completed - end_reason: all_left - ended_by: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== - call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 - - record_type: conference - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - name: All hands meeting - created_at: 2019-01-23T18:10:02.574Z - expires_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - region: sv1 - status: completed - end_reason: all_left - ended_by: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== - call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 + - id: "1293384261075731499" + record_type: fqdn + connection_id: "1516447646313612565" + fqdn: example.com + port: 5060 + dns_record_type: a + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + - id: "1293384261075731499" + record_type: fqdn + connection_id: "1516447646313612565" + fqdn: example.com + port: 5060 + dns_record_type: a + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z meta: page_number: 2 total_pages: 3 @@ -13267,70 +19401,139 @@ components: properties: data: items: - $ref: '#/components/schemas/Conference' + $ref: '#/components/schemas/Fqdn' type: array meta: $ref: '#/components/schemas/PaginationMeta' - title: List Conferences Response + title: List Fqdns Response type: object - Conference_Response: + Fqdn_Response: example: data: - record_type: conference - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 - name: All hands meeting - created_at: 2019-01-23T18:10:02.574Z - expires_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - region: sv1 - status: completed - end_reason: all_left - ended_by: - call_control_id: v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ== - call_session_id: 428c31b6-abf3-3bc1-b7f4-5013ef9657c1 - connection_id: 3fa85f64-9191-4567-b3fc-2c963f66afa6 + id: "1293384261075731499" + record_type: fqdn + connection_id: "1516447646313612565" + fqdn: example.com + port: 5060 + dns_record_type: a + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z properties: data: - $ref: '#/components/schemas/Conference' - title: Conference Response + $ref: '#/components/schemas/Fqdn' + title: Fqdn Response type: object - List_Participants_Response: + List_Ip_Connections_Response: example: data: - - record_type: participant - created_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - end_conference_on_exit: true - soft_end_conference_on_exit: true - status: joining - muted: false - on_hold: true - call_control_id: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ - whisper_call_control_ids: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw - id: dfadada7-af74-47bc-83a4-554275f55f5c - call_leg_id: 3a15df2d-c801-4729-adf5-b56dd42e2abb - conference: - id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 - name: "1" - - record_type: participant - created_at: 2019-01-23T18:10:02.574Z - updated_at: 2019-01-23T18:10:02.574Z - end_conference_on_exit: true - soft_end_conference_on_exit: true - status: joining - muted: false - on_hold: true - call_control_id: v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ - whisper_call_control_ids: - - v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ - - v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw - id: dfadada7-af74-47bc-83a4-554275f55f5c - call_leg_id: 3a15df2d-c801-4729-adf5-b56dd42e2abb - conference: - id: 41b9acd4-f4da-4ff5-a85c-e07e90b53f46 - name: "1" + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_primary_ip_id: 192.0.2.1 + default_secondary_ip_id: 198.51.100.1 + default_tertiary_ip_id: 203.0.113.1 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + tech_prefix: string + ip_authentication_method: token + ip_authentication_token: string + outbound_voice_profile_id: "1293384261075731499" + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_primary_ip_id: 192.0.2.1 + default_secondary_ip_id: 198.51.100.1 + default_tertiary_ip_id: 203.0.113.1 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + tech_prefix: string + ip_authentication_method: token + ip_authentication_token: string + outbound_voice_profile_id: "1293384261075731499" meta: page_number: 2 total_pages: 3 @@ -13339,20 +19542,112 @@ components: properties: data: items: - $ref: '#/components/schemas/Participant' + $ref: '#/components/schemas/IpConnection' type: array meta: $ref: '#/components/schemas/PaginationMeta' - title: List Participants Response + title: List Ip Connections Response type: object - Conference_Command_Response: + Ip_Connection_Response: example: data: - result: ok + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip_connection + active: true + anchorsite_override: Latency + connection_name: string + transport_protocol: UDP + default_on_hold_comfort_noise_enabled: true + dtmf_type: RFC 2833 + encode_contact_header_enabled: true + encrypted_media: SRTP + onnet_t38_passthrough_enabled: true + webhook_event_url: https://example.com + webhook_event_failover_url: https://failover.example.com + webhook_api_version: "1" + webhook_timeout_secs: 25 + rtcp_settings: + port: rtcp-mux + capture_enabled: true + report_frequency_secs: 10 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + inbound: + ani_number_format: +E.164 + dnis_number_format: +e164 + codecs: + - G722 + default_primary_ip_id: 192.0.2.1 + default_secondary_ip_id: 198.51.100.1 + default_tertiary_ip_id: 203.0.113.1 + default_routing_method: sequential + channel_limit: 10 + generate_ringback_tone: true + isup_headers_enabled: true + prack_enabled: true + privacy_zone_enabled: true + sip_compact_headers_enabled: true + sip_region: US + sip_subdomain: string + sip_subdomain_receive_settings: only_my_connections + timeout_1xx_secs: 10 + timeout_2xx_secs: 10 + outbound: + call_parking_enabled: true + ani_override: string + ani_override_type: always + channel_limit: 10 + instant_ringback_enabled: true + generate_ringback_tone: true + localization: string + t38_reinvite_source: telnyx + tech_prefix: string + ip_authentication_method: token + ip_authentication_token: string + outbound_voice_profile_id: "1293384261075731499" properties: data: - $ref: '#/components/schemas/ConferenceCommandResult' - title: Conference Command Response + $ref: '#/components/schemas/IpConnection' + title: Ip Connection Response + type: object + List_Ips_Response: + example: + data: + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip + connection_id: "3456789987654" + ip_address: 192.168.0.0 + port: 5060 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip + connection_id: "3456789987654" + ip_address: 192.168.0.0 + port: 5060 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + properties: + data: + items: + $ref: '#/components/schemas/Ip' + type: array + title: List Ips Response + type: object + Ip_Response: + example: + data: + id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + record_type: ip + connection_id: "3456789987654" + ip_address: 192.168.0.0 + port: 5060 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + properties: + data: + $ref: '#/components/schemas/Ip' + title: Ip Response type: object Message_Response: example: @@ -13952,6 +20247,112 @@ components: $ref: '#/components/schemas/NumberReservation' title: Number Reservation Response type: object + List_Outbound_Voice_Profiles_Response: + example: + data: + - id: "1293384261075731499" + record_type: outbound_voice_profile + name: office + connections_count: 12 + traffic_type: conversational + service_plan: global + concurrent_call_limit: 10 + enabled: true + tags: + - office-profile + usage_payment_method: rate-deck + whitelisted_destinations: + - US + - BR + - AU + max_destination_rate: 10 + daily_spend_limit: "100.00" + daily_spend_limit_enabled: true + call_recording: + call_recording_type: by_caller_phone_number + call_recording_caller_phone_numbers: + - +19705555098 + call_recording_channels: dual + call_recording_format: mp3 + billing_group_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + - id: "1293384261075731499" + record_type: outbound_voice_profile + name: office + connections_count: 12 + traffic_type: conversational + service_plan: global + concurrent_call_limit: 10 + enabled: true + tags: + - office-profile + usage_payment_method: rate-deck + whitelisted_destinations: + - US + - BR + - AU + max_destination_rate: 10 + daily_spend_limit: "100.00" + daily_spend_limit_enabled: true + call_recording: + call_recording_type: by_caller_phone_number + call_recording_caller_phone_numbers: + - +19705555098 + call_recording_channels: dual + call_recording_format: mp3 + billing_group_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 + properties: + data: + items: + $ref: '#/components/schemas/OutboundVoiceProfile' + type: array + meta: + $ref: '#/components/schemas/PaginationMeta' + title: List Outbound Voice Profiles Response + type: object + Outbound_Voice_Profile_Response: + example: + data: + id: "1293384261075731499" + record_type: outbound_voice_profile + name: office + connections_count: 12 + traffic_type: conversational + service_plan: global + concurrent_call_limit: 10 + enabled: true + tags: + - office-profile + usage_payment_method: rate-deck + whitelisted_destinations: + - US + - BR + - AU + max_destination_rate: 10 + daily_spend_limit: "100.00" + daily_spend_limit_enabled: true + call_recording: + call_recording_type: by_caller_phone_number + call_recording_caller_phone_numbers: + - +19705555098 + call_recording_channels: dual + call_recording_format: mp3 + billing_group_id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58 + created_at: 2018-02-02T22:25:27.521Z + updated_at: 2018-02-02T22:25:27.521Z + properties: + data: + $ref: '#/components/schemas/OutboundVoiceProfile' + title: Outbound Voice Profile Response + type: object List_Phone_Number_Regulatory_Requirements_Response: example: data: @@ -14000,6 +20401,7 @@ components: external_pin: "1234" connection_id: "1293384261075731499" connection_name: connection-name + customer_reference: customer-reference messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 messaging_profile_name: regional-customers billing_group_id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 @@ -14023,6 +20425,7 @@ components: external_pin: "1234" connection_id: "1293384261075731499" connection_name: connection-name + customer_reference: customer-reference messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 messaging_profile_name: regional-customers billing_group_id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 @@ -14093,6 +20496,152 @@ components: type: array title: CSV Download Response type: object + List_Phone_Numbers_Background_Jobs_Response: + example: + data: + - id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + record_type: phone_numbers_job + status: pending + type: update_emergency_settings + etc: 2020-10-30T18:10:00.000Z + created_at: 2020-10-23T18:10:00.000Z + updated_at: 2020-10-23T18:10:01.000Z + created_by: 015e81fc-11b7-4170-974d-5592ce987da7 + successful_operations: + - id: "2637816387126861836" + phone_number: +19705555098 + - id: "33081887126861836" + phone_number: +19715555098 + failed_operations: + - id: "3388768018273" + phone_number: +19705551234 + errors: + - code: "10015" + title: Bad Request + detail: The field is invalid. + source: /emergency_address_id + - id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + record_type: phone_numbers_job + status: pending + type: update_emergency_settings + etc: 2020-10-30T18:10:00.000Z + created_at: 2020-10-23T18:10:00.000Z + updated_at: 2020-10-23T18:10:01.000Z + created_by: 015e81fc-11b7-4170-974d-5592ce987da7 + successful_operations: + - id: "2637816387126861836" + phone_number: +19705555098 + - id: "33081887126861836" + phone_number: +19715555098 + failed_operations: + - id: "3388768018273" + phone_number: +19705551234 + errors: + - code: "10015" + title: Bad Request + detail: The field is invalid. + source: /emergency_address_id + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 + properties: + data: + items: + $ref: '#/components/schemas/PhoneNumbersJob' + type: array + meta: + $ref: '#/components/schemas/PaginationMeta' + title: List Phone Numbers Background Jobs Response + type: object + Phone_Numbers_Job_Delete_Phone_Numbers: + example: + data: + id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + record_type: phone_numbers_job + status: pending + type: update_emergency_settings + etc: 2020-10-30T18:10:00.000Z + created_at: 2020-10-23T18:10:00.000Z + updated_at: 2020-10-23T18:10:01.000Z + created_by: 015e81fc-11b7-4170-974d-5592ce987da7 + successful_operations: + - id: "2637816387126861836" + phone_number: +19705555098 + - id: "33081887126861836" + phone_number: +19715555098 + failed_operations: + - id: "3388768018273" + phone_number: +19705551234 + errors: + - code: "10015" + title: Bad Request + detail: The field is invalid. + source: /emergency_address_id + properties: + data: + $ref: '#/components/schemas/PhoneNumbersJob' + title: Phone Numbers Job Delete Phone Numbers + type: object + Phone_Numbers_Enable_Emergency: + example: + data: + id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + record_type: phone_numbers_job + status: pending + type: update_emergency_settings + etc: 2020-10-30T18:10:00.000Z + created_at: 2020-10-23T18:10:00.000Z + updated_at: 2020-10-23T18:10:01.000Z + created_by: 015e81fc-11b7-4170-974d-5592ce987da7 + successful_operations: + - id: "2637816387126861836" + phone_number: +19705555098 + - id: "33081887126861836" + phone_number: +19715555098 + failed_operations: + - id: "3388768018273" + phone_number: +19705551234 + errors: + - code: "10015" + title: Bad Request + detail: The field is invalid. + source: /emergency_address_id + properties: + data: + $ref: '#/components/schemas/PhoneNumbersJob' + title: Phone Numbers Enable Emergency + type: object + Phone_Numbers_Job: + example: + data: + id: 42587e44-3a3e-46de-9255-0c9a7a1d1ec7 + record_type: phone_numbers_job + status: pending + type: update_emergency_settings + etc: 2020-10-30T18:10:00.000Z + created_at: 2020-10-23T18:10:00.000Z + updated_at: 2020-10-23T18:10:01.000Z + created_by: 015e81fc-11b7-4170-974d-5592ce987da7 + successful_operations: + - id: "2637816387126861836" + phone_number: +19705555098 + - id: "33081887126861836" + phone_number: +19715555098 + failed_operations: + - id: "3388768018273" + phone_number: +19705551234 + errors: + - code: "10015" + title: Bad Request + detail: The field is invalid. + source: /emergency_address_id + properties: + data: + $ref: '#/components/schemas/PhoneNumbersJob' + title: Phone Numbers Job + type: object List_Messaging_Settings_Response: example: data: @@ -14162,6 +20711,7 @@ components: - id: "1293384261075731499" record_type: voice_settings connection_id: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b + customer_reference: customer_reference tech_prefix_enabled: false translated_number: +13035559999 call_forwarding: @@ -14187,6 +20737,7 @@ components: - id: "1293384261075731499" record_type: voice_settings connection_id: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b + customer_reference: customer_reference tech_prefix_enabled: false translated_number: +13035559999 call_forwarding: @@ -14236,6 +20787,7 @@ components: external_pin: "1234" connection_id: "1293384261075731499" connection_name: connection-name + customer_reference: customer-reference messaging_profile_id: abc85f64-5717-4562-b3fc-2c9600000000 messaging_profile_name: regional-customers billing_group_id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323 @@ -14260,6 +20812,7 @@ components: id: "1293384261075731499" record_type: voice_settings connection_id: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b + customer_reference: customer_reference tech_prefix_enabled: false translated_number: +13035559999 call_forwarding: @@ -14324,6 +20877,7 @@ components: id: "1293384261075731499" record_type: voice_settings connection_id: 1d0e6cb8-8668-462e-94c6-49ae0f0ed48b + customer_reference: customer_reference tech_prefix_enabled: false translated_number: +13035559999 call_forwarding: @@ -14507,6 +21061,95 @@ components: $ref: '#/components/schemas/ShortCode' title: Short Code Response type: object + inline_response_200_1: + example: + data: + - id: "1293384261075731499" + record_type: texml_application + active: false + friendly_name: call-router + anchorsite_override: Amsterdam, Netherlands + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + voice_url: https://example.com + voice_fallback_url: https://fallback.example.com + voice_method: get + status_callback: https://example.com + status_callback_method: get + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + created_at: 2020-02-02T22:25:27.521Z + updated_at: 2020-02-03T22:25:27.521Z + - id: "1293384261075731499" + record_type: texml_application + active: false + friendly_name: call-router + anchorsite_override: Amsterdam, Netherlands + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + voice_url: https://example.com + voice_fallback_url: https://fallback.example.com + voice_method: get + status_callback: https://example.com + status_callback_method: get + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + created_at: 2020-02-02T22:25:27.521Z + updated_at: 2020-02-03T22:25:27.521Z + meta: + page_number: 2 + total_pages: 3 + total_results: 55 + page_size: 25 + properties: + data: + items: + $ref: '#/components/schemas/TexmlApplication' + type: array + meta: + $ref: '#/components/schemas/PaginationMeta' + type: object + inline_response_201_1: + example: + data: + id: "1293384261075731499" + record_type: texml_application + active: false + friendly_name: call-router + anchorsite_override: Amsterdam, Netherlands + dtmf_type: Inband + first_command_timeout: true + first_command_timeout_secs: 10 + voice_url: https://example.com + voice_fallback_url: https://fallback.example.com + voice_method: get + status_callback: https://example.com + status_callback_method: get + inbound: + channel_limit: 10 + sip_subdomain: example + sip_subdomain_receive_settings: only_my_connections + outbound: + channel_limit: 10 + outbound_voice_profile_id: "1293384261075731499" + created_at: 2020-02-02T22:25:27.521Z + updated_at: 2020-02-03T22:25:27.521Z + properties: + data: + $ref: '#/components/schemas/TexmlApplication' + type: object CallAnswered_payload: properties: call_control_id: @@ -15516,6 +22159,90 @@ components: format: date-time type: string type: object + CreateFaxApplicationRequest_inbound: + properties: + channel_limit: + description: When set, this will limit the number of concurrent inbound + calls to phone numbers associated with this connection. + example: 10 + type: integer + sip_subdomain: + default: "null" + description: 'Specifies a subdomain that can be used to receive Inbound + calls to a Connection, in the same way a phone number is used, from a + SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called + from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" + where the user part can be any alphanumeric value. Please note TLS encrypted + calls are not allowed for subdomain calls.' + example: example + type: string + sip_subdomain_receive_settings: + default: from_anyone + description: 'This option can be enabled to receive calls from: "Anyone" + (any SIP endpoint in the public Internet) or "Only my connections" (any + connection assigned to the same Telnyx user).' + enum: + - only_my_connections + - from_anyone + example: only_my_connections + type: string + type: object + CreateFaxApplicationRequest_outbound: + properties: + channel_limit: + description: When set, this will limit the number of concurrent outbound + calls to phone numbers associated with this connection. + example: 10 + type: integer + outbound_voice_profile_id: + description: Identifies the associated outbound voice profile. + example: "1293384261075731499" + format: int64 + title: Outbound Voice Profile ID + type: string + type: object + CreateTexmlApplicationRequest_inbound: + properties: + channel_limit: + description: When set, this will limit the total number of inbound calls + to phone numbers associated with this connection. + example: 10 + type: integer + sip_subdomain: + default: "null" + description: 'Specifies a subdomain that can be used to receive Inbound + calls to a Connection, in the same way a phone number is used, from a + SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called + from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" + where the user part can be any alphanumeric value. Please note TLS encrypted + calls are not allowed for subdomain calls.' + example: example + type: string + sip_subdomain_receive_settings: + default: from_anyone + description: 'This option can be enabled to receive calls from: "Anyone" + (any SIP endpoint in the public Internet) or "Only my connections" (any + connection assigned to the same Telnyx user).' + enum: + - only_my_connections + - from_anyone + example: only_my_connections + type: string + type: object + CreateTexmlApplicationRequest_outbound: + properties: + channel_limit: + description: When set, this will limit the total number of outbound calls + to phone numbers associated with this connection. + example: 10 + type: integer + outbound_voice_profile_id: + description: Identifies the associated outbound voice profile. + example: "1293384261075731499" + format: int64 + title: Outbound Voice Profile ID + type: string + type: object Error_source: properties: pointer: diff --git a/build.gradle b/build.gradle index fb47d03d..bfa60da4 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.telnyx.sdk' -version = '2.2.0' +version = '2.3.0' buildscript { repositories { diff --git a/build.sbt b/build.sbt index f5f56ef5..c8736760 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.telnyx.sdk", name := "telnyx", - version := "2.2.0", + version := "2.3.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/docs/AnchorsiteOverride.md b/docs/AnchorsiteOverride.md new file mode 100644 index 00000000..fbe51606 --- /dev/null +++ b/docs/AnchorsiteOverride.md @@ -0,0 +1,29 @@ + + +# AnchorsiteOverride + +## Enum + + +* `LATENCY` (value: `"Latency"`) + +* `CHICAGO_IL` (value: `"Chicago, IL"`) + +* `ASHBURN_VA` (value: `"Ashburn, VA"`) + +* `SAN_JOSE_CA` (value: `"San Jose, CA"`) + +* `SYDNEY_AUSTRALIA` (value: `"Sydney, Australia"`) + +* `AMSTERDAM_NETHERLANDS` (value: `"Amsterdam, Netherlands"`) + +* `LONDON_UK` (value: `"London, UK"`) + +* `TORONTO_CANADA` (value: `"Toronto, Canada"`) + +* `VANCOUVER_CANADA` (value: `"Vancouver, Canada"`) + +* `FRANKFURT_GERMANY` (value: `"Frankfurt, Germany"`) + + + diff --git a/docs/CallControlApplicationsApi.md b/docs/CallControlApplicationsApi.md index e94e4bea..6885245b 100644 --- a/docs/CallControlApplicationsApi.md +++ b/docs/CallControlApplicationsApi.md @@ -158,7 +158,7 @@ Name | Type | Description | Notes ## listCallControlApplications -> ListCallControlApplicationsResponse listCallControlApplications().pageNumber(pageNumber).pageSize(pageSize).filterApplicationNameContains(filterApplicationNameContains).filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId).sort(sort).execute(); +> ListCallControlApplicationsResponse listCallControlApplications().pageNumber(pageNumber).pageSize(pageSize).filterApplicationNameContains(filterApplicationNameContains).filterOutboundVoiceProfileId(filterOutboundVoiceProfileId).sort(sort).execute(); List call control applications @@ -185,17 +185,17 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); CallControlApplicationsApi apiInstance = new CallControlApplicationsApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. String filterApplicationNameContains = "\"null\""; // String | If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - String filterOutboundOutboundVoiceProfileId = 1293384261075731499; // String | Identifies the associated outbound voice profile. + String filterOutboundVoiceProfileId = 1293384261075731499; // String | Identifies the associated outbound voice profile. String sort = connection_name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order. try { ListCallControlApplicationsResponse result = api.listCallControlApplications() .pageNumber(pageNumber) .pageSize(pageSize) .filterApplicationNameContains(filterApplicationNameContains) - .filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId) + .filterOutboundVoiceProfileId(filterOutboundVoiceProfileId) .sort(sort) .execute(); System.out.println(result); @@ -215,10 +215,10 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] **filterApplicationNameContains** | **String**| If present, applications with <code>application_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. | [optional] [default to "null"] - **filterOutboundOutboundVoiceProfileId** | **String**| Identifies the associated outbound voice profile. | [optional] + **filterOutboundVoiceProfileId** | **String**| Identifies the associated outbound voice profile. | [optional] **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. | [optional] [default to created_at] [enum: created_at, connection_name, active] ### Return type diff --git a/docs/ConferenceCommandsApi.md b/docs/ConferenceCommandsApi.md index ea657e1d..7c2d2d8e 100644 --- a/docs/ConferenceCommandsApi.md +++ b/docs/ConferenceCommandsApi.md @@ -907,8 +907,8 @@ public class Example { Boolean filterMuted = true; // Boolean | If present, participants will be filtered to those who are/are not muted Boolean filterOnHold = true; // Boolean | If present, participants will be filtered to those who are/are not put on hold Boolean filterWhispering = true; // Boolean | If present, participants will be filtered to those who are whispering or are not - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListParticipantsResponse result = api.listConferenceParticipants(conferenceId) .filterMuted(filterMuted) @@ -938,8 +938,8 @@ Name | Type | Description | Notes **filterMuted** | **Boolean**| If present, participants will be filtered to those who are/are not muted | [optional] **filterOnHold** | **Boolean**| If present, participants will be filtered to those who are/are not put on hold | [optional] **filterWhispering** | **Boolean**| If present, participants will be filtered to those who are whispering or are not | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type @@ -993,8 +993,8 @@ public class Example { ConferenceCommandsApi apiInstance = new ConferenceCommandsApi(defaultClient); String filterName = "filterName_example"; // String | If present, conferences will be filtered to those with a matching `name` attribute. Matching is case-sensitive - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListConferencesResponse result = api.listConferences() .filterName(filterName) @@ -1019,8 +1019,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **filterName** | **String**| If present, conferences will be filtered to those with a matching `name` attribute. Matching is case-sensitive | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/Connection.md b/docs/Connection.md new file mode 100644 index 00000000..7b24f170 --- /dev/null +++ b/docs/Connection.md @@ -0,0 +1,31 @@ + + +# Connection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the specific resource. | [optional] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**active** | **Boolean** | Defaults to true | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | [optional] +**createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**outboundVoiceProfileId** | **String** | Identifies the associated outbound voice profile. | [optional] + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/ConnectionResponse.md b/docs/ConnectionResponse.md new file mode 100644 index 00000000..f48e2530 --- /dev/null +++ b/docs/ConnectionResponse.md @@ -0,0 +1,12 @@ + + +# ConnectionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Connection**](Connection.md) | | [optional] + + + diff --git a/docs/ConnectionRtcpSettings.md b/docs/ConnectionRtcpSettings.md new file mode 100644 index 00000000..22aa0cc4 --- /dev/null +++ b/docs/ConnectionRtcpSettings.md @@ -0,0 +1,23 @@ + + +# ConnectionRtcpSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**port** | [**PortEnum**](#PortEnum) | RTCP port by default is rtp+1, it can also be set to rtcp-mux | [optional] +**captureEnabled** | **Boolean** | BETA - Enable the capture and storage of RTCP messages to create QoS reports on the Telnyx Mission Control Portal. | [optional] +**reportFrequencySecs** | **Integer** | RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds. | [optional] + + + +## Enum: PortEnum + +Name | Value +---- | ----- +RTCP_MUX | "rtcp-mux" +RTP_1 | "rtp+1" + + + diff --git a/docs/ConnectionsApi.md b/docs/ConnectionsApi.md new file mode 100644 index 00000000..fb0e1bf9 --- /dev/null +++ b/docs/ConnectionsApi.md @@ -0,0 +1,170 @@ +# ConnectionsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listConnections**](ConnectionsApi.md#listConnections) | **GET** /connections | List connections +[**retrieveConnection**](ConnectionsApi.md#retrieveConnection) | **GET** /connections/{id} | Retrieve a connection + + + +## listConnections + +> ListConnectionsResponse listConnections().pageNumber(pageNumber).pageSize(pageSize).filterConnectionNameContains(filterConnectionNameContains).filterOutboundVoiceProfileId(filterOutboundVoiceProfileId).sort(sort).execute(); + +List connections + +Returns a list of your connections irrespective of type. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.ConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ConnectionsApi apiInstance = new ConnectionsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterConnectionNameContains = "\"null\""; // String | If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. + String filterOutboundVoiceProfileId = 1293384261075731499; // String | Identifies the associated outbound voice profile. + String sort = connection_name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order. + try { + ListConnectionsResponse result = api.listConnections() + .pageNumber(pageNumber) + .pageSize(pageSize) + .filterConnectionNameContains(filterConnectionNameContains) + .filterOutboundVoiceProfileId(filterOutboundVoiceProfileId) + .sort(sort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConnectionsApi#listConnections"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterConnectionNameContains** | **String**| If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. | [optional] [default to "null"] + **filterOutboundVoiceProfileId** | **String**| Identifies the associated outbound voice profile. | [optional] + **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. | [optional] [default to created_at] [enum: created_at, connection_name, active] + +### Return type + +[**ListConnectionsResponse**](ListConnectionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with a list of connections. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | + + +## retrieveConnection + +> ConnectionResponse retrieveConnection(id) + +Retrieve a connection + +Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.ConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ConnectionsApi apiInstance = new ConnectionsApi(defaultClient); + String id = "id_example"; // String | IP Connection ID + try { + ConnectionResponse result = apiInstance.retrieveConnection(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConnectionsApi#retrieveConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| IP Connection ID | + +### Return type + +[**ConnectionResponse**](ConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about a connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + diff --git a/docs/CreateCredentialConnectionRequest.md b/docs/CreateCredentialConnectionRequest.md new file mode 100644 index 00000000..ce0583fe --- /dev/null +++ b/docs/CreateCredentialConnectionRequest.md @@ -0,0 +1,48 @@ + + +# CreateCredentialConnectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Defaults to true | [optional] +**userName** | **String** | The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). | +**password** | **String** | The password to be used as part of the credentials. Must be 8 to 128 characters long. | +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | +**sipUriCallingPreference** | [**SipUriCallingPreferenceEnum**](#SipUriCallingPreferenceEnum) | This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**inbound** | [**CredentialInbound**](CredentialInbound.md) | | [optional] +**outbound** | [**CredentialOutbound**](CredentialOutbound.md) | | [optional] + + + +## Enum: SipUriCallingPreferenceEnum + +Name | Value +---- | ----- +DISABLED | "disabled" +UNRESTRICTED | "unrestricted" +INTERNAL | "internal" + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/CreateFaxApplicationRequest.md b/docs/CreateFaxApplicationRequest.md new file mode 100644 index 00000000..c2f2d845 --- /dev/null +++ b/docs/CreateFaxApplicationRequest.md @@ -0,0 +1,19 @@ + + +# CreateFaxApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applicationName** | **String** | A user-assigned name to help manage the application. | +**active** | **Boolean** | Specifies whether the connection can be used. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**inbound** | [**CreateFaxApplicationRequestInbound**](CreateFaxApplicationRequestInbound.md) | | [optional] +**outbound** | [**CreateFaxApplicationRequestOutbound**](CreateFaxApplicationRequestOutbound.md) | | [optional] + + + diff --git a/docs/CreateFaxApplicationRequestInbound.md b/docs/CreateFaxApplicationRequestInbound.md new file mode 100644 index 00000000..191993f2 --- /dev/null +++ b/docs/CreateFaxApplicationRequestInbound.md @@ -0,0 +1,23 @@ + + +# CreateFaxApplicationRequestInbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channelLimit** | **Integer** | When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. | [optional] +**sipSubdomain** | **String** | Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. | [optional] +**sipSubdomainReceiveSettings** | [**SipSubdomainReceiveSettingsEnum**](#SipSubdomainReceiveSettingsEnum) | This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). | [optional] + + + +## Enum: SipSubdomainReceiveSettingsEnum + +Name | Value +---- | ----- +ONLY_MY_CONNECTIONS | "only_my_connections" +FROM_ANYONE | "from_anyone" + + + diff --git a/docs/CreateFaxApplicationRequestOutbound.md b/docs/CreateFaxApplicationRequestOutbound.md new file mode 100644 index 00000000..23da7d7a --- /dev/null +++ b/docs/CreateFaxApplicationRequestOutbound.md @@ -0,0 +1,13 @@ + + +# CreateFaxApplicationRequestOutbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channelLimit** | **Integer** | When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. | [optional] +**outboundVoiceProfileId** | **String** | Identifies the associated outbound voice profile. | [optional] + + + diff --git a/docs/CreateFqdnConnectionRequest.md b/docs/CreateFqdnConnectionRequest.md new file mode 100644 index 00000000..a2e10826 --- /dev/null +++ b/docs/CreateFqdnConnectionRequest.md @@ -0,0 +1,35 @@ + + +# CreateFqdnConnectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Defaults to true | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | +**transportProtocol** | [**FqdnConnectionTransportProtocol**](FqdnConnectionTransportProtocol.md) | | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**inbound** | [**InboundFqdn**](InboundFqdn.md) | | [optional] + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/CreateFqdnRequest.md b/docs/CreateFqdnRequest.md new file mode 100644 index 00000000..db3c9e40 --- /dev/null +++ b/docs/CreateFqdnRequest.md @@ -0,0 +1,15 @@ + + +# CreateFqdnRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connectionId** | **String** | ID of the FQDN connection to which this IP should be attached. | +**fqdn** | **String** | FQDN represented by this resource. | +**port** | **Integer** | Port to use when connecting to this FQDN. | [optional] +**dnsRecordType** | **String** | The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. | + + + diff --git a/docs/CreateInboundIpRequest.md b/docs/CreateInboundIpRequest.md new file mode 100644 index 00000000..d1b97a58 --- /dev/null +++ b/docs/CreateInboundIpRequest.md @@ -0,0 +1,75 @@ + + +# CreateInboundIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aniNumberFormat** | [**AniNumberFormatEnum**](#AniNumberFormatEnum) | This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. | [optional] +**dnisNumberFormat** | [**DnisNumberFormatEnum**](#DnisNumberFormatEnum) | | [optional] +**codecs** | **List<String>** | Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. | [optional] +**defaultRoutingMethod** | [**DefaultRoutingMethodEnum**](#DefaultRoutingMethodEnum) | Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. | [optional] +**channelLimit** | **Integer** | When set, this will limit the total number of inbound calls to phone numbers associated with this connection. | [optional] +**generateRingbackTone** | **Boolean** | Generate ringback tone through 183 session progress message with early media. | [optional] +**isupHeadersEnabled** | **Boolean** | When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) | [optional] +**prackEnabled** | **Boolean** | Enable PRACK messages as defined in RFC3262. | [optional] +**privacyZoneEnabled** | **Boolean** | By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. | [optional] +**sipCompactHeadersEnabled** | **Boolean** | Defaults to true. | [optional] +**sipRegion** | [**SipRegionEnum**](#SipRegionEnum) | Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. | [optional] +**sipSubdomain** | **String** | Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. | [optional] +**sipSubdomainReceiveSettings** | [**SipSubdomainReceiveSettingsEnum**](#SipSubdomainReceiveSettingsEnum) | This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). | [optional] +**timeout1xxSecs** | **Integer** | Time(sec) before aborting if connection is not made. | [optional] +**timeout2xxSecs** | **Integer** | Time(sec) before aborting if call is unanswered (min: 1, max: 600). | [optional] + + + +## Enum: AniNumberFormatEnum + +Name | Value +---- | ----- +_E_164 | "+E.164" +E_164 | "E.164" +_E_164_NATIONAL | "+E.164-national" +E_164_NATIONAL | "E.164-national" + + + +## Enum: DnisNumberFormatEnum + +Name | Value +---- | ----- +_E164 | "+e164" +E164 | "e164" +NATIONAL | "national" + + + +## Enum: DefaultRoutingMethodEnum + +Name | Value +---- | ----- +SEQUENTIAL | "sequential" +ROUND_ROBIN | "round-robin" + + + +## Enum: SipRegionEnum + +Name | Value +---- | ----- +US | "US" +EUROPE | "Europe" +AUSTRALIA | "Australia" + + + +## Enum: SipSubdomainReceiveSettingsEnum + +Name | Value +---- | ----- +ONLY_MY_CONNECTIONS | "only_my_connections" +FROM_ANYONE | "from_anyone" + + + diff --git a/docs/CreateIpConnectionRequest.md b/docs/CreateIpConnectionRequest.md new file mode 100644 index 00000000..a78eb5f7 --- /dev/null +++ b/docs/CreateIpConnectionRequest.md @@ -0,0 +1,46 @@ + + +# CreateIpConnectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Defaults to true | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | [optional] +**transportProtocol** | [**TransportProtocolEnum**](#TransportProtocolEnum) | One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**inbound** | [**CreateInboundIpRequest**](CreateInboundIpRequest.md) | | [optional] +**outbound** | [**OutboundIp**](OutboundIp.md) | | [optional] + + + +## Enum: TransportProtocolEnum + +Name | Value +---- | ----- +UDP | "UDP" +TCP | "TCP" +TLS | "TLS" + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/CreateIpRequest.md b/docs/CreateIpRequest.md new file mode 100644 index 00000000..6837504a --- /dev/null +++ b/docs/CreateIpRequest.md @@ -0,0 +1,14 @@ + + +# CreateIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connectionId** | **String** | ID of the IP Connection to which this IP should be attached. | [optional] +**ipAddress** | **String** | IP adddress represented by this resource. | +**port** | **Integer** | Port to use when connecting to this IP. | [optional] + + + diff --git a/docs/CreateOutboundVoiceProfileRequest.md b/docs/CreateOutboundVoiceProfileRequest.md new file mode 100644 index 00000000..4c769333 --- /dev/null +++ b/docs/CreateOutboundVoiceProfileRequest.md @@ -0,0 +1,24 @@ + + +# CreateOutboundVoiceProfileRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | A user-supplied name to help with organization. | [optional] +**trafficType** | [**TrafficType**](TrafficType.md) | | [optional] +**servicePlan** | [**ServicePlan**](ServicePlan.md) | | [optional] +**concurrentCallLimit** | **Integer** | Must be no more than your global concurrent call limit. Null means no limit. | [optional] +**enabled** | **Boolean** | Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. | [optional] +**tags** | **List<String>** | | [optional] +**usagePaymentMethod** | [**UsagePaymentMethod**](UsagePaymentMethod.md) | | [optional] +**whitelistedDestinations** | **List<String>** | The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. | [optional] +**maxDestinationRate** | [**BigDecimal**](BigDecimal.md) | Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. | [optional] +**dailySpendLimit** | **String** | The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. | [optional] +**dailySpendLimitEnabled** | **Boolean** | Specifies whether to enforce the daily_spend_limit on this outbound voice profile. | [optional] +**callRecording** | [**OutboundCallRecording**](OutboundCallRecording.md) | | [optional] +**billingGroupId** | [**UUID**](UUID.md) | The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). | [optional] + + + diff --git a/docs/CreateTexmlApplicationRequest.md b/docs/CreateTexmlApplicationRequest.md new file mode 100644 index 00000000..bc143c40 --- /dev/null +++ b/docs/CreateTexmlApplicationRequest.md @@ -0,0 +1,42 @@ + + +# CreateTexmlApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**friendlyName** | **String** | A user-assigned name to help manage the application. | +**active** | **Boolean** | Specifies whether the connection can be used. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**firstCommandTimeout** | **Boolean** | Specifies whether calls to phone numbers associated with this connection should hangup after timing out. | [optional] +**firstCommandTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a dial command. | [optional] +**voiceUrl** | **String** | URL to which Telnyx will deliver your XML Translator webhooks. | +**voiceFallbackUrl** | **String** | URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. | [optional] +**voiceMethod** | [**VoiceMethodEnum**](#VoiceMethodEnum) | HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. | [optional] +**statusCallback** | **String** | URL for Telnyx to send requests to containing information about call progress events. | [optional] +**statusCallbackMethod** | [**StatusCallbackMethodEnum**](#StatusCallbackMethodEnum) | HTTP request method Telnyx should use when requesting the status_callback URL. | [optional] +**inbound** | [**CreateTexmlApplicationRequestInbound**](CreateTexmlApplicationRequestInbound.md) | | [optional] +**outbound** | [**CreateTexmlApplicationRequestOutbound**](CreateTexmlApplicationRequestOutbound.md) | | [optional] + + + +## Enum: VoiceMethodEnum + +Name | Value +---- | ----- +GET | "get" +POST | "post" + + + +## Enum: StatusCallbackMethodEnum + +Name | Value +---- | ----- +GET | "get" +POST | "post" + + + diff --git a/docs/CreateTexmlApplicationRequestInbound.md b/docs/CreateTexmlApplicationRequestInbound.md new file mode 100644 index 00000000..c747fe2f --- /dev/null +++ b/docs/CreateTexmlApplicationRequestInbound.md @@ -0,0 +1,23 @@ + + +# CreateTexmlApplicationRequestInbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channelLimit** | **Integer** | When set, this will limit the total number of inbound calls to phone numbers associated with this connection. | [optional] +**sipSubdomain** | **String** | Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. | [optional] +**sipSubdomainReceiveSettings** | [**SipSubdomainReceiveSettingsEnum**](#SipSubdomainReceiveSettingsEnum) | This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). | [optional] + + + +## Enum: SipSubdomainReceiveSettingsEnum + +Name | Value +---- | ----- +ONLY_MY_CONNECTIONS | "only_my_connections" +FROM_ANYONE | "from_anyone" + + + diff --git a/docs/CreateTexmlApplicationRequestOutbound.md b/docs/CreateTexmlApplicationRequestOutbound.md new file mode 100644 index 00000000..c54572b7 --- /dev/null +++ b/docs/CreateTexmlApplicationRequestOutbound.md @@ -0,0 +1,13 @@ + + +# CreateTexmlApplicationRequestOutbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channelLimit** | **Integer** | When set, this will limit the total number of outbound calls to phone numbers associated with this connection. | [optional] +**outboundVoiceProfileId** | **String** | Identifies the associated outbound voice profile. | [optional] + + + diff --git a/docs/CredentialConnection.md b/docs/CredentialConnection.md new file mode 100644 index 00000000..caa3aeaa --- /dev/null +++ b/docs/CredentialConnection.md @@ -0,0 +1,52 @@ + + +# CredentialConnection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the type of resource. | [optional] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**active** | **Boolean** | Defaults to true | [optional] +**userName** | **String** | The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). | [optional] +**password** | **String** | The password to be used as part of the credentials. Must be 8 to 128 characters long. | [optional] +**createdAt** | **String** | ISO-8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO-8601 formatted date indicating when the resource was updated. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | [optional] +**sipUriCallingPreference** | [**SipUriCallingPreferenceEnum**](#SipUriCallingPreferenceEnum) | This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**inbound** | [**CredentialInbound**](CredentialInbound.md) | | [optional] +**outbound** | [**CredentialOutbound**](CredentialOutbound.md) | | [optional] + + + +## Enum: SipUriCallingPreferenceEnum + +Name | Value +---- | ----- +DISABLED | "disabled" +UNRESTRICTED | "unrestricted" +INTERNAL | "internal" + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/CredentialConnectionResponse.md b/docs/CredentialConnectionResponse.md new file mode 100644 index 00000000..34ad9db7 --- /dev/null +++ b/docs/CredentialConnectionResponse.md @@ -0,0 +1,12 @@ + + +# CredentialConnectionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**CredentialConnection**](CredentialConnection.md) | | [optional] + + + diff --git a/docs/CredentialConnectionsApi.md b/docs/CredentialConnectionsApi.md new file mode 100644 index 00000000..48dc552f --- /dev/null +++ b/docs/CredentialConnectionsApi.md @@ -0,0 +1,392 @@ +# CredentialConnectionsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCredentialConnection**](CredentialConnectionsApi.md#createCredentialConnection) | **POST** /credential_connections | Create a credential connection +[**deleteCredentialConnection**](CredentialConnectionsApi.md#deleteCredentialConnection) | **DELETE** /credential_connections/{id} | Delete a credential connection +[**listCredentialConnections**](CredentialConnectionsApi.md#listCredentialConnections) | **GET** /credential_connections | List credential connections +[**retrieveCredentialConnection**](CredentialConnectionsApi.md#retrieveCredentialConnection) | **GET** /credential_connections/{id} | Retrieve a credential connection +[**updateCredentialConnection**](CredentialConnectionsApi.md#updateCredentialConnection) | **PATCH** /credential_connections/{id} | Update a credential connection + + + +## createCredentialConnection + +> CredentialConnectionResponse createCredentialConnection(createCredentialConnectionRequest) + +Create a credential connection + +Creates a credential connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.CredentialConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CredentialConnectionsApi apiInstance = new CredentialConnectionsApi(defaultClient); + CreateCredentialConnectionRequest createCredentialConnectionRequest = new CreateCredentialConnectionRequest(); // CreateCredentialConnectionRequest | Parameters that can be defined during credential connection creation + try { + CredentialConnectionResponse result = apiInstance.createCredentialConnection(createCredentialConnectionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CredentialConnectionsApi#createCredentialConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCredentialConnectionRequest** | [**CreateCredentialConnectionRequest**](CreateCredentialConnectionRequest.md)| Parameters that can be defined during credential connection creation | + +### Return type + +[**CredentialConnectionResponse**](CredentialConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful response with details about a credential connection. | - | +| **422** | Bad request | - | + + +## deleteCredentialConnection + +> CredentialConnectionResponse deleteCredentialConnection(id) + +Delete a credential connection + +Deletes an existing credential connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.CredentialConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CredentialConnectionsApi apiInstance = new CredentialConnectionsApi(defaultClient); + String id = "id_example"; // String | Identifies the resource. + try { + CredentialConnectionResponse result = apiInstance.deleteCredentialConnection(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CredentialConnectionsApi#deleteCredentialConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**CredentialConnectionResponse**](CredentialConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about a credential connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## listCredentialConnections + +> ListCredentialConnectionsResponse listCredentialConnections().pageNumber(pageNumber).pageSize(pageSize).filterConnectionNameContains(filterConnectionNameContains).filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId).sort(sort).execute(); + +List credential connections + +Returns a list of your credential connections. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.CredentialConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CredentialConnectionsApi apiInstance = new CredentialConnectionsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterConnectionNameContains = "\"null\""; // String | If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. + String filterOutboundOutboundVoiceProfileId = 1293384261075731499; // String | Identifies the associated outbound voice profile. + String sort = connection_name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order. + try { + ListCredentialConnectionsResponse result = api.listCredentialConnections() + .pageNumber(pageNumber) + .pageSize(pageSize) + .filterConnectionNameContains(filterConnectionNameContains) + .filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId) + .sort(sort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CredentialConnectionsApi#listCredentialConnections"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterConnectionNameContains** | **String**| If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. | [optional] [default to "null"] + **filterOutboundOutboundVoiceProfileId** | **String**| Identifies the associated outbound voice profile. | [optional] + **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. | [optional] [default to created_at] [enum: created_at, connection_name, active] + +### Return type + +[**ListCredentialConnectionsResponse**](ListCredentialConnectionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with a list of credential connections. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | + + +## retrieveCredentialConnection + +> CredentialConnectionResponse retrieveCredentialConnection(id) + +Retrieve a credential connection + +Retrieves the details of an existing credential connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.CredentialConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CredentialConnectionsApi apiInstance = new CredentialConnectionsApi(defaultClient); + String id = "id_example"; // String | Identifies the resource. + try { + CredentialConnectionResponse result = apiInstance.retrieveCredentialConnection(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CredentialConnectionsApi#retrieveCredentialConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**CredentialConnectionResponse**](CredentialConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about a credential connection. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | + + +## updateCredentialConnection + +> CredentialConnectionResponse updateCredentialConnection(id, updateCredentialConnectionRequest) + +Update a credential connection + +Updates settings of an existing credential connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.CredentialConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CredentialConnectionsApi apiInstance = new CredentialConnectionsApi(defaultClient); + String id = "id_example"; // String | Identifies the resource. + UpdateCredentialConnectionRequest updateCredentialConnectionRequest = new UpdateCredentialConnectionRequest(); // UpdateCredentialConnectionRequest | Parameters that can be updated in a credential connection + try { + CredentialConnectionResponse result = apiInstance.updateCredentialConnection(id, updateCredentialConnectionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CredentialConnectionsApi#updateCredentialConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + **updateCredentialConnectionRequest** | [**UpdateCredentialConnectionRequest**](UpdateCredentialConnectionRequest.md)| Parameters that can be updated in a credential connection | + +### Return type + +[**CredentialConnectionResponse**](CredentialConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about a credential connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + diff --git a/docs/CredentialInbound.md b/docs/CredentialInbound.md new file mode 100644 index 00000000..ebfe87a7 --- /dev/null +++ b/docs/CredentialInbound.md @@ -0,0 +1,43 @@ + + +# CredentialInbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aniNumberFormat** | [**AniNumberFormatEnum**](#AniNumberFormatEnum) | This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. | [optional] +**dnisNumberFormat** | [**DnisNumberFormatEnum**](#DnisNumberFormatEnum) | | [optional] +**codecs** | **List<String>** | Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. | [optional] +**channelLimit** | **Integer** | When set, this will limit the total number of inbound calls to phone numbers associated with this connection. | [optional] +**generateRingbackTone** | **Boolean** | Generate ringback tone through 183 session progress message with early media. | [optional] +**isupHeadersEnabled** | **Boolean** | When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) | [optional] +**prackEnabled** | **Boolean** | Enable PRACK messages as defined in RFC3262. | [optional] +**privacyZoneEnabled** | **Boolean** | By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. | [optional] +**sipCompactHeadersEnabled** | **Boolean** | Defaults to true. | [optional] +**timeout1xxSecs** | **Integer** | Time(sec) before aborting if connection is not made. | [optional] +**timeout2xxSecs** | **String** | Time(sec) before aborting if call is unanswered (min: 1, max: 600). | [optional] + + + +## Enum: AniNumberFormatEnum + +Name | Value +---- | ----- +_E_164 | "+E.164" +E_164 | "E.164" +_E_164_NATIONAL | "+E.164-national" +E_164_NATIONAL | "E.164-national" + + + +## Enum: DnisNumberFormatEnum + +Name | Value +---- | ----- +_E164 | "+e164" +E164 | "e164" +NATIONAL | "national" + + + diff --git a/docs/CredentialOutbound.md b/docs/CredentialOutbound.md new file mode 100644 index 00000000..b9bc1194 --- /dev/null +++ b/docs/CredentialOutbound.md @@ -0,0 +1,43 @@ + + +# CredentialOutbound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callParkingEnabled** | **Boolean** | Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next. | [optional] +**aniOverride** | **String** | Set a phone number as the ani_override value to override caller id number on outbound calls. | [optional] +**aniOverrideType** | [**AniOverrideTypeEnum**](#AniOverrideTypeEnum) | Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. | [optional] +**channelLimit** | **Integer** | When set, this will limit the total number of outbound calls to phone numbers associated with this connection. | [optional] +**instantRingbackEnabled** | **Boolean** | When set, ringback will not wait for indication before sending ringback tone to calling party. | [optional] +**generateRingbackTone** | **Boolean** | Generate ringback tone through 183 session progress message with early media. | [optional] +**localization** | **String** | A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default. | [optional] +**t38ReinviteSource** | [**T38ReinviteSourceEnum**](#T38ReinviteSourceEnum) | This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. | [optional] +**outboundVoiceProfileId** | **String** | Identifies the associated outbound voice profile. | [optional] + + + +## Enum: AniOverrideTypeEnum + +Name | Value +---- | ----- +ALWAYS | "always" +NORMAL | "normal" +EMERGENCY | "emergency" + + + +## Enum: T38ReinviteSourceEnum + +Name | Value +---- | ----- +TELNYX | "telnyx" +CUSTOMER | "customer" +DISABLED | "disabled" +PASSTHRU | "passthru" +CALLER_PASSTHRU | "caller-passthru" +CALLEE_PASSTHRU | "callee-passthru" + + + diff --git a/docs/CsvDownloadsApi.md b/docs/CsvDownloadsApi.md index 87885eb4..b6f2792c 100644 --- a/docs/CsvDownloadsApi.md +++ b/docs/CsvDownloadsApi.md @@ -102,8 +102,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); CsvDownloadsApi apiInstance = new CsvDownloadsApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListCSVDownloadsResponse result = api.listCsvDownloads() .pageNumber(pageNumber) @@ -126,8 +126,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/DebuggingApi.md b/docs/DebuggingApi.md index cf420ad7..68fa5acf 100644 --- a/docs/DebuggingApi.md +++ b/docs/DebuggingApi.md @@ -49,8 +49,8 @@ public class Example { String filterEventTimestampLt = 2019-03-29T11:10:00Z; // String | Event timestamp: lower than String filterEventTimestampLte = 2019-03-29T11:10:00Z; // String | Event timestamp: lower than or equal String filterEventTimestampEq = 2019-03-29T11:10:00Z; // String | Event timestamp: equal - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListCallEventsResponse result = api.listCallEvents() .filterCallLegId(filterCallLegId) @@ -91,8 +91,8 @@ Name | Type | Description | Notes **filterEventTimestampLt** | **String**| Event timestamp: lower than | [optional] **filterEventTimestampLte** | **String**| Event timestamp: lower than or equal | [optional] **filterEventTimestampEq** | **String**| Event timestamp: equal | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/DtmfType.md b/docs/DtmfType.md new file mode 100644 index 00000000..bfc7192e --- /dev/null +++ b/docs/DtmfType.md @@ -0,0 +1,15 @@ + + +# DtmfType + +## Enum + + +* `RFC_2833` (value: `"RFC 2833"`) + +* `INBAND` (value: `"Inband"`) + +* `SIP_INFO` (value: `"SIP INFO"`) + + + diff --git a/docs/EncryptedMedia.md b/docs/EncryptedMedia.md new file mode 100644 index 00000000..a424c59f --- /dev/null +++ b/docs/EncryptedMedia.md @@ -0,0 +1,13 @@ + + +# EncryptedMedia + +## Enum + + +* `SRTP` (value: `"SRTP"`) + +* `ZRTP` (value: `"ZRTP"`) + + + diff --git a/docs/FaxApplication.md b/docs/FaxApplication.md new file mode 100644 index 00000000..b23db551 --- /dev/null +++ b/docs/FaxApplication.md @@ -0,0 +1,23 @@ + + +# FaxApplication + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the resource. | [optional] [readonly] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**applicationName** | **String** | A user-assigned name to help manage the application. | [optional] +**active** | **Boolean** | Specifies whether the connection can be used. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**inbound** | [**CreateFaxApplicationRequestInbound**](CreateFaxApplicationRequestInbound.md) | | [optional] +**outbound** | [**CreateFaxApplicationRequestOutbound**](CreateFaxApplicationRequestOutbound.md) | | [optional] +**createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] + + + diff --git a/docs/FqdNsApi.md b/docs/FqdNsApi.md new file mode 100644 index 00000000..e58db8b1 --- /dev/null +++ b/docs/FqdNsApi.md @@ -0,0 +1,392 @@ +# FqdNsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFqdn**](FqdNsApi.md#createFqdn) | **POST** /fqdns | Create an Fqdn +[**deleteFqdn**](FqdNsApi.md#deleteFqdn) | **DELETE** /fqdns/{id} | Delete an Fqdn +[**listFqdns**](FqdNsApi.md#listFqdns) | **GET** /fqdns | List Fqdns +[**retrieveFqdn**](FqdNsApi.md#retrieveFqdn) | **GET** /fqdns/{id} | Retrieve an Fqdn +[**updateFqdn**](FqdNsApi.md#updateFqdn) | **PATCH** /fqdns/{id} | Update an Fqdn + + + +## createFqdn + +> FqdnResponse createFqdn(createFqdnRequest) + +Create an Fqdn + +Create a new FQDN object. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdNsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdNsApi apiInstance = new FqdNsApi(defaultClient); + CreateFqdnRequest createFqdnRequest = new CreateFqdnRequest(); // CreateFqdnRequest | + try { + FqdnResponse result = apiInstance.createFqdn(createFqdnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdNsApi#createFqdn"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFqdnRequest** | [**CreateFqdnRequest**](CreateFqdnRequest.md)| | [optional] + +### Return type + +[**FqdnResponse**](FqdnResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful response with details about an FQDN connection. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## deleteFqdn + +> FqdnResponse deleteFqdn(id) + +Delete an Fqdn + +Delete an FQDN. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdNsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdNsApi apiInstance = new FqdNsApi(defaultClient); + String id = 1517907029795014409; // String | Identifies the resource. + try { + FqdnResponse result = apiInstance.deleteFqdn(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdNsApi#deleteFqdn"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**FqdnResponse**](FqdnResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an FQDN connection. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## listFqdns + +> ListFqdnsResponse listFqdns().pageNumber(pageNumber).pageSize(pageSize).filterConnectionId(filterConnectionId).filterFqdn(filterFqdn).filterPort(filterPort).filterDnsRecordType(filterDnsRecordType).execute(); + +List Fqdns + +Get all FQDNs belonging to the user that match the given filters. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdNsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdNsApi apiInstance = new FqdNsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterConnectionId = "filterConnectionId_example"; // String | ID of the FQDN connection to which the FQDN belongs. + String filterFqdn = example.com; // String | FQDN represented by the resource. + Integer filterPort = 5060; // Integer | Port to use when connecting to the FQDN. + String filterDnsRecordType = a; // String | DNS record type used by the FQDN. + try { + ListFqdnsResponse result = api.listFqdns() + .pageNumber(pageNumber) + .pageSize(pageSize) + .filterConnectionId(filterConnectionId) + .filterFqdn(filterFqdn) + .filterPort(filterPort) + .filterDnsRecordType(filterDnsRecordType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdNsApi#listFqdns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterConnectionId** | **String**| ID of the FQDN connection to which the FQDN belongs. | [optional] + **filterFqdn** | **String**| FQDN represented by the resource. | [optional] + **filterPort** | **Integer**| Port to use when connecting to the FQDN. | [optional] + **filterDnsRecordType** | **String**| DNS record type used by the FQDN. | [optional] + +### Return type + +[**ListFqdnsResponse**](ListFqdnsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with a list of FQDN connections. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## retrieveFqdn + +> FqdnResponse retrieveFqdn(id) + +Retrieve an Fqdn + +Return the details regarding a specific FQDN. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdNsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdNsApi apiInstance = new FqdNsApi(defaultClient); + String id = 1517907029795014409; // String | Identifies the resource. + try { + FqdnResponse result = apiInstance.retrieveFqdn(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdNsApi#retrieveFqdn"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**FqdnResponse**](FqdnResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an FQDN connection. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## updateFqdn + +> FqdnResponse updateFqdn(id, updateFqdnRequest) + +Update an Fqdn + +Update the details of a specific FQDN. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdNsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdNsApi apiInstance = new FqdNsApi(defaultClient); + String id = 1517907029795014409; // String | Identifies the resource. + UpdateFqdnRequest updateFqdnRequest = new UpdateFqdnRequest(); // UpdateFqdnRequest | + try { + FqdnResponse result = apiInstance.updateFqdn(id, updateFqdnRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdNsApi#updateFqdn"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + **updateFqdnRequest** | [**UpdateFqdnRequest**](UpdateFqdnRequest.md)| | [optional] + +### Return type + +[**FqdnResponse**](FqdnResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an FQDN connection. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + diff --git a/docs/Fqdn.md b/docs/Fqdn.md new file mode 100644 index 00000000..5d73a648 --- /dev/null +++ b/docs/Fqdn.md @@ -0,0 +1,19 @@ + + +# Fqdn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the resource. | [optional] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**connectionId** | **String** | ID of the FQDN connection to which this FQDN is attached. | [optional] +**fqdn** | **String** | FQDN represented by this resource. | [optional] +**port** | **Integer** | Port to use when connecting to this FQDN. | [optional] +**dnsRecordType** | **String** | The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. | [optional] +**createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] + + + diff --git a/docs/FqdnConnection.md b/docs/FqdnConnection.md new file mode 100644 index 00000000..44d23c19 --- /dev/null +++ b/docs/FqdnConnection.md @@ -0,0 +1,39 @@ + + +# FqdnConnection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the resource. | [optional] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**active** | **Boolean** | Defaults to true | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | +**transportProtocol** | [**FqdnConnectionTransportProtocol**](FqdnConnectionTransportProtocol.md) | | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] +**inbound** | [**InboundFqdn**](InboundFqdn.md) | | [optional] + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/FqdnConnectionResponse.md b/docs/FqdnConnectionResponse.md new file mode 100644 index 00000000..19be1e74 --- /dev/null +++ b/docs/FqdnConnectionResponse.md @@ -0,0 +1,12 @@ + + +# FqdnConnectionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**FqdnConnection**](FqdnConnection.md) | | [optional] + + + diff --git a/docs/FqdnConnectionTransportProtocol.md b/docs/FqdnConnectionTransportProtocol.md new file mode 100644 index 00000000..1198cf79 --- /dev/null +++ b/docs/FqdnConnectionTransportProtocol.md @@ -0,0 +1,15 @@ + + +# FqdnConnectionTransportProtocol + +## Enum + + +* `UDP` (value: `"UDP"`) + +* `TCP` (value: `"TCP"`) + +* `TLS` (value: `"TLS"`) + + + diff --git a/docs/FqdnConnectionsApi.md b/docs/FqdnConnectionsApi.md new file mode 100644 index 00000000..f04ffffb --- /dev/null +++ b/docs/FqdnConnectionsApi.md @@ -0,0 +1,389 @@ +# FqdnConnectionsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFqdnConnection**](FqdnConnectionsApi.md#createFqdnConnection) | **POST** /fqdn_connections | Create an Fqdn connection +[**deleteFqdnConnection**](FqdnConnectionsApi.md#deleteFqdnConnection) | **DELETE** /fqdn_connections/{id} | Delete an Fqdn connection +[**listFqdnConnections**](FqdnConnectionsApi.md#listFqdnConnections) | **GET** /fqdn_connections | List Fqdn connections +[**retrieveFqdnConnection**](FqdnConnectionsApi.md#retrieveFqdnConnection) | **GET** /fqdn_connections/{id} | Retrieve an Fqdn connection +[**updateFqdnConnection**](FqdnConnectionsApi.md#updateFqdnConnection) | **PATCH** /fqdn_connections/{id} | Update an Fqdn connection + + + +## createFqdnConnection + +> FqdnConnectionResponse createFqdnConnection(createFqdnConnectionRequest) + +Create an Fqdn connection + +Creates a FQDN connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdnConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient); + CreateFqdnConnectionRequest createFqdnConnectionRequest = new CreateFqdnConnectionRequest(); // CreateFqdnConnectionRequest | Parameters that can be defined during FQDN connection creation + try { + FqdnConnectionResponse result = apiInstance.createFqdnConnection(createFqdnConnectionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdnConnectionsApi#createFqdnConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFqdnConnectionRequest** | [**CreateFqdnConnectionRequest**](CreateFqdnConnectionRequest.md)| Parameters that can be defined during FQDN connection creation | + +### Return type + +[**FqdnConnectionResponse**](FqdnConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful response with details about an FQDN connection. | - | +| **422** | Bad request | - | + + +## deleteFqdnConnection + +> FqdnConnectionResponse deleteFqdnConnection(id) + +Delete an Fqdn connection + +Deletes an FQDN connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdnConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient); + String id = "id_example"; // String | FQDN Connection ID + try { + FqdnConnectionResponse result = apiInstance.deleteFqdnConnection(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdnConnectionsApi#deleteFqdnConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| FQDN Connection ID | + +### Return type + +[**FqdnConnectionResponse**](FqdnConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an FQDN connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## listFqdnConnections + +> ListFqdnConnectionsResponse listFqdnConnections().pageNumber(pageNumber).pageSize(pageSize).filterConnectionNameContains(filterConnectionNameContains).sort(sort).execute(); + +List Fqdn connections + +Returns a list of your FQDN connections. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdnConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterConnectionNameContains = "\"null\""; // String | If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. + String sort = connection_name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order. + try { + ListFqdnConnectionsResponse result = api.listFqdnConnections() + .pageNumber(pageNumber) + .pageSize(pageSize) + .filterConnectionNameContains(filterConnectionNameContains) + .sort(sort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdnConnectionsApi#listFqdnConnections"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterConnectionNameContains** | **String**| If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. | [optional] [default to "null"] + **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. | [optional] [default to created_at] [enum: created_at, connection_name, active] + +### Return type + +[**ListFqdnConnectionsResponse**](ListFqdnConnectionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with a list of FQDN connections. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | + + +## retrieveFqdnConnection + +> FqdnConnectionResponse retrieveFqdnConnection(id) + +Retrieve an Fqdn connection + +Retrieves the details of an existing FQDN connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdnConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient); + String id = "id_example"; // String | FQDN Connection ID + try { + FqdnConnectionResponse result = apiInstance.retrieveFqdnConnection(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdnConnectionsApi#retrieveFqdnConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| FQDN Connection ID | + +### Return type + +[**FqdnConnectionResponse**](FqdnConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an FQDN connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## updateFqdnConnection + +> FqdnConnectionResponse updateFqdnConnection(id, updateFqdnConnectionRequest) + +Update an Fqdn connection + +Updates settings of an existing FQDN connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.FqdnConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + FqdnConnectionsApi apiInstance = new FqdnConnectionsApi(defaultClient); + String id = "id_example"; // String | FQDN Connection ID + UpdateFqdnConnectionRequest updateFqdnConnectionRequest = new UpdateFqdnConnectionRequest(); // UpdateFqdnConnectionRequest | Parameters that can be updated in a FQDN connection + try { + FqdnConnectionResponse result = apiInstance.updateFqdnConnection(id, updateFqdnConnectionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FqdnConnectionsApi#updateFqdnConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| FQDN Connection ID | + **updateFqdnConnectionRequest** | [**UpdateFqdnConnectionRequest**](UpdateFqdnConnectionRequest.md)| Parameters that can be updated in a FQDN connection | + +### Return type + +[**FqdnConnectionResponse**](FqdnConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an FQDN connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + diff --git a/docs/FqdnResponse.md b/docs/FqdnResponse.md new file mode 100644 index 00000000..ebfb4f08 --- /dev/null +++ b/docs/FqdnResponse.md @@ -0,0 +1,12 @@ + + +# FqdnResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Fqdn**](Fqdn.md) | | [optional] + + + diff --git a/docs/IPsApi.md b/docs/IPsApi.md new file mode 100644 index 00000000..dc1feeb3 --- /dev/null +++ b/docs/IPsApi.md @@ -0,0 +1,389 @@ +# IPsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createIp**](IPsApi.md#createIp) | **POST** /ips | Create an Ip +[**deleteIp**](IPsApi.md#deleteIp) | **DELETE** /ips/{id} | Delete an Ip +[**listIps**](IPsApi.md#listIps) | **GET** /ips | List Ips +[**retrieveIp**](IPsApi.md#retrieveIp) | **GET** /ips/{id} | Retrieve an Ip +[**updateIp**](IPsApi.md#updateIp) | **PATCH** /ips/{id} | Update an Ip + + + +## createIp + +> IpResponse createIp(createIpRequest) + +Create an Ip + +Create a new IP object. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IPsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IPsApi apiInstance = new IPsApi(defaultClient); + CreateIpRequest createIpRequest = new CreateIpRequest(); // CreateIpRequest | + try { + IpResponse result = apiInstance.createIp(createIpRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IPsApi#createIp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createIpRequest** | [**CreateIpRequest**](CreateIpRequest.md)| | [optional] + +### Return type + +[**IpResponse**](IpResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful response with details about an IP. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## deleteIp + +> IpResponse deleteIp(id) + +Delete an Ip + +Delete an IP. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IPsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IPsApi apiInstance = new IPsApi(defaultClient); + UUID id = 6a09cdc3-8948-47f0-aa62-74ac943d6c58; // UUID | Identifies the type of resource. + try { + IpResponse result = apiInstance.deleteIp(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IPsApi#deleteIp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**UUID**](.md)| Identifies the type of resource. | + +### Return type + +[**IpResponse**](IpResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an IP. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## listIps + +> ListIpsResponse listIps().pageNumber(pageNumber).pageSize(pageSize).filterConnectionId(filterConnectionId).filterIpAddress(filterIpAddress).filterPort(filterPort).execute(); + +List Ips + +Get all IPs belonging to the user that match the given filters. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IPsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IPsApi apiInstance = new IPsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterConnectionId = "filterConnectionId_example"; // String | ID of the IP Connection to which this IP should be attached. + String filterIpAddress = 192.168.0.0; // String | IP adddress represented by this resource. + Integer filterPort = 5060; // Integer | Port to use when connecting to this IP. + try { + ListIpsResponse result = api.listIps() + .pageNumber(pageNumber) + .pageSize(pageSize) + .filterConnectionId(filterConnectionId) + .filterIpAddress(filterIpAddress) + .filterPort(filterPort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IPsApi#listIps"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterConnectionId** | **String**| ID of the IP Connection to which this IP should be attached. | [optional] + **filterIpAddress** | **String**| IP adddress represented by this resource. | [optional] + **filterPort** | **Integer**| Port to use when connecting to this IP. | [optional] + +### Return type + +[**ListIpsResponse**](ListIpsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with a list of IPs. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## retrieveIp + +> IpResponse retrieveIp(id) + +Retrieve an Ip + +Return the details regarding a specific IP. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IPsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IPsApi apiInstance = new IPsApi(defaultClient); + UUID id = 6a09cdc3-8948-47f0-aa62-74ac943d6c58; // UUID | Identifies the type of resource. + try { + IpResponse result = apiInstance.retrieveIp(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IPsApi#retrieveIp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**UUID**](.md)| Identifies the type of resource. | + +### Return type + +[**IpResponse**](IpResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an IP. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + + +## updateIp + +> IpResponse updateIp(id, updateIpRequest) + +Update an Ip + +Update the details of a specific IP. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IPsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IPsApi apiInstance = new IPsApi(defaultClient); + UUID id = 6a09cdc3-8948-47f0-aa62-74ac943d6c58; // UUID | Identifies the type of resource. + UpdateIpRequest updateIpRequest = new UpdateIpRequest(); // UpdateIpRequest | + try { + IpResponse result = apiInstance.updateIp(id, updateIpRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IPsApi#updateIp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**UUID**](.md)| Identifies the type of resource. | + **updateIpRequest** | [**UpdateIpRequest**](UpdateIpRequest.md)| | [optional] + +### Return type + +[**IpResponse**](IpResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an IP. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + diff --git a/docs/InboundFqdn.md b/docs/InboundFqdn.md new file mode 100644 index 00000000..1f0735e5 --- /dev/null +++ b/docs/InboundFqdn.md @@ -0,0 +1,75 @@ + + +# InboundFqdn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aniNumberFormat** | [**AniNumberFormatEnum**](#AniNumberFormatEnum) | This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. | [optional] +**dnisNumberFormat** | [**DnisNumberFormatEnum**](#DnisNumberFormatEnum) | | [optional] +**codecs** | **List<String>** | Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. | [optional] +**defaultRoutingMethod** | [**DefaultRoutingMethodEnum**](#DefaultRoutingMethodEnum) | Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or null, other values are not allowed. | [optional] +**channelLimit** | **Integer** | When set, this will limit the total number of inbound calls to phone numbers associated with this connection. | [optional] +**generateRingbackTone** | **Boolean** | Generate ringback tone through 183 session progress message with early media. | [optional] +**isupHeadersEnabled** | **Boolean** | When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) | [optional] +**prackEnabled** | **Boolean** | Enable PRACK messages as defined in RFC3262. | [optional] +**privacyZoneEnabled** | **Boolean** | By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. | [optional] +**sipCompactHeadersEnabled** | **Boolean** | Defaults to true. | [optional] +**sipRegion** | [**SipRegionEnum**](#SipRegionEnum) | Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. | [optional] +**sipSubdomain** | **String** | Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. | [optional] +**sipSubdomainReceiveSettings** | [**SipSubdomainReceiveSettingsEnum**](#SipSubdomainReceiveSettingsEnum) | This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). | [optional] +**timeout1xxSecs** | **Integer** | Time(sec) before aborting if connection is not made. | [optional] +**timeout2xxSecs** | **Integer** | Time(sec) before aborting if call is unanswered (min: 1, max: 600). | [optional] + + + +## Enum: AniNumberFormatEnum + +Name | Value +---- | ----- +_E_164 | "+E.164" +E_164 | "E.164" +_E_164_NATIONAL | "+E.164-national" +E_164_NATIONAL | "E.164-national" + + + +## Enum: DnisNumberFormatEnum + +Name | Value +---- | ----- +_E164 | "+e164" +E164 | "e164" +NATIONAL | "national" + + + +## Enum: DefaultRoutingMethodEnum + +Name | Value +---- | ----- +SEQUENTIAL | "sequential" +ROUND_ROBIN | "round-robin" + + + +## Enum: SipRegionEnum + +Name | Value +---- | ----- +US | "US" +EUROPE | "Europe" +AUSTRALIA | "Australia" + + + +## Enum: SipSubdomainReceiveSettingsEnum + +Name | Value +---- | ----- +ONLY_MY_CONNECTIONS | "only_my_connections" +FROM_ANYONE | "from_anyone" + + + diff --git a/docs/InboundIp.md b/docs/InboundIp.md new file mode 100644 index 00000000..45654ab1 --- /dev/null +++ b/docs/InboundIp.md @@ -0,0 +1,78 @@ + + +# InboundIp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aniNumberFormat** | [**AniNumberFormatEnum**](#AniNumberFormatEnum) | This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. | [optional] +**dnisNumberFormat** | [**DnisNumberFormatEnum**](#DnisNumberFormatEnum) | | [optional] +**codecs** | **List<String>** | Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. | [optional] +**defaultPrimaryIpId** | **String** | The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection. | [optional] +**defaultSecondaryIpId** | **String** | The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection. | [optional] +**defaultTertiaryIpId** | **String** | The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection. | [optional] +**defaultRoutingMethod** | [**DefaultRoutingMethodEnum**](#DefaultRoutingMethodEnum) | Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. | [optional] +**channelLimit** | **Integer** | When set, this will limit the total number of inbound calls to phone numbers associated with this connection. | [optional] +**generateRingbackTone** | **Boolean** | Generate ringback tone through 183 session progress message with early media. | [optional] +**isupHeadersEnabled** | **Boolean** | When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) | [optional] +**prackEnabled** | **Boolean** | Enable PRACK messages as defined in RFC3262. | [optional] +**privacyZoneEnabled** | **Boolean** | By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. | [optional] +**sipCompactHeadersEnabled** | **Boolean** | Defaults to true. | [optional] +**sipRegion** | [**SipRegionEnum**](#SipRegionEnum) | Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. | [optional] +**sipSubdomain** | **String** | Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. | [optional] +**sipSubdomainReceiveSettings** | [**SipSubdomainReceiveSettingsEnum**](#SipSubdomainReceiveSettingsEnum) | This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). | [optional] +**timeout1xxSecs** | **Integer** | Time(sec) before aborting if connection is not made. | [optional] +**timeout2xxSecs** | **Integer** | Time(sec) before aborting if call is unanswered (min: 1, max: 600). | [optional] + + + +## Enum: AniNumberFormatEnum + +Name | Value +---- | ----- +_E_164 | "+E.164" +E_164 | "E.164" +_E_164_NATIONAL | "+E.164-national" +E_164_NATIONAL | "E.164-national" + + + +## Enum: DnisNumberFormatEnum + +Name | Value +---- | ----- +_E164 | "+e164" +E164 | "e164" +NATIONAL | "national" + + + +## Enum: DefaultRoutingMethodEnum + +Name | Value +---- | ----- +SEQUENTIAL | "sequential" +ROUND_ROBIN | "round-robin" + + + +## Enum: SipRegionEnum + +Name | Value +---- | ----- +US | "US" +EUROPE | "Europe" +AUSTRALIA | "Australia" + + + +## Enum: SipSubdomainReceiveSettingsEnum + +Name | Value +---- | ----- +ONLY_MY_CONNECTIONS | "only_my_connections" +FROM_ANYONE | "from_anyone" + + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 00000000..8391a7fa --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,13 @@ + + +# InlineResponse200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<FaxApplication>**](FaxApplication.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md new file mode 100644 index 00000000..0269d6df --- /dev/null +++ b/docs/InlineResponse2001.md @@ -0,0 +1,13 @@ + + +# InlineResponse2001 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<TexmlApplication>**](TexmlApplication.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md new file mode 100644 index 00000000..cf34e484 --- /dev/null +++ b/docs/InlineResponse201.md @@ -0,0 +1,12 @@ + + +# InlineResponse201 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**FaxApplication**](FaxApplication.md) | | [optional] + + + diff --git a/docs/InlineResponse2011.md b/docs/InlineResponse2011.md new file mode 100644 index 00000000..a1c10000 --- /dev/null +++ b/docs/InlineResponse2011.md @@ -0,0 +1,12 @@ + + +# InlineResponse2011 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TexmlApplication**](TexmlApplication.md) | | [optional] + + + diff --git a/docs/Ip.md b/docs/Ip.md new file mode 100644 index 00000000..4b023fe1 --- /dev/null +++ b/docs/Ip.md @@ -0,0 +1,18 @@ + + +# Ip + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the type of resource. | [optional] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**connectionId** | **String** | ID of the IP Connection to which this IP should be attached. | [optional] +**ipAddress** | **String** | IP adddress represented by this resource. | [optional] +**port** | **Integer** | Port to use when connecting to this IP. | [optional] +**createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] + + + diff --git a/docs/IpConnection.md b/docs/IpConnection.md new file mode 100644 index 00000000..46bdb972 --- /dev/null +++ b/docs/IpConnection.md @@ -0,0 +1,50 @@ + + +# IpConnection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the type of resource. | [optional] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**active** | **Boolean** | Defaults to true | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | [optional] +**transportProtocol** | [**TransportProtocolEnum**](#TransportProtocolEnum) | One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] +**inbound** | [**InboundIp**](InboundIp.md) | | [optional] +**outbound** | [**OutboundIp**](OutboundIp.md) | | [optional] + + + +## Enum: TransportProtocolEnum + +Name | Value +---- | ----- +UDP | "UDP" +TCP | "TCP" +TLS | "TLS" + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/IpConnectionResponse.md b/docs/IpConnectionResponse.md new file mode 100644 index 00000000..62e46900 --- /dev/null +++ b/docs/IpConnectionResponse.md @@ -0,0 +1,12 @@ + + +# IpConnectionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**IpConnection**](IpConnection.md) | | [optional] + + + diff --git a/docs/IpConnectionsApi.md b/docs/IpConnectionsApi.md new file mode 100644 index 00000000..36445372 --- /dev/null +++ b/docs/IpConnectionsApi.md @@ -0,0 +1,392 @@ +# IpConnectionsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createIpConnection**](IpConnectionsApi.md#createIpConnection) | **POST** /ip_connections | Create an Ip connection +[**deleteIpConnection**](IpConnectionsApi.md#deleteIpConnection) | **DELETE** /ip_connections/{id} | Delete an Ip connection +[**listIpConnections**](IpConnectionsApi.md#listIpConnections) | **GET** /ip_connections | List Ip connections +[**retrieveIpConnection**](IpConnectionsApi.md#retrieveIpConnection) | **GET** /ip_connections/{id} | Retrieve an Ip connection +[**updateIpConnection**](IpConnectionsApi.md#updateIpConnection) | **PATCH** /ip_connections/{id} | Update an Ip connection + + + +## createIpConnection + +> IpConnectionResponse createIpConnection(createIpConnectionRequest) + +Create an Ip connection + +Creates an IP connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IpConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IpConnectionsApi apiInstance = new IpConnectionsApi(defaultClient); + CreateIpConnectionRequest createIpConnectionRequest = new CreateIpConnectionRequest(); // CreateIpConnectionRequest | Parameters that can be defined during IP connection creation + try { + IpConnectionResponse result = apiInstance.createIpConnection(createIpConnectionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpConnectionsApi#createIpConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createIpConnectionRequest** | [**CreateIpConnectionRequest**](CreateIpConnectionRequest.md)| Parameters that can be defined during IP connection creation | + +### Return type + +[**IpConnectionResponse**](IpConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful response with details about an IP connection. | - | +| **422** | Bad request | - | + + +## deleteIpConnection + +> IpConnectionResponse deleteIpConnection(id) + +Delete an Ip connection + +Deletes an existing IP connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IpConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IpConnectionsApi apiInstance = new IpConnectionsApi(defaultClient); + String id = "id_example"; // String | Identifies the type of resource. + try { + IpConnectionResponse result = apiInstance.deleteIpConnection(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpConnectionsApi#deleteIpConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the type of resource. | + +### Return type + +[**IpConnectionResponse**](IpConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an IP connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## listIpConnections + +> ListIpConnectionsResponse listIpConnections().pageNumber(pageNumber).pageSize(pageSize).filterConnectionNameContains(filterConnectionNameContains).filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId).sort(sort).execute(); + +List Ip connections + +Returns a list of your IP connections. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IpConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IpConnectionsApi apiInstance = new IpConnectionsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterConnectionNameContains = "\"null\""; // String | If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. + String filterOutboundOutboundVoiceProfileId = 1293384261075731499; // String | Identifies the associated outbound voice profile. + String sort = connection_name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order. + try { + ListIpConnectionsResponse result = api.listIpConnections() + .pageNumber(pageNumber) + .pageSize(pageSize) + .filterConnectionNameContains(filterConnectionNameContains) + .filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId) + .sort(sort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpConnectionsApi#listIpConnections"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterConnectionNameContains** | **String**| If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. | [optional] [default to "null"] + **filterOutboundOutboundVoiceProfileId** | **String**| Identifies the associated outbound voice profile. | [optional] + **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. | [optional] [default to created_at] [enum: created_at, connection_name, active] + +### Return type + +[**ListIpConnectionsResponse**](ListIpConnectionsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with a list of IP connections. | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | + + +## retrieveIpConnection + +> IpConnectionResponse retrieveIpConnection(id) + +Retrieve an Ip connection + +Retrieves the details of an existing ip connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IpConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IpConnectionsApi apiInstance = new IpConnectionsApi(defaultClient); + String id = "id_example"; // String | IP Connection ID + try { + IpConnectionResponse result = apiInstance.retrieveIpConnection(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpConnectionsApi#retrieveIpConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| IP Connection ID | + +### Return type + +[**IpConnectionResponse**](IpConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an IP connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## updateIpConnection + +> IpConnectionResponse updateIpConnection(id, updateIpConnectionRequest) + +Update an Ip connection + +Updates settings of an existing IP connection. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.IpConnectionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + IpConnectionsApi apiInstance = new IpConnectionsApi(defaultClient); + String id = "id_example"; // String | Identifies the type of resource. + UpdateIpConnectionRequest updateIpConnectionRequest = new UpdateIpConnectionRequest(); // UpdateIpConnectionRequest | Parameters that can be updated in a IP connection + try { + IpConnectionResponse result = apiInstance.updateIpConnection(id, updateIpConnectionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IpConnectionsApi#updateIpConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the type of resource. | + **updateIpConnectionRequest** | [**UpdateIpConnectionRequest**](UpdateIpConnectionRequest.md)| Parameters that can be updated in a IP connection | + +### Return type + +[**IpConnectionResponse**](IpConnectionResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with details about an IP connection. | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + diff --git a/docs/IpResponse.md b/docs/IpResponse.md new file mode 100644 index 00000000..9ca45ec6 --- /dev/null +++ b/docs/IpResponse.md @@ -0,0 +1,12 @@ + + +# IpResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Ip**](Ip.md) | | [optional] + + + diff --git a/docs/ListConnectionsResponse.md b/docs/ListConnectionsResponse.md new file mode 100644 index 00000000..2ef2ab13 --- /dev/null +++ b/docs/ListConnectionsResponse.md @@ -0,0 +1,13 @@ + + +# ListConnectionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<Connection>**](Connection.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/ListCredentialConnectionsResponse.md b/docs/ListCredentialConnectionsResponse.md new file mode 100644 index 00000000..35a2c335 --- /dev/null +++ b/docs/ListCredentialConnectionsResponse.md @@ -0,0 +1,13 @@ + + +# ListCredentialConnectionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<CredentialConnection>**](CredentialConnection.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/ListFqdnConnectionsResponse.md b/docs/ListFqdnConnectionsResponse.md new file mode 100644 index 00000000..5709a090 --- /dev/null +++ b/docs/ListFqdnConnectionsResponse.md @@ -0,0 +1,13 @@ + + +# ListFqdnConnectionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<FqdnConnection>**](FqdnConnection.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/ListFqdnsResponse.md b/docs/ListFqdnsResponse.md new file mode 100644 index 00000000..ae8d6d4c --- /dev/null +++ b/docs/ListFqdnsResponse.md @@ -0,0 +1,13 @@ + + +# ListFqdnsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<Fqdn>**](Fqdn.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/ListIpConnectionsResponse.md b/docs/ListIpConnectionsResponse.md new file mode 100644 index 00000000..66c66ade --- /dev/null +++ b/docs/ListIpConnectionsResponse.md @@ -0,0 +1,13 @@ + + +# ListIpConnectionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<IpConnection>**](IpConnection.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/ListIpsResponse.md b/docs/ListIpsResponse.md new file mode 100644 index 00000000..63630db8 --- /dev/null +++ b/docs/ListIpsResponse.md @@ -0,0 +1,12 @@ + + +# ListIpsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<Ip>**](Ip.md) | | [optional] + + + diff --git a/docs/ListOutboundVoiceProfilesResponse.md b/docs/ListOutboundVoiceProfilesResponse.md new file mode 100644 index 00000000..5956afaf --- /dev/null +++ b/docs/ListOutboundVoiceProfilesResponse.md @@ -0,0 +1,13 @@ + + +# ListOutboundVoiceProfilesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<OutboundVoiceProfile>**](OutboundVoiceProfile.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/ListPhoneNumbersBackgroundJobsResponse.md b/docs/ListPhoneNumbersBackgroundJobsResponse.md new file mode 100644 index 00000000..3fb6a655 --- /dev/null +++ b/docs/ListPhoneNumbersBackgroundJobsResponse.md @@ -0,0 +1,13 @@ + + +# ListPhoneNumbersBackgroundJobsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<PhoneNumbersJob>**](PhoneNumbersJob.md) | | [optional] +**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional] + + + diff --git a/docs/MessagingHostedNumberApi.md b/docs/MessagingHostedNumberApi.md index 3650d3cf..782e214f 100644 --- a/docs/MessagingHostedNumberApi.md +++ b/docs/MessagingHostedNumberApi.md @@ -177,8 +177,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); MessagingHostedNumberApi apiInstance = new MessagingHostedNumberApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListMessagingHostedNumberOrderResponse result = api.listMessagingHostedNumberOrder() .pageNumber(pageNumber) @@ -201,8 +201,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/MessagingProfilesApi.md b/docs/MessagingProfilesApi.md index 4a98bcab..252920d7 100644 --- a/docs/MessagingProfilesApi.md +++ b/docs/MessagingProfilesApi.md @@ -181,8 +181,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); MessagingProfilesApi apiInstance = new MessagingProfilesApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. UUID id = new UUID(); // UUID | The id of the messaging profile(s) to retrieve String timeFrame = "24h"; // String | The timeframe for which you'd like to retrieve metrics. try { @@ -209,8 +209,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] **id** | [**UUID**](.md)| The id of the messaging profile(s) to retrieve | [optional] **timeFrame** | **String**| The timeframe for which you'd like to retrieve metrics. | [optional] [default to 24h] [enum: 1h, 3h, 24h, 3d, 7d, 30d] @@ -262,8 +262,8 @@ public class Example { MessagingProfilesApi apiInstance = new MessagingProfilesApi(defaultClient); UUID id = new UUID(); // UUID | The id of the messaging profile to retrieve - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListMessagingProfilePhoneNumbersResponse result = api.listMessagingProfilePhoneNumbers(id) .pageNumber(pageNumber) @@ -287,8 +287,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | [**UUID**](.md)| The id of the messaging profile to retrieve | - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type @@ -338,8 +338,8 @@ public class Example { MessagingProfilesApi apiInstance = new MessagingProfilesApi(defaultClient); UUID id = new UUID(); // UUID | The id of the messaging profile to retrieve - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListMessagingProfileShortCodesResponse result = api.listMessagingProfileShortCodes(id) .pageNumber(pageNumber) @@ -363,8 +363,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | [**UUID**](.md)| The id of the messaging profile to retrieve | - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type @@ -413,8 +413,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); MessagingProfilesApi apiInstance = new MessagingProfilesApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListMessagingProfilesResponse result = api.listMessagingProfiles() .pageNumber(pageNumber) @@ -437,8 +437,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/MessagingUrlDomainsApi.md b/docs/MessagingUrlDomainsApi.md index b73c4c15..acd42154 100644 --- a/docs/MessagingUrlDomainsApi.md +++ b/docs/MessagingUrlDomainsApi.md @@ -35,8 +35,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); MessagingUrlDomainsApi apiInstance = new MessagingUrlDomainsApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListMessagingProfileUrlDomainsResponse result = api.listMessagingUrlDomains() .pageNumber(pageNumber) @@ -59,8 +59,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/NumberBackgroundJobsApi.md b/docs/NumberBackgroundJobsApi.md new file mode 100644 index 00000000..0c0d8547 --- /dev/null +++ b/docs/NumberBackgroundJobsApi.md @@ -0,0 +1,306 @@ +# NumberBackgroundJobsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createPhoneNumbersJobDeletePhoneNumbers**](NumberBackgroundJobsApi.md#createPhoneNumbersJobDeletePhoneNumbers) | **POST** /phone_numbers/jobs/delete_phone_numbers | Delete a batch of numbers +[**createPhoneNumbersJobUpdateEmergencySettings**](NumberBackgroundJobsApi.md#createPhoneNumbersJobUpdateEmergencySettings) | **POST** /phone_numbers/jobs/update_emergency_settings | Update the emergency settings from a batch of numbers +[**listPhoneNumbersJobs**](NumberBackgroundJobsApi.md#listPhoneNumbersJobs) | **GET** /phone_numbers/jobs | Lists the phone numbers jobs +[**retrievePhoneNumbersJob**](NumberBackgroundJobsApi.md#retrievePhoneNumbersJob) | **GET** /phone_numbers/jobs/{id} | Retrieve a phone numbers job + + + +## createPhoneNumbersJobDeletePhoneNumbers + +> PhoneNumbersJobDeletePhoneNumbers createPhoneNumbersJobDeletePhoneNumbers().phoneNumbersJobDeletePhoneNumbersRequest(phoneNumbersJobDeletePhoneNumbersRequest).execute(); + +Delete a batch of numbers + +Creates a new background job to delete a batch of numbers. At most one thousand numbers can be updated per API call. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.NumberBackgroundJobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + NumberBackgroundJobsApi apiInstance = new NumberBackgroundJobsApi(defaultClient); + PhoneNumbersJobDeletePhoneNumbersRequest phoneNumbersJobDeletePhoneNumbersRequest = new PhoneNumbersJobDeletePhoneNumbersRequest(); // PhoneNumbersJobDeletePhoneNumbersRequest | + try { + PhoneNumbersJobDeletePhoneNumbers result = api.createPhoneNumbersJobDeletePhoneNumbers() + .phoneNumbersJobDeletePhoneNumbersRequest(phoneNumbersJobDeletePhoneNumbersRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NumberBackgroundJobsApi#createPhoneNumbersJobDeletePhoneNumbers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phoneNumbersJobDeletePhoneNumbersRequest** | [**PhoneNumbersJobDeletePhoneNumbersRequest**](PhoneNumbersJobDeletePhoneNumbersRequest.md)| | + +### Return type + +[**PhoneNumbersJobDeletePhoneNumbers**](PhoneNumbersJobDeletePhoneNumbers.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Phone numbers job delete phone numbers requested. | - | +| **0** | Unexpected error | - | + + +## createPhoneNumbersJobUpdateEmergencySettings + +> PhoneNumbersEnableEmergency createPhoneNumbersJobUpdateEmergencySettings(phoneNumbersJobUpdateEmergencySettingsRequest) + +Update the emergency settings from a batch of numbers + +Creates a background job to update the emergency settings of a collection of phone numbers. At most one thousand numbers can be updated per API call. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.NumberBackgroundJobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + NumberBackgroundJobsApi apiInstance = new NumberBackgroundJobsApi(defaultClient); + PhoneNumbersJobUpdateEmergencySettingsRequest phoneNumbersJobUpdateEmergencySettingsRequest = new PhoneNumbersJobUpdateEmergencySettingsRequest(); // PhoneNumbersJobUpdateEmergencySettingsRequest | + try { + PhoneNumbersEnableEmergency result = apiInstance.createPhoneNumbersJobUpdateEmergencySettings(phoneNumbersJobUpdateEmergencySettingsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NumberBackgroundJobsApi#createPhoneNumbersJobUpdateEmergencySettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phoneNumbersJobUpdateEmergencySettingsRequest** | [**PhoneNumbersJobUpdateEmergencySettingsRequest**](PhoneNumbersJobUpdateEmergencySettingsRequest.md)| | + +### Return type + +[**PhoneNumbersEnableEmergency**](PhoneNumbersEnableEmergency.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Phone numbers enable emergency requested. | - | +| **0** | Unexpected error | - | + + +## listPhoneNumbersJobs + +> ListPhoneNumbersBackgroundJobsResponse listPhoneNumbersJobs().filterType(filterType).pageNumber(pageNumber).pageSize(pageSize).sort(sort).execute(); + +Lists the phone numbers jobs + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.NumberBackgroundJobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + NumberBackgroundJobsApi apiInstance = new NumberBackgroundJobsApi(defaultClient); + String filterType = update_emergency_settings; // String | Filter the phone number jobs by type. + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String sort = created_at; // String | Specifies the sort order for results. If not given, results are sorted by created_at in descending order. + try { + ListPhoneNumbersBackgroundJobsResponse result = api.listPhoneNumbersJobs() + .filterType(filterType) + .pageNumber(pageNumber) + .pageSize(pageSize) + .sort(sort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NumberBackgroundJobsApi#listPhoneNumbersJobs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filterType** | **String**| Filter the phone number jobs by type. | [optional] [enum: update_emergency_settings, delete_phone_numbers] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **sort** | **String**| Specifies the sort order for results. If not given, results are sorted by created_at in descending order. | [optional] [enum: created_at] + +### Return type + +[**ListPhoneNumbersBackgroundJobsResponse**](ListPhoneNumbersBackgroundJobsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response with a list of phone numbers background jobs. | - | +| **0** | Unexpected error | - | + + +## retrievePhoneNumbersJob + +> PhoneNumbersJob retrievePhoneNumbersJob(id).execute(); + +Retrieve a phone numbers job + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.NumberBackgroundJobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + NumberBackgroundJobsApi apiInstance = new NumberBackgroundJobsApi(defaultClient); + String id = "id_example"; // String | Identifies the Phone Numbers Job. + try { + PhoneNumbersJob result = api.retrievePhoneNumbersJob(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NumberBackgroundJobsApi#retrievePhoneNumbersJob"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the Phone Numbers Job. | + +### Return type + +[**PhoneNumbersJob**](PhoneNumbersJob.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Phone numbers job details. | - | +| **0** | Unexpected error | - | + diff --git a/docs/NumberConfigurationsApi.md b/docs/NumberConfigurationsApi.md index f45e9d22..49ce2ae7 100644 --- a/docs/NumberConfigurationsApi.md +++ b/docs/NumberConfigurationsApi.md @@ -161,7 +161,7 @@ Name | Type | Description | Notes ## listPhoneNumbers -> ListPhoneNumbersResponse listPhoneNumbers().pageNumber(pageNumber).pageSize(pageSize).filterTag(filterTag).filterPhoneNumber(filterPhoneNumber).filterStatus(filterStatus).filterVoiceConnectionNameContains(filterVoiceConnectionNameContains).filterVoiceConnectionNameStartsWith(filterVoiceConnectionNameStartsWith).filterVoiceConnectionNameEndsWith(filterVoiceConnectionNameEndsWith).filterVoiceConnectionNameEq(filterVoiceConnectionNameEq).filterUsagePaymentMethod(filterUsagePaymentMethod).filterBillingGroupId(filterBillingGroupId).filterEmergencyAddressId(filterEmergencyAddressId).sort(sort).execute(); +> ListPhoneNumbersResponse listPhoneNumbers().pageNumber(pageNumber).pageSize(pageSize).filterTag(filterTag).filterPhoneNumber(filterPhoneNumber).filterStatus(filterStatus).filterVoiceConnectionNameContains(filterVoiceConnectionNameContains).filterVoiceConnectionNameStartsWith(filterVoiceConnectionNameStartsWith).filterVoiceConnectionNameEndsWith(filterVoiceConnectionNameEndsWith).filterVoiceConnectionNameEq(filterVoiceConnectionNameEq).filterUsagePaymentMethod(filterUsagePaymentMethod).filterBillingGroupId(filterBillingGroupId).filterEmergencyAddressId(filterEmergencyAddressId).filterCustomerReference(filterCustomerReference).sort(sort).execute(); List phone numbers @@ -186,8 +186,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); NumberConfigurationsApi apiInstance = new NumberConfigurationsApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. String filterTag = "filterTag_example"; // String | Filter by phone number tags. String filterPhoneNumber = "filterPhoneNumber_example"; // String | Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned. String filterStatus = active; // String | Filter by phone number status. @@ -198,6 +198,7 @@ public class Example { String filterUsagePaymentMethod = channel; // String | Filter by usage_payment_method. String filterBillingGroupId = 62e4bf2e-c278-4282-b524-488d9c9c43b2; // String | Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'. String filterEmergencyAddressId = 9102160989215728032; // String | Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'. + String filterCustomerReference = MY REF 001; // String | Filter numbers via the customer_reference set. String sort = connection_name; // String | Specifies the sort order for results. If not given, results are sorted by created_at in descending order. try { ListPhoneNumbersResponse result = api.listPhoneNumbers() @@ -213,6 +214,7 @@ public class Example { .filterUsagePaymentMethod(filterUsagePaymentMethod) .filterBillingGroupId(filterBillingGroupId) .filterEmergencyAddressId(filterEmergencyAddressId) + .filterCustomerReference(filterCustomerReference) .sort(sort) .execute(); System.out.println(result); @@ -232,8 +234,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] **filterTag** | **String**| Filter by phone number tags. | [optional] **filterPhoneNumber** | **String**| Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned. | [optional] **filterStatus** | **String**| Filter by phone number status. | [optional] [enum: purchase_pending, purchase_failed, port_pending, active, deleted, port_failed, emergency_only, ported_out, port_out_pending] @@ -244,6 +246,7 @@ Name | Type | Description | Notes **filterUsagePaymentMethod** | **String**| Filter by usage_payment_method. | [optional] [enum: pay-per-minute, channel] **filterBillingGroupId** | **String**| Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'. | [optional] **filterEmergencyAddressId** | **String**| Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'. | [optional] + **filterCustomerReference** | **String**| Filter numbers via the customer_reference set. | [optional] **sort** | **String**| Specifies the sort order for results. If not given, results are sorted by created_at in descending order. | [optional] [enum: purchased_at, phone_number, connection_name, usage_payment_method] ### Return type @@ -293,8 +296,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); NumberConfigurationsApi apiInstance = new NumberConfigurationsApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListMessagingSettingsResponse result = api.listPhoneNumbersWithMessagingSettings() .pageNumber(pageNumber) @@ -317,8 +320,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type @@ -342,7 +345,7 @@ Name | Type | Description | Notes ## listPhoneNumbersWithVoiceSettings -> ListPhoneNumbersWithVoiceSettingsResponse listPhoneNumbersWithVoiceSettings().pageNumber(pageNumber).pageSize(pageSize).filterPhoneNumber(filterPhoneNumber).filterConnectionNameContains(filterConnectionNameContains).filterUsagePaymentMethod(filterUsagePaymentMethod).sort(sort).execute(); +> ListPhoneNumbersWithVoiceSettingsResponse listPhoneNumbersWithVoiceSettings().pageNumber(pageNumber).pageSize(pageSize).filterPhoneNumber(filterPhoneNumber).filterConnectionNameContains(filterConnectionNameContains).filterCustomerReference(filterCustomerReference).filterUsagePaymentMethod(filterUsagePaymentMethod).sort(sort).execute(); List phone numbers with voice settings @@ -367,10 +370,11 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); NumberConfigurationsApi apiInstance = new NumberConfigurationsApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. String filterPhoneNumber = "filterPhoneNumber_example"; // String | Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned. String filterConnectionNameContains = test; // String | Filter contains connection name. Requires at least three characters. + String filterCustomerReference = "filterCustomerReference_example"; // String | Filter numbers via the customer_reference set. String filterUsagePaymentMethod = channel; // String | Filter by usage_payment_method. String sort = connection_name; // String | Specifies the sort order for results. If not given, results are sorted by created_at in descending order. try { @@ -379,6 +383,7 @@ public class Example { .pageSize(pageSize) .filterPhoneNumber(filterPhoneNumber) .filterConnectionNameContains(filterConnectionNameContains) + .filterCustomerReference(filterCustomerReference) .filterUsagePaymentMethod(filterUsagePaymentMethod) .sort(sort) .execute(); @@ -399,10 +404,11 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] **filterPhoneNumber** | **String**| Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned. | [optional] **filterConnectionNameContains** | **String**| Filter contains connection name. Requires at least three characters. | [optional] + **filterCustomerReference** | **String**| Filter numbers via the customer_reference set. | [optional] **filterUsagePaymentMethod** | **String**| Filter by usage_payment_method. | [optional] [enum: pay-per-minute, channel] **sort** | **String**| Specifies the sort order for results. If not given, results are sorted by created_at in descending order. | [optional] [enum: purchased_at, phone_number, connection_name, usage_payment_method] diff --git a/docs/NumberOrderDocumentsApi.md b/docs/NumberOrderDocumentsApi.md index 006fec5f..85b17aea 100644 --- a/docs/NumberOrderDocumentsApi.md +++ b/docs/NumberOrderDocumentsApi.md @@ -114,8 +114,8 @@ public class Example { String filterRequirementId = "filterRequirementId_example"; // String | Filter number order documents by `requirement_id`. String filterCreatedAtGt = "filterCreatedAtGt_example"; // String | Filter number order documents after this datetime. String filterCreatedAtLt = "filterCreatedAtLt_example"; // String | Filter number order documents from before this datetime. - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListNumberOrderDocumentsResponse result = api.listNumberOrderDocuments() .filterRequirementId(filterRequirementId) @@ -144,8 +144,8 @@ Name | Type | Description | Notes **filterRequirementId** | **String**| Filter number order documents by `requirement_id`. | [optional] **filterCreatedAtGt** | **String**| Filter number order documents after this datetime. | [optional] **filterCreatedAtLt** | **String**| Filter number order documents from before this datetime. | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/NumberOrderRegulatoryRequirementsApi.md b/docs/NumberOrderRegulatoryRequirementsApi.md index 36c29b7c..e6dda14e 100644 --- a/docs/NumberOrderRegulatoryRequirementsApi.md +++ b/docs/NumberOrderRegulatoryRequirementsApi.md @@ -42,8 +42,8 @@ public class Example { String filterRequirementId = "filterRequirementId_example"; // String | Filter number order regulatory requirements by `requirement_id`. String filterFieldType = "filterFieldType_example"; // String | Filter number order regulatory requirements by `field_type`. String filterRequirementType = "filterRequirementType_example"; // String | Filter number order regulatory requirements by `requirement_type`. - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListNumberOrderRegulatoryRequirementsResponse result = api.listNumberOrderRegulatoryRequirements() .filterRequirementId(filterRequirementId) @@ -72,8 +72,8 @@ Name | Type | Description | Notes **filterRequirementId** | **String**| Filter number order regulatory requirements by `requirement_id`. | [optional] **filterFieldType** | **String**| Filter number order regulatory requirements by `field_type`. | [optional] **filterRequirementType** | **String**| Filter number order regulatory requirements by `requirement_type`. | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type @@ -125,8 +125,8 @@ public class Example { NumberOrderRegulatoryRequirementsApi apiInstance = new NumberOrderRegulatoryRequirementsApi(defaultClient); List filterPhoneNumber = Arrays.asList(); // List | The list of phone numbers to retrieve regulatory requirements for. - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListPhoneNumberRegulatoryRequirementsResponse result = api.listPhoneNumberRegulatoryRequirements() .filterPhoneNumber(filterPhoneNumber) @@ -151,8 +151,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **filterPhoneNumber** | [**List<String>**](String.md)| The list of phone numbers to retrieve regulatory requirements for. | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/NumberOrdersApi.md b/docs/NumberOrdersApi.md index 07b6de3d..e7f9ed0c 100644 --- a/docs/NumberOrdersApi.md +++ b/docs/NumberOrdersApi.md @@ -117,8 +117,8 @@ public class Example { String filterPhoneNumbersPhoneNumber = "filterPhoneNumbersPhoneNumber_example"; // String | Filter number orders having these phone numbers. String filterCustomerReference = "filterCustomerReference_example"; // String | Filter number orders via the customer reference set. Boolean filterRequirementsMet = true; // Boolean | Filter number orders by requirements met. - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListNumberOrdersResponse result = api.listNumberOrders() .filterStatus(filterStatus) @@ -153,8 +153,8 @@ Name | Type | Description | Notes **filterPhoneNumbersPhoneNumber** | **String**| Filter number orders having these phone numbers. | [optional] **filterCustomerReference** | **String**| Filter number orders via the customer reference set. | [optional] **filterRequirementsMet** | **Boolean**| Filter number orders by requirements met. | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/NumberReservationsApi.md b/docs/NumberReservationsApi.md index d78528fb..3e656e80 100644 --- a/docs/NumberReservationsApi.md +++ b/docs/NumberReservationsApi.md @@ -187,8 +187,8 @@ public class Example { String filterCreatedAtLt = "filterCreatedAtLt_example"; // String | Filter number reservations earlier than this value. String filterPhoneNumbersPhoneNumber = "filterPhoneNumbersPhoneNumber_example"; // String | Filter number reservations having these phone numbers. String filterCustomerReference = "filterCustomerReference_example"; // String | Filter number reservations via the customer reference set. - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListNumberReservationsResponse result = api.listNumberReservations() .filterStatus(filterStatus) @@ -221,8 +221,8 @@ Name | Type | Description | Notes **filterCreatedAtLt** | **String**| Filter number reservations earlier than this value. | [optional] **filterPhoneNumbersPhoneNumber** | **String**| Filter number reservations having these phone numbers. | [optional] **filterCustomerReference** | **String**| Filter number reservations via the customer reference set. | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/OutboundCallRecording.md b/docs/OutboundCallRecording.md new file mode 100644 index 00000000..f590dbf3 --- /dev/null +++ b/docs/OutboundCallRecording.md @@ -0,0 +1,43 @@ + + +# OutboundCallRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callRecordingType** | [**CallRecordingTypeEnum**](#CallRecordingTypeEnum) | Specifies which calls are recorded. | [optional] +**callRecordingCallerPhoneNumbers** | **List<String>** | When call_recording_type is 'by_caller_phone_number', only outbound calls using one of these numbers will be recorded. Numbers must be specified in E164 format. | [optional] +**callRecordingChannels** | [**CallRecordingChannelsEnum**](#CallRecordingChannelsEnum) | When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B. | [optional] +**callRecordingFormat** | [**CallRecordingFormatEnum**](#CallRecordingFormatEnum) | The audio file format for calls being recorded. | [optional] + + + +## Enum: CallRecordingTypeEnum + +Name | Value +---- | ----- +ALL | "all" +NONE | "none" +BY_CALLER_PHONE_NUMBER | "by_caller_phone_number" + + + +## Enum: CallRecordingChannelsEnum + +Name | Value +---- | ----- +SINGLE | "single" +DUAL | "dual" + + + +## Enum: CallRecordingFormatEnum + +Name | Value +---- | ----- +WAV | "wav" +MP3 | "mp3" + + + diff --git a/docs/OutboundIp.md b/docs/OutboundIp.md new file mode 100644 index 00000000..95834ed8 --- /dev/null +++ b/docs/OutboundIp.md @@ -0,0 +1,55 @@ + + +# OutboundIp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callParkingEnabled** | **Boolean** | Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next. | [optional] +**aniOverride** | **String** | Set a phone number as the ani_override value to override caller id number on outbound calls. | [optional] +**aniOverrideType** | [**AniOverrideTypeEnum**](#AniOverrideTypeEnum) | Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. | [optional] +**channelLimit** | **Integer** | When set, this will limit the total number of outbound calls to phone numbers associated with this connection. | [optional] +**instantRingbackEnabled** | **Boolean** | When set, ringback will not wait for indication before sending ringback tone to calling party. | [optional] +**generateRingbackTone** | **Boolean** | Generate ringback tone through 183 session progress message with early media. | [optional] +**localization** | **String** | A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default. | [optional] +**t38ReinviteSource** | [**T38ReinviteSourceEnum**](#T38ReinviteSourceEnum) | This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. | [optional] +**techPrefix** | **String** | Numerical chars only, exactly 4 characters. | [optional] +**ipAuthenticationMethod** | [**IpAuthenticationMethodEnum**](#IpAuthenticationMethodEnum) | | [optional] +**ipAuthenticationToken** | **String** | | [optional] +**outboundVoiceProfileId** | **String** | Identifies the associated outbound voice profile. | [optional] + + + +## Enum: AniOverrideTypeEnum + +Name | Value +---- | ----- +ALWAYS | "always" +NORMAL | "normal" +EMERGENCY | "emergency" + + + +## Enum: T38ReinviteSourceEnum + +Name | Value +---- | ----- +TELNYX | "telnyx" +CUSTOMER | "customer" +DISABLED | "disabled" +PASSTHRU | "passthru" +CALLER_PASSTHRU | "caller-passthru" +CALLEE_PASSTHRU | "callee-passthru" + + + +## Enum: IpAuthenticationMethodEnum + +Name | Value +---- | ----- +TECH_PREFIXP_CHARGE_INFO | "tech-prefixp-charge-info" +TOKEN | "token" + + + diff --git a/docs/OutboundVoiceProfile.md b/docs/OutboundVoiceProfile.md new file mode 100644 index 00000000..32e651e9 --- /dev/null +++ b/docs/OutboundVoiceProfile.md @@ -0,0 +1,29 @@ + + +# OutboundVoiceProfile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the resource. | [optional] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**name** | **String** | A user-supplied name to help with organization. | [optional] +**connectionsCount** | **Integer** | Amount of connections associated with this outbound voice profile. | [optional] +**trafficType** | [**TrafficType**](TrafficType.md) | | [optional] +**servicePlan** | [**ServicePlan**](ServicePlan.md) | | [optional] +**concurrentCallLimit** | **Integer** | Must be no more than your global concurrent call limit. Null means no limit. | [optional] +**enabled** | **Boolean** | Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. | [optional] +**tags** | **List<String>** | | [optional] +**usagePaymentMethod** | [**UsagePaymentMethod**](UsagePaymentMethod.md) | | [optional] +**whitelistedDestinations** | **List<String>** | The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. | [optional] +**maxDestinationRate** | [**BigDecimal**](BigDecimal.md) | Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. | [optional] +**dailySpendLimit** | **String** | The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. | [optional] +**dailySpendLimitEnabled** | **Boolean** | Specifies whether to enforce the daily_spend_limit on this outbound voice profile. | [optional] +**callRecording** | [**OutboundCallRecording**](OutboundCallRecording.md) | | [optional] +**billingGroupId** | [**UUID**](UUID.md) | The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). | [optional] +**createdAt** | **String** | ISO 8601 formatted date-time indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date-time indicating when the resource was updated. | [optional] + + + diff --git a/docs/OutboundVoiceProfileResponse.md b/docs/OutboundVoiceProfileResponse.md new file mode 100644 index 00000000..4ec1bffe --- /dev/null +++ b/docs/OutboundVoiceProfileResponse.md @@ -0,0 +1,12 @@ + + +# OutboundVoiceProfileResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**OutboundVoiceProfile**](OutboundVoiceProfile.md) | | [optional] + + + diff --git a/docs/OutboundVoiceProfilesApi.md b/docs/OutboundVoiceProfilesApi.md new file mode 100644 index 00000000..a365bb3d --- /dev/null +++ b/docs/OutboundVoiceProfilesApi.md @@ -0,0 +1,390 @@ +# OutboundVoiceProfilesApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createOutboundVoiceProfile**](OutboundVoiceProfilesApi.md#createOutboundVoiceProfile) | **POST** /outbound_voice_profiles | Create an outbound voice profile +[**deleteOutboundVoiceProfile**](OutboundVoiceProfilesApi.md#deleteOutboundVoiceProfile) | **DELETE** /outbound_voice_profiles/{id} | Delete an outbound voice profile +[**listOutboundVoiceProfiles**](OutboundVoiceProfilesApi.md#listOutboundVoiceProfiles) | **GET** /outbound_voice_profiles | Get all outbound voice profiles +[**retrieveOutboundVoiceProfile**](OutboundVoiceProfilesApi.md#retrieveOutboundVoiceProfile) | **GET** /outbound_voice_profiles/{id} | Retrieve an outbound voice profile +[**updateOutboundVoiceProfile**](OutboundVoiceProfilesApi.md#updateOutboundVoiceProfile) | **PATCH** /outbound_voice_profiles/{id} | Updates an existing outbound voice profile. + + + +## createOutboundVoiceProfile + +> OutboundVoiceProfileResponse createOutboundVoiceProfile(createOutboundVoiceProfileRequest) + +Create an outbound voice profile + +Create an outbound voice profile. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.OutboundVoiceProfilesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + OutboundVoiceProfilesApi apiInstance = new OutboundVoiceProfilesApi(defaultClient); + CreateOutboundVoiceProfileRequest createOutboundVoiceProfileRequest = new CreateOutboundVoiceProfileRequest(); // CreateOutboundVoiceProfileRequest | Parameters that can be defined when creating an outbound voice profile + try { + OutboundVoiceProfileResponse result = apiInstance.createOutboundVoiceProfile(createOutboundVoiceProfileRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OutboundVoiceProfilesApi#createOutboundVoiceProfile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createOutboundVoiceProfileRequest** | [**CreateOutboundVoiceProfileRequest**](CreateOutboundVoiceProfileRequest.md)| Parameters that can be defined when creating an outbound voice profile | + +### Return type + +[**OutboundVoiceProfileResponse**](OutboundVoiceProfileResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## deleteOutboundVoiceProfile + +> OutboundVoiceProfileResponse deleteOutboundVoiceProfile(id) + +Delete an outbound voice profile + +Deletes an existing outbound voice profile. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.OutboundVoiceProfilesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + OutboundVoiceProfilesApi apiInstance = new OutboundVoiceProfilesApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + try { + OutboundVoiceProfileResponse result = apiInstance.deleteOutboundVoiceProfile(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OutboundVoiceProfilesApi#deleteOutboundVoiceProfile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**OutboundVoiceProfileResponse**](OutboundVoiceProfileResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## listOutboundVoiceProfiles + +> ListOutboundVoiceProfilesResponse listOutboundVoiceProfiles().pageNumber(pageNumber).pageSize(pageSize).filterNameContains(filterNameContains).sort(sort).execute(); + +Get all outbound voice profiles + +Get all outbound voice profiles belonging to the user that match the given filters. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.OutboundVoiceProfilesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + OutboundVoiceProfilesApi apiInstance = new OutboundVoiceProfilesApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterNameContains = office-profile; // String | Optional filter on outbound voice profile name. + String sort = name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • name: sorts the result by the name field in ascending order.
  • -name: sorts the result by the name field in descending order.

+ try { + ListOutboundVoiceProfilesResponse result = api.listOutboundVoiceProfiles() + .pageNumber(pageNumber) + .pageSize(pageSize) + .filterNameContains(filterNameContains) + .sort(sort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OutboundVoiceProfilesApi#listOutboundVoiceProfiles"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterNameContains** | **String**| Optional filter on outbound voice profile name. | [optional] + **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code>-</code> prefix.<br/><br/> That is: <ul> <li> <code>name</code>: sorts the result by the <code>name</code> field in ascending order. </li> <li> <code>-name</code>: sorts the result by the <code>name</code> field in descending order. </li> </ul> <br/> | [optional] [default to -created_at] [enum: enabled, -enabled, created_at, -created_at, name, -name, service_plan, -service_plan, traffic_type, -traffic_type, usage_payment_method, -usage_payment_method] + +### Return type + +[**ListOutboundVoiceProfilesResponse**](ListOutboundVoiceProfilesResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **422** | Bad request | - | + + +## retrieveOutboundVoiceProfile + +> OutboundVoiceProfileResponse retrieveOutboundVoiceProfile(id) + +Retrieve an outbound voice profile + +Retrieves the details of an existing outbound voice profile. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.OutboundVoiceProfilesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + OutboundVoiceProfilesApi apiInstance = new OutboundVoiceProfilesApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + try { + OutboundVoiceProfileResponse result = apiInstance.retrieveOutboundVoiceProfile(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OutboundVoiceProfilesApi#retrieveOutboundVoiceProfile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**OutboundVoiceProfileResponse**](OutboundVoiceProfileResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## updateOutboundVoiceProfile + +> OutboundVoiceProfileResponse updateOutboundVoiceProfile(id, updateOutboundVoiceProfileRequest) + +Updates an existing outbound voice profile. + +Updates an existing outbound voice profile. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.OutboundVoiceProfilesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + OutboundVoiceProfilesApi apiInstance = new OutboundVoiceProfilesApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + UpdateOutboundVoiceProfileRequest updateOutboundVoiceProfileRequest = new UpdateOutboundVoiceProfileRequest(); // UpdateOutboundVoiceProfileRequest | Parameters that can be updated on an outbound voice profile + try { + OutboundVoiceProfileResponse result = apiInstance.updateOutboundVoiceProfile(id, updateOutboundVoiceProfileRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OutboundVoiceProfilesApi#updateOutboundVoiceProfile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + **updateOutboundVoiceProfileRequest** | [**UpdateOutboundVoiceProfileRequest**](UpdateOutboundVoiceProfileRequest.md)| Parameters that can be updated on an outbound voice profile | + +### Return type + +[**OutboundVoiceProfileResponse**](OutboundVoiceProfileResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + diff --git a/docs/PhoneNumberDetailed.md b/docs/PhoneNumberDetailed.md index aaf0faf3..30e20f4f 100644 --- a/docs/PhoneNumberDetailed.md +++ b/docs/PhoneNumberDetailed.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **tags** | **List<String>** | A list of user-assigned tags to help manage the phone number. | [optional] **externalPin** | **String** | If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, Telnyx will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism. | [optional] **connectionName** | **String** | The user-assigned name of the connection to be associated with this phone number. | [optional] [readonly] +**customerReference** | **String** | A customer reference string for customer look ups. | [optional] **connectionId** | **String** | Identifies the connection associated with the phone number. | [optional] **messagingProfileId** | **String** | Identifies the messaging profile associated with the phone number. | [optional] **messagingProfileName** | **String** | The name of the messaging profile associated with the phone number. | [optional] diff --git a/docs/PhoneNumberWithVoiceSettings.md b/docs/PhoneNumberWithVoiceSettings.md index 0727ce5c..62aaeb7e 100644 --- a/docs/PhoneNumberWithVoiceSettings.md +++ b/docs/PhoneNumberWithVoiceSettings.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **recordType** | **String** | Identifies the type of the resource. | [optional] [readonly] **phoneNumber** | **String** | The phone number in +E164 format. | [optional] [readonly] **connectionId** | **String** | Identifies the connection associated with this phone number. | [optional] +**customerReference** | **String** | A customer reference string for customer look ups. | [optional] **techPrefixEnabled** | **Boolean** | Controls whether a tech prefix is enabled for this phone number. | [optional] **translatedNumber** | **String** | This field allows you to rewrite the destination number of an inbound call before the call is routed to you. The value of this field may be any alphanumeric value, and the value will replace the number originally dialed. | [optional] **callForwarding** | [**CallForwarding**](CallForwarding.md) | | [optional] diff --git a/docs/PhoneNumbersEnableEmergency.md b/docs/PhoneNumbersEnableEmergency.md new file mode 100644 index 00000000..367c3665 --- /dev/null +++ b/docs/PhoneNumbersEnableEmergency.md @@ -0,0 +1,12 @@ + + +# PhoneNumbersEnableEmergency + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PhoneNumbersJob**](PhoneNumbersJob.md) | | [optional] + + + diff --git a/docs/PhoneNumbersJob.md b/docs/PhoneNumbersJob.md new file mode 100644 index 00000000..e1251618 --- /dev/null +++ b/docs/PhoneNumbersJob.md @@ -0,0 +1,12 @@ + + +# PhoneNumbersJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PhoneNumbersJob**](PhoneNumbersJob.md) | | [optional] + + + diff --git a/docs/PhoneNumbersJobDeletePhoneNumbers.md b/docs/PhoneNumbersJobDeletePhoneNumbers.md new file mode 100644 index 00000000..7c556c56 --- /dev/null +++ b/docs/PhoneNumbersJobDeletePhoneNumbers.md @@ -0,0 +1,12 @@ + + +# PhoneNumbersJobDeletePhoneNumbers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PhoneNumbersJob**](PhoneNumbersJob.md) | | [optional] + + + diff --git a/docs/PhoneNumbersJobDeletePhoneNumbersRequest.md b/docs/PhoneNumbersJobDeletePhoneNumbersRequest.md new file mode 100644 index 00000000..f83bbd20 --- /dev/null +++ b/docs/PhoneNumbersJobDeletePhoneNumbersRequest.md @@ -0,0 +1,12 @@ + + +# PhoneNumbersJobDeletePhoneNumbersRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumbers** | **List<String>** | | + + + diff --git a/docs/PhoneNumbersJobFailedOperation.md b/docs/PhoneNumbersJobFailedOperation.md new file mode 100644 index 00000000..3e167c78 --- /dev/null +++ b/docs/PhoneNumbersJobFailedOperation.md @@ -0,0 +1,14 @@ + + +# PhoneNumbersJobFailedOperation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumber** | **String** | The phone number in e164 format. | [optional] +**id** | **String** | The phone number's ID | [optional] +**errors** | [**List<Error>**](Error.md) | | [optional] + + + diff --git a/docs/PhoneNumbersJobSuccessfulOperation.md b/docs/PhoneNumbersJobSuccessfulOperation.md new file mode 100644 index 00000000..06281c9f --- /dev/null +++ b/docs/PhoneNumbersJobSuccessfulOperation.md @@ -0,0 +1,13 @@ + + +# PhoneNumbersJobSuccessfulOperation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumber** | **String** | The phone number in e164 format. | [optional] +**id** | **String** | The phone number's ID | [optional] + + + diff --git a/docs/PhoneNumbersJobUpdateEmergencySettingsRequest.md b/docs/PhoneNumbersJobUpdateEmergencySettingsRequest.md new file mode 100644 index 00000000..0aa2ab27 --- /dev/null +++ b/docs/PhoneNumbersJobUpdateEmergencySettingsRequest.md @@ -0,0 +1,14 @@ + + +# PhoneNumbersJobUpdateEmergencySettingsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumbers** | **List<String>** | | +**emergencyEnabled** | **Boolean** | Indicates whether to enable emergency services on this number. | +**emergencyAddressId** | **String** | Identifies the address to be used with emergency services. | + + + diff --git a/docs/ProgrammableFaxApplicationsApi.md b/docs/ProgrammableFaxApplicationsApi.md new file mode 100644 index 00000000..264c065d --- /dev/null +++ b/docs/ProgrammableFaxApplicationsApi.md @@ -0,0 +1,386 @@ +# ProgrammableFaxApplicationsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFaxApplication**](ProgrammableFaxApplicationsApi.md#createFaxApplication) | **POST** /fax_applications | Creates a Fax Application +[**deleteFaxApplication**](ProgrammableFaxApplicationsApi.md#deleteFaxApplication) | **DELETE** /fax_applications/{id} | Deletes a Fax Application +[**getFaxApplication**](ProgrammableFaxApplicationsApi.md#getFaxApplication) | **GET** /fax_applications/{id} | Retrieve a Fax Application +[**listFaxApplications**](ProgrammableFaxApplicationsApi.md#listFaxApplications) | **GET** /fax_applications | List all Fax Applications +[**updateFaxApplication**](ProgrammableFaxApplicationsApi.md#updateFaxApplication) | **PATCH** /fax_applications/{id} | Update a Fax Application + + + +## createFaxApplication + +> InlineResponse201 createFaxApplication(createFaxApplicationRequest) + +Creates a Fax Application + +Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the `/phone_numbers` endpoint. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.ProgrammableFaxApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ProgrammableFaxApplicationsApi apiInstance = new ProgrammableFaxApplicationsApi(defaultClient); + CreateFaxApplicationRequest createFaxApplicationRequest = new CreateFaxApplicationRequest(); // CreateFaxApplicationRequest | Parameters that can be set when creating a Fax Application + try { + InlineResponse201 result = apiInstance.createFaxApplication(createFaxApplicationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProgrammableFaxApplicationsApi#createFaxApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFaxApplicationRequest** | [**CreateFaxApplicationRequest**](CreateFaxApplicationRequest.md)| Parameters that can be set when creating a Fax Application | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful response | - | +| **422** | Bad request | - | + + +## deleteFaxApplication + +> InlineResponse201 deleteFaxApplication(id) + +Deletes a Fax Application + +Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.ProgrammableFaxApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ProgrammableFaxApplicationsApi apiInstance = new ProgrammableFaxApplicationsApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + try { + InlineResponse201 result = apiInstance.deleteFaxApplication(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProgrammableFaxApplicationsApi#deleteFaxApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## getFaxApplication + +> InlineResponse201 getFaxApplication(id) + +Retrieve a Fax Application + +Return the details of an existing Fax Application inside the 'data' attribute of the response. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.ProgrammableFaxApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ProgrammableFaxApplicationsApi apiInstance = new ProgrammableFaxApplicationsApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + try { + InlineResponse201 result = apiInstance.getFaxApplication(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProgrammableFaxApplicationsApi#getFaxApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## listFaxApplications + +> InlineResponse200 listFaxApplications(pageNumber, pageSize, filterApplicationNameContains, filterOutboundVoiceProfileId, sort) + +List all Fax Applications + +This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.ProgrammableFaxApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ProgrammableFaxApplicationsApi apiInstance = new ProgrammableFaxApplicationsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterApplicationNameContains = "\"null\""; // String | If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. + String filterOutboundVoiceProfileId = 1293384261075731499; // String | Identifies the associated outbound voice profile. + String sort = connection_name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order. + try { + InlineResponse200 result = apiInstance.listFaxApplications(pageNumber, pageSize, filterApplicationNameContains, filterOutboundVoiceProfileId, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProgrammableFaxApplicationsApi#listFaxApplications"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterApplicationNameContains** | **String**| If present, applications with <code>application_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. | [optional] [default to "null"] + **filterOutboundVoiceProfileId** | **String**| Identifies the associated outbound voice profile. | [optional] + **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. | [optional] [default to created_at] [enum: created_at, connection_name, active] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | + + +## updateFaxApplication + +> InlineResponse201 updateFaxApplication(id, updateFaxApplicationRequest) + +Update a Fax Application + +Updates settings of an existing Fax Application based on the parameters of the request. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.ProgrammableFaxApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + ProgrammableFaxApplicationsApi apiInstance = new ProgrammableFaxApplicationsApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + UpdateFaxApplicationRequest updateFaxApplicationRequest = new UpdateFaxApplicationRequest(); // UpdateFaxApplicationRequest | Parameters to be updated for the Fax Application + try { + InlineResponse201 result = apiInstance.updateFaxApplication(id, updateFaxApplicationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProgrammableFaxApplicationsApi#updateFaxApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + **updateFaxApplicationRequest** | [**UpdateFaxApplicationRequest**](UpdateFaxApplicationRequest.md)| Parameters to be updated for the Fax Application | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + diff --git a/docs/RecordingsCommandsApi.md b/docs/RecordingsCommandsApi.md index c4d03d4b..8f3beacd 100644 --- a/docs/RecordingsCommandsApi.md +++ b/docs/RecordingsCommandsApi.md @@ -41,8 +41,8 @@ public class Example { String filterConferenceId = 428c31b6-7af4-4bcb-b7f5-5013ef9657c1; // String | Return only recordings associated with a given conference String filterCreatedAtGte = 2019-03-29T11:10:00Z; // String | Return only recordings created later than or at given ISO 8601 datetime String filterCreatedAtLte = 2019-03-29T11:10:00Z; // String | Return only recordings created earlier than or at given ISO 8601 datetime - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. try { ListRecordingsResponse result = api.listRecordings() .filterConferenceId(filterConferenceId) @@ -71,8 +71,8 @@ Name | Type | Description | Notes **filterConferenceId** | **String**| Return only recordings associated with a given conference | [optional] **filterCreatedAtGte** | **String**| Return only recordings created later than or at given ISO 8601 datetime | [optional] **filterCreatedAtLte** | **String**| Return only recordings created earlier than or at given ISO 8601 datetime | [optional] - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] ### Return type diff --git a/docs/ServicePlan.md b/docs/ServicePlan.md new file mode 100644 index 00000000..4dca1b10 --- /dev/null +++ b/docs/ServicePlan.md @@ -0,0 +1,15 @@ + + +# ServicePlan + +## Enum + + +* `US` (value: `"us"`) + +* `INTERNATIONAL` (value: `"international"`) + +* `GLOBAL` (value: `"global"`) + + + diff --git a/docs/ShortCodesApi.md b/docs/ShortCodesApi.md index a1b2c013..d0464dad 100644 --- a/docs/ShortCodesApi.md +++ b/docs/ShortCodesApi.md @@ -37,8 +37,8 @@ public class Example { bearerAuth.setBearerToken("BEARER TOKEN"); ShortCodesApi apiInstance = new ShortCodesApi(defaultClient); - Integer pageNumber = 1; // Integer | The page number to load - Integer pageSize = 20; // Integer | The size of the page + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. String filterMessagingProfileId = "filterMessagingProfileId_example"; // String | Filter by Messaging Profile ID. Use the string `null` for phone numbers without assigned profiles. A synonym for the `/messaging_profiles/{id}/short_codes` endpoint when querying about an extant profile. try { ListShortCodesResponse result = api.listShortCodes() @@ -63,8 +63,8 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageNumber** | **Integer**| The page number to load | [optional] [default to 1] - **pageSize** | **Integer**| The size of the page | [optional] [default to 20] + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] **filterMessagingProfileId** | **String**| Filter by Messaging Profile ID. Use the string `null` for phone numbers without assigned profiles. A synonym for the `/messaging_profiles/{id}/short_codes` endpoint when querying about an extant profile. | [optional] ### Return type diff --git a/docs/TeXmlApplicationsApi.md b/docs/TeXmlApplicationsApi.md new file mode 100644 index 00000000..206d8582 --- /dev/null +++ b/docs/TeXmlApplicationsApi.md @@ -0,0 +1,386 @@ +# TeXmlApplicationsApi + +All URIs are relative to *https://api.telnyx.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createTexmlApplication**](TeXmlApplicationsApi.md#createTexmlApplication) | **POST** /texml_applications | Creates a TeXML Application +[**deleteTexmlApplication**](TeXmlApplicationsApi.md#deleteTexmlApplication) | **DELETE** /texml_applications/{id} | Deletes a TeXML Application +[**findTexmlApplications**](TeXmlApplicationsApi.md#findTexmlApplications) | **GET** /texml_applications | List all TeXML Applications +[**getTexmlApplication**](TeXmlApplicationsApi.md#getTexmlApplication) | **GET** /texml_applications/{id} | Retrieve a TeXML Application +[**updateTexmlApplication**](TeXmlApplicationsApi.md#updateTexmlApplication) | **PATCH** /texml_applications/{id} | Update a TeXML Application + + + +## createTexmlApplication + +> InlineResponse2011 createTexmlApplication(createTexmlApplicationRequest) + +Creates a TeXML Application + +Creates a TeXML Application. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.TeXmlApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient); + CreateTexmlApplicationRequest createTexmlApplicationRequest = new CreateTexmlApplicationRequest(); // CreateTexmlApplicationRequest | Parameters that can be set when creating a TeXML Application + try { + InlineResponse2011 result = apiInstance.createTexmlApplication(createTexmlApplicationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TeXmlApplicationsApi#createTexmlApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createTexmlApplicationRequest** | [**CreateTexmlApplicationRequest**](CreateTexmlApplicationRequest.md)| Parameters that can be set when creating a TeXML Application | + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful response | - | +| **422** | Bad request | - | + + +## deleteTexmlApplication + +> InlineResponse2011 deleteTexmlApplication(id) + +Deletes a TeXML Application + +Deletes a TeXML Application. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.TeXmlApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + try { + InlineResponse2011 result = apiInstance.deleteTexmlApplication(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TeXmlApplicationsApi#deleteTexmlApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## findTexmlApplications + +> InlineResponse2001 findTexmlApplications(pageNumber, pageSize, filterFriendlyNameContains, filterOutboundVoiceProfileId, sort) + +List all TeXML Applications + +Returns a list of your TeXML Applications. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.TeXmlApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient); + Integer pageNumber = 1; // Integer | The page number to load. + Integer pageSize = 20; // Integer | The size of the page. + String filterFriendlyNameContains = "\"null\""; // String | If present, applications with friendly_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. + String filterOutboundVoiceProfileId = 1293384261075731499; // String | Identifies the associated outbound voice profile. + String sort = connection_name; // String | Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:
  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order. + try { + InlineResponse2001 result = apiInstance.findTexmlApplications(pageNumber, pageSize, filterFriendlyNameContains, filterOutboundVoiceProfileId, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TeXmlApplicationsApi#findTexmlApplications"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageNumber** | **Integer**| The page number to load. | [optional] [default to 1] + **pageSize** | **Integer**| The size of the page. | [optional] [default to 20] + **filterFriendlyNameContains** | **String**| If present, applications with <code>friendly_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. | [optional] [default to "null"] + **filterOutboundVoiceProfileId** | **String**| Identifies the associated outbound voice profile. | [optional] + **sort** | **String**| Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. | [optional] [default to created_at] [enum: created_at, connection_name, active] + +### Return type + +[**InlineResponse2001**](InlineResponse2001.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | + + +## getTexmlApplication + +> InlineResponse2011 getTexmlApplication(id) + +Retrieve a TeXML Application + +Retrieves the details of an existing TeXML Application. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.TeXmlApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + try { + InlineResponse2011 result = apiInstance.getTexmlApplication(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TeXmlApplicationsApi#getTexmlApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + + +## updateTexmlApplication + +> InlineResponse2011 updateTexmlApplication(id, updateTexmlApplicationRequest) + +Update a TeXML Application + +Updates settings of an existing TeXML Application. + +### Example + +```java +// Import classes: +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.*; +import com.telnyx.sdk.api.TeXmlApplicationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.telnyx.com/v2"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + TeXmlApplicationsApi apiInstance = new TeXmlApplicationsApi(defaultClient); + String id = 1293384261075731499; // String | Identifies the resource. + UpdateTexmlApplicationRequest updateTexmlApplicationRequest = new UpdateTexmlApplicationRequest(); // UpdateTexmlApplicationRequest | Parameters that can be updated in a TeXML Application + try { + InlineResponse2011 result = apiInstance.updateTexmlApplication(id, updateTexmlApplicationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TeXmlApplicationsApi#updateTexmlApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifies the resource. | + **updateTexmlApplicationRequest** | [**UpdateTexmlApplicationRequest**](UpdateTexmlApplicationRequest.md)| Parameters that can be updated in a TeXML Application | + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful response | - | +| **401** | Unauthorized | - | +| **404** | Resource not found | - | +| **422** | Bad request | - | + diff --git a/docs/TexmlApplication.md b/docs/TexmlApplication.md new file mode 100644 index 00000000..6130b7ec --- /dev/null +++ b/docs/TexmlApplication.md @@ -0,0 +1,46 @@ + + +# TexmlApplication + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Identifies the resource. | [optional] [readonly] +**recordType** | **String** | Identifies the type of the resource. | [optional] +**friendlyName** | **String** | A user-assigned name to help manage the application. | [optional] +**active** | **Boolean** | Specifies whether the connection can be used. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**firstCommandTimeout** | **Boolean** | Specifies whether calls to phone numbers associated with this connection should hangup after timing out. | [optional] +**firstCommandTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a dial command. | [optional] +**voiceUrl** | **String** | URL to which Telnyx will deliver your XML Translator webhooks. | [optional] +**voiceFallbackUrl** | **String** | URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. | [optional] +**voiceMethod** | [**VoiceMethodEnum**](#VoiceMethodEnum) | HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. | [optional] +**statusCallback** | **String** | URL for Telnyx to send requests to containing information about call progress events. | [optional] +**statusCallbackMethod** | [**StatusCallbackMethodEnum**](#StatusCallbackMethodEnum) | HTTP request method Telnyx should use when requesting the status_callback URL. | [optional] +**inbound** | [**CreateTexmlApplicationRequestInbound**](CreateTexmlApplicationRequestInbound.md) | | [optional] +**outbound** | [**CreateTexmlApplicationRequestOutbound**](CreateTexmlApplicationRequestOutbound.md) | | [optional] +**createdAt** | **String** | ISO 8601 formatted date indicating when the resource was created. | [optional] +**updatedAt** | **String** | ISO 8601 formatted date indicating when the resource was updated. | [optional] + + + +## Enum: VoiceMethodEnum + +Name | Value +---- | ----- +GET | "get" +POST | "post" + + + +## Enum: StatusCallbackMethodEnum + +Name | Value +---- | ----- +GET | "get" +POST | "post" + + + diff --git a/docs/TrafficType.md b/docs/TrafficType.md new file mode 100644 index 00000000..43a15526 --- /dev/null +++ b/docs/TrafficType.md @@ -0,0 +1,13 @@ + + +# TrafficType + +## Enum + + +* `CONVERSATIONAL` (value: `"conversational"`) + +* `SHORT_DURATION` (value: `"short_duration"`) + + + diff --git a/docs/UpdateCredentialConnectionRequest.md b/docs/UpdateCredentialConnectionRequest.md new file mode 100644 index 00000000..24651c0a --- /dev/null +++ b/docs/UpdateCredentialConnectionRequest.md @@ -0,0 +1,48 @@ + + +# UpdateCredentialConnectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Defaults to true | [optional] +**userName** | **String** | The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). | [optional] +**password** | **String** | The password to be used as part of the credentials. Must be 8 to 128 characters long. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | [optional] +**sipUriCallingPreference** | [**SipUriCallingPreferenceEnum**](#SipUriCallingPreferenceEnum) | This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**inbound** | [**CredentialInbound**](CredentialInbound.md) | | [optional] +**outbound** | [**CredentialOutbound**](CredentialOutbound.md) | | [optional] + + + +## Enum: SipUriCallingPreferenceEnum + +Name | Value +---- | ----- +DISABLED | "disabled" +UNRESTRICTED | "unrestricted" +INTERNAL | "internal" + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/UpdateFaxApplicationRequest.md b/docs/UpdateFaxApplicationRequest.md new file mode 100644 index 00000000..b9189191 --- /dev/null +++ b/docs/UpdateFaxApplicationRequest.md @@ -0,0 +1,19 @@ + + +# UpdateFaxApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applicationName** | **String** | A user-assigned name to help manage the application. | +**active** | **Boolean** | Specifies whether the connection can be used. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**inbound** | [**CreateFaxApplicationRequestInbound**](CreateFaxApplicationRequestInbound.md) | | [optional] +**outbound** | [**CreateFaxApplicationRequestOutbound**](CreateFaxApplicationRequestOutbound.md) | | [optional] + + + diff --git a/docs/UpdateFqdnConnectionRequest.md b/docs/UpdateFqdnConnectionRequest.md new file mode 100644 index 00000000..3bb7f70c --- /dev/null +++ b/docs/UpdateFqdnConnectionRequest.md @@ -0,0 +1,35 @@ + + +# UpdateFqdnConnectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Defaults to true | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | [optional] +**transportProtocol** | [**FqdnConnectionTransportProtocol**](FqdnConnectionTransportProtocol.md) | | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**inbound** | [**InboundFqdn**](InboundFqdn.md) | | [optional] + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/UpdateFqdnRequest.md b/docs/UpdateFqdnRequest.md new file mode 100644 index 00000000..c9494413 --- /dev/null +++ b/docs/UpdateFqdnRequest.md @@ -0,0 +1,15 @@ + + +# UpdateFqdnRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connectionId** | **String** | ID of the FQDN connection to which this IP should be attached. | [optional] +**fqdn** | **String** | FQDN represented by this resource. | [optional] +**port** | **Integer** | Port to use when connecting to this FQDN. | [optional] +**dnsRecordType** | **String** | The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. | [optional] + + + diff --git a/docs/UpdateIpConnectionRequest.md b/docs/UpdateIpConnectionRequest.md new file mode 100644 index 00000000..2e622146 --- /dev/null +++ b/docs/UpdateIpConnectionRequest.md @@ -0,0 +1,46 @@ + + +# UpdateIpConnectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | Defaults to true | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**connectionName** | **String** | | [optional] +**transportProtocol** | [**TransportProtocolEnum**](#TransportProtocolEnum) | One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. | [optional] +**defaultOnHoldComfortNoiseEnabled** | **Boolean** | When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**encodeContactHeaderEnabled** | **Boolean** | Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. | [optional] +**encryptedMedia** | [**EncryptedMedia**](EncryptedMedia.md) | | [optional] +**onnetT38PassthroughEnabled** | **Boolean** | Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. | [optional] +**webhookEventUrl** | **String** | The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. | [optional] +**webhookEventFailoverUrl** | **String** | The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. | [optional] +**webhookApiVersion** | [**WebhookApiVersionEnum**](#WebhookApiVersionEnum) | Determines which webhook format will be used, Telnyx API v1 or v2. | [optional] +**webhookTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a webhook. | [optional] +**rtcpSettings** | [**ConnectionRtcpSettings**](ConnectionRtcpSettings.md) | | [optional] +**inbound** | [**InboundIp**](InboundIp.md) | | [optional] +**outbound** | [**OutboundIp**](OutboundIp.md) | | [optional] + + + +## Enum: TransportProtocolEnum + +Name | Value +---- | ----- +UDP | "UDP" +TCP | "TCP" +TLS | "TLS" + + + +## Enum: WebhookApiVersionEnum + +Name | Value +---- | ----- +_1 | "1" +_2 | "2" + + + diff --git a/docs/UpdateIpRequest.md b/docs/UpdateIpRequest.md new file mode 100644 index 00000000..cce736b2 --- /dev/null +++ b/docs/UpdateIpRequest.md @@ -0,0 +1,14 @@ + + +# UpdateIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connectionId** | **String** | ID of the IP Connection to which this IP should be attached. | [optional] +**ipAddress** | **String** | IP adddress represented by this resource. | +**port** | **Integer** | Port to use when connecting to this IP. | [optional] + + + diff --git a/docs/UpdateOutboundVoiceProfileRequest.md b/docs/UpdateOutboundVoiceProfileRequest.md new file mode 100644 index 00000000..3f61d44a --- /dev/null +++ b/docs/UpdateOutboundVoiceProfileRequest.md @@ -0,0 +1,24 @@ + + +# UpdateOutboundVoiceProfileRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | A user-supplied name to help with organization. | [optional] +**trafficType** | [**TrafficType**](TrafficType.md) | | [optional] +**servicePlan** | [**ServicePlan**](ServicePlan.md) | | [optional] +**concurrentCallLimit** | **Integer** | Must be no more than your global concurrent call limit. Null means no limit. | [optional] +**enabled** | **Boolean** | Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. | [optional] +**tags** | **List<String>** | | [optional] +**usagePaymentMethod** | [**UsagePaymentMethod**](UsagePaymentMethod.md) | | [optional] +**whitelistedDestinations** | **List<String>** | The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. | [optional] +**maxDestinationRate** | [**BigDecimal**](BigDecimal.md) | Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. | [optional] +**dailySpendLimit** | **String** | The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. | [optional] +**dailySpendLimitEnabled** | **Boolean** | Specifies whether to enforce the daily_spend_limit on this outbound voice profile. | [optional] +**callRecording** | [**OutboundCallRecording**](OutboundCallRecording.md) | | [optional] +**billingGroupId** | [**UUID**](UUID.md) | The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). | [optional] + + + diff --git a/docs/UpdatePhoneNumberRequest.md b/docs/UpdatePhoneNumberRequest.md index 8daff4e9..5a3dd928 100644 --- a/docs/UpdatePhoneNumberRequest.md +++ b/docs/UpdatePhoneNumberRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **id** | **String** | Identifies the type of resource. | [optional] [readonly] **tags** | **List<String>** | A list of user-assigned tags to help organize phone numbers. | [optional] **externalPin** | **String** | If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, we will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism. | [optional] +**customerReference** | **String** | A customer reference string for customer look ups. | [optional] **connectionId** | **String** | Identifies the connection associated with the phone number. | [optional] **billingGroupId** | **String** | Identifies the billing group associated with the phone number. | [optional] diff --git a/docs/UpdateTexmlApplicationRequest.md b/docs/UpdateTexmlApplicationRequest.md new file mode 100644 index 00000000..779b49df --- /dev/null +++ b/docs/UpdateTexmlApplicationRequest.md @@ -0,0 +1,42 @@ + + +# UpdateTexmlApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**friendlyName** | **String** | A user-assigned name to help manage the application. | +**active** | **Boolean** | Specifies whether the connection can be used. | [optional] +**anchorsiteOverride** | [**AnchorsiteOverride**](AnchorsiteOverride.md) | | [optional] +**dtmfType** | [**DtmfType**](DtmfType.md) | | [optional] +**firstCommandTimeout** | **Boolean** | Specifies whether calls to phone numbers associated with this connection should hangup after timing out. | [optional] +**firstCommandTimeoutSecs** | **Integer** | Specifies how many seconds to wait before timing out a dial command. | [optional] +**voiceUrl** | **String** | URL to which Telnyx will deliver your XML Translator webhooks. | +**voiceFallbackUrl** | **String** | URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. | [optional] +**voiceMethod** | [**VoiceMethodEnum**](#VoiceMethodEnum) | HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. | [optional] +**statusCallback** | **String** | URL for Telnyx to send requests to containing information about call progress events. | [optional] +**statusCallbackMethod** | [**StatusCallbackMethodEnum**](#StatusCallbackMethodEnum) | HTTP request method Telnyx should use when requesting the status_callback URL. | [optional] +**inbound** | [**CreateTexmlApplicationRequestInbound**](CreateTexmlApplicationRequestInbound.md) | | [optional] +**outbound** | [**CreateTexmlApplicationRequestOutbound**](CreateTexmlApplicationRequestOutbound.md) | | [optional] + + + +## Enum: VoiceMethodEnum + +Name | Value +---- | ----- +GET | "get" +POST | "post" + + + +## Enum: StatusCallbackMethodEnum + +Name | Value +---- | ----- +GET | "get" +POST | "post" + + + diff --git a/docs/UsagePaymentMethod.md b/docs/UsagePaymentMethod.md new file mode 100644 index 00000000..80b8f042 --- /dev/null +++ b/docs/UsagePaymentMethod.md @@ -0,0 +1,13 @@ + + +# UsagePaymentMethod + +## Enum + + +* `TARIFF` (value: `"tariff"`) + +* `RATE_DECK` (value: `"rate-deck"`) + + + diff --git a/docs/WebhookApiVersion.md b/docs/WebhookApiVersion.md new file mode 100644 index 00000000..944c967f --- /dev/null +++ b/docs/WebhookApiVersion.md @@ -0,0 +1,13 @@ + + +# WebhookApiVersion + +## Enum + + +* `_1` (value: `"1"`) + +* `_2` (value: `"2"`) + + + diff --git a/openapi-configuration/open-api_java_sdk_config.json b/openapi-configuration/open-api_java_sdk_config.json index 8c92848d..3b0390f9 100644 --- a/openapi-configuration/open-api_java_sdk_config.json +++ b/openapi-configuration/open-api_java_sdk_config.json @@ -1,5 +1,5 @@ { - "artifactVersion" : "2.2.0", + "artifactVersion" : "2.3.0", "java8" : true, "dateLibrary" : "java8", "groupId" : "com.telnyx.sdk", diff --git a/openapi-configuration/spec3.json b/openapi-configuration/spec3.json index 9db9b701..0c4f63a8 100644 --- a/openapi-configuration/spec3.json +++ b/openapi-configuration/spec3.json @@ -39,10 +39,34 @@ "name": "Conference Commands", "description": "Conference command operations" }, + { + "name": "Connections", + "description": "Connections operations" + }, + { + "name": "Credential Connections", + "description": "Credential connection operations" + }, { "name": "Debugging", "description": "Call Control debugging" }, + { + "name": "FQDN Connections", + "description": "FQDN connection operations" + }, + { + "name": "FQDNs", + "description": "FQDN operations" + }, + { + "name": "IP Connections", + "description": "IP connection operations" + }, + { + "name": "IPs", + "description": "IP operations" + }, { "name": "Messages", "description": "Messages" @@ -59,6 +83,10 @@ "name": "Messaging URL Domains", "description": "Messaging URL Domains" }, + { + "name": "Number Background Jobs", + "description": "Background jobs performed over a batch of phone numbers" + }, { "name": "Number Configurations", "description": "Configure your phone numbers" @@ -83,6 +111,14 @@ "name": "Number Search", "description": "Number search" }, + { + "name": "Outbound Voice Profiles", + "description": "Outbound voice profiles operations" + }, + { + "name": "Programmable Fax Applications", + "description": "Fax Applications operations" + }, { "name": "Recordings Commands", "description": "Recordings commands operations" @@ -90,6 +126,10 @@ { "name": "Short Codes", "description": "Short codes" + }, + { + "name": "TeXML Applications", + "description": "TeXML Applications operations" } ], "paths": { @@ -3013,439 +3053,447 @@ "x-latency-category": "interactive" } }, - "/messages": { - "post": { - "summary": "Send a message", - "description": "Send a message with a Phone Number, Alphanumeric Sender ID, Short Code or Number Pool.\n\nThis endpoint allows you to send a message with any messaging resource.\nCurrent messaging resources include: long-code, short-code, number-pool, and\nalphanumeric-sender-id.\n", - "operationId": "createMessage", + "/connections": { + "get": { + "description": "Returns a list of your connections irrespective of type.", + "summary": "List connections", + "operationId": "listConnections", "tags": [ - "Messages" + "Connections" ], - "requestBody": { - "description": "Message payload", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateMessageRequest" - } - } + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/FilterConnectionName" + }, + { + "$ref": "#/components/parameters/FilterOutboundVoiceProfileId" + }, + { + "$ref": "#/components/parameters/SortConnection" } - }, + ], "responses": { "200": { - "$ref": "#/components/responses/MessageResponse" + "$ref": "#/components/responses/ListConnectionsResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" - } - }, - "callbacks": { - "deliveryUpdate": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OutboundMessageEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." - } - } - } - } + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" } }, "x-latency-category": "responsive" } }, - "/messages/long_code": { - "post": { - "summary": "Send a long code message", - "operationId": "createLongCodeMessage", + "/connections/{id}": { + "get": { + "description": "Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type.", + "summary": "Retrieve a connection", + "operationId": "retrieveConnection", "tags": [ - "Messages" + "Connections" ], - "requestBody": { - "description": "Message payload", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLongCodeMessageRequest" - } + "parameters": [ + { + "name": "id", + "in": "path", + "description": "IP Connection ID", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "$ref": "#/components/responses/MessageResponse" + "$ref": "#/components/responses/ConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" - } - }, - "callbacks": { - "deliveryUpdate": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OutboundMessageEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." - } - } - } - } + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/messages/number_pool": { - "post": { - "summary": "Send a message using number pool", - "operationId": "createNumberPoolMessage", + "/credential_connections": { + "get": { + "description": "Returns a list of your credential connections.", + "summary": "List credential connections", + "operationId": "listCredentialConnections", "tags": [ - "Messages" + "Credential Connections" ], - "requestBody": { - "description": "Message payload", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNumberPoolMessageRequest" - } - } + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/FilterConnectionName" + }, + { + "$ref": "#/components/parameters/FilterInnerOutboundVoiceProfileId" + }, + { + "$ref": "#/components/parameters/SortConnection" } - }, + ], "responses": { "200": { - "$ref": "#/components/responses/MessageResponse" + "$ref": "#/components/responses/ListCredentialConnectionsResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" - } - }, - "callbacks": { - "deliveryUpdate": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OutboundMessageEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." - } - } - } - } + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" } }, "x-latency-category": "responsive" - } - }, - "/messages/short_code": { + }, "post": { - "summary": "Send a short code message", - "operationId": "createShortCodeMessage", + "description": "Creates a credential connection.", + "summary": "Create a credential connection", + "operationId": "createCredentialConnection", "tags": [ - "Messages" + "Credential Connections" ], + "parameters": [], "requestBody": { - "description": "Message payload", + "description": "Parameters that can be defined during credential connection creation", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateShortCodeMessageRequest" + "$ref": "#/components/schemas/CreateCredentialConnectionRequest" } } } }, "responses": { - "200": { - "$ref": "#/components/responses/MessageResponse" + "201": { + "$ref": "#/components/responses/CredentialConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" - } - }, - "callbacks": { - "deliveryUpdate": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OutboundMessageEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." - } - } - } - } + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/messages/{id}": { - "get": { - "summary": "Retrieve a message", - "description": "Note: This API endpoint can only retrieve messages that are no older than 10 days since their creation. If you require messages older than this, please generate an [MDR report.](https://developers.telnyx.com/docs/api/v1/reports/MDR-Reports)", - "operationId": "retrieveMessage", + "/credential_connections/{id}": { + "delete": { + "description": "Deletes an existing credential connection.", + "summary": "Delete a credential connection", + "operationId": "deleteCredentialConnection", "tags": [ - "Messages" + "Credential Connections" ], "parameters": [ { "name": "id", "in": "path", - "description": "The id of the message", + "description": "Identifies the resource.", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "$ref": "#/components/responses/MessageResponse" + "$ref": "#/components/responses/CredentialConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" - } - }, - "/messaging_hosted_number_orders": { + }, "get": { - "summary": "List messaging hosted number orders", - "operationId": "listMessagingHostedNumberOrder", + "description": "Retrieves the details of an existing credential connection.", + "summary": "Retrieve a credential connection", + "operationId": "retrieveCredentialConnection", "tags": [ - "Messaging Hosted Number" + "Credential Connections" ], - "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" + "name": "id", + "in": "path", + "description": "Identifies the resource.", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "$ref": "#/components/responses/ListMessagingHostedNumberOrdersResponse" + "$ref": "#/components/responses/CredentialConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" } }, "x-latency-category": "responsive" }, - "post": { - "summary": "Create a messaging hosted number order", - "operationId": "createMessagingHostedNumberOrder", + "patch": { + "description": "Updates settings of an existing credential connection.", + "summary": "Update a credential connection", + "operationId": "updateCredentialConnection", "tags": [ - "Messaging Hosted Number" + "Credential Connections" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Identifies the resource.", + "required": true, + "schema": { + "type": "string" + } + } ], "requestBody": { - "description": "Message payload", + "description": "Parameters that can be updated in a credential connection", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMessagingHostedNumberOrderRequest" + "$ref": "#/components/schemas/UpdateCredentialConnectionRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/MessagingHostedNumberOrderResponse" + "$ref": "#/components/responses/CredentialConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/messaging_hosted_number_orders/{id}": { + "/fax_applications": { "get": { - "summary": "Retrieve a messaging hosted number order", - "operationId": "retrieveMessagingHostedNumberOrder", + "description": "This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx.", + "summary": "List all Fax Applications", + "operationId": "listFaxApplications", "tags": [ - "Messaging Hosted Number" + "Programmable Fax Applications" ], "parameters": [ { - "name": "id", - "in": "path", - "description": "Identifies the type of resource.", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/FilterApplicationName" + }, + { + "$ref": "#/components/parameters/FilterOutboundVoiceProfileId" + }, + { + "$ref": "#/components/parameters/SortConnection" } ], "responses": { "200": { - "$ref": "#/components/responses/MessagingHostedNumberOrderResponse" + "$ref": "#/components/responses/GetAllFaxApplicationsResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" } }, "x-latency-category": "responsive" - } - }, - "/messaging_hosted_number_orders/{id}/actions/file_upload": { + }, "post": { - "summary": "Upload file required for a messaging hosted number order", - "operationId": "uploadFileMessagingHostedNumberOrder", + "description": "Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the `/phone_numbers` endpoint.", + "summary": "Creates a Fax Application", + "operationId": "CreateFaxApplication", "tags": [ - "Messaging Hosted Number" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Identifies the type of resource.", - "required": true, - "schema": { - "type": "string" - } - } + "Programmable Fax Applications" ], + "parameters": [], "requestBody": { - "description": "Message payload", + "description": "Parameters that can be set when creating a Fax Application", + "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "$ref": "#/components/schemas/UploadFileMessagingHostedNumberOrderRequest" - }, - "encoding": { - "loa": { - "contentType": "application/pdf" - }, - "bill": { - "contentType": "application/pdf" - } + "$ref": "#/components/schemas/CreateFaxApplicationRequest" } } } }, "responses": { - "200": { - "$ref": "#/components/responses/MessagingHostedNumberOrderResponse" + "201": { + "$ref": "#/components/responses/FaxApplicationResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/messaging_hosted_numbers/{id}": { + "/fax_applications/{id}": { "delete": { - "summary": "Delete a messaging hosted number", - "operationId": "deleteMessagingHostedNumber", + "description": "Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers.", + "summary": "Deletes a Fax Application", + "operationId": "DeleteFaxApplication", "tags": [ - "Messaging Hosted Number" + "Programmable Fax Applications" ], "parameters": [ { - "name": "id", - "in": "path", - "description": "Identifies the type of resource.", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/id" } ], "responses": { "200": { - "$ref": "#/components/responses/MessagingHostedNumberResponse" + "$ref": "#/components/responses/FaxApplicationResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" - } - }, - "/messaging_profile_metrics": { + }, "get": { - "summary": "List messaging profile metrics", - "operationId": "listMessagingProfileMetrics", + "description": "Return the details of an existing Fax Application inside the 'data' attribute of the response.", + "summary": "Retrieve a Fax Application", + "operationId": "getFaxApplication", "tags": [ - "Messaging Profiles" + "Programmable Fax Applications" ], - "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/PageNumber" + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/FaxApplicationResponse" }, - { - "$ref": "#/components/parameters/PageSize" + "401": { + "description": "Unauthorized" }, - { - "$ref": "#/components/parameters/MessagingProfileMetric" + "404": { + "description": "Resource not found" }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" + }, + "patch": { + "description": "Updates settings of an existing Fax Application based on the parameters of the request.", + "summary": "Update a Fax Application", + "operationId": "UpdateFaxApplication", + "tags": [ + "Programmable Fax Applications" + ], + "parameters": [ { - "$ref": "#/components/parameters/MessagingProfileMetricTimeFrame" + "$ref": "#/components/parameters/id" } ], + "requestBody": { + "description": "Parameters to be updated for the Fax Application", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFaxApplicationRequest" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/ListMessagingProfileMetrics" + "$ref": "#/components/responses/FaxApplicationResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/messaging_profiles": { + "/fqdn_connections": { "get": { - "summary": "List messaging profiles", - "operationId": "listMessagingProfiles", + "description": "Returns a list of your FQDN connections.", + "summary": "List Fqdn connections", + "operationId": "listFqdnConnections", "tags": [ - "Messaging Profiles" + "FQDN Connections" ], "x-group-parameters": "true", "parameters": [ @@ -3454,393 +3502,475 @@ }, { "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/FilterConnectionName" + }, + { + "$ref": "#/components/parameters/SortConnection" } ], "responses": { "200": { - "$ref": "#/components/responses/ListMessagingProfilesResponse" + "$ref": "#/components/responses/ListFqdnConnectionsResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" } }, "x-latency-category": "responsive" }, "post": { - "summary": "Create a messaging profile", - "operationId": "createMessagingProfile", + "description": "Creates a FQDN connection.", + "summary": "Create an Fqdn connection", + "operationId": "createFqdnConnection", "tags": [ - "Messaging Profiles" + "FQDN Connections" ], + "parameters": [], "requestBody": { - "description": "New Messaging Profile object", + "description": "Parameters that can be defined during FQDN connection creation", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMessagingProfileRequest" + "$ref": "#/components/schemas/CreateFqdnConnectionRequest" } } } }, "responses": { - "200": { - "$ref": "#/components/responses/MessagingProfileResponse" + "201": { + "$ref": "#/components/responses/FqdnConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" - } - }, - "callbacks": { - "inboundMessage": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InboundMessageEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." - } - } - } - } - }, - "deliveryUpdate": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OutboundMessageEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." - } - } - } - } - }, - "replacedLinkClick": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReplacedLinkClickEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." - } - } - } - } + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/messaging_profiles/{id}": { + "/fqdn_connections/{id}": { "delete": { - "summary": "Delete a messaging profile", - "operationId": "deleteMessagingProfile", + "description": "Deletes an FQDN connection.", + "summary": "Delete an Fqdn connection", + "operationId": "deleteFqdnConnection", "tags": [ - "Messaging Profiles" + "FQDN Connections" ], "parameters": [ { - "$ref": "#/components/parameters/MessagingProfileId" + "name": "id", + "in": "path", + "description": "FQDN Connection ID", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "$ref": "#/components/responses/MessagingProfileResponse" + "$ref": "#/components/responses/FqdnConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" }, "get": { - "summary": "Retrieve a messaging profile", - "operationId": "retrieveMessagingProfile", + "description": "Retrieves the details of an existing FQDN connection.", + "summary": "Retrieve an Fqdn connection", + "operationId": "retrieveFqdnConnection", "tags": [ - "Messaging Profiles" + "FQDN Connections" ], "parameters": [ { - "$ref": "#/components/parameters/MessagingProfileId" + "name": "id", + "in": "path", + "description": "FQDN Connection ID", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "$ref": "#/components/responses/MessagingProfileResponse" + "$ref": "#/components/responses/FqdnConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" }, "patch": { - "summary": "Update a messaging profile", - "operationId": "updateMessagingProfile", + "description": "Updates settings of an existing FQDN connection.", + "summary": "Update an Fqdn connection", + "operationId": "updateFqdnConnection", "tags": [ - "Messaging Profiles" + "FQDN Connections" ], "parameters": [ { - "$ref": "#/components/parameters/MessagingProfileId" + "name": "id", + "in": "path", + "description": "FQDN Connection ID", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { - "description": "New Messaging Profile object", + "description": "Parameters that can be updated in a FQDN connection", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateMessagingProfileRequest" + "$ref": "#/components/schemas/UpdateFqdnConnectionRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/MessagingProfileResponse" + "$ref": "#/components/responses/FqdnConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/messaging_profiles/{id}/metrics": { + "/fqdns": { "get": { - "summary": "Retrieve messaging profile metrics", - "operationId": "retrieveMessagingProfileDetailedMetrics", + "summary": "List Fqdns", + "description": "Get all FQDNs belonging to the user that match the given filters.", + "operationId": "listFqdns", "tags": [ - "Messaging Profiles" + "FQDNs" ], "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/MessagingProfileId" + "$ref": "#/components/parameters/PageNumber" }, { - "$ref": "#/components/parameters/MessagingProfileMetricTimeFrame" + "$ref": "#/components/parameters/PageSize" + }, + { + "name": "filter[connection_id]", + "description": "ID of the FQDN connection to which the FQDN belongs.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "filter[fqdn]", + "description": "FQDN represented by the resource.", + "in": "query", + "schema": { + "type": "string", + "example": "example.com" + } + }, + { + "name": "filter[port]", + "description": "Port to use when connecting to the FQDN.", + "in": "query", + "schema": { + "type": "integer", + "example": 5060 + } + }, + { + "name": "filter[dns_record_type]", + "description": "DNS record type used by the FQDN.", + "in": "query", + "schema": { + "type": "string", + "example": "a" + } } ], "responses": { "200": { - "$ref": "#/components/responses/RetrieveMessagingProfileMetrics" + "$ref": "#/components/responses/ListFqdnsResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + } + }, + "x-latency-category": "responsive" + }, + "post": { + "description": "Create a new FQDN object.", + "summary": "Create an Fqdn", + "operationId": "createFqdn", + "tags": [ + "FQDNs" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFqdnRequest" + } + } + } + }, + "responses": { + "201": { + "$ref": "#/components/responses/FqdnResponse" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" } }, - "/messaging_profiles/{id}/phone_numbers": { - "get": { - "summary": "List phone numbers associated with a messaging profile", - "operationId": "listMessagingProfilePhoneNumbers", + "/fqdns/{id}": { + "delete": { + "description": "Delete an FQDN.", + "summary": "Delete an Fqdn", + "operationId": "deleteFqdn", "tags": [ - "Messaging Profiles" + "FQDNs" ], - "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" - }, - { - "$ref": "#/components/parameters/MessagingProfileId" + "$ref": "#/components/parameters/FqdnId" } ], "responses": { "200": { - "$ref": "#/components/responses/ListMessagingProfilePhoneNumbersResponse" + "$ref": "#/components/responses/FqdnResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" - } - }, - "/messaging_profiles/{id}/short_codes": { + }, "get": { - "summary": "List short codes associated with a messaging profile", - "operationId": "listMessagingProfileShortCodes", + "description": "Return the details regarding a specific FQDN.", + "summary": "Retrieve an Fqdn", + "operationId": "retrieveFqdn", "tags": [ - "Messaging Profiles" + "FQDNs" ], - "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" - }, - { - "$ref": "#/components/parameters/MessagingProfileId" + "$ref": "#/components/parameters/FqdnId" } ], "responses": { "200": { - "$ref": "#/components/responses/ListMessagingProfileShortCodesResponse" + "$ref": "#/components/responses/FqdnResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" - } - }, - "/messaging_url_domains": { - "get": { - "summary": "List messaging URL domains", - "operationId": "listMessagingUrlDomains", + }, + "patch": { + "description": "Update the details of a specific FQDN.", + "summary": "Update an Fqdn", + "operationId": "updateFqdn", "tags": [ - "Messaging URL Domains" + "FQDNs" ], - "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" + "$ref": "#/components/parameters/FqdnId" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFqdnRequest" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/ListMessagingUrlDomains" + "$ref": "#/components/responses/FqdnResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" } }, - "/number_order_documents": { + "/ip_connections": { "get": { - "summary": "List number order documents", - "description": "Gets a paginated list of number order documents.", - "operationId": "listNumberOrderDocuments", + "description": "Returns a list of your IP connections.", + "summary": "List Ip connections", + "operationId": "listIpConnections", "tags": [ - "Number Order Documents" + "IP Connections" ], "x-group-parameters": "true", "parameters": [ { - "name": "filter[requirement_id]", - "in": "query", - "description": "Filter number order documents by `requirement_id`.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/PageNumber" }, { - "name": "filter[created_at][gt]", - "in": "query", - "description": "Filter number order documents after this datetime.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/PageSize" }, { - "name": "filter[created_at][lt]", - "in": "query", - "description": "Filter number order documents from before this datetime.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/FilterConnectionName" }, { - "$ref": "#/components/parameters/PageNumber" + "$ref": "#/components/parameters/FilterInnerOutboundVoiceProfileId" }, { - "$ref": "#/components/parameters/PageSize" + "$ref": "#/components/parameters/SortConnection" } ], "responses": { "200": { - "$ref": "#/components/responses/ListNumberOrderDocumentsResponse" + "$ref": "#/components/responses/ListIpConnectionsResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" } }, "x-latency-category": "responsive" }, "post": { - "summary": "Create a number order document", - "description": "Upload a phone number order document.", - "operationId": "createNumberOrderDocument", + "description": "Creates an IP connection.", + "summary": "Create an Ip connection", + "operationId": "createIpConnection", "tags": [ - "Number Order Documents" + "IP Connections" ], + "parameters": [], "requestBody": { + "description": "Parameters that can be defined during IP connection creation", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateNumberOrderDocumentRequest" + "$ref": "#/components/schemas/CreateIpConnectionRequest" } } } }, "responses": { - "200": { - "$ref": "#/components/responses/NumberOrderDocumentResponse" + "201": { + "$ref": "#/components/responses/IpConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/number_order_documents/{number_order_document_id}": { + "/ip_connections/{id}": { + "delete": { + "description": "Deletes an existing IP connection.", + "summary": "Delete an Ip connection", + "operationId": "deleteIpConnection", + "tags": [ + "IP Connections" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Identifies the type of resource.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/IpConnectionResponse" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" + }, "get": { - "summary": "Retrieve a number order document", - "description": "Gets a single number order document.", - "operationId": "retrieveNumberOrderDocument", + "description": "Retrieves the details of an existing ip connection.", + "summary": "Retrieve an Ip connection", + "operationId": "retrieveIpConnection", "tags": [ - "Number Order Documents" + "IP Connections" ], "parameters": [ { - "name": "number_order_document_id", + "name": "id", "in": "path", - "description": "The number order document ID.", + "description": "IP Connection ID", "required": true, "schema": { "type": "string" @@ -3849,26 +3979,32 @@ ], "responses": { "200": { - "$ref": "#/components/responses/NumberOrderDocumentResponse" + "$ref": "#/components/responses/IpConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" }, "patch": { - "summary": "Update a number order document", - "description": "Updates a number order document.", - "operationId": "updateNumberOrderDocument", + "description": "Updates settings of an existing IP connection.", + "summary": "Update an Ip connection", + "operationId": "updateIpConnection", "tags": [ - "Number Order Documents" + "IP Connections" ], "parameters": [ { - "name": "number_order_document_id", + "name": "id", "in": "path", - "description": "The number order document ID.", + "description": "Identifies the type of resource.", "required": true, "schema": { "type": "string" @@ -3876,367 +4012,433 @@ } ], "requestBody": { + "description": "Parameters that can be updated in a IP connection", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateNumberOrderDocumentRequest" + "$ref": "#/components/schemas/UpdateIpConnectionRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/NumberOrderDocumentResponse" + "$ref": "#/components/responses/IpConnectionResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } }, - "/number_orders": { + "/ips": { "get": { - "summary": "List number orders", - "description": "Get a paginated list of number orders.", - "operationId": "listNumberOrders", + "summary": "List Ips", + "description": "Get all IPs belonging to the user that match the given filters.", + "operationId": "listIps", "tags": [ - "Number Orders" + "IPs" ], "x-group-parameters": "true", "parameters": [ { - "name": "filter[status]", - "in": "query", - "description": "Filter number orders by status.", - "schema": { - "type": "string" - } - }, - { - "name": "filter[created_at][gt]", - "in": "query", - "description": "Filter number orders later than this value.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/PageNumber" }, { - "name": "filter[created_at][lt]", - "in": "query", - "description": "Filter number orders earlier than this value.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/PageSize" }, { - "name": "filter[phone_numbers.phone_number]", + "name": "filter[connection_id]", + "description": "ID of the IP Connection to which this IP should be attached.", "in": "query", - "description": "Filter number orders having these phone numbers.", "schema": { "type": "string" } }, { - "name": "filter[customer_reference]", + "name": "filter[ip_address]", + "description": "IP adddress represented by this resource.", "in": "query", - "description": "Filter number orders via the customer reference set.", "schema": { - "type": "string" + "type": "string", + "example": "192.168.0.0" } }, { - "name": "filter[requirements_met]", + "name": "filter[port]", + "description": "Port to use when connecting to this IP.", "in": "query", - "description": "Filter number orders by requirements met.", "schema": { - "type": "boolean" + "type": "integer", + "example": 5060 } - }, - { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" } ], "responses": { "200": { - "$ref": "#/components/responses/ListNumberOrdersResponse" + "$ref": "#/components/responses/ListIpsResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" }, "post": { - "summary": "Create a number order", - "description": "Creates a phone number order.", - "operationId": "createNumberOrder", + "description": "Create a new IP object.", + "summary": "Create an Ip", + "operationId": "createIp", "tags": [ - "Number Orders" + "IPs" ], "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateNumberOrderRequest" + "$ref": "#/components/schemas/CreateIpRequest" } } } }, "responses": { - "200": { - "$ref": "#/components/responses/NumberOrderResponse" + "201": { + "$ref": "#/components/responses/IpResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" - } - }, - "callbacks": { - "numberOrderStatusUpdate": { - "{$request.body#/webhook_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NumberOrderedEvent" - } - } - } - }, - "responses": { - "200": { - "description": "The server must return a HTTP 200, otherwise we will reattempt to deliver the webhook to the failover URL." - } - } - } - } + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" } }, - "/number_orders/{number_order_id}": { + "/ips/{id}": { + "delete": { + "description": "Delete an IP.", + "summary": "Delete an Ip", + "operationId": "deleteIp", + "tags": [ + "IPs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IpId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/IpResponse" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + } + }, + "x-latency-category": "responsive" + }, "get": { - "summary": "Retrieve a number order", - "description": "Get an existing phone number order.", - "operationId": "retrieveNumberOrder", + "description": "Return the details regarding a specific IP.", + "summary": "Retrieve an Ip", + "operationId": "retrieveIp", "tags": [ - "Number Orders" + "IPs" ], "parameters": [ { - "name": "number_order_id", - "in": "path", - "description": "The number order ID.", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/IpId" } ], "responses": { "200": { - "$ref": "#/components/responses/NumberOrderResponse" + "$ref": "#/components/responses/IpResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" }, "patch": { - "summary": "Update a number order", - "description": "Updates a phone number order.", - "operationId": "updateNumberOrder", + "description": "Update the details of a specific IP.", + "summary": "Update an Ip", + "operationId": "updateIp", "tags": [ - "Number Orders" + "IPs" ], "parameters": [ { - "name": "number_order_id", - "in": "path", - "description": "The number order ID.", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/IpId" } ], "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateNumberOrderRequest" + "$ref": "#/components/schemas/UpdateIpRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/NumberOrderResponse" + "$ref": "#/components/responses/IpResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" } }, "x-latency-category": "responsive" } }, - "/number_reservations": { - "get": { - "summary": "List number reservations", - "description": "Gets a paginated list of phone number reservations.", - "operationId": "listNumberReservations", - "tags": [ - "Number Reservations" + "/messages": { + "post": { + "summary": "Send a message", + "description": "Send a message with a Phone Number, Alphanumeric Sender ID, Short Code or Number Pool.\n\nThis endpoint allows you to send a message with any messaging resource.\nCurrent messaging resources include: long-code, short-code, number-pool, and\nalphanumeric-sender-id.\n", + "operationId": "createMessage", + "tags": [ + "Messages" ], - "x-group-parameters": "true", - "parameters": [ - { - "name": "filter[status]", - "in": "query", - "description": "Filter number reservations by status.", - "schema": { - "type": "string" - } - }, - { - "name": "filter[created_at][gt]", - "in": "query", - "description": "Filter number reservations later than this value.", - "schema": { - "type": "string" - } - }, - { - "name": "filter[created_at][lt]", - "in": "query", - "description": "Filter number reservations earlier than this value.", - "schema": { - "type": "string" - } - }, - { - "name": "filter[phone_numbers.phone_number]", - "in": "query", - "description": "Filter number reservations having these phone numbers.", - "schema": { - "type": "string" + "requestBody": { + "description": "Message payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMessageRequest" + } } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/MessageResponse" }, - { - "name": "filter[customer_reference]", - "in": "query", - "description": "Filter number reservations via the customer reference set.", - "schema": { - "type": "string" + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "callbacks": { + "deliveryUpdate": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutboundMessageEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } } - }, - { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" } + }, + "x-latency-category": "responsive" + } + }, + "/messages/long_code": { + "post": { + "summary": "Send a long code message", + "operationId": "createLongCodeMessage", + "tags": [ + "Messages" ], + "requestBody": { + "description": "Message payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLongCodeMessageRequest" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/ListNumberReservationsResponse" + "$ref": "#/components/responses/MessageResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } }, + "callbacks": { + "deliveryUpdate": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutboundMessageEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } + } + } + }, "x-latency-category": "responsive" - }, + } + }, + "/messages/number_pool": { "post": { - "summary": "Create a number reservation", - "description": "Creates a Phone Number Reservation for multiple numbers.", - "operationId": "createNumberReservation", + "summary": "Send a message using number pool", + "operationId": "createNumberPoolMessage", "tags": [ - "Number Reservations" + "Messages" ], "requestBody": { - "required": true, + "description": "Message payload", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateNumberReservationRequest" + "$ref": "#/components/schemas/CreateNumberPoolMessageRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/NumberReservationResponse" + "$ref": "#/components/responses/MessageResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } }, + "callbacks": { + "deliveryUpdate": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutboundMessageEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } + } + } + }, "x-latency-category": "responsive" } }, - "/number_reservations/{number_reservation_id}": { - "get": { - "summary": "Retrieve a number reservation", - "description": "Gets a single phone number reservation.", - "operationId": "retrieveNumberReservation", + "/messages/short_code": { + "post": { + "summary": "Send a short code message", + "operationId": "createShortCodeMessage", "tags": [ - "Number Reservations" + "Messages" ], - "parameters": [ - { - "name": "number_reservation_id", - "in": "path", - "description": "The number reservation ID.", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "description": "Message payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShortCodeMessageRequest" + } } } - ], + }, "responses": { "200": { - "$ref": "#/components/responses/NumberReservationResponse" + "$ref": "#/components/responses/MessageResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } }, + "callbacks": { + "deliveryUpdate": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutboundMessageEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } + } + } + }, "x-latency-category": "responsive" } }, - "/number_reservations/{number_reservation_id}/actions/extend": { - "post": { - "summary": "Extend a number reservation", - "description": "Extends reservation expiry time on all phone numbers.", - "operationId": "extendNumberReservationExpiryTime", + "/messages/{id}": { + "get": { + "summary": "Retrieve a message", + "description": "Note: This API endpoint can only retrieve messages that are no older than 10 days since their creation. If you require messages older than this, please generate an [MDR report.](https://developers.telnyx.com/docs/api/v1/reports/MDR-Reports)", + "operationId": "retrieveMessage", "tags": [ - "Number Reservations" + "Messages" ], "parameters": [ { - "name": "number_reservation_id", + "name": "id", "in": "path", - "description": "The number reservation ID.", + "description": "The id of the message", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "$ref": "#/components/responses/NumberReservationResponse" + "$ref": "#/components/responses/MessageResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4245,27 +4447,15 @@ "x-latency-category": "responsive" } }, - "/phone_number_regulatory_requirements": { + "/messaging_hosted_number_orders": { "get": { - "summary": "List regulatory requirements per number", - "description": "Gets a paginated list of phone number regulatory requirements.", - "operationId": "listPhoneNumberRegulatoryRequirements", + "summary": "List messaging hosted number orders", + "operationId": "listMessagingHostedNumberOrder", "tags": [ - "Number Order Regulatory Requirements" + "Messaging Hosted Number" ], "x-group-parameters": "true", "parameters": [ - { - "name": "filter[phone_number]", - "in": "query", - "description": "The list of phone numbers to retrieve regulatory requirements for.", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, { "$ref": "#/components/parameters/PageNumber" }, @@ -4275,164 +4465,33 @@ ], "responses": { "200": { - "$ref": "#/components/responses/ListPhoneNumberRegulatoryRequirementsResponse" + "$ref": "#/components/responses/ListMessagingHostedNumberOrdersResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } }, "x-latency-category": "responsive" - } - }, - "/phone_numbers": { - "get": { - "summary": "List phone numbers", - "operationId": "listPhoneNumbers", + }, + "post": { + "summary": "Create a messaging hosted number order", + "operationId": "createMessagingHostedNumberOrder", "tags": [ - "Number Configurations" + "Messaging Hosted Number" ], - "x-group-parameters": "true", - "parameters": [ - { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" - }, - { - "name": "filter[tag]", - "in": "query", - "description": "Filter by phone number tags.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "filter[phone_number]", - "in": "query", - "description": "Filter by phone number. Requires at least three digits.\n Non-numerical characters will result in no values being returned.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "filter[status]", - "in": "query", - "description": "Filter by phone number status.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "purchase_pending", - "purchase_failed", - "port_pending", - "active", - "deleted", - "port_failed", - "emergency_only", - "ported_out", - "port_out_pending" - ], - "example": "active" - } - }, - { - "name": "filter[voice.connection_name][contains]", - "in": "query", - "description": "Filter contains connection name. Requires at least three characters.", - "required": false, - "schema": { - "type": "string", - "example": "test" - } - }, - { - "name": "filter[voice.connection_name][starts_with]", - "in": "query", - "description": "Filter starts with connection name. Requires at least three characters.", - "required": false, - "schema": { - "type": "string", - "example": "test" - } - }, - { - "name": "filter[voice.connection_name][ends_with]", - "in": "query", - "description": "Filter ends with connection name. Requires at least three characters.", - "required": false, - "schema": { - "type": "string", - "example": "test" - } - }, - { - "name": "filter[voice.connection_name][eq]", - "in": "query", - "description": "Filter by connection name.", - "required": false, - "schema": { - "type": "string", - "example": "test" - } - }, - { - "name": "filter[usage_payment_method]", - "in": "query", - "description": "Filter by usage_payment_method.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "pay-per-minute", - "channel" - ], - "example": "channel" - } - }, - { - "name": "filter[billing_group_id]", - "in": "query", - "description": "Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'.", - "required": false, - "schema": { - "type": "string", - "example": "62e4bf2e-c278-4282-b524-488d9c9c43b2" - } - }, - { - "name": "filter[emergency_address_id]", - "in": "query", - "description": "Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'.", - "required": false, - "schema": { - "type": "string", - "format": "int64", - "example": "9102160989215728032" - } - }, - { - "name": "sort", - "in": "query", - "description": "Specifies the sort order for results. If not given, results are sorted by created_at in descending order.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "purchased_at", - "phone_number", - "connection_name", - "usage_payment_method" - ], - "example": "connection_name" + "requestBody": { + "description": "Message payload", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMessagingHostedNumberOrderRequest" + } } } - ], + }, "responses": { "200": { - "$ref": "#/components/responses/ListPhoneNumbersResponse" + "$ref": "#/components/responses/MessagingHostedNumberOrderResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4441,62 +4500,94 @@ "x-latency-category": "responsive" } }, - "/phone_numbers/csv_downloads": { + "/messaging_hosted_number_orders/{id}": { "get": { - "summary": "List CSV downloads", - "operationId": "listCsvDownloads", + "summary": "Retrieve a messaging hosted number order", + "operationId": "retrieveMessagingHostedNumberOrder", "tags": [ - "CSV Downloads" + "Messaging Hosted Number" ], - "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" + "name": "id", + "in": "path", + "description": "Identifies the type of resource.", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "$ref": "#/components/responses/ListCsvDownloadsResponse" + "$ref": "#/components/responses/MessagingHostedNumberOrderResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } }, "x-latency-category": "responsive" - }, + } + }, + "/messaging_hosted_number_orders/{id}/actions/file_upload": { "post": { - "x-latency-category": "background", - "summary": "Create a CSV download", - "operationId": "createCsvDownload", + "summary": "Upload file required for a messaging hosted number order", + "operationId": "uploadFileMessagingHostedNumberOrder", "tags": [ - "CSV Downloads" + "Messaging Hosted Number" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Identifies the type of resource.", + "required": true, + "schema": { + "type": "string" + } + } ], + "requestBody": { + "description": "Message payload", + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/UploadFileMessagingHostedNumberOrderRequest" + }, + "encoding": { + "loa": { + "contentType": "application/pdf" + }, + "bill": { + "contentType": "application/pdf" + } + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/CsvDownloadResponse" + "$ref": "#/components/responses/MessagingHostedNumberOrderResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } - } + }, + "x-latency-category": "responsive" } }, - "/phone_numbers/csv_downloads/{id}": { - "get": { - "x-latency-category": "background", - "summary": "Retrieve a CSV download", - "operationId": "retrieveCsvDownload", + "/messaging_hosted_numbers/{id}": { + "delete": { + "summary": "Delete a messaging hosted number", + "operationId": "deleteMessagingHostedNumber", "tags": [ - "CSV Downloads" + "Messaging Hosted Number" ], "parameters": [ { "name": "id", "in": "path", - "description": "Identifies the CSV download.", + "description": "Identifies the type of resource.", "required": true, "schema": { "type": "string" @@ -4505,20 +4596,21 @@ ], "responses": { "200": { - "$ref": "#/components/responses/CsvDownloadResponse" + "$ref": "#/components/responses/MessagingHostedNumberResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } - } - } + }, + "x-latency-category": "responsive" + } }, - "/phone_numbers/messaging": { + "/messaging_profile_metrics": { "get": { - "summary": "List phone numbers with messaging settings", - "operationId": "listPhoneNumbersWithMessagingSettings", + "summary": "List messaging profile metrics", + "operationId": "listMessagingProfileMetrics", "tags": [ - "Number Configurations" + "Messaging Profiles" ], "x-group-parameters": "true", "parameters": [ @@ -4527,11 +4619,17 @@ }, { "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/MessagingProfileMetric" + }, + { + "$ref": "#/components/parameters/MessagingProfileMetricTimeFrame" } ], "responses": { "200": { - "$ref": "#/components/responses/ListPhoneNumbersWithMessagingSettingsResponse" + "$ref": "#/components/responses/ListMessagingProfileMetrics" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4540,12 +4638,12 @@ "x-latency-category": "responsive" } }, - "/phone_numbers/voice": { + "/messaging_profiles": { "get": { - "summary": "List phone numbers with voice settings", - "operationId": "listPhoneNumbersWithVoiceSettings", + "summary": "List messaging profiles", + "operationId": "listMessagingProfiles", "tags": [ - "Number Configurations" + "Messaging Profiles" ], "x-group-parameters": "true", "parameters": [ @@ -4554,83 +4652,126 @@ }, { "$ref": "#/components/parameters/PageSize" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListMessagingProfilesResponse" }, - { - "name": "filter[phone_number]", - "in": "query", - "description": "Filter by phone number. Requires at least three digits.\n Non-numerical characters will result in no values being returned.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "filter[connection_name][contains]", - "in": "query", - "description": "Filter contains connection name. Requires at least three characters.", - "required": false, - "schema": { - "type": "string", - "example": "test" - } - }, - { - "name": "filter[usage_payment_method]", - "in": "query", - "description": "Filter by usage_payment_method.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "pay-per-minute", - "channel" - ], - "example": "channel" - } - }, - { - "name": "sort", - "in": "query", - "description": "Specifies the sort order for results. If not given, results are sorted by created_at in descending order.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "purchased_at", - "phone_number", - "connection_name", - "usage_payment_method" - ], - "example": "connection_name" - } + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } + }, + "x-latency-category": "responsive" + }, + "post": { + "summary": "Create a messaging profile", + "operationId": "createMessagingProfile", + "tags": [ + "Messaging Profiles" ], + "requestBody": { + "description": "New Messaging Profile object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMessagingProfileRequest" + } + } + } + }, "responses": { "200": { - "$ref": "#/components/responses/ListPhoneNumbersWithVoiceSettingsResponse" + "$ref": "#/components/responses/MessagingProfileResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } }, + "callbacks": { + "inboundMessage": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InboundMessageEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } + } + }, + "deliveryUpdate": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutboundMessageEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } + } + }, + "replacedLinkClick": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplacedLinkClickEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL." + } + } + } + } + } + }, "x-latency-category": "responsive" } }, - "/phone_numbers/{id}": { + "/messaging_profiles/{id}": { "delete": { - "summary": "Delete a phone number", - "operationId": "deletePhoneNumber", + "summary": "Delete a messaging profile", + "operationId": "deleteMessagingProfile", "tags": [ - "Number Configurations" + "Messaging Profiles" ], "parameters": [ { - "$ref": "#/components/parameters/IntId" + "$ref": "#/components/parameters/MessagingProfileId" } ], "responses": { "200": { - "$ref": "#/components/responses/PhoneNumberResponse" + "$ref": "#/components/responses/MessagingProfileResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4639,19 +4780,19 @@ "x-latency-category": "responsive" }, "get": { - "summary": "Retrieve a phone number", - "operationId": "retrievePhoneNumber", + "summary": "Retrieve a messaging profile", + "operationId": "retrieveMessagingProfile", "tags": [ - "Number Configurations" + "Messaging Profiles" ], "parameters": [ { - "$ref": "#/components/parameters/IntId" + "$ref": "#/components/parameters/MessagingProfileId" } ], "responses": { "200": { - "$ref": "#/components/responses/PhoneNumberResponse" + "$ref": "#/components/responses/MessagingProfileResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4660,30 +4801,30 @@ "x-latency-category": "responsive" }, "patch": { - "summary": "Update a phone number", - "operationId": "updatePhoneNumber", + "summary": "Update a messaging profile", + "operationId": "updateMessagingProfile", "tags": [ - "Number Configurations" + "Messaging Profiles" ], "parameters": [ { - "$ref": "#/components/parameters/IntId" + "$ref": "#/components/parameters/MessagingProfileId" } ], "requestBody": { - "description": "Updated settings for the phone number.", + "description": "New Messaging Profile object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePhoneNumberRequest" + "$ref": "#/components/schemas/UpdateMessagingProfileRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/PhoneNumberResponse" + "$ref": "#/components/responses/MessagingProfileResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4692,60 +4833,85 @@ "x-latency-category": "responsive" } }, - "/phone_numbers/{id}/actions/enable_emergency": { - "post": { - "summary": "Enable emergency for a phone number", - "operationId": "enableEmergencyPhoneNumber", + "/messaging_profiles/{id}/metrics": { + "get": { + "summary": "Retrieve messaging profile metrics", + "operationId": "retrieveMessagingProfileDetailedMetrics", "tags": [ - "Number Configurations" + "Messaging Profiles" ], + "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/IntId" + "$ref": "#/components/parameters/MessagingProfileId" + }, + { + "$ref": "#/components/parameters/MessagingProfileMetricTimeFrame" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PhoneNumberEnableEmergencyRequest" - } - } + "responses": { + "200": { + "$ref": "#/components/responses/RetrieveMessagingProfileMetrics" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } }, + "x-latency-category": "responsive" + } + }, + "/messaging_profiles/{id}/phone_numbers": { + "get": { + "summary": "List phone numbers associated with a messaging profile", + "operationId": "listMessagingProfilePhoneNumbers", + "tags": [ + "Messaging Profiles" + ], + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/MessagingProfileId" + } + ], "responses": { "200": { - "description": "Phone number emergency enabled.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Phone Number Enable Emergency", - "properties": { - "data": { - "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" - } - } - } - } - } + "$ref": "#/components/responses/ListMessagingProfilePhoneNumbersResponse" }, - "202": { - "description": "Phone number emergency requested.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Phone Number Enable Emergency", - "properties": { - "data": { - "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" - } - } - } - } - } + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/messaging_profiles/{id}/short_codes": { + "get": { + "summary": "List short codes associated with a messaging profile", + "operationId": "listMessagingProfileShortCodes", + "tags": [ + "Messaging Profiles" + ], + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/MessagingProfileId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListMessagingProfileShortCodesResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4754,65 +4920,104 @@ "x-latency-category": "responsive" } }, - "/phone_numbers/{id}/messaging": { + "/messaging_url_domains": { "get": { - "summary": "Retrieve a phone number with messaging settings", - "operationId": "retrievePhoneNumberWithMessagingSettings", + "summary": "List messaging URL domains", + "operationId": "listMessagingUrlDomains", "tags": [ - "Number Configurations" + "Messaging URL Domains" ], + "x-group-parameters": "true", "parameters": [ { - "name": "id", - "in": "path", - "description": "Identifies the type of resource.", - "required": true, - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" } ], "responses": { "200": { - "$ref": "#/components/responses/PhoneNumberWithMessagingSettingsResponse" + "$ref": "#/components/responses/ListMessagingUrlDomains" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" } }, "x-latency-category": "responsive" - }, - "patch": { - "summary": "Update a phone number with messaging settings", - "operationId": "updatePhoneNumberWithMessagingSettings", + } + }, + "/number_order_documents": { + "get": { + "summary": "List number order documents", + "description": "Gets a paginated list of number order documents.", + "operationId": "listNumberOrderDocuments", "tags": [ - "Number Configurations" + "Number Order Documents" ], + "x-group-parameters": "true", "parameters": [ { - "name": "id", - "in": "path", - "description": "Identifies the type of resource.", - "required": true, + "name": "filter[requirement_id]", + "in": "query", + "description": "Filter number order documents by `requirement_id`.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[created_at][gt]", + "in": "query", + "description": "Filter number order documents after this datetime.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[created_at][lt]", + "in": "query", + "description": "Filter number order documents from before this datetime.", "schema": { "type": "string" } + }, + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListNumberOrderDocumentsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } + }, + "x-latency-category": "responsive" + }, + "post": { + "summary": "Create a number order document", + "description": "Upload a phone number order document.", + "operationId": "createNumberOrderDocument", + "tags": [ + "Number Order Documents" ], "requestBody": { - "description": "Updated messaging settings for the phone number", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePhoneNumberMessagingSettingsRequest" + "$ref": "#/components/schemas/CreateNumberOrderDocumentRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/PhoneNumberWithMessagingSettingsResponse" + "$ref": "#/components/responses/NumberOrderDocumentResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4821,21 +5026,28 @@ "x-latency-category": "responsive" } }, - "/phone_numbers/{id}/voice": { + "/number_order_documents/{number_order_document_id}": { "get": { - "summary": "Retrieve a phone number with voice settings", - "operationId": "retrievePhoneNumberWithVoiceSettings", + "summary": "Retrieve a number order document", + "description": "Gets a single number order document.", + "operationId": "retrieveNumberOrderDocument", "tags": [ - "Number Configurations" + "Number Order Documents" ], "parameters": [ { - "$ref": "#/components/parameters/IntId" + "name": "number_order_document_id", + "in": "path", + "description": "The number order document ID.", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "$ref": "#/components/responses/PhoneNumberWithVoiceSettingsResponse" + "$ref": "#/components/responses/NumberOrderDocumentResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4844,30 +5056,36 @@ "x-latency-category": "responsive" }, "patch": { - "summary": "Update a phone number with voice settings", - "operationId": "updatePhoneNumberWithVoiceSettings", + "summary": "Update a number order document", + "description": "Updates a number order document.", + "operationId": "updateNumberOrderDocument", "tags": [ - "Number Configurations" + "Number Order Documents" ], "parameters": [ { - "$ref": "#/components/parameters/IntId" + "name": "number_order_document_id", + "in": "path", + "description": "The number order document ID.", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { - "description": "Updated voice settings for the phone number.", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePhoneNumberVoiceSettingsRequest" + "$ref": "#/components/schemas/UpdateNumberOrderDocumentRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/PhoneNumberWithVoiceSettingsResponse" + "$ref": "#/components/responses/NumberOrderDocumentResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -4876,44 +5094,62 @@ "x-latency-category": "responsive" } }, - "/recordings": { + "/number_orders": { "get": { - "description": "Lists recordings for the authenticated user", - "summary": "List recordings", - "operationId": "listRecordings", + "summary": "List number orders", + "description": "Get a paginated list of number orders.", + "operationId": "listNumberOrders", "tags": [ - "Recordings Commands" + "Number Orders" ], "x-group-parameters": "true", "parameters": [ { - "name": "filter[conference_id]", + "name": "filter[status]", "in": "query", - "description": "Return only recordings associated with a given conference", - "required": false, + "description": "Filter number orders by status.", "schema": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" + "type": "string" } }, { - "name": "filter[created_at][gte]", + "name": "filter[created_at][gt]", "in": "query", - "description": "Return only recordings created later than or at given ISO 8601 datetime", - "required": false, + "description": "Filter number orders later than this value.", "schema": { - "type": "string", - "example": "2019-03-29T11:10:00Z" + "type": "string" } }, { - "name": "filter[created_at][lte]", + "name": "filter[created_at][lt]", "in": "query", - "description": "Return only recordings created earlier than or at given ISO 8601 datetime", - "required": false, + "description": "Filter number orders earlier than this value.", "schema": { - "type": "string", - "example": "2019-03-29T11:10:00Z" + "type": "string" + } + }, + { + "name": "filter[phone_numbers.phone_number]", + "in": "query", + "description": "Filter number orders having these phone numbers.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[customer_reference]", + "in": "query", + "description": "Filter number orders via the customer reference set.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[requirements_met]", + "in": "query", + "description": "Filter number orders by requirements met.", + "schema": { + "type": "boolean" } }, { @@ -4925,31 +5161,78 @@ ], "responses": { "200": { - "$ref": "#/components/responses/ListRecordingsResponse" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedResponse" + "$ref": "#/components/responses/ListNumberOrdersResponse" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntityResponse" + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } }, - "x-latency-category": "interactive" - } - }, - "/recordings/{id}": { + "x-latency-category": "responsive" + }, + "post": { + "summary": "Create a number order", + "description": "Creates a phone number order.", + "operationId": "createNumberOrder", + "tags": [ + "Number Orders" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNumberOrderRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/NumberOrderResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "callbacks": { + "numberOrderStatusUpdate": { + "{$request.body#/webhook_url}": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NumberOrderedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "The server must return a HTTP 200, otherwise we will reattempt to deliver the webhook to the failover URL." + } + } + } + } + } + }, + "x-latency-category": "responsive" + } + }, + "/number_orders/{number_order_id}": { "get": { - "description": "Retrieve a recording from the authenticated user's recordings", - "summary": "Retrieve a recording", - "operationId": "retrieveRecording", + "summary": "Retrieve a number order", + "description": "Get an existing phone number order.", + "operationId": "retrieveNumberOrder", "tags": [ - "Recordings Commands" + "Number Orders" ], "parameters": [ { - "name": "id", - "description": "Uniquely identifies the recording", + "name": "number_order_id", "in": "path", + "description": "The number order ID.", "required": true, "schema": { "type": "string" @@ -4958,48 +5241,99 @@ ], "responses": { "200": { - "$ref": "#/components/responses/RecordingResponse" + "$ref": "#/components/responses/NumberOrderResponse" }, - "401": { - "$ref": "#/components/responses/UnauthorizedResponse" + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + }, + "patch": { + "summary": "Update a number order", + "description": "Updates a phone number order.", + "operationId": "updateNumberOrder", + "tags": [ + "Number Orders" + ], + "parameters": [ + { + "name": "number_order_id", + "in": "path", + "description": "The number order ID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNumberOrderRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/NumberOrderResponse" }, - "404": { - "$ref": "#/components/responses/NotFoundResponse" + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } }, - "x-latency-category": "interactive" + "x-latency-category": "responsive" } }, - "/regulatory_requirements": { + "/number_reservations": { "get": { - "summary": "List number order regulatory requirements", - "description": "Gets a paginated list of number order regulatory requirements.", - "operationId": "listNumberOrderRegulatoryRequirements", + "summary": "List number reservations", + "description": "Gets a paginated list of phone number reservations.", + "operationId": "listNumberReservations", "tags": [ - "Number Order Regulatory Requirements" + "Number Reservations" ], "x-group-parameters": "true", "parameters": [ { - "name": "filter[requirement_id]", + "name": "filter[status]", "in": "query", - "description": "Filter number order regulatory requirements by `requirement_id`.", + "description": "Filter number reservations by status.", "schema": { "type": "string" } }, { - "name": "filter[field_type]", + "name": "filter[created_at][gt]", "in": "query", - "description": "Filter number order regulatory requirements by `field_type`.", + "description": "Filter number reservations later than this value.", "schema": { "type": "string" } }, { - "name": "filter[requirement_type]", + "name": "filter[created_at][lt]", "in": "query", - "description": "Filter number order regulatory requirements by `requirement_type`.", + "description": "Filter number reservations earlier than this value.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[phone_numbers.phone_number]", + "in": "query", + "description": "Filter number reservations having these phone numbers.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[customer_reference]", + "in": "query", + "description": "Filter number reservations via the customer reference set.", "schema": { "type": "string" } @@ -5013,7 +5347,34 @@ ], "responses": { "200": { - "$ref": "#/components/responses/ListNumberOrderRegulatoryRequirementsResponse" + "$ref": "#/components/responses/ListNumberReservationsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + }, + "post": { + "summary": "Create a number reservation", + "description": "Creates a Phone Number Reservation for multiple numbers.", + "operationId": "createNumberReservation", + "tags": [ + "Number Reservations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNumberReservationRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/NumberReservationResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -5022,19 +5383,19 @@ "x-latency-category": "responsive" } }, - "/regulatory_requirements/{requirement_id}": { + "/number_reservations/{number_reservation_id}": { "get": { - "summary": "Retrieve a number order regulatory requirement", - "description": "Gets a single number order regulatory requirement.", - "operationId": "retrieveNumberOrderRegulatoryRequirement", + "summary": "Retrieve a number reservation", + "description": "Gets a single phone number reservation.", + "operationId": "retrieveNumberReservation", "tags": [ - "Number Order Regulatory Requirements" + "Number Reservations" ], "parameters": [ { - "name": "requirement_id", + "name": "number_reservation_id", "in": "path", - "description": "The number order regulatory requirement ID.", + "description": "The number reservation ID.", "required": true, "schema": { "type": "string" @@ -5043,7 +5404,7 @@ ], "responses": { "200": { - "$ref": "#/components/responses/NumberOrderRegulatoryRequirementResponse" + "$ref": "#/components/responses/NumberReservationResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -5052,25 +5413,20 @@ "x-latency-category": "responsive" } }, - "/short_codes": { - "get": { - "summary": "List short codes", - "operationId": "listShortCodes", + "/number_reservations/{number_reservation_id}/actions/extend": { + "post": { + "summary": "Extend a number reservation", + "description": "Extends reservation expiry time on all phone numbers.", + "operationId": "extendNumberReservationExpiryTime", "tags": [ - "Short Codes" + "Number Reservations" ], - "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/PageNumber" - }, - { - "$ref": "#/components/parameters/PageSize" - }, - { - "name": "filter[messaging_profile_id]", - "in": "query", - "description": "Filter by Messaging Profile ID. Use the string `null` for phone numbers without assigned profiles. A synonym for the `/messaging_profiles/{id}/short_codes` endpoint when querying about an extant profile.", + "name": "number_reservation_id", + "in": "path", + "description": "The number reservation ID.", + "required": true, "schema": { "type": "string" } @@ -5078,7 +5434,7 @@ ], "responses": { "200": { - "$ref": "#/components/responses/ListShortCodesResponse" + "$ref": "#/components/responses/NumberReservationResponse" }, "default": { "$ref": "#/components/responses/GenericErrorResponse" @@ -5087,1428 +5443,5889 @@ "x-latency-category": "responsive" } }, - "/short_codes/{id}": { + "/outbound_voice_profiles": { "get": { - "summary": "Retrieve a short code", - "operationId": "retrieveShortCode", + "description": "Get all outbound voice profiles belonging to the user that match the given filters.", + "summary": "Get all outbound voice profiles", + "operationId": "listOutboundVoiceProfiles", "tags": [ - "Short Codes" + "Outbound Voice Profiles" ], + "x-group-parameters": "true", "parameters": [ { - "$ref": "#/components/parameters/ShortCodeId" + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/NameFilter" + }, + { + "$ref": "#/components/parameters/SortOutboundVoiceProfile" } ], "responses": { "200": { - "$ref": "#/components/responses/ShortCodeResponse" + "$ref": "#/components/responses/ListOutboundVoiceProfilesResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" }, - "patch": { - "summary": "Update short code", - "operationId": "updateShortCode", - "description": "Update the settings for a specific short code. To unbind a short code from a profile, set the `messaging_profile_id` to `null` or an empty string.", + "post": { + "description": "Create an outbound voice profile.", + "summary": "Create an outbound voice profile", + "operationId": "createOutboundVoiceProfile", "tags": [ - "Short Codes" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ShortCodeId" - } + "Outbound Voice Profiles" ], "requestBody": { - "description": "Short code update", + "description": "Parameters that can be defined when creating an outbound voice profile", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateShortCodeRequest" + "$ref": "#/components/schemas/CreateOutboundVoiceProfileRequest" } } } }, "responses": { "200": { - "$ref": "#/components/responses/ShortCodeResponse" + "$ref": "#/components/responses/OutboundVoiceProfileResponse" }, - "default": { - "$ref": "#/components/responses/GenericErrorResponse" + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" } }, "x-latency-category": "responsive" } - } - }, - "components": { - "callbacks": {}, - "examples": {}, - "headers": {}, - "links": {}, - "parameters": { - "CallControlId": { - "name": "call_control_id", - "description": "Unique identifier and token for controlling the call", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "FilterApplicationName": { - "name": "filter[application_name][contains]", - "in": "query", - "required": false, - "description": "If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.", - "schema": { - "type": "string", - "default": "null" - } - }, - "FilterCallEventStatus": { - "name": "filter[status]", - "in": "query", - "description": "Event status", - "required": false, - "schema": { - "type": "string", - "enum": [ - "delivered", - "failed" - ], - "example": "delivered" - } - }, - "FilterCallEventTimestampEqualTo": { - "name": "filter[event_timestamp][eq]", - "in": "query", - "description": "Event timestamp: equal", - "required": false, - "schema": { - "type": "string", - "example": "2019-03-29T11:10:00Z" - } - }, - "FilterCallEventTimestampGreaterThan": { - "name": "filter[event_timestamp][gt]", - "in": "query", - "description": "Event timestamp: greater than", - "required": false, - "schema": { - "type": "string", - "example": "2019-03-29T11:10:00Z" - } - }, - "FilterCallEventTimestampGreaterThanOrEqualTo": { - "name": "filter[event_timestamp][gte]", - "in": "query", - "description": "Event timestamp: greater than or equal", - "required": false, - "schema": { - "type": "string", - "example": "2019-03-29T11:10:00Z" - } - }, - "FilterCallEventTimestampLessThan": { - "name": "filter[event_timestamp][lt]", - "in": "query", - "description": "Event timestamp: lower than", - "required": false, - "schema": { - "type": "string", - "example": "2019-03-29T11:10:00Z" - } - }, - "FilterCallEventTimestampLessThanOrEqualTo": { - "name": "filter[event_timestamp][lte]", - "in": "query", - "description": "Event timestamp: lower than or equal", - "required": false, - "schema": { - "type": "string", - "example": "2019-03-29T11:10:00Z" - } - }, - "FilterCallEventType": { - "name": "filter[type]", - "in": "query", - "description": "Event type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "command", - "webhook" - ], - "example": "webhook" - } - }, - "FilterCallLegId": { - "name": "filter[call_leg_id]", - "in": "query", - "description": "The unique identifier of an individual call leg.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - "FilterCallSessionId": { - "name": "filter[call_session_id]", - "in": "query", - "description": "The unique identifier of the call control session. A session may include multiple call leg events.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - "FilterConferenceName": { - "name": "filter[name]", - "in": "query", - "description": "If present, conferences will be filtered to those with a matching `name` attribute. Matching is case-sensitive", - "schema": { - "type": "string" - } - }, - "FilterOutboundVoiceProfileId": { - "name": "filter[outbound.outbound_voice_profile_id]", - "in": "query", - "required": false, - "description": "Identifies the associated outbound voice profile.", - "schema": { - "type": "string", - "format": "int64", - "example": "1293384261075731499" - } - }, - "IntId": { - "name": "id", - "description": "Identifies the resource.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "int64", - "example": "1293384261075731499" - } - }, - "MessagingProfileId": { - "name": "id", - "in": "path", - "description": "The id of the messaging profile to retrieve", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - "MessagingProfileMetric": { - "name": "id", - "in": "query", - "description": "The id of the messaging profile(s) to retrieve", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - "MessagingProfileMetricTimeFrame": { - "name": "time_frame", - "in": "query", - "description": "The timeframe for which you'd like to retrieve metrics.", - "required": false, - "schema": { - "type": "string", - "default": "24h", - "enum": [ - "1h", - "3h", - "24h", - "3d", - "7d", - "30d" - ] - } + }, + "/outbound_voice_profiles/{id}": { + "delete": { + "description": "Deletes an existing outbound voice profile.", + "summary": "Delete an outbound voice profile", + "operationId": "deleteOutboundVoiceProfile", + "tags": [ + "Outbound Voice Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OutboundVoiceProfileResponse" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" }, - "PageNumber": { - "name": "page[number]", - "in": "query", - "description": "The page number to load", - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } + "get": { + "description": "Retrieves the details of an existing outbound voice profile.", + "summary": "Retrieve an outbound voice profile", + "operationId": "retrieveOutboundVoiceProfile", + "tags": [ + "Outbound Voice Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OutboundVoiceProfileResponse" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" }, - "PageSize": { - "name": "page[size]", - "in": "query", - "description": "The size of the page", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 250, - "default": 20 - } - }, - "ShortCodeId": { - "name": "id", - "in": "path", - "description": "The id of the short code", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - "SortConnection": { - "name": "sort", - "in": "query", - "required": false, - "description": "Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

\nThat is:
    \n
  • \n connection_name: sorts the result by the\n connection_name field in ascending order.\n
  • \n\n
  • \n -connection_name: sorts the result by the\n connection_name field in descending order.\n
  • \n

If not given, results are sorted by created_at in descending order.", - "schema": { - "type": "string", - "enum": [ - "created_at", - "connection_name", - "active" - ], - "example": "connection_name", - "default": "created_at" - } - } - }, - "requestBodies": {}, - "responses": { - "CallControlApplicationResponse": { - "description": "Successful response with details about a call control application.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Call Control Application Response", - "properties": { - "data": { - "$ref": "#/components/schemas/CallControlApplication" - } + "patch": { + "description": "Updates an existing outbound voice profile.", + "summary": "Updates an existing outbound voice profile.", + "operationId": "updateOutboundVoiceProfile", + "tags": [ + "Outbound Voice Profiles" + ], + "requestBody": { + "description": "Parameters that can be updated on an outbound voice profile", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOutboundVoiceProfileRequest" } } } - } - }, - "CallControlCommandResponse": { - "description": "Successful response upon making a call control command.", - "content": { - "application/json": { + }, + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OutboundVoiceProfileResponse" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" + } + }, + "/phone_number_regulatory_requirements": { + "get": { + "summary": "List regulatory requirements per number", + "description": "Gets a paginated list of phone number regulatory requirements.", + "operationId": "listPhoneNumberRegulatoryRequirements", + "tags": [ + "Number Order Regulatory Requirements" + ], + "x-group-parameters": "true", + "parameters": [ + { + "name": "filter[phone_number]", + "in": "query", + "description": "The list of phone numbers to retrieve regulatory requirements for.", "schema": { - "type": "object", - "title": "Call Control Command Response", - "properties": { - "data": { - "$ref": "#/components/schemas/CallControlCommandResult" - } + "type": "array", + "items": { + "type": "string" } } + }, + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" } - } - }, - "ConferenceCommandResponse": { - "description": "Successful response upon making a conference command.", - "content": { - "application/json": { + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListPhoneNumberRegulatoryRequirementsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers": { + "get": { + "summary": "List phone numbers", + "operationId": "listPhoneNumbers", + "tags": [ + "Number Configurations" + ], + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "name": "filter[tag]", + "in": "query", + "description": "Filter by phone number tags.", + "required": false, "schema": { - "type": "object", - "title": "Conference Command Response", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceCommandResult" - } - } + "type": "string" } - } - } - }, - "ConferenceResponse": { - "description": "Successful response with details about a conference.", - "content": { - "application/json": { + }, + { + "name": "filter[phone_number]", + "in": "query", + "description": "Filter by phone number. Requires at least three digits.\n Non-numerical characters will result in no values being returned.", + "required": false, "schema": { - "type": "object", - "title": "Conference Response", - "properties": { - "data": { - "$ref": "#/components/schemas/Conference" - } - } + "type": "string" } - } - } - }, - "CsvDownloadResponse": { - "description": "Successful response with details about a CSV download.", - "content": { - "application/json": { + }, + { + "name": "filter[status]", + "in": "query", + "description": "Filter by phone number status.", + "required": false, "schema": { - "type": "object", - "title": "CSV Download Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CsvDownload" - } - } - } + "type": "string", + "enum": [ + "purchase_pending", + "purchase_failed", + "port_pending", + "active", + "deleted", + "port_failed", + "emergency_only", + "ported_out", + "port_out_pending" + ], + "example": "active" } - } - } - }, - "GenericErrorResponse": { - "description": "Unexpected error", - "content": { - "application/json": { + }, + { + "name": "filter[voice.connection_name][contains]", + "in": "query", + "description": "Filter contains connection name. Requires at least three characters.", + "required": false, "schema": { - "$ref": "#/components/schemas/Errors" + "type": "string", + "example": "test" } - } - } - }, - "ListAvailablePhoneNumbersResponse": { - "description": "Successful response with a list of available phone numbers.", - "content": { - "application/json": { + }, + { + "name": "filter[voice.connection_name][starts_with]", + "in": "query", + "description": "Filter starts with connection name. Requires at least three characters.", + "required": false, "schema": { - "type": "object", - "title": "List Available Phone Numbers Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AvailablePhoneNumber" - } - }, - "meta": { - "$ref": "#/components/schemas/AvailablePhoneNumbersMetadata" - } - } + "type": "string", + "example": "test" } - } - } - }, - "ListCallControlApplicationsResponse": { - "description": "Successful response with a list of call control applications.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "List Call Control Applications Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CallControlApplication" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } - } - } - } - }, - "ListCallEventsResponse": { - "description": "Successful response with a list of call events.", - "content": { - "application/json": { + }, + { + "name": "filter[voice.connection_name][ends_with]", + "in": "query", + "description": "Filter ends with connection name. Requires at least three characters.", + "required": false, "schema": { - "type": "object", - "title": "List Call Events Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CallEvent" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "example": "test" } - } - } - }, - "ListConferencesResponse": { - "description": "Successful response with a list of conferences.", - "content": { - "application/json": { + }, + { + "name": "filter[voice.connection_name][eq]", + "in": "query", + "description": "Filter by connection name.", + "required": false, "schema": { - "type": "object", - "title": "List Conferences Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Conference" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "example": "test" } - } - } - }, - "ListCsvDownloadsResponse": { - "description": "Successful response with a list of CSV downloads.", - "content": { - "application/json": { + }, + { + "name": "filter[usage_payment_method]", + "in": "query", + "description": "Filter by usage_payment_method.", + "required": false, "schema": { - "type": "object", - "title": "List CSV Downloads Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CsvDownload" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "enum": [ + "pay-per-minute", + "channel" + ], + "example": "channel" } - } - } - }, - "ListMessagingHostedNumberOrdersResponse": { - "description": "Successful response with a list of messaging hosted number orders.", - "content": { - "application/json": { + }, + { + "name": "filter[billing_group_id]", + "in": "query", + "description": "Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'.", + "required": false, "schema": { - "type": "object", - "title": "List Messaging Hosted Number Order Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessagingHostedNumberOrder" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "example": "62e4bf2e-c278-4282-b524-488d9c9c43b2" } - } - } - }, - "ListMessagingProfileMetrics": { - "description": "Successful response with a list of messaging profile metrics.", - "content": { - "application/json": { + }, + { + "name": "filter[emergency_address_id]", + "in": "query", + "description": "Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'.", + "required": false, "schema": { - "type": "object", - "title": "List Messaging Profile Metrics Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessagingProfileHighLevelMetrics" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "format": "int64", + "example": "9102160989215728032" } - } - } - }, - "ListMessagingProfilePhoneNumbersResponse": { - "description": "Successful response with a list of messaging profile phone numbers.", - "content": { - "application/json": { + }, + { + "name": "filter[customer_reference]", + "in": "query", + "description": "Filter numbers via the customer_reference set.", "schema": { - "type": "object", - "title": "List Messaging Profile Phone Numbers Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhoneNumberWithMessagingSettings" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "example": "MY REF 001" } - } - } - }, - "ListMessagingProfileShortCodesResponse": { - "description": "Successful response with a list of messaging profile short codes.", - "content": { - "application/json": { + }, + { + "name": "sort", + "in": "query", + "description": "Specifies the sort order for results. If not given, results are sorted by created_at in descending order.", + "required": false, "schema": { - "type": "object", - "title": "List Messaging Profile Short Codes Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShortCode" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "enum": [ + "purchased_at", + "phone_number", + "connection_name", + "usage_payment_method" + ], + "example": "connection_name" } } - } - }, - "ListMessagingProfilesResponse": { - "description": "Successful response with a list of messaging profiles.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "List Messaging Profiles Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessagingProfile" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } - } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListPhoneNumbersResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } - } - }, - "ListMessagingUrlDomains": { - "description": "Successful response with details about a messaging URL domain.", - "content": { - "application/json": { + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/csv_downloads": { + "get": { + "summary": "List CSV downloads", + "operationId": "listCsvDownloads", + "tags": [ + "CSV Downloads" + ], + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListCsvDownloadsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + }, + "post": { + "x-latency-category": "background", + "summary": "Create a CSV download", + "operationId": "createCsvDownload", + "tags": [ + "CSV Downloads" + ], + "responses": { + "200": { + "$ref": "#/components/responses/CsvDownloadResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + } + } + }, + "/phone_numbers/csv_downloads/{id}": { + "get": { + "x-latency-category": "background", + "summary": "Retrieve a CSV download", + "operationId": "retrieveCsvDownload", + "tags": [ + "CSV Downloads" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Identifies the CSV download.", + "required": true, "schema": { - "type": "object", - "title": "List Messaging Profile Url Domains Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessagingUrlDomain" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string" } } + ], + "responses": { + "200": { + "$ref": "#/components/responses/CsvDownloadResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } } - }, - "ListNumberOrderDocumentsResponse": { - "description": "Successful response with a list of number order documents.", - "content": { - "application/json": { + } + }, + "/phone_numbers/jobs": { + "get": { + "summary": "Lists the phone numbers jobs", + "operationId": "listPhoneNumbersJobs", + "tags": [ + "Number Background Jobs" + ], + "x-group-parameters": "true", + "parameters": [ + { + "name": "filter[type]", + "in": "query", + "description": "Filter the phone number jobs by type.", "schema": { - "type": "object", - "title": "List Number Order Documents Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NumberOrderDocument" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } + "type": "string", + "enum": [ + "update_emergency_settings", + "delete_phone_numbers" + ], + "example": "update_emergency_settings", + "description": "Identifies the type of the background job." + } + }, + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "name": "sort", + "in": "query", + "description": "Specifies the sort order for results. If not given, results are sorted by created_at in descending order.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created_at" + ], + "example": "created_at" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListPhoneNumbersJobsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/jobs/delete_phone_numbers": { + "post": { + "x-latency-category": "background", + "summary": "Delete a batch of numbers", + "description": "Creates a new background job to delete a batch of numbers. At most one thousand numbers can be updated per API call.", + "operationId": "createPhoneNumbersJobDeletePhoneNumbers", + "tags": [ + "Number Background Jobs" + ], + "x-group-parameters": "true", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneNumbersJobDeletePhoneNumbersRequest" } } } - } - }, - "ListNumberOrderRegulatoryRequirementsResponse": { - "description": "Successful response with a list of number order regulatory requirements.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "List Number Order Regulatory Requirements Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RegulatoryRequirement" + }, + "responses": { + "202": { + "description": "Phone numbers job delete phone numbers requested.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Phone Numbers Job Delete Phone Numbers", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumbersJob" + } } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" } } } + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } } - }, - "ListNumberOrdersResponse": { - "description": "Successful response with a list of number orders.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "List Number Orders Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NumberOrder" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } + } + }, + "/phone_numbers/jobs/update_emergency_settings": { + "post": { + "x-latency-category": "background", + "summary": "Update the emergency settings from a batch of numbers", + "description": "Creates a background job to update the emergency settings of a collection of phone numbers. At most one thousand numbers can be updated per API call.", + "operationId": "createPhoneNumbersJobUpdateEmergencySettings", + "tags": [ + "Number Background Jobs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneNumbersJobUpdateEmergencySettingsRequest" } } } - } - }, - "ListNumberReservationsResponse": { - "description": "Successful response with a list of number reservations.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "List Number Reservations Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NumberReservation" + }, + "responses": { + "202": { + "description": "Phone numbers enable emergency requested.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Phone Numbers Enable Emergency", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumbersJob" + } } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" } } } + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } } - }, - "ListParticipantsResponse": { - "description": "Successful response with a list of conference participants.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "List Participants Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Participant" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } - } - } - } - }, - "ListPhoneNumberRegulatoryRequirementsResponse": { - "description": "Successful response with a list of phone number regulatory requirements.", - "content": { - "application/json": { + } + }, + "/phone_numbers/jobs/{id}": { + "get": { + "summary": "Retrieve a phone numbers job", + "operationId": "retrievePhoneNumbersJob", + "tags": [ + "Number Background Jobs" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Identifies the Phone Numbers Job.", + "required": true, "schema": { - "type": "object", - "title": "List Phone Number Regulatory Requirements Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhoneNumberRegulatoryGroup" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string" } } - } - }, - "ListPhoneNumbersResponse": { - "description": "Successful response with a list of phone numbers.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "List Phone Numbers Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhoneNumberDetailed" + ], + "x-group-parameters": "true", + "responses": { + "200": { + "description": "Phone numbers job details.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Phone Numbers Job", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumbersJob" + } } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" } } } + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } - } - }, - "ListPhoneNumbersWithMessagingSettingsResponse": { - "description": "Successful response with a list of phone numbers with messaging settings.", - "content": { - "application/json": { + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/messaging": { + "get": { + "summary": "List phone numbers with messaging settings", + "operationId": "listPhoneNumbersWithMessagingSettings", + "tags": [ + "Number Configurations" + ], + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListPhoneNumbersWithMessagingSettingsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/voice": { + "get": { + "summary": "List phone numbers with voice settings", + "operationId": "listPhoneNumbersWithVoiceSettings", + "tags": [ + "Number Configurations" + ], + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "name": "filter[phone_number]", + "in": "query", + "description": "Filter by phone number. Requires at least three digits.\n Non-numerical characters will result in no values being returned.", + "required": false, "schema": { - "type": "object", - "title": "List Messaging Settings Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhoneNumberWithMessagingSettings" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string" } - } - } - }, - "ListPhoneNumbersWithVoiceSettingsResponse": { - "description": "Successful response with a list of phone numbers with voice settings.", - "content": { - "application/json": { + }, + { + "name": "filter[connection_name][contains]", + "in": "query", + "description": "Filter contains connection name. Requires at least three characters.", + "required": false, "schema": { - "type": "object", - "title": "List Phone Numbers With Voice Settings Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "example": "test" } - } - } - }, - "ListRecordingsResponse": { - "description": "Successful response with a list of recordings.", - "content": { - "application/json": { + }, + { + "name": "filter[customer_reference]", + "in": "query", + "description": "Filter numbers via the customer_reference set.", "schema": { - "type": "object", - "title": "List Recordings Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Recording" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string" } - } - } - }, - "ListShortCodesResponse": { - "description": "Successful response with a list of short codes.", - "content": { - "application/json": { + }, + { + "name": "filter[usage_payment_method]", + "in": "query", + "description": "Filter by usage_payment_method.", + "required": false, "schema": { - "type": "object", - "title": "List Short Codes Response", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShortCode" - } - }, - "meta": { - "$ref": "#/components/schemas/PaginationMeta" - } - } + "type": "string", + "enum": [ + "pay-per-minute", + "channel" + ], + "example": "channel" } - } - } - }, - "MessageResponse": { - "description": "Successful response with details about a message.", - "content": { - "application/json": { + }, + { + "name": "sort", + "in": "query", + "description": "Specifies the sort order for results. If not given, results are sorted by created_at in descending order.", + "required": false, "schema": { - "type": "object", - "title": "Message Response", - "properties": { - "data": { - "$ref": "#/components/schemas/OutboundMessagePayload" - } - } + "type": "string", + "enum": [ + "purchased_at", + "phone_number", + "connection_name", + "usage_payment_method" + ], + "example": "connection_name" } } - } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListPhoneNumbersWithVoiceSettingsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/{id}": { + "delete": { + "summary": "Delete a phone number", + "operationId": "deletePhoneNumber", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IntId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/PhoneNumberResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" }, - "MessagingHostedNumberOrderResponse": { - "description": "Successful response with details about a messaging hosted number order.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Retrieve Messaging Hosted Number Order Response", - "properties": { - "data": { - "$ref": "#/components/schemas/MessagingHostedNumberOrder" - } - } - } + "get": { + "summary": "Retrieve a phone number", + "operationId": "retrievePhoneNumber", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IntId" } - } + ], + "responses": { + "200": { + "$ref": "#/components/responses/PhoneNumberResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" }, - "MessagingHostedNumberResponse": { - "description": "Successful response with details about a messaging hosted number.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Retrieve Messaging Hosted Number Response", - "properties": { - "data": { - "$ref": "#/components/schemas/HostedNumber" - } + "patch": { + "summary": "Update a phone number", + "operationId": "updatePhoneNumber", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IntId" + } + ], + "requestBody": { + "description": "Updated settings for the phone number.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhoneNumberRequest" } } } - } - }, - "MessagingProfileResponse": { - "description": "Successful response with details about a messaging profile.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Messaging Profile Response", - "properties": { - "data": { - "$ref": "#/components/schemas/MessagingProfile" - } + }, + "responses": { + "200": { + "$ref": "#/components/responses/PhoneNumberResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/{id}/actions/enable_emergency": { + "post": { + "summary": "Enable emergency for a phone number", + "operationId": "enableEmergencyPhoneNumber", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IntId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhoneNumberEnableEmergencyRequest" } } } - } - }, - "NotFoundResponse": { - "description": "Conference does not exist" - }, - "NumberOrderDocumentResponse": { - "description": "Successful response with details about a number order document.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Number Order Document Response", - "properties": { - "data": { - "$ref": "#/components/schemas/NumberOrderDocument" + }, + "responses": { + "200": { + "description": "Phone number emergency enabled.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Phone Number Enable Emergency", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" + } + } } } } - } - } - }, - "NumberOrderRegulatoryRequirementResponse": { - "description": "Successful response with details about a number order regulatory requirement.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Number Order Regulatory Requirement Response", - "properties": { - "data": { - "$ref": "#/components/schemas/RegulatoryRequirement" + }, + "202": { + "description": "Phone number emergency requested.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Phone Number Enable Emergency", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" + } + } } } } + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" } - } - }, - "NumberOrderResponse": { - "description": "Successful response with details about a number order.", - "content": { - "application/json": { + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/{id}/messaging": { + "get": { + "summary": "Retrieve a phone number with messaging settings", + "operationId": "retrievePhoneNumberWithMessagingSettings", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Identifies the type of resource.", + "required": true, "schema": { - "type": "object", - "title": "Number Order Response", - "properties": { - "data": { - "$ref": "#/components/schemas/NumberOrder" - } - } + "type": "string" } } - } + ], + "responses": { + "200": { + "$ref": "#/components/responses/PhoneNumberWithMessagingSettingsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" }, - "NumberReservationResponse": { - "description": "Successful response with details about a number reservation.", - "content": { - "application/json": { + "patch": { + "summary": "Update a phone number with messaging settings", + "operationId": "updatePhoneNumberWithMessagingSettings", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Identifies the type of resource.", + "required": true, "schema": { - "type": "object", - "title": "Number Reservation Response", + "type": "string" + } + } + ], + "requestBody": { + "description": "Updated messaging settings for the phone number", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhoneNumberMessagingSettingsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/PhoneNumberWithMessagingSettingsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/phone_numbers/{id}/voice": { + "get": { + "summary": "Retrieve a phone number with voice settings", + "operationId": "retrievePhoneNumberWithVoiceSettings", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IntId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/PhoneNumberWithVoiceSettingsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + }, + "patch": { + "summary": "Update a phone number with voice settings", + "operationId": "updatePhoneNumberWithVoiceSettings", + "tags": [ + "Number Configurations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/IntId" + } + ], + "requestBody": { + "description": "Updated voice settings for the phone number.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhoneNumberVoiceSettingsRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/PhoneNumberWithVoiceSettingsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/recordings": { + "get": { + "description": "Lists recordings for the authenticated user", + "summary": "List recordings", + "operationId": "listRecordings", + "tags": [ + "Recordings Commands" + ], + "x-group-parameters": "true", + "parameters": [ + { + "name": "filter[conference_id]", + "in": "query", + "description": "Return only recordings associated with a given conference", + "required": false, + "schema": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" + } + }, + { + "name": "filter[created_at][gte]", + "in": "query", + "description": "Return only recordings created later than or at given ISO 8601 datetime", + "required": false, + "schema": { + "type": "string", + "example": "2019-03-29T11:10:00Z" + } + }, + { + "name": "filter[created_at][lte]", + "in": "query", + "description": "Return only recordings created earlier than or at given ISO 8601 datetime", + "required": false, + "schema": { + "type": "string", + "example": "2019-03-29T11:10:00Z" + } + }, + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListRecordingsResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntityResponse" + } + }, + "x-latency-category": "interactive" + } + }, + "/recordings/{id}": { + "get": { + "description": "Retrieve a recording from the authenticated user's recordings", + "summary": "Retrieve a recording", + "operationId": "retrieveRecording", + "tags": [ + "Recordings Commands" + ], + "parameters": [ + { + "name": "id", + "description": "Uniquely identifies the recording", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/RecordingResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedResponse" + }, + "404": { + "$ref": "#/components/responses/NotFoundResponse" + } + }, + "x-latency-category": "interactive" + } + }, + "/regulatory_requirements": { + "get": { + "summary": "List number order regulatory requirements", + "description": "Gets a paginated list of number order regulatory requirements.", + "operationId": "listNumberOrderRegulatoryRequirements", + "tags": [ + "Number Order Regulatory Requirements" + ], + "x-group-parameters": "true", + "parameters": [ + { + "name": "filter[requirement_id]", + "in": "query", + "description": "Filter number order regulatory requirements by `requirement_id`.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[field_type]", + "in": "query", + "description": "Filter number order regulatory requirements by `field_type`.", + "schema": { + "type": "string" + } + }, + { + "name": "filter[requirement_type]", + "in": "query", + "description": "Filter number order regulatory requirements by `requirement_type`.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListNumberOrderRegulatoryRequirementsResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/regulatory_requirements/{requirement_id}": { + "get": { + "summary": "Retrieve a number order regulatory requirement", + "description": "Gets a single number order regulatory requirement.", + "operationId": "retrieveNumberOrderRegulatoryRequirement", + "tags": [ + "Number Order Regulatory Requirements" + ], + "parameters": [ + { + "name": "requirement_id", + "in": "path", + "description": "The number order regulatory requirement ID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/NumberOrderRegulatoryRequirementResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/short_codes": { + "get": { + "summary": "List short codes", + "operationId": "listShortCodes", + "tags": [ + "Short Codes" + ], + "x-group-parameters": "true", + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "name": "filter[messaging_profile_id]", + "in": "query", + "description": "Filter by Messaging Profile ID. Use the string `null` for phone numbers without assigned profiles. A synonym for the `/messaging_profiles/{id}/short_codes` endpoint when querying about an extant profile.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ListShortCodesResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/short_codes/{id}": { + "get": { + "summary": "Retrieve a short code", + "operationId": "retrieveShortCode", + "tags": [ + "Short Codes" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ShortCodeId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ShortCodeResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + }, + "patch": { + "summary": "Update short code", + "operationId": "updateShortCode", + "description": "Update the settings for a specific short code. To unbind a short code from a profile, set the `messaging_profile_id` to `null` or an empty string.", + "tags": [ + "Short Codes" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ShortCodeId" + } + ], + "requestBody": { + "description": "Short code update", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateShortCodeRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ShortCodeResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "x-latency-category": "responsive" + } + }, + "/texml_applications": { + "get": { + "description": "Returns a list of your TeXML Applications.", + "summary": "List all TeXML Applications", + "operationId": "findTexmlApplications", + "tags": [ + "TeXML Applications" + ], + "parameters": [ + { + "$ref": "#/components/parameters/PageNumber" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "name": "filter[friendly_name][contains]", + "in": "query", + "description": "If present, applications with friendly_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.", + "schema": { + "type": "string", + "default": "null" + } + }, + { + "$ref": "#/components/parameters/FilterOutboundVoiceProfileId" + }, + { + "$ref": "#/components/parameters/SortConnection" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/GetAllTexmlApplicationsResponse" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + } + }, + "x-latency-category": "responsive" + }, + "post": { + "description": "Creates a TeXML Application.", + "summary": "Creates a TeXML Application", + "operationId": "CreateTexmlApplication", + "tags": [ + "TeXML Applications" + ], + "parameters": [], + "requestBody": { + "description": "Parameters that can be set when creating a TeXML Application", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTexmlApplicationRequest" + } + } + } + }, + "responses": { + "201": { + "$ref": "#/components/responses/TexmlApplicationResponse" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" + } + }, + "/texml_applications/{id}": { + "delete": { + "description": "Deletes a TeXML Application.", + "summary": "Deletes a TeXML Application", + "operationId": "DeleteTexmlApplication", + "tags": [ + "TeXML Applications" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/TexmlApplicationResponse" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" + }, + "get": { + "description": "Retrieves the details of an existing TeXML Application.", + "summary": "Retrieve a TeXML Application", + "operationId": "getTexmlApplication", + "tags": [ + "TeXML Applications" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/TexmlApplicationResponse" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" + }, + "patch": { + "description": "Updates settings of an existing TeXML Application.", + "summary": "Update a TeXML Application", + "operationId": "UpdateTexmlApplication", + "tags": [ + "TeXML Applications" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "requestBody": { + "description": "Parameters that can be updated in a TeXML Application", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTexmlApplicationRequest" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/TexmlApplicationResponse" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "Bad request" + } + }, + "x-latency-category": "responsive" + } + } + }, + "components": { + "callbacks": {}, + "examples": {}, + "headers": {}, + "links": {}, + "parameters": { + "CallControlId": { + "name": "call_control_id", + "description": "Unique identifier and token for controlling the call", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + "FilterApplicationName": { + "name": "filter[application_name][contains]", + "in": "query", + "description": "If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.", + "schema": { + "type": "string", + "default": "null" + } + }, + "FilterCallEventStatus": { + "name": "filter[status]", + "in": "query", + "description": "Event status", + "required": false, + "schema": { + "type": "string", + "enum": [ + "delivered", + "failed" + ], + "example": "delivered" + } + }, + "FilterCallEventTimestampEqualTo": { + "name": "filter[event_timestamp][eq]", + "in": "query", + "description": "Event timestamp: equal", + "required": false, + "schema": { + "type": "string", + "example": "2019-03-29T11:10:00Z" + } + }, + "FilterCallEventTimestampGreaterThan": { + "name": "filter[event_timestamp][gt]", + "in": "query", + "description": "Event timestamp: greater than", + "required": false, + "schema": { + "type": "string", + "example": "2019-03-29T11:10:00Z" + } + }, + "FilterCallEventTimestampGreaterThanOrEqualTo": { + "name": "filter[event_timestamp][gte]", + "in": "query", + "description": "Event timestamp: greater than or equal", + "required": false, + "schema": { + "type": "string", + "example": "2019-03-29T11:10:00Z" + } + }, + "FilterCallEventTimestampLessThan": { + "name": "filter[event_timestamp][lt]", + "in": "query", + "description": "Event timestamp: lower than", + "required": false, + "schema": { + "type": "string", + "example": "2019-03-29T11:10:00Z" + } + }, + "FilterCallEventTimestampLessThanOrEqualTo": { + "name": "filter[event_timestamp][lte]", + "in": "query", + "description": "Event timestamp: lower than or equal", + "required": false, + "schema": { + "type": "string", + "example": "2019-03-29T11:10:00Z" + } + }, + "FilterCallEventType": { + "name": "filter[type]", + "in": "query", + "description": "Event type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "command", + "webhook" + ], + "example": "webhook" + } + }, + "FilterCallLegId": { + "name": "filter[call_leg_id]", + "in": "query", + "description": "The unique identifier of an individual call leg.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "FilterCallSessionId": { + "name": "filter[call_session_id]", + "in": "query", + "description": "The unique identifier of the call control session. A session may include multiple call leg events.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "FilterConferenceName": { + "name": "filter[name]", + "in": "query", + "description": "If present, conferences will be filtered to those with a matching `name` attribute. Matching is case-sensitive", + "schema": { + "type": "string" + } + }, + "FilterConnectionName": { + "name": "filter[connection_name][contains]", + "in": "query", + "description": "If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.", + "schema": { + "type": "string", + "default": null + } + }, + "FilterInnerOutboundVoiceProfileId": { + "name": "filter[outbound.outbound_voice_profile_id]", + "in": "query", + "description": "Identifies the associated outbound voice profile.", + "schema": { + "type": "string", + "format": "int64", + "example": "1293384261075731499" + } + }, + "FilterOutboundVoiceProfileId": { + "name": "filter[outbound_voice_profile_id]", + "in": "query", + "description": "Identifies the associated outbound voice profile.", + "schema": { + "type": "string", + "format": "int64", + "example": "1293384261075731499" + } + }, + "FqdnId": { + "name": "id", + "description": "Identifies the resource.", + "in": "path", + "required": true, + "schema": { + "format": "int64", + "type": "string", + "example": "1517907029795014409" + } + }, + "IntId": { + "name": "id", + "description": "Identifies the resource.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "int64", + "example": "1293384261075731499" + } + }, + "IpId": { + "name": "id", + "description": "Identifies the type of resource.", + "in": "path", + "required": true, + "schema": { + "format": "uuid", + "type": "string", + "example": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" + } + }, + "MessagingProfileId": { + "name": "id", + "in": "path", + "description": "The id of the messaging profile to retrieve", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "MessagingProfileMetric": { + "name": "id", + "in": "query", + "description": "The id of the messaging profile(s) to retrieve", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "MessagingProfileMetricTimeFrame": { + "name": "time_frame", + "in": "query", + "description": "The timeframe for which you'd like to retrieve metrics.", + "required": false, + "schema": { + "type": "string", + "default": "24h", + "enum": [ + "1h", + "3h", + "24h", + "3d", + "7d", + "30d" + ] + } + }, + "NameFilter": { + "name": "filter[name][contains]", + "in": "query", + "description": "Optional filter on outbound voice profile name.", + "schema": { + "type": "string", + "example": "office-profile" + } + }, + "PageNumber": { + "name": "page[number]", + "in": "query", + "description": "The page number to load.", + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + }, + "PageSize": { + "name": "page[size]", + "in": "query", + "description": "The size of the page.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 250, + "default": 20 + } + }, + "ShortCodeId": { + "name": "id", + "in": "path", + "description": "The id of the short code", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "SortConnection": { + "name": "sort", + "in": "query", + "description": "Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

\nThat is:
    \n
  • \n connection_name: sorts the result by the\n connection_name field in ascending order.\n
  • \n\n
  • \n -connection_name: sorts the result by the\n connection_name field in descending order.\n
  • \n

If not given, results are sorted by created_at in descending order.", + "schema": { + "type": "string", + "enum": [ + "created_at", + "connection_name", + "active" + ], + "example": "connection_name", + "default": "created_at" + } + }, + "SortOutboundVoiceProfile": { + "name": "sort", + "in": "query", + "description": "Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

\nThat is:
    \n
  • \n name: sorts the result by the\n name field in ascending order.\n
  • \n\n
  • \n -name: sorts the result by the\n name field in descending order.\n
  • \n

", + "schema": { + "type": "string", + "enum": [ + "enabled", + "-enabled", + "created_at", + "-created_at", + "name", + "-name", + "service_plan", + "-service_plan", + "traffic_type", + "-traffic_type", + "usage_payment_method", + "-usage_payment_method" + ], + "default": "-created_at", + "example": "name" + } + }, + "id": { + "name": "id", + "description": "Identifies the resource.", + "in": "path", + "required": true, + "schema": { + "format": "int64", + "type": "string", + "example": "1293384261075731499" + } + } + }, + "requestBodies": {}, + "responses": { + "CallControlApplicationResponse": { + "description": "Successful response with details about a call control application.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Call Control Application Response", + "properties": { + "data": { + "$ref": "#/components/schemas/CallControlApplication" + } + } + } + } + } + }, + "CallControlCommandResponse": { + "description": "Successful response upon making a call control command.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Call Control Command Response", + "properties": { + "data": { + "$ref": "#/components/schemas/CallControlCommandResult" + } + } + } + } + } + }, + "ConferenceCommandResponse": { + "description": "Successful response upon making a conference command.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Conference Command Response", + "properties": { + "data": { + "$ref": "#/components/schemas/ConferenceCommandResult" + } + } + } + } + } + }, + "ConferenceResponse": { + "description": "Successful response with details about a conference.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Conference Response", + "properties": { + "data": { + "$ref": "#/components/schemas/Conference" + } + } + } + } + } + }, + "ConnectionResponse": { + "description": "Successful response with details about a connection.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Connection Response", + "properties": { + "data": { + "$ref": "#/components/schemas/Connection" + } + } + } + } + } + }, + "CredentialConnectionResponse": { + "description": "Successful response with details about a credential connection.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Credential Connection Response", + "properties": { + "data": { + "$ref": "#/components/schemas/CredentialConnection" + } + } + } + } + } + }, + "CsvDownloadResponse": { + "description": "Successful response with details about a CSV download.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "CSV Download Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CsvDownload" + } + } + } + } + } + } + }, + "FaxApplicationResponse": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/FaxApplication" + } + } + } + } + } + }, + "FqdnConnectionResponse": { + "description": "Successful response with details about an FQDN connection.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Fqdn Connection Response", + "properties": { + "data": { + "$ref": "#/components/schemas/FqdnConnection" + } + } + } + } + } + }, + "FqdnResponse": { + "description": "Successful response with details about an FQDN connection.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Fqdn Response", + "properties": { + "data": { + "$ref": "#/components/schemas/Fqdn" + } + } + } + } + } + }, + "GenericErrorResponse": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Errors" + } + } + } + }, + "GetAllFaxApplicationsResponse": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FaxApplication" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "GetAllTexmlApplicationsResponse": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TexmlApplication" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "IpConnectionResponse": { + "description": "Successful response with details about an IP connection.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Ip Connection Response", + "properties": { + "data": { + "$ref": "#/components/schemas/IpConnection" + } + } + } + } + } + }, + "IpResponse": { + "description": "Successful response with details about an IP.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Ip Response", + "properties": { + "data": { + "$ref": "#/components/schemas/Ip" + } + } + } + } + } + }, + "ListAvailablePhoneNumbersResponse": { + "description": "Successful response with a list of available phone numbers.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Available Phone Numbers Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AvailablePhoneNumber" + } + }, + "meta": { + "$ref": "#/components/schemas/AvailablePhoneNumbersMetadata" + } + } + } + } + } + }, + "ListCallControlApplicationsResponse": { + "description": "Successful response with a list of call control applications.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Call Control Applications Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallControlApplication" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListCallEventsResponse": { + "description": "Successful response with a list of call events.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Call Events Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallEvent" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListConferencesResponse": { + "description": "Successful response with a list of conferences.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Conferences Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Conference" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListConnectionsResponse": { + "description": "Successful response with a list of connections.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Connections Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListCredentialConnectionsResponse": { + "description": "Successful response with a list of credential connections.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Credential Connections Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CredentialConnection" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListCsvDownloadsResponse": { + "description": "Successful response with a list of CSV downloads.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List CSV Downloads Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CsvDownload" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListFqdnConnectionsResponse": { + "description": "Successful response with a list of FQDN connections.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Fqdn Connections Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FqdnConnection" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListFqdnsResponse": { + "description": "Successful response with a list of FQDN connections.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Fqdns Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fqdn" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListIpConnectionsResponse": { + "description": "Successful response with a list of IP connections.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Ip Connections Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IpConnection" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListIpsResponse": { + "description": "Successful response with a list of IPs.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Ips Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ip" + } + } + } + } + } + } + }, + "ListMessagingHostedNumberOrdersResponse": { + "description": "Successful response with a list of messaging hosted number orders.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Messaging Hosted Number Order Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessagingHostedNumberOrder" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListMessagingProfileMetrics": { + "description": "Successful response with a list of messaging profile metrics.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Messaging Profile Metrics Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessagingProfileHighLevelMetrics" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListMessagingProfilePhoneNumbersResponse": { + "description": "Successful response with a list of messaging profile phone numbers.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Messaging Profile Phone Numbers Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumberWithMessagingSettings" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListMessagingProfileShortCodesResponse": { + "description": "Successful response with a list of messaging profile short codes.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Messaging Profile Short Codes Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShortCode" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListMessagingProfilesResponse": { + "description": "Successful response with a list of messaging profiles.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Messaging Profiles Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessagingProfile" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListMessagingUrlDomains": { + "description": "Successful response with details about a messaging URL domain.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Messaging Profile Url Domains Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessagingUrlDomain" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListNumberOrderDocumentsResponse": { + "description": "Successful response with a list of number order documents.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Number Order Documents Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NumberOrderDocument" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListNumberOrderRegulatoryRequirementsResponse": { + "description": "Successful response with a list of number order regulatory requirements.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Number Order Regulatory Requirements Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegulatoryRequirement" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListNumberOrdersResponse": { + "description": "Successful response with a list of number orders.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Number Orders Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NumberOrder" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListNumberReservationsResponse": { + "description": "Successful response with a list of number reservations.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Number Reservations Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NumberReservation" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListOutboundVoiceProfilesResponse": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Outbound Voice Profiles Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutboundVoiceProfile" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListParticipantsResponse": { + "description": "Successful response with a list of conference participants.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Participants Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Participant" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListPhoneNumberRegulatoryRequirementsResponse": { + "description": "Successful response with a list of phone number regulatory requirements.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Phone Number Regulatory Requirements Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumberRegulatoryGroup" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListPhoneNumbersJobsResponse": { + "description": "Successful response with a list of phone numbers background jobs.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Phone Numbers Background Jobs Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumbersJob" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListPhoneNumbersResponse": { + "description": "Successful response with a list of phone numbers.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Phone Numbers Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumberDetailed" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListPhoneNumbersWithMessagingSettingsResponse": { + "description": "Successful response with a list of phone numbers with messaging settings.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Messaging Settings Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumberWithMessagingSettings" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListPhoneNumbersWithVoiceSettingsResponse": { + "description": "Successful response with a list of phone numbers with voice settings.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Phone Numbers With Voice Settings Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListRecordingsResponse": { + "description": "Successful response with a list of recordings.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Recordings Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Recording" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "ListShortCodesResponse": { + "description": "Successful response with a list of short codes.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "List Short Codes Response", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShortCode" + } + }, + "meta": { + "$ref": "#/components/schemas/PaginationMeta" + } + } + } + } + } + }, + "MessageResponse": { + "description": "Successful response with details about a message.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Message Response", + "properties": { + "data": { + "$ref": "#/components/schemas/OutboundMessagePayload" + } + } + } + } + } + }, + "MessagingHostedNumberOrderResponse": { + "description": "Successful response with details about a messaging hosted number order.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Retrieve Messaging Hosted Number Order Response", + "properties": { + "data": { + "$ref": "#/components/schemas/MessagingHostedNumberOrder" + } + } + } + } + } + }, + "MessagingHostedNumberResponse": { + "description": "Successful response with details about a messaging hosted number.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Retrieve Messaging Hosted Number Response", + "properties": { + "data": { + "$ref": "#/components/schemas/HostedNumber" + } + } + } + } + } + }, + "MessagingProfileResponse": { + "description": "Successful response with details about a messaging profile.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Messaging Profile Response", + "properties": { + "data": { + "$ref": "#/components/schemas/MessagingProfile" + } + } + } + } + } + }, + "NotFoundResponse": { + "description": "Conference does not exist" + }, + "NumberOrderDocumentResponse": { + "description": "Successful response with details about a number order document.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Number Order Document Response", + "properties": { + "data": { + "$ref": "#/components/schemas/NumberOrderDocument" + } + } + } + } + } + }, + "NumberOrderRegulatoryRequirementResponse": { + "description": "Successful response with details about a number order regulatory requirement.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Number Order Regulatory Requirement Response", + "properties": { + "data": { + "$ref": "#/components/schemas/RegulatoryRequirement" + } + } + } + } + } + }, + "NumberOrderResponse": { + "description": "Successful response with details about a number order.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Number Order Response", + "properties": { + "data": { + "$ref": "#/components/schemas/NumberOrder" + } + } + } + } + } + }, + "NumberReservationResponse": { + "description": "Successful response with details about a number reservation.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Number Reservation Response", + "properties": { + "data": { + "$ref": "#/components/schemas/NumberReservation" + } + } + } + } + } + }, + "OutboundVoiceProfileResponse": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Outbound Voice Profile Response", "properties": { "data": { - "$ref": "#/components/schemas/NumberReservation" + "$ref": "#/components/schemas/OutboundVoiceProfile" + } + } + } + } + } + }, + "PhoneNumberResponse": { + "description": "Successful response with details about a phone number.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Phone Number Response", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumberDetailed" + } + } + } + } + } + }, + "PhoneNumberWithMessagingSettingsResponse": { + "description": "Successful response with details about a phone number including voice settings.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Retrieve Messaging Settings Response", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumberWithMessagingSettings" + } + } + } + } + } + }, + "PhoneNumberWithVoiceSettingsResponse": { + "description": "Successful response with details about a phone number including voice settings.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Retrieve Phone Number Voice Response", + "properties": { + "data": { + "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" + } + } + } + } + } + }, + "RecordingResponse": { + "description": "Successful response with details about a recording.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Get Recording Response", + "properties": { + "data": { + "$ref": "#/components/schemas/Recording" + } + } + } + } + } + }, + "RetrieveCallStatusResponse": { + "description": "Successful response with details about a call status.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Retrieve Call Status Response", + "properties": { + "data": { + "$ref": "#/components/schemas/Call" + } + } + } + } + } + }, + "RetrieveMessagingProfileMetrics": { + "description": "Successful response with details about a messaging profile's metrics.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Retrieve Messaging Profile Metrics Response", + "properties": { + "data": { + "$ref": "#/components/schemas/MessagingProfileDetailedMetrics" + } + } + } + } + } + }, + "ShortCodeResponse": { + "description": "Successful response with details about a short code.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Short Code Response", + "properties": { + "data": { + "$ref": "#/components/schemas/ShortCode" + } + } + } + } + } + }, + "TexmlApplicationResponse": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TexmlApplication" + } + } + } + } + } + }, + "UnauthorizedResponse": { + "description": "Unauthorized" + }, + "UnprocessableEntityResponse": { + "description": "Unprocessable entity" + } + }, + "schemas": { + "AnchorsiteOverride": { + "title": "Anchorsite Override", + "type": "string", + "description": "`Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.", + "enum": [ + "Latency", + "Chicago, IL", + "Ashburn, VA", + "San Jose, CA", + "Sydney, Australia", + "Amsterdam, Netherlands", + "London, UK", + "Toronto, Canada", + "Vancouver, Canada", + "Frankfurt, Germany" + ], + "default": "Latency", + "example": "Amsterdam, Netherlands" + }, + "AnswerRequest": { + "type": "object", + "title": "Answer Request", + "properties": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + }, + "webhook_url": { + "description": "Use this field to override the URL for which Telnyx will send subsuqeunt webhooks to for this call.", + "type": "string", + "example": "https://www.example.com/server-b/" + }, + "webhook_url_method": { + "description": "HTTP request type used for `webhook_url`.", + "default": "POST", + "type": "string", + "enum": [ + "POST", + "GET" + ], + "example": "GET" + } + }, + "example": { + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "webhook_url": "https://www.example.com/server-b/", + "webhook_url_method": "POST" + } + }, + "ApplicationName": { + "title": "Application Name", + "type": "string", + "description": "A user-assigned name to help manage the application.", + "example": "call-router" + }, + "AvailablePhoneNumber": { + "type": "object", + "properties": { + "record_type": { + "type": "string", + "example": "available_phone_number", + "enum": [ + "available_phone_number" + ] + }, + "phone_number": { + "type": "string", + "example": "+19705555098" + }, + "vanity_format": { + "type": "string" + }, + "best_effort": { + "type": "boolean", + "description": "Specifies whether the phone number is an exact match based on the search criteria or not.", + "example": false + }, + "quickship": { + "type": "boolean", + "description": "Specifies whether the phone number can receive calls immediately after purchase or not.", + "example": true + }, + "reservable": { + "type": "boolean", + "description": "Specifies whether the phone number can be reserved before purchase or not.", + "example": true + }, + "region_information": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegionInformation" + } + }, + "cost_information": { + "$ref": "#/components/schemas/CostInformation" + }, + "regulatory_requirements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegulatoryRequirement" + } + } + }, + "example": { + "record_type": "available_phone_number", + "phone_number": "+19705555098", + "vanity_format": "", + "best_effort": false, + "quickship": true, + "reservable": true, + "region_information": [ + { + "region_type": "country_code", + "region_name": "US" + } + ], + "cost_information": { + "upfront_cost": "3.21", + "monthly_cost": "6.54", + "currency": "USD" + }, + "regulatory_requirements": [ + { + "requirement_type": "end user proof of address", + "label": "Proof of Address", + "field_type": "address", + "description": "Requirement for providing Proof of Address." + } + ] + } + }, + "AvailablePhoneNumbersMetadata": { + "type": "object", + "example": { + "total_results": 100, + "best_effort_results": 50 + }, + "properties": { + "total_results": { + "type": "integer", + "example": 1 + }, + "best_effort_results": { + "type": "integer", + "example": 0 + } + } + }, + "BridgeRequest": { + "type": "object", + "title": "Bridge Request", + "required": [ + "call_control_id" + ], + "properties": { + "call_control_id": { + "description": "The Call Control ID of the call you want to bridge with.", + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + }, + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + }, + "park_after_unbridge": { + "description": "Specifies behavior after the bridge ends (i.e. the opposite leg either hangs up or is transferred). If supplied with the value `self`, the current leg will be parked after unbridge. If not set, the default behavior is to hang up the leg.", + "type": "string", + "example": "self" + } + }, + "example": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "park_after_unbridge": "self" + } + }, + "Call": { + "type": "object", + "title": "Call", + "required": [ + "call_control_id", + "call_leg_id", + "call_session_id", + "is_alive", + "record_type" + ], + "example": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768", + "call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768", + "is_alive": false, + "record_type": "call" + }, + "properties": { + "record_type": { + "type": "string", + "enum": [ + "call" + ], + "example": "call" + }, + "call_session_id": { + "description": "ID that is unique to the call session and can be used to correlate webhook events", + "type": "string", + "example": "428c31b6-7af4-4bcb-b68e-5013ef9657c1" + }, + "call_leg_id": { + "description": "ID that is unique to the call and can be used to correlate webhook events", + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" + }, + "call_control_id": { + "description": "Unique identifier and token for controlling the call.", + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + }, + "is_alive": { + "description": "Indicates whether the call is alive or not. For Dial command it will always be `false` (dialing is asynchronous).", + "type": "boolean", + "example": true + } + } + }, + "CallAnswered": { + "type": "object", + "title": "Call Answered", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.answered", + "enum": [ + "call.answered" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "state": { + "type": "string", + "example": "answered", + "enum": [ + "answered" + ], + "description": "State received from a command." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.answered", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "state": "answered" + } + } + }, + "CallAnsweredEvent": { + "type": "object", + "title": "Call Answered Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallAnswered" + } + } + }, + "CallBridged": { + "type": "object", + "title": "Call Bridged", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.bridged", + "enum": [ + "call.bridged" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "state": { + "type": "string", + "example": "bridged", + "enum": [ + "bridged" + ], + "description": "State received from a command." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.bridged", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "state": "bridged" + } + } + }, + "CallBridgedEvent": { + "type": "object", + "title": "Call Bridged Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallBridged" + } + } + }, + "CallControlApplication": { + "type": "object", + "title": "Call Control Application", + "properties": { + "active": { + "type": "boolean", + "description": "Specifies whether the connection can be used.", + "default": true + }, + "anchorsite_override": { + "type": "string", + "description": "`Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.\n", + "enum": [ + "\"Latency\"", + "\"Chicago, IL\"", + "\"Ashburn, VA\"", + "\"San Jose, CA\"" + ], + "example": "\"Amsterdam, Netherlands\"", + "default": "\"Latency\"" + }, + "application_name": { + "type": "string", + "description": "A user-assigned name to help manage the application.", + "example": "call-router" + }, + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date of when the resource was created", + "example": "2018-02-02T22:25:27.521Z" + }, + "dtmf_type": { + "type": "string", + "description": "Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.", + "enum": [ + "RFC 2833", + "Inband", + "SIP INFO" + ], + "example": "Inband", + "default": "RFC 2833" + }, + "first_command_timeout": { + "type": "boolean", + "description": "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.", + "example": true, + "default": false + }, + "first_command_timeout_secs": { + "type": "integer", + "description": "Specifies how many seconds to wait before timing out a dial command.", + "example": 10, + "default": 30 + }, + "id": { + "type": "string", + "format": "int64", + "example": "1293384261075731499" + }, + "inbound": { + "$ref": "#/components/schemas/CallControlApplicationInbound" + }, + "outbound": { + "$ref": "#/components/schemas/CallControlApplicationOutbound" + }, + "record_type": { + "type": "string", + "enum": [ + "call_control_application" + ], + "default": "call_control_application" + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date of when the resource was last updated", + "example": "2018-02-02T22:25:27.521Z" + }, + "webhook_api_version": { + "type": "string", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "enum": [ + "1", + "2" + ], + "example": "1", + "default": "1" + }, + "webhook_event_failover_url": { + "type": "string", + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as `https`.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" + }, + "webhook_event_url": { + "type": "string", + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as `https`.", + "example": "https://example.com" + }, + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "example": 25, + "default": null, + "nullable": true + } + }, + "example": { + "active": false, + "anchorsite_override": "\"Latency\"", + "application_name": "call-router", + "created_at": "2018-02-02T22:25:27.521Z", + "dtmf_type": "Inband", + "first_command_timeout": true, + "first_command_timeout_secs": 10, + "id": "1293384261075731499", + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" + }, + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + }, + "record_type": "call_control_application", + "updated_at": "2018-02-02T22:25:27.521Z", + "webhook_api_version": "1", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_event_url": "https://example.com", + "webhook_timeout_secs": 25 + } + }, + "CallControlApplicationInbound": { + "type": "object", + "title": "Call Control Application Inbound", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.", + "example": 10, + "default": null + }, + "sip_subdomain": { + "type": "string", + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", + "example": "example", + "default": null + }, + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "example": "only_my_connections", + "default": "from_anyone" + } + } + }, + "CallControlApplicationOutbound": { + "type": "object", + "title": "Call Control Application Outbound", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.", + "example": 10, + "default": null + }, + "outbound_voice_profile_id": { + "type": "string", + "format": "int64", + "description": "Identifies the associated outbound voice profile.", + "example": "1293384261075731499" + } + } + }, + "CallControlCommandResult": { + "type": "object", + "title": "Call Control Command Result", + "example": { + "result": "ok" + }, + "properties": { + "result": { + "type": "string", + "example": "ok" + } + } + }, + "CallDtmfReceived": { + "type": "object", + "title": "Call DTMF Received", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.dtmf.received", + "enum": [ + "call.dtmf.received" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Identifies the type of resource." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "digit": { + "type": "string", + "example": "#", + "description": "The received DTMF digit or symbol." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.dtmf.received", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "digit": "#" + } + } + }, + "CallDtmfReceivedEvent": { + "type": "object", + "title": "Call DTMF Received Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallDtmfReceived" + } + } + }, + "CallEvent": { + "type": "object", + "title": "Call Event", + "required": [ + "record_type", + "call_leg_id", + "call_session_id", + "event_timestamp", + "name", + "type", + "metadata" + ], + "properties": { + "record_type": { + "type": "string", + "enum": [ + "call_event" + ], + "example": "call_event" + }, + "call_leg_id": { + "type": "string", + "description": "Uniquely identifies an individual call leg.", + "example": "308fe500-5213-11e9-ace7-02420a0f0668" + }, + "call_session_id": { + "type": "string", + "description": "Uniquely identifies the call control session. A session may include multiple call leg events.", + "example": "308fec30-5213-11e9-9d3f-02420a0f0668" + }, + "event_timestamp": { + "type": "string", + "description": "Event timestamp", + "example": "2019-03-29T11:10:19.127783Z" + }, + "name": { + "type": "string", + "description": "Event name", + "example": "call.hangup" + }, + "type": { + "type": "string", + "description": "Event type", + "enum": [ + "command", + "webhook" + ], + "example": "webhook" + }, + "metadata": { + "type": "object", + "description": "Event metadata, which includes raw event, and extra information based on event type" + } + }, + "example": { + "record_type": "call_event", + "call_leg_id": "308fe500-5213-11e9-ace7-02420a0f0668", + "call_session_id": "308fec30-5213-11e9-9d3f-02420a0f0668", + "event_timestamp": "2019-03-29T11:10:19.127783Z", + "name": "call.hangup", + "type": "webhook", + "metadata": {} + } + }, + "CallForkStarted": { + "type": "object", + "title": "Call Fork Started", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.fork.started", + "enum": [ + "call.fork.started" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.fork.started", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" + } + } + }, + "CallForkStartedEvent": { + "type": "object", + "title": "Call Fork Started Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallForkStarted" + } + } + }, + "CallForkStopped": { + "type": "object", + "title": "Call Fork Stopped", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.fork.stopped", + "enum": [ + "call.fork.stopped" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.fork.stopped", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" + } + } + }, + "CallForkStoppedEvent": { + "type": "object", + "title": "Call Fork Stopped Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallForkStopped" + } + } + }, + "CallForwarding": { + "description": "The call forwarding settings for a phone number.", + "type": "object", + "properties": { + "call_forwarding_enabled": { + "type": "boolean", + "default": true, + "description": "Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints.", + "example": true + }, + "forwards_to": { + "type": "string", + "description": "The phone number to which inbound calls to this number are forwarded. Inbound calls will not be forwarded if this field is left blank. If set, must be a +E.164-formatted phone number." + }, + "forwarding_type": { + "type": "string", + "description": "Call forwarding type. 'forwards_to' must be set for this to have an effect.", + "enum": [ + "always", + "on_failure" + ], + "example": "always" + } + }, + "example": { + "call_forwarding_enabled": true, + "forwards_to": "+13035559123", + "forwarding_type": "always" + } + }, + "CallGatherEnded": { + "type": "object", + "title": "Call Gather Ended", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.gather.ended", + "enum": [ + "call.gather.ended" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "digits": { + "type": "string", + "example": "5503", + "description": "The received DTMF digit or symbol." + }, + "status": { + "type": "string", + "enum": [ + "valid", + "invalid", + "call_hangup", + "cancelled", + "cancelled_amd" + ], + "example": "valid", + "description": "Reflects how command ended." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.gather.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "digits": "123", + "status": "valid" + } + } + }, + "CallGatherEndedEvent": { + "type": "object", + "title": "Call Gather Ended Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallGatherEnded" + } + } + }, + "CallHangup": { + "type": "object", + "title": "Call Hangup", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.hangup", + "enum": [ + "call.hangup" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "state": { + "type": "string", + "example": "hangup", + "enum": [ + "hangup" + ], + "description": "State received from a command." + }, + "hangup_cause": { + "type": "string", + "example": "call_rejected", + "enum": [ + "call_rejected", + "normal_clearing", + "originator_cancel", + "timeout", + "time_limit", + "user_busy", + "not_found", + "unspecified" + ], + "description": "The reason the call was ended (`call_rejected`, `normal_clearing`, `originator_cancel`, `timeout`, `time_limit`, `user_busy`, `not_found` or `unspecified`)." + }, + "hangup_source": { + "type": "string", + "example": "caller", + "enum": [ + "caller", + "callee", + "unknown" + ], + "description": "The party who ended the call (`callee`, `caller`, `unknown`)." + }, + "sip_hangup_cause": { + "type": "string", + "example": "603", + "description": "The reason the call was ended (SIP response code). If the SIP response is unavailable (in inbound calls for example) this is set to `unspecified`." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.hangup", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "state": "hangup", + "hangup_cause": "call_rejected", + "hangup_source": "caller", + "sip_hangup_cause": "603" + } + } + }, + "CallHangupEvent": { + "type": "object", + "title": "Call Hangup Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallHangup" + } + } + }, + "CallInitiated": { + "type": "object", + "title": "Call Initiated", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.initiated", + "enum": [ + "call.initiated" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "direction": { + "type": "string", + "example": "incoming", + "enum": [ + "incoming", + "outgoing" + ], + "description": "Whether the call is `incoming` or `outgoing`." + }, + "state": { + "type": "string", + "example": "parked", + "enum": [ + "parked", + "bridging" + ], + "description": "State received from a command." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.initiated", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "direction": "incoming", + "state": "parked" + } + } + }, + "CallInitiatedEvent": { + "type": "object", + "title": "Call Initiated Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallInitiated" + } + } + }, + "CallMachineDetectionEnded": { + "type": "object", + "title": "Call Machine Detection Ended", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.machine.detection.ended", + "enum": [ + "call.machine.detection.ended" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "result": { + "type": "string", + "example": "machine", + "enum": [ + "human", + "machine", + "not_sure" + ], + "description": "Answering machine detection result." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.machine.detection.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "result": "human" + } + } + }, + "CallMachineDetectionEndedEvent": { + "type": "object", + "title": "Call Machine Detection Ended Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallMachineDetectionEnded" + } + } + }, + "CallMachineGreetingEnded": { + "type": "object", + "title": "Call Machine Greeting Ended", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.machine.greeting.ended", + "enum": [ + "call.machine.greeting.ended" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + }, + "result": { + "type": "string", + "example": "ended", + "enum": [ + "ended", + "not_sure" + ], + "description": "Answering machine greeting ended result." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.machine.greeting.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "from": "+35319605860", + "to": "+35319605860", + "result": "ended" + } + } + }, + "CallMachineGreetingEndedEvent": { + "type": "object", + "title": "Call Machine Greeting Ended Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallMachineGreetingEnded" + } + } + }, + "CallPlaybackEnded": { + "type": "object", + "title": "Call Playback Ended", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.playback.ended", + "enum": [ + "call.playback.ended" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "media_url": { + "type": "string", + "example": "http://example.com/audio.wav", + "description": "The audio URL being played back." + }, + "overlay": { + "type": "boolean", + "example": false, + "description": "Whether the audio is going to be played in overlay mode or not." + }, + "status": { + "type": "string", + "enum": [ + "valid", + "invalid", + "call_hangup" + ], + "example": "valid", + "description": "Reflects how command ended." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.playback.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "media_url": "http://example.com/audio.wav", + "overlay": false, + "status": "valid" + } + } + }, + "CallPlaybackEndedEvent": { + "type": "object", + "title": "Call Playback Ended Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallPlaybackEnded" + } + } + }, + "CallPlaybackStarted": { + "type": "object", + "title": "Call Playback Started", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.playback.started", + "enum": [ + "call.playback.started" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "media_url": { + "type": "string", + "example": "http://example.com/audio.wav", + "description": "The audio URL being played back." + }, + "overlay": { + "type": "boolean", + "example": false, + "description": "Whether the audio is going to be played in overlay mode or not." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.playback.started", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "media_url": "http://example.com/audio.wav", + "overlay": false + } + } + }, + "CallPlaybackStartedEvent": { + "type": "object", + "title": "Call Playback Started Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallPlaybackStarted" + } + } + }, + "CallRecording": { + "description": "The call recording settings for a phone number.", + "type": "object", + "properties": { + "inbound_call_recording_enabled": { + "type": "boolean", + "default": false, + "description": "When enabled, any inbound call to this number will be recorded." + }, + "inbound_call_recording_format": { + "type": "string", + "enum": [ + "wav", + "mp3" + ], + "default": "wav", + "description": "The audio file format for calls being recorded." + }, + "inbound_call_recording_channels": { + "type": "string", + "enum": [ + "single", + "dual" + ], + "default": "single", + "description": "When using 'dual' channels, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B." + } + }, + "example": { + "inbound_call_recording_enabled": true, + "inbound_call_recording_format": "wav", + "inbound_call_recording_channels": "single" + } + }, + "CallRecordingSaved": { + "type": "object", + "title": "Call Recording Saved", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.recording.saved", + "enum": [ + "call.recording.saved" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "recording_started_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:20:27.521992Z", + "description": "ISO 8601 datetime of when recording started." + }, + "recording_ended_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when recording ended." + }, + "channels": { + "type": "string", + "example": "single", + "enum": [ + "single", + "dual" + ], + "description": "Whether recording was recorded in `single` or `dual` channel." + }, + "recording_urls": { + "type": "object", + "description": "Recording URLs in requested format valid for 10 minutes. After 10 minutes, you may retrieve recordings via API using Reports -> Call Recordings documentation, or via Mission Control under Reporting -> Recordings.", + "properties": { + "mp3": { + "type": "string", + "nullable": true, + "example": "http://example.com/recording.mp3", + "description": "Recording URL in requested `mp3` format." + }, + "wav": { + "type": "string", + "nullable": true, + "example": "http://example.com/recording.wav", + "description": "Recording URL in requested `wav` format." + } + } + }, + "public_recording_urls": { + "type": "object", + "description": "Recording URLs in requested format. The URL is valid for as long as the file exists. For security purposes, this feature is activated on a per request basis. Please contact customer support with your Account ID to request activation.", + "properties": { + "mp3": { + "type": "string", + "nullable": true, + "example": "http://example.com/recording.mp3", + "description": "Recording URL in requested `mp3` format." + }, + "wav": { + "type": "string", + "nullable": true, + "example": "http://example.com/recording.wav", + "description": "Recording URL in requested `wav` format." + } } } } - } - } - }, - "PhoneNumberResponse": { - "description": "Successful response with details about a phone number.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Phone Number Response", - "properties": { - "data": { - "$ref": "#/components/schemas/PhoneNumberDetailed" - } + } + }, + "example": { + "record_type": "event", + "event_type": "call.recording.saved", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "recording_started_at": "2018-02-02T22:20:27.521992Z", + "recording_ended_at": "2018-02-02T22:20:27.521992Z", + "channels": "single", + "recording_urls": { + "mp3": "http://example.com/recording.mp3", + "wav": "http://example.com/recording.wav" + }, + "public_recording_urls": { + "mp3": "http://example.com/recording.mp3", + "wav": "http://example.com/recording.wav" + } + } + } + }, + "CallRecordingSavedEvent": { + "type": "object", + "title": "Call Recording Saved Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallRecordingSaved" + } + } + }, + "CallReferCompleted": { + "type": "object", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.refer.completed", + "enum": [ + "call.refer.completed" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + "description": "Unique ID for controlling the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "sip_notify_response": { + "type": "integer", + "example": 200, + "description": "SIP NOTIFY event status for tracking the REFER attempt." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.refer.completed", + "id": "4ce4366d-8d87-44be-a00b-942154e9c5f5", + "occurred_at": "2020-03-30T13:29:44.650000Z", + "payload": { + "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", + "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "connection_id": "1289082222292239760", + "from": "+35319605860", + "sip_notify_response": 200, + "to": "+13129457420" + } + } + }, + "CallReferCompletedEvent": { + "type": "object", + "title": "Call Recording Saved Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallReferCompleted" + } + } + }, + "CallReferFailed": { + "type": "object", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.refer.failed", + "enum": [ + "call.refer.failed" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + "description": "Unique ID for controlling the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "sip_notify_response": { + "type": "integer", + "example": 603, + "description": "SIP NOTIFY event status for tracking the REFER attempt." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.refer.failed", + "id": "fbeb70e0-54eb-4e26-8d19-56b43e66f754", + "occurred_at": "2020-03-30T13:29:42.130013Z", + "payload": { + "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", + "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "connection_id": "1289082222292239760", + "from": "+35319605860", + "sip_notify_response": 603, + "to": "+13129457420" + } + } + }, + "CallReferFailedEvent": { + "type": "object", + "title": "Call Recording Saved Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallReferFailed" + } + } + }, + "CallReferStarted": { + "type": "object", + "title": "Call Refer Started", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.refer.started", + "enum": [ + "call.refer.started" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + "description": "Unique ID for controlling the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "from": { + "type": "string", + "example": "+35319605860", + "description": "Number or SIP URI placing the call." + }, + "sip_notify_response": { + "type": "integer", + "example": 100, + "description": "SIP NOTIFY event status for tracking the REFER attempt." + }, + "to": { + "type": "string", + "example": "+13129457420", + "description": "Destination number or SIP URI of the call." + } + } + } + }, + "example": { + "record_type": "event", + "event_type": "call.refer.started", + "id": "fbeb70e0-54eb-4e26-8d19-56b43e66f754", + "occurred_at": "2020-03-30T13:29:42.130013Z", + "payload": { + "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", + "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", + "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "connection_id": "1289082222292239760", + "from": "+35319605860", + "sip_notify_response": 100, + "to": "+13129457420" + } + } + }, + "CallReferStartedEvent": { + "type": "object", + "title": "Call Refer Started Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallReferStarted" + } + } + }, + "CallRequest": { + "type": "object", + "title": "Dial Request", + "required": [ + "connection_id", + "to", + "from" + ], + "example": { + "to": "+18005550100 or sip:username@sip.telnyx.com", + "from": "+18005550101", + "connection_id": "7267xxxxxxxxxxxxxx", + "audio_url": "http://www.example.com/sounds/greeting.wav", + "timeout_secs": 60, + "timeout_limit_secs": 60, + "webhook_url": "https://www.example.com/server-b/", + "webhook_url_method": "POST", + "answering_machine_detection": "detect", + "answering_machine_detection_config": { + "total_analysis_time_millis": 5000, + "after_greeting_silence_millis": 1000, + "between_words_silence_millis": 1000, + "greeting_duration_millis": 1000, + "initial_silence_millis": 1000, + "maximum_number_of_words": 1000, + "maximum_word_length_millis": 2000, + "silence_threshold": 512, + "greeting_total_analysis_time_millis": 50000, + "greeting_silence_duration_millis": 2000 + }, + "custom_headers": [ + { + "name": "head_1", + "value": "val_1" + }, + { + "name": "head_2", + "value": "val_2" + } + ], + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "link_to": "ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg==", + "sip_auth_username": "username", + "sip_auth_password": "password" + }, + "properties": { + "to": { + "description": "The DID or SIP URI to dial out to.", + "type": "string", + "example": "+18005550100 or sip:username@sip.telnyx.com" + }, + "from": { + "description": "The `from` number to be used as the caller id presented to the destination (`to` number). The number should be in +E164 format. This attribute will default to the `from` number of the original call if omitted.", + "type": "string", + "example": "+18005550101" + }, + "connection_id": { + "type": "string", + "description": "The ID of the connection to be used when dialing the destination." + }, + "audio_url": { + "type": "string", + "example": "http://example.com/message.wav", + "description": "The URL of a file to be played back to the callee when the call is answered. The URL can point to either a WAV or MP3 file." + }, + "timeout_secs": { + "description": "The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being called. If the timeout is reached before an answer is received, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be sent. Minimum value is 5 seconds. Maximum value is 120 seconds.", + "default": 30, + "type": "integer", + "example": 60, + "format": "int32" + }, + "time_limit_secs": { + "description": "Sets the maximum duration of a Call Control Leg in seconds. If the time limit is reached, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `time_limit` will be sent. For example, by setting a time limit of 120 seconds, a Call Leg will be automatically terminated two minutes after being answered. The default time limit is 14400 seconds or 4 hours and this is also the maximum allowed call length.", + "default": 14400, + "type": "integer", + "example": 600, + "format": "int32" + }, + "answering_machine_detection": { + "description": "Enables Answering Machine Detection. When a call is answered, Telnyx runs real-time detection to determine if it was picked up by a human or a machine and sends an `call.machine.detection.ended` webhook with the analysis result. If 'greeting_end' or 'detect_words' is used and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' webhook when the answering machine greeting ends with a beep or silence. If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' if a beep is detected.", + "default": "disabled", + "type": "string", + "enum": [ + "detect", + "detect_beep", + "detect_words", + "greeting_end", + "disabled" + ] + }, + "answering_machine_detection_config": { + "description": "Optional configuration parameters to modify 'answering_machine_detection' performance.", + "type": "object", + "properties": { + "total_analysis_time_millis": { + "description": "Maximum timeout threshold for overall detection.", + "default": 3500, + "type": "integer", + "example": 5000, + "format": "int32" + }, + "after_greeting_silence_millis": { + "description": "Silence duration threshold after a greeting message or voice for it be considered human.", + "default": 800, + "type": "integer", + "example": 1000, + "format": "int32" + }, + "between_words_silence_millis": { + "description": "Maximum threshold for silence between words.", + "default": 50, + "type": "integer", + "example": 100, + "format": "int32" + }, + "greeting_duration_millis": { + "description": "Maximum threshold of a human greeting. If greeting longer than this value, considered machine.", + "default": 3500, + "type": "integer", + "example": 1500, + "format": "int32" + }, + "initial_silence_millis": { + "description": "If initial silence duration is greater than this value, consider it a machine.", + "default": 3500, + "type": "integer", + "example": 1800, + "format": "int32" + }, + "maximum_number_of_words": { + "description": "If number of detected words is greater than this value, consder it a machine.", + "default": 5, + "type": "integer", + "example": 3, + "format": "int32" + }, + "maximum_word_length_millis": { + "description": "If a single word lasts longer than this threshold, consider it a machine.", + "default": 3500, + "type": "integer", + "example": 2000, + "format": "int32" + }, + "silence_threshold": { + "description": "Minimum noise threshold for any analysis.", + "default": 256, + "type": "integer", + "example": 512, + "format": "int32" + }, + "greeting_total_analysis_time_millis": { + "description": "If machine already detected, maximum timeout threshold to determine the end of the machine greeting.", + "default": 5000, + "type": "integer", + "example": 7500, + "format": "int32" + }, + "greeting_silence_duration_millis": { + "description": "If machine already detected, maximum threshold for silence between words. If exceeded, the greeting is considered ended.", + "default": 1500, + "type": "integer", + "example": 2000, + "format": "int32" + } + } + }, + "custom_headers": { + "description": "Custom headers to be added to the SIP INVITE.", + "type": "array", + "example": [ + { + "name": "head_1", + "value": "val_1" + }, + { + "name": "head_2", + "value": "val_2" } + ], + "items": { + "$ref": "#/components/schemas/CustomSipHeader" } + }, + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + }, + "link_to": { + "description": "Use another call's control id for sharing the same call session id", + "type": "string", + "example": "ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg==" + }, + "sip_auth_username": { + "description": "SIP Authentication username used for SIP challenges.", + "type": "string" + }, + "sip_auth_password": { + "description": "SIP Authentication password used for SIP challenges.", + "type": "string" + }, + "webhook_url": { + "description": "Use this field to override the URL for which Telnyx will send subsuqeunt webhooks to for this call.", + "type": "string", + "example": "https://www.example.com/server-b/" + }, + "webhook_url_method": { + "description": "HTTP request type used for `webhook_url`.", + "default": "POST", + "type": "string", + "enum": [ + "POST", + "GET" + ], + "example": "GET" } } }, - "PhoneNumberWithMessagingSettingsResponse": { - "description": "Successful response with details about a phone number including voice settings.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Retrieve Messaging Settings Response", - "properties": { - "data": { - "$ref": "#/components/schemas/PhoneNumberWithMessagingSettings" - } + "CallSpeakEnded": { + "type": "object", + "title": "Call Speak Ended", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.speak.ended", + "enum": [ + "call.speak.ended" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "status": { + "type": "string", + "example": "completed", + "enum": [ + "completed", + "call_hangup" + ], + "description": "Reflects how `speak` ended." } } } - } - }, - "PhoneNumberWithVoiceSettingsResponse": { - "description": "Successful response with details about a phone number including voice settings.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Retrieve Phone Number Voice Response", - "properties": { - "data": { - "$ref": "#/components/schemas/PhoneNumberWithVoiceSettings" - } - } - } + }, + "example": { + "record_type": "event", + "event_type": "call.speak.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "status": "completed" } } }, - "RecordingResponse": { - "description": "Successful response with details about a recording.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Get Recording Response", - "properties": { - "data": { - "$ref": "#/components/schemas/Recording" - } - } - } + "CallSpeakEndedEvent": { + "type": "object", + "title": "Call Speak Ended Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallSpeakEnded" } } }, - "RetrieveCallStatusResponse": { - "description": "Successful response with details about a call status.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Retrieve Call Status Response", - "properties": { - "data": { - "$ref": "#/components/schemas/Call" - } + "CallSpeakStarted": { + "type": "object", + "title": "Call Speak Started", + "properties": { + "record_type": { + "type": "string", + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." + }, + "event_type": { + "type": "string", + "example": "call.speak.started", + "enum": [ + "call.speak.started" + ], + "description": "The type of event being delivered." + }, + "id": { + "type": "string", + "format": "uuid", + "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "description": "Identifies the type of resource." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521992Z", + "description": "ISO 8601 datetime of when the event occurred." + }, + "payload": { + "type": "object", + "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, + "connection_id": { + "type": "string", + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." + }, + "call_leg_id": { + "type": "string", + "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "description": "ID that is unique to the call and can be used to correlate webhook events." + }, + "call_session_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." } } } - } - }, - "RetrieveMessagingProfileMetrics": { - "description": "Successful response with details about a messaging profile's metrics.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Retrieve Messaging Profile Metrics Response", - "properties": { - "data": { - "$ref": "#/components/schemas/MessagingProfileDetailedMetrics" - } - } - } + }, + "example": { + "record_type": "event", + "event_type": "call.speak.started", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d" } } }, - "ShortCodeResponse": { - "description": "Successful response with details about a short code.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Short Code Response", - "properties": { - "data": { - "$ref": "#/components/schemas/ShortCode" - } - } - } + "CallSpeakStartedEvent": { + "type": "object", + "title": "Call Speak Started Event", + "properties": { + "data": { + "$ref": "#/components/schemas/CallSpeakStarted" } } }, - "UnauthorizedResponse": { - "description": "Unauthorized" - }, - "UnprocessableEntityResponse": { - "description": "Unprocessable entity" - } - }, - "schemas": { - "AnswerRequest": { + "CnamListing": { + "description": "The CNAM listing settings for a phone number.", "type": "object", - "title": "Answer Request", "properties": { - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" - }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" - }, - "webhook_url": { - "description": "Use this field to override the URL for which Telnyx will send subsuqeunt webhooks to for this call.", - "type": "string", - "example": "https://www.example.com/server-b/" + "cnam_listing_enabled": { + "type": "boolean", + "default": false, + "description": "Enables CNAM listings for this number. Requires cnam_listing_details to also be set." }, - "webhook_url_method": { - "description": "HTTP request type used for `webhook_url`.", - "default": "POST", + "cnam_listing_details": { "type": "string", - "enum": [ - "POST", - "GET" - ], - "example": "GET" + "description": "The CNAM listing details for this number. Must be alphanumeric characters or spaces with a maximum length of 15. Requires cnam_listing_enabled to also be set to true." } }, "example": { - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "webhook_url": "https://www.example.com/server-b/", - "webhook_url_method": "POST" + "cnam_listing_enabled": true, + "cnam_listing_details": "example" } }, - "AvailablePhoneNumber": { + "Conference": { "type": "object", + "title": "Conference", + "required": [ + "record_type", + "id", + "name", + "created_at", + "expires_at" + ], "properties": { "record_type": { "type": "string", - "example": "available_phone_number", "enum": [ - "available_phone_number" - ] + "conference" + ], + "example": "conference" }, - "phone_number": { + "id": { "type": "string", - "example": "+19705555098" + "description": "Uniquely identifies the conference", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "vanity_format": { - "type": "string" + "name": { + "type": "string", + "description": "Name of the conference", + "example": "All hands meeting" }, - "best_effort": { - "type": "boolean", - "description": "Specifies whether the phone number is an exact match based on the search criteria or not.", - "example": false + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date of when the conference was created", + "example": "2019-01-23T18:10:02.574Z" }, - "quickship": { - "type": "boolean", - "description": "Specifies whether the phone number can receive calls immediately after purchase or not.", - "example": true + "expires_at": { + "type": "string", + "description": "ISO 8601 formatted date of when the conference will expire", + "example": "2019-01-23T18:10:02.574Z" }, - "reservable": { - "type": "boolean", - "description": "Specifies whether the phone number can be reserved before purchase or not.", - "example": true + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date of when the conference was last updated", + "example": "2019-01-23T18:10:02.574Z" }, - "region_information": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RegionInformation" - } + "region": { + "type": "string", + "description": "Region where the conference is hosted", + "example": "sv1" }, - "cost_information": { - "$ref": "#/components/schemas/CostInformation" + "status": { + "type": "string", + "enum": [ + "init", + "in_progress", + "completed" + ], + "description": "Status of the conference", + "example": "completed" }, - "regulatory_requirements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RegulatoryRequirement" + "end_reason": { + "type": "string", + "enum": [ + "all_left", + "ended_via_api", + "host_left", + "time_exceeded" + ], + "description": "Reason why the conference ended", + "example": "all_left" + }, + "ended_by": { + "type": "object", + "description": "IDs related to who ended the conference. It is expected for them to all be there or all be null", + "properties": { + "call_control_id": { + "type": "string", + "description": "Call Control ID which ended the conference", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==" + }, + "call_session_id": { + "type": "string", + "description": "Call Session ID which ended the conference", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" + } } + }, + "connection_id": { + "type": "string", + "description": "Identifies the connection associated with the conference", + "example": "3fa85f64-9191-4567-b3fc-2c963f66afa6" } }, "example": { - "record_type": "available_phone_number", - "phone_number": "+19705555098", - "vanity_format": "", - "best_effort": false, - "quickship": true, - "reservable": true, - "region_information": [ - { - "region_type": "country_code", - "region_name": "US" - } - ], - "cost_information": { - "upfront_cost": "3.21", - "monthly_cost": "6.54", - "currency": "USD" - }, - "regulatory_requirements": [ - { - "requirement_type": "end user proof of address", - "label": "Proof of Address", - "field_type": "address", - "description": "Requirement for providing Proof of Address." - } - ] - } - }, - "AvailablePhoneNumbersMetadata": { - "type": "object", - "example": { - "total_results": 100, - "best_effort_results": 50 - }, - "properties": { - "total_results": { - "type": "integer", - "example": 1 + "record_type": "conference", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "All hands meeting", + "created_at": "2019-01-23T18:10:02.574Z", + "expires_at": "2019-01-23T18:10:02.574Z", + "updated_at": "2019-01-23T18:10:02.574Z", + "region": "sv1", + "status": "completed", + "end_reason": "all_left", + "ended_by": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", + "call_session_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" }, - "best_effort_results": { - "type": "integer", - "example": 0 - } + "connection_id": "3fa85f64-9191-4567-b3fc-2c963f66afa6" } }, - "BridgeRequest": { - "type": "object", - "title": "Bridge Request", + "ConferenceCallRequest": { "required": [ - "call_control_id" + "call_control_id", + "from", + "to" ], + "type": "object", + "title": "Conference Dial Request", "properties": { "call_control_id": { - "description": "The Call Control ID of the call you want to bridge with.", - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + "description": "Unique identifier and token for controlling the call", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", + "type": "string" }, "client_state": { "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "type": "string" }, "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901", + "type": "string" + }, + "from": { + "description": "The `from` number to be used as the caller id presented to the destination (`to` number).", "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "example": "+18005550101" }, - "park_after_unbridge": { - "description": "Specifies behavior after the bridge ends (i.e. the opposite leg either hangs up or is transferred). If supplied with the value `self`, the current leg will be parked after unbridge. If not set, the default behavior is to hang up the leg.", + "hold": { + "description": "Whether the participant should be put on hold immediately after joining the conference.", + "example": true, + "type": "boolean", + "default": false + }, + "hold_audio_url": { + "description": "The URL of an audio file to be played to the participant when they are put on hold after joining the conference. This property takes effect only if \"hold\" is set to \"true\".", + "example": "http://www.example.com/audio.wav", + "type": "string" + }, + "mute": { + "description": "Whether the participant should be muted immediately after joining the conference.", + "example": false, + "type": "boolean", + "default": false + }, + "start_conference_on_enter": { + "description": "Whether the conference should be started after the participant joins the conference.", + "example": true, + "type": "boolean", + "default": false + }, + "supervisor_role": { + "description": "Sets the joining participant as a supervisor for the conference. A conference can have multiple supervisors. \"barge\" means the supervisor enters the conference as a normal participant. This is the same as \"none\". \"monitor\" means the supervisor is muted but can hear all participants. \"whisper\" means that only the specified \"whisper_call_control_ids\" can hear the supervisor. Defaults to \"none\".", + "example": "whisper", "type": "string", - "example": "self" + "enum": [ + "barge", + "monitor", + "none", + "whisper" + ] + }, + "to": { + "description": "The DID or SIP URI to dial out and bridge to the given call.", + "type": "string", + "example": "+18005550100 or sip:username@sip.telnyx.com" + }, + "whisper_call_control_ids": { + "description": "Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only.", + "example": [ + "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + ], + "type": "array", + "items": { + "type": "string" + } } }, "example": { "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "park_after_unbridge": "self" + "hold": true, + "hold_audio_url": "http://www.example.com/audio.wav", + "mute": true, + "from": "+18005550101", + "to": "+18005550100", + "start_conference_on_enter": true, + "supervisor_role": "whisper", + "whisper_call_control_ids": [ + "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + ] } }, - "Call": { + "ConferenceCommandResult": { "type": "object", - "title": "Call", + "title": "Conference Command Result", "required": [ - "call_control_id", - "call_leg_id", - "call_session_id", - "is_alive", - "record_type" + "result" ], - "example": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768", - "call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768", - "is_alive": false, - "record_type": "call" - }, "properties": { - "record_type": { - "type": "string", - "enum": [ - "call" - ], - "example": "call" - }, - "call_session_id": { - "description": "ID that is unique to the call session and can be used to correlate webhook events", - "type": "string", - "example": "428c31b6-7af4-4bcb-b68e-5013ef9657c1" - }, - "call_leg_id": { - "description": "ID that is unique to the call and can be used to correlate webhook events", - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" - }, - "call_control_id": { - "description": "Unique identifier and token for controlling the call.", + "result": { "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" - }, - "is_alive": { - "description": "Indicates whether the call is alive or not. For Dial command it will always be `false` (dialing is asynchronous).", - "type": "boolean", - "example": true + "example": "ok" } + }, + "example": { + "result": "ok" } }, - "CallAnswered": { + "ConferenceCreated": { "type": "object", - "title": "Call Answered", - "properties": { - "record_type": { - "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." - }, - "event_type": { - "type": "string", - "example": "call.answered", - "enum": [ - "call.answered" - ], - "description": "The type of event being delivered." - }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "from": { - "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." - }, - "to": { - "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." - }, - "state": { - "type": "string", - "example": "answered", - "enum": [ - "answered" - ], - "description": "State received from a command." - } - } - } - }, + "title": "Conference Created", "example": { "record_type": "event", - "event_type": "call.answered", + "event_type": "conference.created", "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "occurred_at": "2018-02-02T22:25:27.521992Z", "payload": { @@ -6517,24 +11334,10 @@ "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "state": "answered" - } - } - }, - "CallAnsweredEvent": { - "type": "object", - "title": "Call Answered Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallAnswered" - } - } - }, - "CallBridged": { - "type": "object", - "title": "Call Bridged", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "occured_at": "2018-02-02T22:25:27.521Z" + } + }, "properties": { "record_type": { "type": "string", @@ -6546,9 +11349,9 @@ }, "event_type": { "type": "string", - "example": "call.bridged", + "example": "conference.created", "enum": [ - "call.bridged" + "conference.created" ], "description": "The type of event being delivered." }, @@ -6558,12 +11361,6 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { @@ -6592,251 +11389,33 @@ "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", "description": "State received from a command." }, - "from": { - "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." - }, - "to": { + "conference_id": { "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "Conference ID that the participant joined." }, - "state": { + "occurred_at": { "type": "string", - "example": "bridged", - "enum": [ - "bridged" - ], - "description": "State received from a command." + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, - "example": { - "record_type": "event", - "event_type": "call.bridged", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "state": "bridged" - } } }, - "CallBridgedEvent": { + "ConferenceCreatedEvent": { "type": "object", - "title": "Call Bridged Event", + "title": "Conference Created Event", "properties": { "data": { - "$ref": "#/components/schemas/CallBridged" - } - } - }, - "CallControlApplication": { - "type": "object", - "title": "Call Control Application", - "properties": { - "active": { - "type": "boolean", - "description": "Specifies whether the connection can be used.", - "default": true - }, - "anchorsite_override": { - "type": "string", - "description": "`Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.\n", - "enum": [ - "\"Latency\"", - "\"Chicago, IL\"", - "\"Ashburn, VA\"", - "\"San Jose, CA\"" - ], - "example": "\"Amsterdam, Netherlands\"", - "default": "\"Latency\"" - }, - "application_name": { - "type": "string", - "description": "A user-assigned name to help manage the application.", - "example": "call-router" - }, - "created_at": { - "type": "string", - "description": "ISO 8601 formatted date of when the resource was created", - "example": "2018-02-02T22:25:27.521Z" - }, - "dtmf_type": { - "type": "string", - "description": "Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.", - "enum": [ - "RFC 2833", - "Inband", - "SIP INFO" - ], - "example": "Inband", - "default": "RFC 2833" - }, - "first_command_timeout": { - "type": "boolean", - "description": "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.", - "example": true, - "default": false - }, - "first_command_timeout_secs": { - "type": "integer", - "description": "Specifies how many seconds to wait before timing out a dial command.", - "example": 10, - "default": 30 - }, - "id": { - "type": "string", - "format": "int64", - "example": "1293384261075731499" - }, - "inbound": { - "$ref": "#/components/schemas/CallControlApplicationInbound" - }, - "outbound": { - "$ref": "#/components/schemas/CallControlApplicationOutbound" - }, - "record_type": { - "type": "string", - "enum": [ - "call_control_application" - ], - "default": "call_control_application" - }, - "updated_at": { - "type": "string", - "description": "ISO 8601 formatted date of when the resource was last updated", - "example": "2018-02-02T22:25:27.521Z" - }, - "webhook_api_version": { - "type": "string", - "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", - "enum": [ - "1", - "2" - ], - "example": "1", - "default": "1" - }, - "webhook_event_failover_url": { - "type": "string", - "format": "url", - "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as `https`.", - "example": "https://failover.example.com", - "nullable": true, - "default": "" - }, - "webhook_event_url": { - "type": "string", - "format": "url", - "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as `https`.", - "example": "https://example.com" - }, - "webhook_timeout_secs": { - "type": "integer", - "minimum": 0, - "maximum": 30, - "example": 25, - "default": null, - "nullable": true - } - }, - "example": { - "active": false, - "anchorsite_override": "\"Latency\"", - "application_name": "call-router", - "created_at": "2018-02-02T22:25:27.521Z", - "dtmf_type": "Inband", - "first_command_timeout": true, - "first_command_timeout_secs": 10, - "id": "1293384261075731499", - "inbound": { - "channel_limit": 10, - "sip_subdomain": "example", - "sip_subdomain_receive_settings": "only_my_connections" - }, - "outbound": { - "channel_limit": 10, - "outbound_voice_profile_id": "1293384261075731499" - }, - "record_type": "call_control_application", - "updated_at": "2018-02-02T22:25:27.521Z", - "webhook_api_version": "1", - "webhook_event_failover_url": "https://failover.example.com", - "webhook_event_url": "https://example.com", - "webhook_timeout_secs": 25 - } - }, - "CallControlApplicationInbound": { - "type": "object", - "title": "Call Control Application Inbound", - "properties": { - "channel_limit": { - "type": "integer", - "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.", - "example": 10, - "default": null - }, - "sip_subdomain": { - "type": "string", - "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", - "example": "example", - "default": null - }, - "sip_subdomain_receive_settings": { - "type": "string", - "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", - "enum": [ - "only_my_connections", - "from_anyone" - ], - "example": "only_my_connections", - "default": "from_anyone" - } - } - }, - "CallControlApplicationOutbound": { - "type": "object", - "title": "Call Control Application Outbound", - "properties": { - "channel_limit": { - "type": "integer", - "description": "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.", - "example": 10, - "default": null - }, - "outbound_voice_profile_id": { - "type": "string", - "format": "int64", - "description": "Identifies the associated outbound voice profile.", - "example": "1293384261075731499" - } - } - }, - "CallControlCommandResult": { - "type": "object", - "title": "Call Control Command Result", - "example": { - "result": "ok" - }, - "properties": { - "result": { - "type": "string", - "example": "ok" + "$ref": "#/components/schemas/ConferenceCreated" } } }, - "CallDtmfReceived": { + "ConferenceEnded": { "type": "object", - "title": "Call DTMF Received", + "title": "Conference Ended", "properties": { "record_type": { "type": "string", @@ -6848,9 +11427,9 @@ }, "event_type": { "type": "string", - "example": "call.dtmf.received", + "example": "conference.ended", "enum": [ - "call.dtmf.received" + "conference.ended" ], "description": "The type of event being delivered." }, @@ -6860,12 +11439,6 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { @@ -6877,7 +11450,7 @@ "connection_id": { "type": "string", "example": "7267xxxxxxxxxxxxxx", - "description": "Identifies the type of resource." + "description": "Telnyx connection ID used in the call." }, "call_leg_id": { "type": "string", @@ -6894,27 +11467,32 @@ "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", "description": "State received from a command." }, - "from": { + "conference_id": { "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "Conference ID that the participant joined." }, - "to": { + "occurred_at": { "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." }, - "digit": { + "reason": { "type": "string", - "example": "#", - "description": "The received DTMF digit or symbol." + "enum": [ + "all_left", + "host_left", + "time_exceeded" + ], + "description": "Reason the conference ended." } } } }, "example": { "record_type": "event", - "event_type": "call.dtmf.received", + "event_type": "conference.ended", "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "occurred_at": "2018-02-02T22:25:27.521992Z", "payload": { @@ -6923,88 +11501,66 @@ "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "digit": "#" + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "occured_at": "2018-02-02T22:25:27.521Z", + "reason": "host_left" } } }, - "CallDtmfReceivedEvent": { + "ConferenceEndedEvent": { "type": "object", - "title": "Call DTMF Received Event", + "title": "Conference Ended Event", "properties": { "data": { - "$ref": "#/components/schemas/CallDtmfReceived" + "$ref": "#/components/schemas/ConferenceEnded" } } }, - "CallEvent": { + "ConferenceHoldRequest": { "type": "object", - "title": "Call Event", - "required": [ - "record_type", - "call_leg_id", - "call_session_id", - "event_timestamp", - "name", - "type", - "metadata" - ], + "title": "Conference Hold Request", "properties": { - "record_type": { - "type": "string", - "enum": [ - "call_event" - ], - "example": "call_event" - }, - "call_leg_id": { - "type": "string", - "description": "Uniquely identifies an individual call leg.", - "example": "308fe500-5213-11e9-ace7-02420a0f0668" - }, - "call_session_id": { - "type": "string", - "description": "Uniquely identifies the call control session. A session may include multiple call leg events.", - "example": "308fec30-5213-11e9-9d3f-02420a0f0668" - }, - "event_timestamp": { - "type": "string", - "description": "Event timestamp", - "example": "2019-03-29T11:10:19.127783Z" - }, - "name": { - "type": "string", - "description": "Event name", - "example": "call.hangup" + "call_control_ids": { + "description": "List of unique identifiers and tokens for controlling the call. When empty all participants will be placed on hold.", + "type": "array", + "items": { + "type": "string" + } }, - "type": { + "audio_url": { "type": "string", - "description": "Event type", - "enum": [ - "command", - "webhook" - ], - "example": "webhook" - }, - "metadata": { - "type": "object", - "description": "Event metadata, which includes raw event, and extra information based on event type" + "example": "http://example.com/message.wav", + "description": "The URL of a file to be played back at the beginning of each prompt. The URL can point to either a WAV or MP3 file." } }, "example": { - "record_type": "call_event", - "call_leg_id": "308fe500-5213-11e9-ace7-02420a0f0668", - "call_session_id": "308fec30-5213-11e9-9d3f-02420a0f0668", - "event_timestamp": "2019-03-29T11:10:19.127783Z", - "name": "call.hangup", - "type": "webhook", - "metadata": {} + "call_control_ids": [ + "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + ], + "audio_url": "http://example.com/message.wav" } }, - "CallForkStarted": { + "ConferenceMuteRequest": { "type": "object", - "title": "Call Fork Started", + "title": "Conference Mute Request", + "properties": { + "call_control_ids": { + "description": "Array of unique identifiers and tokens for controlling the call. When empty all participants will be muted.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "call_control_ids": [ + "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + ] + } + }, + "ConferenceParticipantJoined": { + "type": "object", + "title": "Conference Participant Joined", "properties": { "record_type": { "type": "string", @@ -7016,9 +11572,9 @@ }, "event_type": { "type": "string", - "example": "call.fork.started", + "example": "conference.participant.joined", "enum": [ - "call.fork.started" + "conference.participant.joined" ], "description": "The type of event being delivered." }, @@ -7031,12 +11587,17 @@ "occurred_at": { "type": "string", "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", + "example": "2018-02-02T22:25:27.521Z", "description": "ISO 8601 datetime of when the event occurred." }, "payload": { "type": "object", "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, "connection_id": { "type": "string", "example": "7267xxxxxxxxxxxxxx", @@ -7051,34 +11612,61 @@ "type": "string", "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "conference_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "Conference ID that the participant joined." } } } }, "example": { "record_type": "event", - "event_type": "call.fork.started", + "event_type": "conference.participant.joined", "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "occurred_at": "2018-02-02T22:25:27.521992Z", "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", "connection_id": "7267xxxxxxxxxxxxxx", "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" } } }, - "CallForkStartedEvent": { + "ConferenceParticipantJoinedEvent": { "type": "object", - "title": "Call Fork Started Event", + "title": "Conference Participant Joined Event", "properties": { "data": { - "$ref": "#/components/schemas/CallForkStarted" + "$ref": "#/components/schemas/ConferenceParticipantJoined" } } }, - "CallForkStopped": { + "ConferenceParticipantLeft": { "type": "object", - "title": "Call Fork Stopped", + "title": "Conference Participant Left", + "example": { + "record_type": "event", + "event_type": "conference.participant.left", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" + } + }, "properties": { "record_type": { "type": "string", @@ -7090,9 +11678,9 @@ }, "event_type": { "type": "string", - "example": "call.fork.stopped", + "example": "conference.participant.left", "enum": [ - "call.fork.stopped" + "conference.participant.left" ], "description": "The type of event being delivered." }, @@ -7105,12 +11693,17 @@ "occurred_at": { "type": "string", "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", + "example": "2018-02-02T22:25:27.521Z", "description": "ISO 8601 datetime of when the event occurred." }, "payload": { "type": "object", "properties": { + "call_control_id": { + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Call ID used to issue commands via Call Control API." + }, "connection_id": { "type": "string", "example": "7267xxxxxxxxxxxxxx", @@ -7125,64 +11718,50 @@ "type": "string", "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", "description": "ID that is unique to the call session and can be used to correlate webhook events." + }, + "client_state": { + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "description": "State received from a command." + }, + "conference_id": { + "type": "string", + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "Conference ID that the participant joined." } } } - }, - "example": { - "record_type": "event", - "event_type": "call.fork.stopped", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1" - } - } - }, - "CallForkStoppedEvent": { - "type": "object", - "title": "Call Fork Stopped Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallForkStopped" - } } }, - "CallForwarding": { - "description": "The call forwarding settings for a phone number.", - "type": "object", - "properties": { - "call_forwarding_enabled": { - "type": "boolean", - "default": true, - "description": "Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints.", - "example": true - }, - "forwards_to": { - "type": "string", - "description": "The phone number to which inbound calls to this number are forwarded. Inbound calls will not be forwarded if this field is left blank. If set, must be a +E.164-formatted phone number." - }, - "forwarding_type": { - "type": "string", - "description": "Call forwarding type. 'forwards_to' must be set for this to have an effect.", - "enum": [ - "always", - "on_failure" - ], - "example": "always" + "ConferenceParticipantLeftEvent": { + "type": "object", + "title": "Conference Participant Left Event", + "properties": { + "data": { + "$ref": "#/components/schemas/ConferenceParticipantLeft" } - }, - "example": { - "call_forwarding_enabled": true, - "forwards_to": "+13035559123", - "forwarding_type": "always" } }, - "CallGatherEnded": { + "ConferenceParticipantPlaybackEnded": { "type": "object", - "title": "Call Gather Ended", + "title": "Conference Participant Playback Ended", + "example": { + "record_type": "event", + "event_type": "conference.participant.playback.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "connection_id": "7267xxxxxxxxxxxxxx", + "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "media_url": "https://www.example.com/audio.mp3", + "occured_at": "2018-02-02T22:25:27.521Z" + } + }, "properties": { "record_type": { "type": "string", @@ -7194,9 +11773,9 @@ }, "event_type": { "type": "string", - "example": "call.gather.ended", + "example": "conference.participant.playback.ended", "enum": [ - "call.gather.ended" + "conference.participant.playback.ended" ], "description": "The type of event being delivered." }, @@ -7206,24 +11785,13 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { "call_control_id": { "type": "string", "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." + "description": "Participant's call ID used to issue commands via Call Control API." }, "call_leg_id": { "type": "string", @@ -7240,39 +11808,51 @@ "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", "description": "State received from a command." }, - "from": { + "connection_id": { "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." }, - "to": { + "creator_call_session_id": { "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session that started the conference." }, - "digits": { + "conference_id": { "type": "string", - "example": "5503", - "description": "The received DTMF digit or symbol." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." }, - "status": { + "media_url": { "type": "string", - "enum": [ - "valid", - "invalid", - "call_hangup", - "cancelled", - "cancelled_amd" - ], - "example": "valid", - "description": "Reflects how command ended." + "example": "https://www.example.com/audio.mp3", + "description": "The URL to the audio file being played." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, + } + }, + "ConferenceParticipantPlaybackEndedEvent": { + "type": "object", + "title": "Conference Participant Playback Ended Event", + "properties": { + "data": { + "$ref": "#/components/schemas/ConferenceParticipantPlaybackEnded" + } + } + }, + "ConferenceParticipantPlaybackStarted": { + "type": "object", + "title": "Conference Participant Playback Started", "example": { "record_type": "event", - "event_type": "call.gather.ended", + "event_type": "conference.participant.playback.started", "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "occurred_at": "2018-02-02T22:25:27.521992Z", "payload": { @@ -7281,25 +11861,12 @@ "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "digits": "123", - "status": "valid" - } - } - }, - "CallGatherEndedEvent": { - "type": "object", - "title": "Call Gather Ended Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallGatherEnded" + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "media_url": "https://www.example.com/audio.mp3", + "occured_at": "2018-02-02T22:25:27.521Z" } - } - }, - "CallHangup": { - "type": "object", - "title": "Call Hangup", + }, "properties": { "record_type": { "type": "string", @@ -7311,9 +11878,9 @@ }, "event_type": { "type": "string", - "example": "call.hangup", + "example": "conference.participant.playback.started", "enum": [ - "call.hangup" + "conference.participant.playback.started" ], "description": "The type of event being delivered." }, @@ -7323,24 +11890,13 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { "call_control_id": { "type": "string", "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." + "description": "Participant's call ID used to issue commands via Call Control API." }, "call_leg_id": { "type": "string", @@ -7357,60 +11913,51 @@ "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", "description": "State received from a command." }, - "from": { - "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." - }, - "to": { + "connection_id": { "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." }, - "state": { + "creator_call_session_id": { "type": "string", - "example": "hangup", - "enum": [ - "hangup" - ], - "description": "State received from a command." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session that started the conference." }, - "hangup_cause": { + "conference_id": { "type": "string", - "example": "call_rejected", - "enum": [ - "call_rejected", - "normal_clearing", - "originator_cancel", - "timeout", - "time_limit", - "user_busy", - "not_found", - "unspecified" - ], - "description": "The reason the call was ended (`call_rejected`, `normal_clearing`, `originator_cancel`, `timeout`, `time_limit`, `user_busy`, `not_found` or `unspecified`)." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." }, - "hangup_source": { + "media_url": { "type": "string", - "example": "caller", - "enum": [ - "caller", - "callee", - "unknown" - ], - "description": "The party who ended the call (`callee`, `caller`, `unknown`)." + "example": "https://www.example.com/audio.mp3", + "description": "The URL to the audio file being played." }, - "sip_hangup_cause": { + "occurred_at": { "type": "string", - "example": "603", - "description": "The reason the call was ended (SIP response code). If the SIP response is unavailable (in inbound calls for example) this is set to `unspecified`." + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, + } + }, + "ConferenceParticipantPlaybackStartedEvent": { + "type": "object", + "title": "Conference Participant Playback Started Event", + "properties": { + "data": { + "$ref": "#/components/schemas/ConferenceParticipantPlaybackStarted" + } + } + }, + "ConferenceParticipantSpeakEnded": { + "type": "object", + "title": "Conference Participant Speak Ended", "example": { "record_type": "event", - "event_type": "call.hangup", + "event_type": "conference.participant.speak.ended", "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "occurred_at": "2018-02-02T22:25:27.521992Z", "payload": { @@ -7419,27 +11966,11 @@ "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "state": "hangup", - "hangup_cause": "call_rejected", - "hangup_source": "caller", - "sip_hangup_cause": "603" - } - } - }, - "CallHangupEvent": { - "type": "object", - "title": "Call Hangup Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallHangup" + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "occured_at": "2018-02-02T22:25:27.521Z" } - } - }, - "CallInitiated": { - "type": "object", - "title": "Call Initiated", + }, "properties": { "record_type": { "type": "string", @@ -7451,9 +11982,9 @@ }, "event_type": { "type": "string", - "example": "call.initiated", + "example": "conference.participant.speak.ended", "enum": [ - "call.initiated" + "conference.participant.speak.ended" ], "description": "The type of event being delivered." }, @@ -7463,24 +11994,13 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." + "type": "string", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "description": "Participant's call ID used to issue commands via Call Control API." }, "call_leg_id": { "type": "string", @@ -7497,40 +12017,46 @@ "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", "description": "State received from a command." }, - "from": { + "connection_id": { "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." }, - "to": { + "creator_call_session_id": { "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session that started the conference." }, - "direction": { + "conference_id": { "type": "string", - "example": "incoming", - "enum": [ - "incoming", - "outgoing" - ], - "description": "Whether the call is `incoming` or `outgoing`." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." }, - "state": { + "occurred_at": { "type": "string", - "example": "parked", - "enum": [ - "parked", - "bridging" - ], - "description": "State received from a command." + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, + } + }, + "ConferenceParticipantSpeakEndedEvent": { + "type": "object", + "title": "Conference Participant Speak Ended Event", + "properties": { + "data": { + "$ref": "#/components/schemas/ConferenceParticipantSpeakEnded" + } + } + }, + "ConferenceParticipantSpeakStarted": { + "type": "object", + "title": "Conference Participant Speak Started", "example": { "record_type": "event", - "event_type": "call.initiated", + "event_type": "conference.participant.speak.started", "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "occurred_at": "2018-02-02T22:25:27.521992Z", "payload": { @@ -7539,25 +12065,11 @@ "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "direction": "incoming", - "state": "parked" - } - } - }, - "CallInitiatedEvent": { - "type": "object", - "title": "Call Initiated Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallInitiated" + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "occured_at": "2018-02-02T22:25:27.521Z" } - } - }, - "CallMachineDetectionEnded": { - "type": "object", - "title": "Call Machine Detection Ended", + }, "properties": { "record_type": { "type": "string", @@ -7569,9 +12081,9 @@ }, "event_type": { "type": "string", - "example": "call.machine.detection.ended", + "example": "conference.participant.speak.started", "enum": [ - "call.machine.detection.ended" + "conference.participant.speak.started" ], "description": "The type of event being delivered." }, @@ -7581,24 +12093,13 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { "call_control_id": { "type": "string", "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." + "description": "Participant's call ID used to issue commands via Call Control API." }, "call_leg_id": { "type": "string", @@ -7615,57 +12116,86 @@ "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", "description": "State received from a command." }, - "from": { + "connection_id": { "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." + "example": "7267xxxxxxxxxxxxxx", + "description": "Telnyx connection ID used in the call." }, - "to": { + "creator_call_session_id": { "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session that started the conference." }, - "result": { + "conference_id": { "type": "string", - "example": "machine", - "enum": [ - "human", - "machine", - "not_sure" - ], - "description": "Answering machine detection result." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." + }, + "occurred_at": { + "type": "string", + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, - "example": { - "record_type": "event", - "event_type": "call.machine.detection.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "result": "human" - } } }, - "CallMachineDetectionEndedEvent": { + "ConferenceParticipantSpeakStartedEvent": { "type": "object", - "title": "Call Machine Detection Ended Event", + "title": "Conference Participant Speak Started Event", "properties": { "data": { - "$ref": "#/components/schemas/CallMachineDetectionEnded" + "$ref": "#/components/schemas/ConferenceParticipantSpeakStarted" } } }, - "CallMachineGreetingEnded": { + "ConferencePlayRequest": { + "required": [ + "audio_url" + ], "type": "object", - "title": "Call Machine Greeting Ended", + "title": "Conference Play Request", + "properties": { + "audio_url": { + "description": "The URL of the file to be played back in the conference. The URL can point to either a WAV or MP3 file.", + "type": "string", + "example": "http://www.example.com/sounds/greeting.wav" + }, + "loop": { + "description": "The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string `infinity` for an endless loop.", + "example": "infinity", + "default": 1, + "$ref": "#/components/schemas/Loopcount" + }, + "call_control_ids": { + "description": "List of call control ids identifying participants the audio file should be played to. If not given, the audio file will be played to the entire conference.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "audio_url": "http://www.example.com/sounds/greeting.wav" + } + }, + "ConferencePlaybackEnded": { + "type": "object", + "title": "Conference Playback Ended", + "example": { + "record_type": "event", + "event_type": "conference.playback.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "media_url": "https://www.example.com/audio.mp3", + "occured_at": "2018-02-02T22:25:27.521Z" + } + }, "properties": { "record_type": { "type": "string", @@ -7677,9 +12207,9 @@ }, "event_type": { "type": "string", - "example": "call.machine.greeting.ended", + "example": "conference.playback.ended", "enum": [ - "call.machine.greeting.ended" + "conference.playback.ended" ], "description": "The type of event being delivered." }, @@ -7689,90 +12219,64 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, "connection_id": { "type": "string", "example": "7267xxxxxxxxxxxxxx", "description": "Telnyx connection ID used in the call." }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { + "creator_call_session_id": { "type": "string", "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." + "description": "ID that is unique to the call session that started the conference." }, - "from": { + "conference_id": { "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." }, - "to": { + "media_url": { "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." + "example": "https://www.example.com/audio.mp3", + "description": "The URL to the audio file being played." }, - "result": { + "occurred_at": { "type": "string", - "example": "ended", - "enum": [ - "ended", - "not_sure" - ], - "description": "Answering machine greeting ended result." - } - } - } - }, - "example": { - "record_type": "event", - "event_type": "call.machine.greeting.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "from": "+35319605860", - "to": "+35319605860", - "result": "ended" + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." + } + } } } }, - "CallMachineGreetingEndedEvent": { + "ConferencePlaybackEndedEvent": { "type": "object", - "title": "Call Machine Greeting Ended Event", + "title": "Conference Playback Ended Event", "properties": { "data": { - "$ref": "#/components/schemas/CallMachineGreetingEnded" + "$ref": "#/components/schemas/ConferencePlaybackEnded" } } }, - "CallPlaybackEnded": { + "ConferencePlaybackStarted": { "type": "object", - "title": "Call Playback Ended", + "title": "Conference Playback Started", + "example": { + "record_type": "event", + "event_type": "conference.playback.started", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "media_url": "https://www.example.com/audio.mp3", + "occured_at": "2018-02-02T22:25:27.521Z" + } + }, "properties": { "record_type": { "type": "string", @@ -7784,9 +12288,9 @@ }, "event_type": { "type": "string", - "example": "call.playback.ended", + "example": "conference.playback.started", "enum": [ - "call.playback.ended" + "conference.playback.started" ], "description": "The type of event being delivered." }, @@ -7796,92 +12300,63 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, "connection_id": { "type": "string", "example": "7267xxxxxxxxxxxxxx", "description": "Telnyx connection ID used in the call." }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { + "creator_call_session_id": { "type": "string", "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." + "description": "ID that is unique to the call session that started the conference." }, - "client_state": { + "conference_id": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." }, "media_url": { "type": "string", - "example": "http://example.com/audio.wav", - "description": "The audio URL being played back." - }, - "overlay": { - "type": "boolean", - "example": false, - "description": "Whether the audio is going to be played in overlay mode or not." + "example": "https://www.example.com/audio.mp3", + "description": "The URL to the audio file being played." }, - "status": { + "occurred_at": { "type": "string", - "enum": [ - "valid", - "invalid", - "call_hangup" - ], - "example": "valid", - "description": "Reflects how command ended." + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, - "example": { - "record_type": "event", - "event_type": "call.playback.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "media_url": "http://example.com/audio.wav", - "overlay": false, - "status": "valid" - } } }, - "CallPlaybackEndedEvent": { + "ConferencePlaybackStartedEvent": { "type": "object", - "title": "Call Playback Ended Event", + "title": "Conference Playback Started Event", "properties": { "data": { - "$ref": "#/components/schemas/CallPlaybackEnded" + "$ref": "#/components/schemas/ConferencePlaybackStarted" } } }, - "CallPlaybackStarted": { + "ConferenceSpeakEnded": { "type": "object", - "title": "Call Playback Started", + "title": "Conference Speak Ended", + "example": { + "record_type": "event", + "event_type": "conference.speak.ended", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "occured_at": "2018-02-02T22:25:27.521Z" + } + }, "properties": { "record_type": { "type": "string", @@ -7893,9 +12368,9 @@ }, "event_type": { "type": "string", - "example": "call.playback.started", + "example": "conference.speak.ended", "enum": [ - "call.playback.started" + "conference.speak.ended" ], "description": "The type of event being delivered." }, @@ -7905,115 +12380,151 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, "connection_id": { "type": "string", "example": "7267xxxxxxxxxxxxxx", "description": "Telnyx connection ID used in the call." }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { + "creator_call_session_id": { "type": "string", "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." + "description": "ID that is unique to the call session that started the conference." }, - "client_state": { + "conference_id": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." }, - "media_url": { + "occurred_at": { "type": "string", - "example": "http://example.com/audio.wav", - "description": "The audio URL being played back." - }, - "overlay": { - "type": "boolean", - "example": false, - "description": "Whether the audio is going to be played in overlay mode or not." + "format": "date-time", + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, - "example": { - "record_type": "event", - "event_type": "call.playback.started", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "media_url": "http://example.com/audio.wav", - "overlay": false - } } }, - "CallPlaybackStartedEvent": { + "ConferenceSpeakEndedEvent": { "type": "object", - "title": "Call Playback Started Event", + "title": "Conference Speak Ended Event", "properties": { "data": { - "$ref": "#/components/schemas/CallPlaybackStarted" + "$ref": "#/components/schemas/ConferenceSpeakEnded" } } }, - "CallRecording": { - "description": "The call recording settings for a phone number.", + "ConferenceSpeakRequest": { "type": "object", + "title": "Conference Speak Request", + "required": [ + "payload", + "voice", + "language" + ], "properties": { - "inbound_call_recording_enabled": { - "type": "boolean", - "default": false, - "description": "When enabled, any inbound call to this number will be recorded." + "call_control_ids": { + "description": "Call Control IDs of participants who will hear the spoken text. When empty all participants will hear the spoken text.", + "type": "array", + "items": { + "type": "string" + } }, - "inbound_call_recording_format": { + "payload": { + "description": "The text or SSML to be converted into speech. There is a 5,000 character limit.", + "type": "string", + "example": "Say this to participants" + }, + "payload_type": { + "description": "The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML).", + "default": "text", "type": "string", "enum": [ - "wav", - "mp3" + "text", + "ssml" + ], + "example": "ssml" + }, + "voice": { + "description": "The gender of the voice used to speak the text.", + "type": "string", + "enum": [ + "male", + "female" + ], + "example": "female" + }, + "language": { + "description": "The language used to speak the text.", + "type": "string", + "enum": [ + "arb", + "cmn-CN", + "cy-GB", + "da-DK", + "de-DE", + "en-AU", + "en-GB", + "en-GB-WLS", + "en-IN", + "en-US", + "es-ES", + "es-MX", + "es-US", + "fr-CA", + "fr-FR", + "hi-IN", + "is-IS", + "it-IT", + "ja-JP", + "ko-KR", + "nb-NO", + "nl-NL", + "pl-PL", + "pt-BR", + "pt-PT", + "ro-RO", + "ru-RU", + "sv-SE", + "tr-TR" ], - "default": "wav", - "description": "The audio file format for calls being recorded." + "example": "en-US" }, - "inbound_call_recording_channels": { + "command_id": { + "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", "type": "string", - "enum": [ - "single", - "dual" - ], - "default": "single", - "description": "When using 'dual' channels, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B." + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, "example": { - "inbound_call_recording_enabled": true, - "inbound_call_recording_format": "wav", - "inbound_call_recording_channels": "single" + "call_control_ids": [ + "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + ], + "payload": "Say this to participants", + "payload_type": "text", + "voice": "female", + "language": "en-US", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "CallRecordingSaved": { + "ConferenceSpeakStarted": { "type": "object", - "title": "Call Recording Saved", + "title": "Conference Speak Started", + "example": { + "record_type": "event", + "event_type": "conference.speak.started", + "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", + "occurred_at": "2018-02-02T22:25:27.521992Z", + "payload": { + "connection_id": "7267xxxxxxxxxxxxxx", + "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", + "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "occured_at": "2018-02-02T22:25:27.521Z" + } + }, "properties": { "record_type": { "type": "string", @@ -8025,9 +12536,9 @@ }, "event_type": { "type": "string", - "example": "call.recording.saved", + "example": "conference.speak.started", "enum": [ - "call.recording.saved" + "conference.speak.started" ], "description": "The type of event being delivered." }, @@ -8037,2203 +12548,2936 @@ "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", "description": "Identifies the type of resource." }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." - }, "payload": { "type": "object", "properties": { - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, "connection_id": { "type": "string", "example": "7267xxxxxxxxxxxxxx", "description": "Telnyx connection ID used in the call." }, - "client_state": { + "creator_call_session_id": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID that is unique to the call session that started the conference." }, - "recording_started_at": { + "conference_id": { "type": "string", - "format": "date-time", - "example": "2018-02-02T22:20:27.521992Z", - "description": "ISO 8601 datetime of when recording started." + "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", + "description": "ID of the conference the text was spoken in." }, - "recording_ended_at": { + "occurred_at": { "type": "string", "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when recording ended." - }, - "channels": { - "type": "string", - "example": "single", - "enum": [ - "single", - "dual" - ], - "description": "Whether recording was recorded in `single` or `dual` channel." - }, - "recording_urls": { - "type": "object", - "description": "Recording URLs in requested format valid for 10 minutes. After 10 minutes, you may retrieve recordings via API using Reports -> Call Recordings documentation, or via Mission Control under Reporting -> Recordings.", - "properties": { - "mp3": { - "type": "string", - "nullable": true, - "example": "http://example.com/recording.mp3", - "description": "Recording URL in requested `mp3` format." - }, - "wav": { - "type": "string", - "nullable": true, - "example": "http://example.com/recording.wav", - "description": "Recording URL in requested `wav` format." - } - } - }, - "public_recording_urls": { - "type": "object", - "description": "Recording URLs in requested format. The URL is valid for as long as the file exists. For security purposes, this feature is activated on a per request basis. Please contact customer support with your Account ID to request activation.", - "properties": { - "mp3": { - "type": "string", - "nullable": true, - "example": "http://example.com/recording.mp3", - "description": "Recording URL in requested `mp3` format." - }, - "wav": { - "type": "string", - "nullable": true, - "example": "http://example.com/recording.wav", - "description": "Recording URL in requested `wav` format." - } - } + "example": "2018-02-02T22:25:27.521Z", + "description": "ISO 8601 datetime of when the event occurred." } } } - }, - "example": { - "record_type": "event", - "event_type": "call.recording.saved", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "recording_started_at": "2018-02-02T22:20:27.521992Z", - "recording_ended_at": "2018-02-02T22:20:27.521992Z", - "channels": "single", - "recording_urls": { - "mp3": "http://example.com/recording.mp3", - "wav": "http://example.com/recording.wav" - }, - "public_recording_urls": { - "mp3": "http://example.com/recording.mp3", - "wav": "http://example.com/recording.wav" + } + }, + "ConferenceSpeakStartedEvent": { + "type": "object", + "title": "Conference Speak Started Event", + "properties": { + "data": { + "$ref": "#/components/schemas/ConferenceSpeakStarted" + } + } + }, + "ConferenceUnholdRequest": { + "required": [ + "call_control_ids" + ], + "type": "object", + "title": "Conference Unhold Request", + "properties": { + "call_control_ids": { + "description": "List of unique identifiers and tokens for controlling the call. Enter each call control ID to be unheld.", + "type": "array", + "items": { + "type": "string" } } + }, + "example": { + "call_control_ids": [ + "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + ] } }, - "CallRecordingSavedEvent": { + "ConferenceUnmuteRequest": { "type": "object", - "title": "Call Recording Saved Event", + "title": "Conference Unmute Request", "properties": { - "data": { - "$ref": "#/components/schemas/CallRecordingSaved" + "call_control_ids": { + "description": "List of unique identifiers and tokens for controlling the call. Enter each call control ID to be unmuted. When empty all participants will be unmuted.", + "type": "array", + "items": { + "type": "string" + } } + }, + "example": { + "call_control_ids": [ + "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + ] } }, - "CallReferCompleted": { + "Connection": { "type": "object", + "title": "Connection", "properties": { + "id": { + "type": "string", + "format": "int64", + "description": "Identifies the specific resource.", + "example": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" + }, "record_type": { "type": "string", - "example": "event", + "description": "Identifies the type of the resource.", + "example": "ip_connection" + }, + "active": { + "type": "boolean", + "description": "Defaults to true", + "example": true + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { + "type": "string", + "example": "string" + }, + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" + }, + "webhook_event_url": { + "description": "The URL where webhooks related to this connection will be sent.", + "type": "string", + "format": "url", + "default": null, + "nullable": true, + "example": "https://example.com" + }, + "webhook_event_failover_url": { + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails.", + "type": "string", + "format": "url", + "default": "", + "nullable": true, + "example": "https://failover.example.com" + }, + "webhook_api_version": { + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "type": "string", "enum": [ - "event" + "1", + "2" ], - "description": "Identifies the type of the resource." + "default": "1", + "example": "1" }, - "event_type": { - "type": "string", - "example": "call.refer.completed", + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" + } + }, + "example": { + "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "record_type": "ip_connection", + "active": true, + "anchorsite_override": "Latency", + "connection_name": "string", + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z", + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "outbound_voice_profile_id": "1293384261075731499" + } + }, + "ConnectionActive": { + "title": "Connection Active", + "type": "boolean", + "description": "Specifies whether the connection can be used.", + "default": true, + "example": false + }, + "ConnectionName": { + "title": "Connection Name", + "type": "string", + "description": "A user-assigned name to help manage the connection.", + "example": "office-connection" + }, + "ConnectionRtcpSettings": { + "type": "object", + "title": "Connection RTCP Settings", + "properties": { + "port": { "enum": [ - "call.refer.completed" + "rtcp-mux", + "rtp+1" ], - "description": "The type of event being delivered." - }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "default": "rtp+1", + "description": "RTCP port by default is rtp+1, it can also be set to rtcp-mux" }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." + "capture_enabled": { + "type": "boolean", + "default": false, + "description": "BETA - Enable the capture and storage of RTCP messages to create QoS reports on the Telnyx Mission Control Portal.", + "example": true }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", - "description": "Unique ID for controlling the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "from": { - "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." - }, - "sip_notify_response": { - "type": "integer", - "example": 200, - "description": "SIP NOTIFY event status for tracking the REFER attempt." - }, - "to": { - "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." - } - } + "report_frequency_secs": { + "type": "integer", + "default": 5, + "description": "RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds.", + "example": 10 } }, "example": { - "record_type": "event", - "event_type": "call.refer.completed", - "id": "4ce4366d-8d87-44be-a00b-942154e9c5f5", - "occurred_at": "2020-03-30T13:29:44.650000Z", - "payload": { - "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", - "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", - "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "connection_id": "1289082222292239760", - "from": "+35319605860", - "sip_notify_response": 200, - "to": "+13129457420" - } + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_secs": 10 } }, - "CallReferCompletedEvent": { + "CostInformation": { "type": "object", - "title": "Call Recording Saved Event", "properties": { - "data": { - "$ref": "#/components/schemas/CallReferCompleted" + "upfront_cost": { + "type": "string", + "example": "3.21" + }, + "monthly_cost": { + "type": "string", + "example": "6.54" + }, + "currency": { + "type": "string", + "description": "The ISO 4217 code for the currency.", + "example": "USD" } + }, + "example": { + "upfront_cost": "3.21", + "monthly_cost": "6.54", + "currency": "USD" } }, - "CallReferFailed": { + "CreateCallControlApplicationRequest": { "type": "object", + "title": "Create Call Control Application Request", + "required": [ + "application_name", + "webhook_event_url" + ], "properties": { - "record_type": { + "application_name": { "type": "string", - "example": "event", + "description": "A user-assigned name to help manage the application.", + "example": "call-router" + }, + "webhook_event_url": { + "type": "string", + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" + }, + "active": { + "type": "boolean", + "description": "Specifies whether the connection can be used.", + "default": true + }, + "anchorsite_override": { + "type": "string", + "description": "Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.\n", "enum": [ - "event" + "\"Latency\"", + "\"Chicago, IL\"", + "\"Ashburn, VA\"", + "\"San Jose, CA\"" ], - "description": "Identifies the type of the resource." + "example": "\"Amsterdam, Netherlands\"", + "default": "\"Latency\"" }, - "event_type": { + "dtmf_type": { "type": "string", - "example": "call.refer.failed", + "description": "Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.", "enum": [ - "call.refer.failed" + "RFC 2833", + "Inband", + "SIP INFO" ], - "description": "The type of event being delivered." + "example": "Inband", + "default": "RFC 2833" }, - "id": { + "first_command_timeout": { + "type": "boolean", + "description": "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.", + "example": true, + "default": false + }, + "first_command_timeout_secs": { + "type": "integer", + "description": "Specifies how many seconds to wait before timing out a dial command.", + "example": 10, + "default": 30 + }, + "inbound": { + "$ref": "#/components/schemas/CallControlApplicationInbound" + }, + "outbound": { + "$ref": "#/components/schemas/CallControlApplicationOutbound" + }, + "webhook_api_version": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "enum": [ + "1", + "2" + ], + "example": "1", + "default": "1" }, - "occurred_at": { + "webhook_event_failover_url": { "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", - "description": "Unique ID for controlling the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "from": { - "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." - }, - "sip_notify_response": { - "type": "integer", - "example": 603, - "description": "SIP NOTIFY event status for tracking the REFER attempt." - }, - "to": { - "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." - } - } - } - }, - "example": { - "record_type": "event", - "event_type": "call.refer.failed", - "id": "fbeb70e0-54eb-4e26-8d19-56b43e66f754", - "occurred_at": "2020-03-30T13:29:42.130013Z", - "payload": { - "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", - "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", - "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "connection_id": "1289082222292239760", - "from": "+35319605860", - "sip_notify_response": 603, - "to": "+13129457420" - } - } - }, - "CallReferFailedEvent": { - "type": "object", - "title": "Call Recording Saved Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallReferFailed" + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true } + }, + "example": { + "application_name": "call-router", + "webhook_event_url": "https://example.com", + "active": false, + "anchorsite_override": "\"Latency\"", + "dtmf_type": "Inband", + "first_command_timeout": true, + "first_command_timeout_secs": 10, + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" + }, + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + }, + "webhook_api_version": "1", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_timeout_secs": 25 } }, - "CallReferStarted": { + "CreateConferenceRequest": { + "required": [ + "call_control_id", + "name" + ], "type": "object", - "title": "Call Refer Started", + "title": "Create Conference Request", "properties": { - "record_type": { - "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "call_control_id": { + "description": "Unique identifier and token for controlling the call", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", + "type": "string" }, - "event_type": { - "type": "string", - "example": "call.refer.started", + "name": { + "description": "Name of the conference", + "example": "Business", + "type": "string" + }, + "beep_enabled": { + "description": "Whether a beep sound should be played when participants join and/or leave the conference.", "enum": [ - "call.refer.started" + "always", + "never", + "on_enter", + "on_exit" ], - "description": "The type of event being delivered." + "default": "never", + "example": "on_exit", + "type": "string" }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "type": "string" }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." + "comfort_noise": { + "description": "Toggle background comfort noise.", + "example": false, + "type": "boolean", + "default": true }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", - "description": "Unique ID for controlling the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "from": { - "type": "string", - "example": "+35319605860", - "description": "Number or SIP URI placing the call." - }, - "sip_notify_response": { - "type": "integer", - "example": 100, - "description": "SIP NOTIFY event status for tracking the REFER attempt." - }, - "to": { - "type": "string", - "example": "+13129457420", - "description": "Destination number or SIP URI of the call." - } - } + "command_id": { + "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901", + "type": "string" + }, + "duration_minutes": { + "description": "Time length (minutes) after which the conference will end.", + "example": 5, + "type": "integer" + }, + "hold_audio_url": { + "description": "The URL to an audio file to be played to participants joining the conference. Takes effect only when \"start_conference_on_create\" is set to \"false\".", + "example": "http://www.example.com/audio.wav", + "type": "string" + }, + "start_conference_on_create": { + "description": "Whether the conference should be started on creation. If the conference isn't started all participants that join are automatically put on hold. Defaults to \"true\".", + "example": false, + "type": "boolean" } }, "example": { - "record_type": "event", - "event_type": "call.refer.started", - "id": "fbeb70e0-54eb-4e26-8d19-56b43e66f754", - "occurred_at": "2020-03-30T13:29:42.130013Z", - "payload": { - "call_control_id": "v2:OycMASgvIjsGIAVEx8x3n9rYeKnUJx6a3V8VGhs5futnr17KZhujZA", - "call_leg_id": "817f7de8-728a-11ea-9ce6-02420a0f8969", - "call_session_id": "817f8c2a-728a-11ea-9cbe-02420a0f8969", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "connection_id": "1289082222292239760", - "from": "+35319605860", - "sip_notify_response": 100, - "to": "+13129457420" - } - } - }, - "CallReferStartedEvent": { - "type": "object", - "title": "Call Refer Started Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallReferStarted" - } + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "name": "Business", + "beep_enabled": "always", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "duration_minutes": 5, + "hold_audio_url": "http://www.example.com/audio.wav", + "start_conference_on_create": false } }, - "CallRequest": { + "CreateCredentialConnectionRequest": { "type": "object", - "title": "Dial Request", + "title": "Create Credential Connection Request", "required": [ - "connection_id", - "to", - "from" + "user_name", + "password", + "connection_name" ], - "example": { - "to": "+18005550100 or sip:username@sip.telnyx.com", - "from": "+18005550101", - "connection_id": "7267xxxxxxxxxxxxxx", - "audio_url": "http://www.example.com/sounds/greeting.wav", - "timeout_secs": 60, - "timeout_limit_secs": 60, - "webhook_url": "https://www.example.com/server-b/", - "webhook_url_method": "POST", - "answering_machine_detection": "detect", - "answering_machine_detection_config": { - "total_analysis_time_millis": 5000, - "after_greeting_silence_millis": 1000, - "between_words_silence_millis": 1000, - "greeting_duration_millis": 1000, - "initial_silence_millis": 1000, - "maximum_number_of_words": 1000, - "maximum_word_length_millis": 2000, - "silence_threshold": 512, - "greeting_total_analysis_time_millis": 50000, - "greeting_silence_duration_millis": 2000 - }, - "custom_headers": [ - { - "name": "head_1", - "value": "val_1" - }, - { - "name": "head_2", - "value": "val_2" - } - ], - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "link_to": "ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg==", - "sip_auth_username": "username", - "sip_auth_password": "password" - }, "properties": { - "to": { - "description": "The DID or SIP URI to dial out to.", + "active": { + "type": "boolean", + "description": "Defaults to true" + }, + "user_name": { "type": "string", - "example": "+18005550100 or sip:username@sip.telnyx.com" + "description": "The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters).", + "example": "myusername123" }, - "from": { - "description": "The `from` number to be used as the caller id presented to the destination (`to` number). The number should be in +E164 format. This attribute will default to the `from` number of the original call if omitted.", + "password": { "type": "string", - "example": "+18005550101" + "description": "The password to be used as part of the credentials. Must be 8 to 128 characters long.", + "example": "my123secure456password789" + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { + "type": "string" + }, + "sip_uri_calling_preference": { + "type": "string", + "default": "disabled", + "description": "This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).", + "enum": [ + "disabled", + "unrestricted", + "internal" + ] + }, + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": false, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout." + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios." + }, + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings." + }, + "webhook_event_url": { + "type": "string", + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" }, - "connection_id": { + "webhook_event_failover_url": { "type": "string", - "description": "The ID of the connection to be used when dialing the destination." + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, - "audio_url": { + "webhook_api_version": { "type": "string", - "example": "http://example.com/message.wav", - "description": "The URL of a file to be played back to the callee when the call is answered. The URL can point to either a WAV or MP3 file." + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "enum": [ + "1", + "2" + ], + "example": "1", + "default": "1" }, - "timeout_secs": { - "description": "The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being called. If the timeout is reached before an answer is received, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be sent. Minimum value is 5 seconds. Maximum value is 120 seconds.", - "default": 30, + "webhook_timeout_secs": { "type": "integer", - "example": 60, - "format": "int32" + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true }, - "time_limit_secs": { - "description": "Sets the maximum duration of a Call Control Leg in seconds. If the time limit is reached, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `time_limit` will be sent. For example, by setting a time limit of 120 seconds, a Call Leg will be automatically terminated two minutes after being answered. The default time limit is 14400 seconds or 4 hours and this is also the maximum allowed call length.", - "default": 14400, - "type": "integer", - "example": 600, - "format": "int32" + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" }, - "answering_machine_detection": { - "description": "Enables Answering Machine Detection. When a call is answered, Telnyx runs real-time detection to determine if it was picked up by a human or a machine and sends an `call.machine.detection.ended` webhook with the analysis result. If 'greeting_end' or 'detect_words' is used and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' webhook when the answering machine greeting ends with a beep or silence. If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' if a beep is detected.", - "default": "disabled", - "type": "string", - "enum": [ - "detect", - "detect_beep", - "detect_words", - "greeting_end", - "disabled" - ] + "inbound": { + "$ref": "#/components/schemas/CredentialInbound" }, - "answering_machine_detection_config": { - "description": "Optional configuration parameters to modify 'answering_machine_detection' performance.", + "outbound": { + "$ref": "#/components/schemas/CredentialOutbound" + } + }, + "example": { + "active": true, + "password": "my123secure456password789", + "user_name": "myusername123", + "anchorsite_override": "Latency", + "connection_name": "my name", + "sip_uri_calling_preference": " disabled", + "default_on_hold_comfort_noise_enabled": false, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": true, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_seconds": 10 + }, + "inbound": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": "G722", + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 + }, + "outbound": { + "call_parking_enabled": true, + "ani_override": "always", + "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "US", + "t38_reinvite_source": "telnyx", + "outbound_voice_profile_id": "1293384261075731499" + } + } + }, + "CreateFaxApplicationRequest": { + "type": "object", + "title": "Create Fax Application Request", + "required": [ + "application_name", + "webhook_event_url" + ], + "properties": { + "application_name": { + "$ref": "#/components/schemas/ApplicationName" + }, + "active": { + "$ref": "#/components/schemas/ConnectionActive" + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "webhook_event_url": { + "$ref": "#/components/schemas/WebhookEventUrl" + }, + "webhook_event_failover_url": { + "$ref": "#/components/schemas/WebhookEventFailoverUrl" + }, + "webhook_timeout_secs": { + "$ref": "#/components/schemas/WebhookTimeoutSecs" + }, + "inbound": { "type": "object", "properties": { - "total_analysis_time_millis": { - "description": "Maximum timeout threshold for overall detection.", - "default": 3500, - "type": "integer", - "example": 5000, - "format": "int32" - }, - "after_greeting_silence_millis": { - "description": "Silence duration threshold after a greeting message or voice for it be considered human.", - "default": 800, - "type": "integer", - "example": 1000, - "format": "int32" - }, - "between_words_silence_millis": { - "description": "Maximum threshold for silence between words.", - "default": 50, - "type": "integer", - "example": 100, - "format": "int32" - }, - "greeting_duration_millis": { - "description": "Maximum threshold of a human greeting. If greeting longer than this value, considered machine.", - "default": 3500, - "type": "integer", - "example": 1500, - "format": "int32" - }, - "initial_silence_millis": { - "description": "If initial silence duration is greater than this value, consider it a machine.", - "default": 3500, - "type": "integer", - "example": 1800, - "format": "int32" - }, - "maximum_number_of_words": { - "description": "If number of detected words is greater than this value, consder it a machine.", - "default": 5, - "type": "integer", - "example": 3, - "format": "int32" - }, - "maximum_word_length_millis": { - "description": "If a single word lasts longer than this threshold, consider it a machine.", - "default": 3500, - "type": "integer", - "example": 2000, - "format": "int32" - }, - "silence_threshold": { - "description": "Minimum noise threshold for any analysis.", - "default": 256, + "channel_limit": { "type": "integer", - "example": 512, - "format": "int32" + "description": "When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - "greeting_total_analysis_time_millis": { - "description": "If machine already detected, maximum timeout threshold to determine the end of the machine greeting.", - "default": 5000, - "type": "integer", - "example": 7500, - "format": "int32" + "sip_subdomain": { + "type": "string", + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", + "default": null, + "example": "example" }, - "greeting_silence_duration_millis": { - "description": "If machine already detected, maximum threshold for silence between words. If exceeded, the greeting is considered ended.", - "default": 1500, - "type": "integer", - "example": 2000, - "format": "int32" + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "default": "from_anyone", + "example": "only_my_connections" } } }, - "custom_headers": { - "description": "Custom headers to be added to the SIP INVITE.", - "type": "array", - "example": [ - { - "name": "head_1", - "value": "val_1" + "outbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - { - "name": "head_2", - "value": "val_2" + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" } - ], - "items": { - "$ref": "#/components/schemas/CustomSipHeader" } + } + }, + "example": { + "application_name": "fax-router", + "active": false, + "anchorsite_override": "Amsterdam, Netherlands", + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_timeout_secs": 25, + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + } + } + }, + "CreateFqdnConnectionRequest": { + "title": "Create Fqdn Connection Request", + "required": [ + "connection_name" + ], + "properties": { + "active": { + "type": "boolean", + "description": "Defaults to true", + "default": true + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { + "type": "string" + }, + "transport_protocol": { + "$ref": "#/components/schemas/FqdnConnectionTransportProtocol" + }, + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": true, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout." + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios." + }, + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings." + }, + "webhook_event_url": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" + }, + "webhook_event_failover_url": { + "type": "string", + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" + }, + "webhook_api_version": { + "type": "string", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "enum": [ + "1", + "2" + ], + "example": "1", + "default": "1" + }, + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true + }, + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" + }, + "inbound": { + "$ref": "#/components/schemas/InboundFqdn" + } + }, + "example": { + "active": true, + "anchorsite_override": "Latency", + "connection_name": "string", + "transport_protocol": "UDP", + "default_on_hold_comfort_noise_enabled": true, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": true, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_secs": 10 }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "inbound": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": [ + "G722" + ], + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "string", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 10 + } + } + }, + "CreateFqdnRequest": { + "title": "Create Fqdn Request", + "type": "object", + "required": [ + "fqdn", + "dns_record_type", + "connection_id" + ], + "properties": { + "connection_id": { "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "description": "ID of the FQDN connection to which this IP should be attached." }, - "link_to": { - "description": "Use another call's control id for sharing the same call session id", + "fqdn": { "type": "string", - "example": "ilditnZK_eVysupV21KzmzN_sM29ygfauQojpm4BgFtfX5hXAcjotg==" - }, - "sip_auth_username": { - "description": "SIP Authentication username used for SIP challenges.", - "type": "string" + "description": "FQDN represented by this resource.", + "example": "example.com" }, - "sip_auth_password": { - "description": "SIP Authentication password used for SIP challenges.", - "type": "string" - }, - "webhook_url": { - "description": "Use this field to override the URL for which Telnyx will send subsuqeunt webhooks to for this call.", - "type": "string", - "example": "https://www.example.com/server-b/" + "port": { + "type": "integer", + "description": "Port to use when connecting to this FQDN.", + "default": 5060, + "example": 5060, + "nullable": true }, - "webhook_url_method": { - "description": "HTTP request type used for `webhook_url`.", - "default": "POST", + "dns_record_type": { "type": "string", - "enum": [ - "POST", - "GET" - ], - "example": "GET" + "description": "The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used.", + "example": "a" } + }, + "example": { + "connection_id": "1516447646313612565", + "fqdn": "example.com", + "port": 8080, + "dns_record_type": "a" } }, - "CallSpeakEnded": { + "CreateInboundIpRequest": { "type": "object", - "title": "Call Speak Ended", + "title": "Create Inbound Ip Request", "properties": { - "record_type": { + "ani_number_format": { "type": "string", - "example": "event", "enum": [ - "event" + "+E.164", + "E.164", + "+E.164-national", + "E.164-national" ], - "description": "Identifies the type of the resource." + "default": "E.164-national", + "description": "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls." }, - "event_type": { + "dnis_number_format": { "type": "string", - "example": "call.speak.ended", "enum": [ - "call.speak.ended" + "+e164", + "e164", + "national" ], - "description": "The type of event being delivered." + "default": "e164" }, - "id": { + "codecs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.", + "default": [ + "G722", + "G711U", + "G711A", + "G729", + "OPUS", + "H.264" + ] + }, + "default_routing_method": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "enum": [ + "sequential", + "round-robin" + ], + "description": "Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed." }, - "occurred_at": { + "channel_limit": { + "type": "integer", + "default": null, + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection." + }, + "generate_ringback_tone": { + "type": "boolean", + "default": false, + "description": "Generate ringback tone through 183 session progress message with early media." + }, + "isup_headers_enabled": { + "type": "boolean", + "default": false, + "description": "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)" + }, + "prack_enabled": { + "type": "boolean", + "description": "Enable PRACK messages as defined in RFC3262.", + "default": false + }, + "privacy_zone_enabled": { + "type": "boolean", + "description": "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.", + "default": false + }, + "sip_compact_headers_enabled": { + "type": "boolean", + "description": "Defaults to true.", + "default": true + }, + "sip_region": { "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." + "default": "US", + "description": "Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used.", + "enum": [ + "US", + "Europe", + "Australia" + ] }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "status": { - "type": "string", - "example": "completed", - "enum": [ - "completed", - "call_hangup" - ], - "description": "Reflects how `speak` ended." - } - } + "sip_subdomain": { + "type": "string", + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls." + }, + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ] + }, + "timeout_1xx_secs": { + "type": "integer", + "description": "Time(sec) before aborting if connection is not made.", + "minimum": 1, + "maximum": 120, + "default": 3 + }, + "timeout_2xx_secs": { + "type": "integer", + "description": "Time(sec) before aborting if call is unanswered (min: 1, max: 600).", + "default": 90 } }, "example": { - "record_type": "event", - "event_type": "call.speak.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "status": "completed" - } - } - }, - "CallSpeakEndedEvent": { - "type": "object", - "title": "Call Speak Ended Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallSpeakEnded" - } + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": "G722", + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "test", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 } }, - "CallSpeakStarted": { - "type": "object", - "title": "Call Speak Started", + "CreateIpConnectionRequest": { + "title": "Create IP Connection Request", "properties": { - "record_type": { + "active": { + "type": "boolean", + "description": "Defaults to true", + "example": true + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "example": "string" }, - "event_type": { + "transport_protocol": { "type": "string", - "example": "call.speak.started", + "description": "One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.", + "default": "UDP", "enum": [ - "call.speak.started" + "UDP", + "TCP", + "TLS" ], - "description": "The type of event being delivered." + "example": "UDP" }, - "id": { + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": true, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.", + "example": true + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.", + "example": true + }, + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.", + "example": false + }, + "webhook_event_url": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" }, - "occurred_at": { + "webhook_event_failover_url": { "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521992Z", - "description": "ISO 8601 datetime of when the event occurred." + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - } - } + "webhook_api_version": { + "type": "string", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "enum": [ + "1", + "2" + ], + "example": "1", + "default": "1" + }, + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true + }, + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" + }, + "inbound": { + "$ref": "#/components/schemas/CreateInboundIpRequest" + }, + "outbound": { + "$ref": "#/components/schemas/OutboundIp" } }, "example": { - "record_type": "event", - "event_type": "call.speak.started", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d" - } - } - }, - "CallSpeakStartedEvent": { - "type": "object", - "title": "Call Speak Started Event", - "properties": { - "data": { - "$ref": "#/components/schemas/CallSpeakStarted" + "active": true, + "anchorsite_override": "Latency", + "connection_name": "string", + "transport_protocol": "UDP", + "default_on_hold_comfort_noise_enabled": true, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": false, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_secs": 10 + }, + "inbound:": { + "ani_number_format": "+E.164", + "dns_number_format": "+e164", + "codecs": "G722", + "default_primary_ip_id": "192.168.0.0", + "default_tertiary_ip_id": "192.168.0.0", + "default_secondary_ip_id": "192.168.0.0", + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "test", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 + }, + "outbound": { + "call_parking_enabled": true, + "ani_override": "string", + "ani_override_type": "always", + "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "string", + "t38_reinvite_source": "telnyx", + "tech_prefix": "string", + "ip_authentication_method": "token", + "ip_authentication_token": "string", + "outbound_voice_profile_id": "1293384261075731499" } } }, - "CnamListing": { - "description": "The CNAM listing settings for a phone number.", + "CreateIpRequest": { + "title": "Create Ip Request", "type": "object", + "required": [ + "ip_address" + ], "properties": { - "cnam_listing_enabled": { - "type": "boolean", - "default": false, - "description": "Enables CNAM listings for this number. Requires cnam_listing_details to also be set." + "connection_id": { + "type": "string", + "description": "ID of the IP Connection to which this IP should be attached." }, - "cnam_listing_details": { + "ip_address": { "type": "string", - "description": "The CNAM listing details for this number. Must be alphanumeric characters or spaces with a maximum length of 15. Requires cnam_listing_enabled to also be set to true." + "description": "IP adddress represented by this resource.", + "example": "192.168.0.0" + }, + "port": { + "type": "integer", + "description": "Port to use when connecting to this IP.", + "default": 5060, + "example": 5060 } }, "example": { - "cnam_listing_enabled": true, - "cnam_listing_details": "example" + "connection_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "ip_address": "192.168.0.0", + "port": 5060 } }, - "Conference": { + "CreateLongCodeMessageRequest": { "type": "object", - "title": "Conference", "required": [ - "record_type", - "id", - "name", - "created_at", - "expires_at" + "from", + "to" ], "properties": { - "record_type": { + "from": { "type": "string", - "enum": [ - "conference" - ], - "example": "conference" + "format": "address", + "description": "Phone number, in +E.164 format, used to send the message." }, - "id": { - "type": "string", - "description": "Uniquely identifies the conference", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "to": { + "$ref": "#/components/schemas/ToNumber" }, - "name": { + "text": { "type": "string", - "description": "Name of the conference", - "example": "All hands meeting" + "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" }, - "created_at": { + "subject": { "type": "string", - "description": "ISO 8601 formatted date of when the conference was created", - "example": "2019-01-23T18:10:02.574Z" + "description": "Subject of multimedia message" }, - "expires_at": { - "type": "string", - "description": "ISO 8601 formatted date of when the conference will expire", - "example": "2019-01-23T18:10:02.574Z" + "media_urls": { + "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", + "type": "array", + "items": { + "type": "string", + "format": "url" + } }, - "updated_at": { + "webhook_url": { + "description": "The URL where webhooks related to this message will be sent.", "type": "string", - "description": "ISO 8601 formatted date of when the conference was last updated", - "example": "2019-01-23T18:10:02.574Z" + "format": "url" }, - "region": { + "webhook_failover_url": { + "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", "type": "string", - "description": "Region where the conference is hosted", - "example": "sv1" + "format": "url" }, - "status": { - "type": "string", - "enum": [ - "init", - "in_progress", - "completed" - ], - "description": "Status of the conference", - "example": "completed" + "use_profile_webhooks": { + "type": "boolean", + "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", + "default": true }, - "end_reason": { + "type": { + "description": "The protocol for sending the message, either SMS or MMS.", "type": "string", "enum": [ - "all_left", - "ended_via_api", - "host_left", - "time_exceeded" - ], - "description": "Reason why the conference ended", - "example": "all_left" - }, - "ended_by": { - "type": "object", - "description": "IDs related to who ended the conference. It is expected for them to all be there or all be null", - "properties": { - "call_control_id": { - "type": "string", - "description": "Call Control ID which ended the conference", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==" - }, - "call_session_id": { - "type": "string", - "description": "Call Session ID which ended the conference", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" - } - } + "SMS", + "MMS" + ] }, - "connection_id": { - "type": "string", - "description": "Identifies the connection associated with the conference", - "example": "3fa85f64-9191-4567-b3fc-2c963f66afa6" + "auto_detect": { + "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", + "type": "boolean", + "default": false } }, "example": { - "record_type": "conference", - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "name": "All hands meeting", - "created_at": "2019-01-23T18:10:02.574Z", - "expires_at": "2019-01-23T18:10:02.574Z", - "updated_at": "2019-01-23T18:10:02.574Z", - "region": "sv1", - "status": "completed", - "end_reason": "all_left", - "ended_by": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", - "call_session_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" - }, - "connection_id": "3fa85f64-9191-4567-b3fc-2c963f66afa6" + "from": "+18445550001", + "to": "+13125550002", + "text": "Hello, World!", + "subject": "From Telnyx!", + "media_urls": [ + "http://example.com" + ], + "webhook_url": "http://example.com/webhooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "use_profile_webhooks": true, + "type": "MMS" } }, - "ConferenceCallRequest": { + "CreateMessageRequest": { + "type": "object", "required": [ - "call_control_id", - "from", "to" ], - "type": "object", - "title": "Conference Dial Request", "properties": { - "call_control_id": { - "description": "Unique identifier and token for controlling the call", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", - "type": "string" + "from": { + "type": "string", + "format": "address", + "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code).\n\n**Required if sending with a phone number, short code, or alphanumeric sender ID.**\n" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "type": "string" + "messaging_profile_id": { + "type": "string", + "description": "Unique identifier for a messaging profile.\n\n**Required if sending via number pool or with an alphanumeric sender ID.**\n" }, - "command_id": { - "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901", - "type": "string" + "to": { + "$ref": "#/components/schemas/ToNumber" }, - "from": { - "description": "The `from` number to be used as the caller id presented to the destination (`to` number).", + "text": { "type": "string", - "example": "+18005550101" + "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" }, - "hold": { - "description": "Whether the participant should be put on hold immediately after joining the conference.", - "example": true, - "type": "boolean", - "default": false + "subject": { + "type": "string", + "description": "Subject of multimedia message" }, - "hold_audio_url": { - "description": "The URL of an audio file to be played to the participant when they are put on hold after joining the conference. This property takes effect only if \"hold\" is set to \"true\".", - "example": "http://www.example.com/audio.wav", - "type": "string" + "media_urls": { + "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", + "type": "array", + "items": { + "type": "string", + "format": "url" + } }, - "mute": { - "description": "Whether the participant should be muted immediately after joining the conference.", - "example": false, - "type": "boolean", - "default": false + "webhook_url": { + "description": "The URL where webhooks related to this message will be sent.", + "type": "string", + "format": "url" }, - "start_conference_on_enter": { - "description": "Whether the conference should be started after the participant joins the conference.", - "example": true, + "webhook_failover_url": { + "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", + "type": "string", + "format": "url" + }, + "use_profile_webhooks": { "type": "boolean", - "default": false + "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", + "default": true }, - "supervisor_role": { - "description": "Sets the joining participant as a supervisor for the conference. A conference can have multiple supervisors. \"barge\" means the supervisor enters the conference as a normal participant. This is the same as \"none\". \"monitor\" means the supervisor is muted but can hear all participants. \"whisper\" means that only the specified \"whisper_call_control_ids\" can hear the supervisor. Defaults to \"none\".", - "example": "whisper", + "type": { + "description": "The protocol for sending the message, either SMS or MMS.", "type": "string", "enum": [ - "barge", - "monitor", - "none", - "whisper" + "SMS", + "MMS" ] }, - "to": { - "description": "The DID or SIP URI to dial out and bridge to the given call.", - "type": "string", - "example": "+18005550100 or sip:username@sip.telnyx.com" - }, - "whisper_call_control_ids": { - "description": "Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only.", - "example": [ - "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", - "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" - ], - "type": "array", - "items": { - "type": "string" - } + "auto_detect": { + "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", + "type": "boolean", + "default": false } }, "example": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "hold": true, - "hold_audio_url": "http://www.example.com/audio.wav", - "mute": true, - "from": "+18005550101", - "to": "+18005550100", - "start_conference_on_enter": true, - "supervisor_role": "whisper", - "whisper_call_control_ids": [ - "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", - "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" - ] + "from": "+18445550001", + "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", + "to": "+18445550001", + "text": "Hello, World!", + "subject": "From Telnyx!", + "media_urls": [ + "http://example.com" + ], + "webhook_url": "http://example.com/webhooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "use_profile_webhooks": true, + "type": "MMS" } }, - "ConferenceCommandResult": { + "CreateMessagingHostedNumberOrderRequest": { "type": "object", - "title": "Conference Command Result", - "required": [ - "result" - ], + "example": { + "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", + "phone_numbers": [ + "+18665550001", + "+18665550002" + ] + }, "properties": { - "result": { + "phone_numbers": { + "type": "array", + "items": { + "type": "string", + "format": "+E.164" + }, + "description": "Phone numbers to be used for hosted messaging." + }, + "messaging_profile_id": { "type": "string", - "example": "ok" + "description": "Automatically associate the number with this messaging profile ID when the order is complete." } - }, - "example": { - "result": "ok" } }, - "ConferenceCreated": { + "CreateMessagingProfileRequest": { "type": "object", - "title": "Conference Created", - "example": { - "record_type": "event", - "event_type": "conference.created", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "occured_at": "2018-02-02T22:25:27.521Z" - } - }, + "required": [ + "name" + ], "properties": { - "record_type": { + "name": { + "description": "A user friendly name for the messaging profile.", + "type": "string" + }, + "enabled": { + "description": "Specifies whether the messaging profile is enabled or not.", + "type": "boolean", + "default": true + }, + "webhook_url": { + "description": "The URL where webhooks related to this messaging profile will be sent.", "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "format": "url", + "default": "", + "nullable": true }, - "event_type": { + "webhook_failover_url": { + "description": "The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails.", + "type": "string", + "format": "url", + "default": "", + "nullable": true + }, + "webhook_api_version": { + "description": "Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.", "type": "string", - "example": "conference.created", "enum": [ - "conference.created" + "1", + "2", + "2010-04-01" ], - "description": "The type of event being delivered." + "default": "2" }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "number_pool_settings": { + "$ref": "#/components/schemas/NumberPoolSettings" }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "Conference ID that the participant joined." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." - } - } + "url_shortener_settings": { + "$ref": "#/components/schemas/UrlShortenerSettings" } - } - }, - "ConferenceCreatedEvent": { - "type": "object", - "title": "Conference Created Event", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceCreated" + }, + "example": { + "name": "My name", + "enabled": true, + "webhook_url": "https://www.example.com/hooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "webhook_api_version": "2", + "number_pool_settings": { + "toll_free_weight": 10, + "long_code_weight": 1, + "skip_unhealthy": true, + "sticky_sender": false, + "geomatch": false + }, + "url_shortener_settings": { + "domain": "example.ex", + "prefix": "", + "replace_blacklist_only": true, + "send_webhooks": false } } }, - "ConferenceEnded": { - "type": "object", - "title": "Conference Ended", + "CreateNumberOrderDocumentRequest": { "properties": { + "id": { + "type": "string", + "format": "uuid", + "example": "387d1e31-a218-4375-8151-103f2d5e2d2c", + "readOnly": true + }, "record_type": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "example": "number_order_document", + "readOnly": true + }, + "file_id": { + "type": "string", + "description": "The id of the file to associate as a number order document.", + "example": "1e3c5822-0362-4702-8e46-5a129f0d3976" + }, + "requirements_id": { + "type": "string", + "description": "Unique id for a requirement.", + "example": "36aaf27d-986b-493c-bd1b-de16af2e4292" + }, + "customer_reference": { + "type": "string", + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" }, - "event_type": { + "requirement_type": { "type": "string", - "example": "conference.ended", "enum": [ - "conference.ended" + "address_proof", + "identification", + "reg_form" ], - "description": "The type of event being delivered." + "readOnly": true }, - "id": { + "created_at": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." - }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "Conference ID that the participant joined." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." - }, - "reason": { - "type": "string", - "enum": [ - "all_left", - "host_left", - "time_exceeded" - ], - "description": "Reason the conference ended." - } - } + "format": "datetime", + "description": "An ISO 8901 datetime string denoting when the number order document was uploaded.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true } }, "example": { - "record_type": "event", - "event_type": "conference.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "occured_at": "2018-02-02T22:25:27.521Z", - "reason": "host_left" - } - } - }, - "ConferenceEndedEvent": { - "type": "object", - "title": "Conference Ended Event", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceEnded" - } + "id": "387d1e31-a218-4375-8151-103f2d5e2d2c", + "record_type": "number_order_document", + "file_id": "1e3c5822-0362-4702-8e46-5a129f0d3976", + "requirements_id": "36aaf27d-986b-493c-bd1b-de16af2e4292", + "customer_reference": "MY REF 001", + "requirement_type": "address_proof", + "created_at": "2018-01-01T00:00:00.000000Z" } }, - "ConferenceHoldRequest": { - "type": "object", - "title": "Conference Hold Request", + "CreateNumberOrderRequest": { "properties": { - "call_control_ids": { - "description": "List of unique identifiers and tokens for controlling the call. When empty all participants will be placed on hold.", + "id": { + "type": "string", + "format": "uuid", + "example": "12ade33a-21c0-473b-b055-b3c836e1c292", + "readOnly": true + }, + "record_type": { + "type": "string", + "example": "number_order", + "readOnly": true + }, + "phone_numbers": { "type": "array", "items": { - "type": "string" - } + "$ref": "#/components/schemas/PhoneNumber" + }, + "writeOnly": true }, - "audio_url": { + "phone_numbers_count": { + "type": "integer", + "description": "The count of phone numbers in the number order.", + "example": 1, + "readOnly": true + }, + "connection_id": { "type": "string", - "example": "http://example.com/message.wav", - "description": "The URL of a file to be played back at the beginning of each prompt. The URL can point to either a WAV or MP3 file." + "example": "346789098765567", + "description": "Identifies the connection associated with this phone number." + }, + "messaging_profile_id": { + "type": "string", + "example": "abc85f64-5717-4562-b3fc-2c9600", + "description": "Identifies the messaging profile associated with the phone number." + }, + "status": { + "type": "string", + "enum": [ + "pending", + "success", + "failure" + ], + "description": "The status of the order.", + "readOnly": true + }, + "customer_reference": { + "type": "string", + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" + }, + "created_at": { + "type": "string", + "format": "datetime", + "description": "An ISO 8901 datetime string denoting when the number order was created.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true + }, + "updated_at": { + "type": "string", + "format": "datetime", + "description": "An ISO 8901 datetime string for when the number order was updated.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true + }, + "requirements_met": { + "type": "boolean", + "description": "True if all requirements are met for every phone number, false otherwise.", + "example": true, + "readOnly": true } }, "example": { - "call_control_ids": [ - "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" + "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + "phone_numbers": [ + { + "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + "record_type": "number_order_phone_number", + "phone_number": "+19705555098", + "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + "regulatory_requirements": [ + { + "record_type": "phone_number_regulatory_requirement", + "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", + "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", + "field_type": "address_id" + } + ], + "requirements_met": true, + "status": "success" + } ], - "audio_url": "http://example.com/message.wav" + "record_type": "number_order", + "phone_numbers_count": 1, + "connection_id": "346789098765567", + "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600", + "status": "pending", + "customer_reference": "MY REF 001", + "created_at": "2018-01-01T00:00:00.000000Z", + "updated_at": "2018-01-01T00:00:00.000000Z", + "requirements_met": true } }, - "ConferenceMuteRequest": { + "CreateNumberPoolMessageRequest": { "type": "object", - "title": "Conference Mute Request", + "required": [ + "to", + "messaging_profile_id" + ], "properties": { - "call_control_ids": { - "description": "Array of unique identifiers and tokens for controlling the call. When empty all participants will be muted.", + "messaging_profile_id": { + "type": "string", + "description": "Unique identifier for a messaging profile." + }, + "to": { + "$ref": "#/components/schemas/ToNumber" + }, + "text": { + "type": "string", + "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" + }, + "subject": { + "type": "string", + "description": "Subject of multimedia message" + }, + "media_urls": { + "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", "type": "array", "items": { - "type": "string" + "type": "string", + "format": "url" } + }, + "webhook_url": { + "description": "The URL where webhooks related to this message will be sent.", + "type": "string", + "format": "url" + }, + "webhook_failover_url": { + "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", + "type": "string", + "format": "url" + }, + "use_profile_webhooks": { + "type": "boolean", + "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", + "default": true + }, + "type": { + "description": "The protocol for sending the message, either SMS or MMS.", + "type": "string", + "enum": [ + "SMS", + "MMS" + ] + }, + "auto_detect": { + "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", + "type": "boolean", + "default": false } }, "example": { - "call_control_ids": [ - "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" - ] + "from": "+18445550001", + "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", + "to": [ + "+13125550002" + ], + "text": "Hello, World!", + "subject": "From Telnyx!", + "media_urls": [ + "http://example.com" + ], + "webhook_url": "http://example.com/webhooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "use_profile_webhooks": true, + "type": "MMS" } }, - "ConferenceParticipantJoined": { - "type": "object", - "title": "Conference Participant Joined", + "CreateNumberReservationRequest": { "properties": { + "id": { + "type": "string", + "format": "uuid", + "example": "12ade33a-21c0-473b-b055-b3c836e1c292", + "readOnly": true + }, "record_type": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "example": "number_reservation", + "readOnly": true }, - "event_type": { + "phone_numbers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReservedPhoneNumber" + } + }, + "status": { "type": "string", - "example": "conference.participant.joined", "enum": [ - "conference.participant.joined" + "pending", + "success", + "failure" ], - "description": "The type of event being delivered." + "description": "The status of the entire reservation.", + "readOnly": true }, - "id": { + "customer_reference": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" }, - "occurred_at": { + "created_at": { "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." + "format": "datetime", + "description": "An ISO 8901 datetime string denoting when the numbers reservation was created.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "Conference ID that the participant joined." - } - } + "updated_at": { + "type": "string", + "format": "datetime", + "description": "An ISO 8901 datetime string for when the number reservation was updated.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true } }, "example": { - "record_type": "event", - "event_type": "conference.participant.joined", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" - } - } - }, - "ConferenceParticipantJoinedEvent": { - "type": "object", - "title": "Conference Participant Joined Event", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceParticipantJoined" - } + "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + "record_type": "number_reservation", + "phone_numbers": [ + { + "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + "record_type": "reserved_phone_number", + "phone_number": "+19705555098", + "status": "pending", + "created_at": "2018-01-01T00:00:00.000000Z", + "updated_at": "2018-01-01T00:00:00.000000Z", + "expired_at": "2018-01-01T00:00:00.000000Z" + } + ], + "status": "pending", + "customer_reference": "MY REF 001", + "created_at": "2018-01-01T00:00:00.000000Z", + "updated_at": "2018-01-01T00:00:00.000000Z" } }, - "ConferenceParticipantLeft": { + "CreateOutboundVoiceProfileRequest": { "type": "object", - "title": "Conference Participant Left", + "title": "Outbound Voice Profile", "example": { - "record_type": "event", - "event_type": "conference.participant.left", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1" - } + "name": "office", + "traffic_type": "conversational", + "service_plan": "global", + "concurrent_call_limit": 10, + "enabled": true, + "tags": [ + "office-profile" + ], + "usage_payment_method": "rate-deck", + "whitelisted_destinations": [ + "US", + "BR", + "AU" + ], + "max_destination_rate": 10, + "daily_spend_limit": "100.00", + "daily_spend_limit_enabled": true, + "billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" }, "properties": { - "record_type": { + "name": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "description": "A user-supplied name to help with organization.", + "example": "office", + "default": "" }, - "event_type": { - "type": "string", - "example": "conference.participant.left", - "enum": [ - "conference.participant.left" - ], - "description": "The type of event being delivered." + "traffic_type": { + "$ref": "#/components/schemas/TrafficType" }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "service_plan": { + "$ref": "#/components/schemas/ServicePlan" }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." + "concurrent_call_limit": { + "type": "integer", + "description": "Must be no more than your global concurrent call limit. Null means no limit.", + "example": 10, + "nullable": true }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Call ID used to issue commands via Call Control API." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "Conference ID that the participant joined." - } - } - } - } - }, - "ConferenceParticipantLeftEvent": { - "type": "object", - "title": "Conference Participant Left Event", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceParticipantLeft" + "enabled": { + "type": "boolean", + "description": "Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.", + "example": true, + "default": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "office-profile" + ] + }, + "usage_payment_method": { + "$ref": "#/components/schemas/UsagePaymentMethod" + }, + "whitelisted_destinations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.", + "example": [ + "US", + "BR", + "AU" + ], + "default": [ + "US", + "CA" + ] + }, + "max_destination_rate": { + "type": "number", + "description": "Maximum rate (price per minute) for a Destination to be allowed when making outbound calls." + }, + "daily_spend_limit": { + "type": "string", + "description": "The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.", + "example": "100.00" + }, + "daily_spend_limit_enabled": { + "type": "boolean", + "description": "Specifies whether to enforce the daily_spend_limit on this outbound voice profile.", + "example": true, + "default": false + }, + "call_recording": { + "$ref": "#/components/schemas/OutboundCallRecording" + }, + "billing_group_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).", + "example": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "default": null, + "nullable": true } } }, - "ConferenceParticipantPlaybackEnded": { + "CreateShortCodeMessageRequest": { "type": "object", - "title": "Conference Participant Playback Ended", - "example": { - "record_type": "event", - "event_type": "conference.participant.playback.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "media_url": "https://www.example.com/audio.mp3", - "occured_at": "2018-02-02T22:25:27.521Z" - } - }, + "required": [ + "from", + "to" + ], "properties": { - "record_type": { + "from": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "format": "address", + "description": "Phone number, in +E.164 format, used to send the message." }, - "event_type": { + "to": { + "$ref": "#/components/schemas/ToNumber" + }, + "text": { "type": "string", - "example": "conference.participant.playback.ended", - "enum": [ - "conference.participant.playback.ended" - ], - "description": "The type of event being delivered." + "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" }, - "id": { + "subject": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "description": "Subject of multimedia message" }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Participant's call ID used to issue commands via Call Control API." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." - }, - "media_url": { - "type": "string", - "example": "https://www.example.com/audio.mp3", - "description": "The URL to the audio file being played." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." - } + "media_urls": { + "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", + "type": "array", + "items": { + "type": "string", + "format": "url" } + }, + "webhook_url": { + "description": "The URL where webhooks related to this message will be sent.", + "type": "string", + "format": "url" + }, + "webhook_failover_url": { + "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", + "type": "string", + "format": "url" + }, + "use_profile_webhooks": { + "type": "boolean", + "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", + "default": true + }, + "type": { + "description": "The protocol for sending the message, either SMS or MMS.", + "type": "string", + "enum": [ + "SMS", + "MMS" + ] + }, + "auto_detect": { + "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", + "type": "boolean", + "default": false } + }, + "example": { + "from": "+18445550001", + "to": "+18445550001", + "text": "Hello, World!", + "subject": "From Telnyx!", + "media_urls": [ + "http://example.com" + ], + "webhook_url": "http://example.com/webhooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "use_profile_webhooks": true, + "type": "MMS" } }, - "ConferenceParticipantPlaybackEndedEvent": { - "type": "object", - "title": "Conference Participant Playback Ended Event", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceParticipantPlaybackEnded" - } - } - }, - "ConferenceParticipantPlaybackStarted": { + "CreateTexmlApplicationRequest": { "type": "object", - "title": "Conference Participant Playback Started", - "example": { - "record_type": "event", - "event_type": "conference.participant.playback.started", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "media_url": "https://www.example.com/audio.mp3", - "occured_at": "2018-02-02T22:25:27.521Z" - } - }, + "title": "Create Texml Application Request", + "required": [ + "friendly_name", + "voice_url" + ], "properties": { - "record_type": { - "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "friendly_name": { + "$ref": "#/components/schemas/ApplicationName" }, - "event_type": { - "type": "string", - "example": "conference.participant.playback.started", - "enum": [ - "conference.participant.playback.started" - ], - "description": "The type of event being delivered." + "active": { + "$ref": "#/components/schemas/ConnectionActive" }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Participant's call ID used to issue commands via Call Control API." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "first_command_timeout": { + "$ref": "#/components/schemas/FirstCommandTimeout" + }, + "first_command_timeout_secs": { + "$ref": "#/components/schemas/FirstCommandTimeoutSecs" + }, + "voice_url": { + "type": "string", + "description": "URL to which Telnyx will deliver your XML Translator webhooks.", + "format": "url", + "example": "https://example.com" + }, + "voice_fallback_url": { + "type": "string", + "description": "URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url.", + "default": null, + "format": "url", + "example": "https://fallback.example.com" + }, + "voice_method": { + "type": "string", + "description": "HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'.", + "enum": [ + "get", + "post" + ], + "default": "post", + "example": "get" + }, + "status_callback": { + "type": "string", + "description": "URL for Telnyx to send requests to containing information about call progress events.", + "default": null, + "format": "url", + "example": "https://example.com" + }, + "status_callback_method": { + "type": "string", + "description": "HTTP request method Telnyx should use when requesting the status_callback URL.", + "enum": [ + "get", + "post" + ], + "default": "post", + "example": "get" + }, + "inbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - "conference_id": { + "sip_subdomain": { "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", + "default": null, + "example": "example" }, - "media_url": { + "sip_subdomain_receive_settings": { "type": "string", - "example": "https://www.example.com/audio.mp3", - "description": "The URL to the audio file being played." + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "default": "from_anyone", + "example": "only_my_connections" + } + } + }, + "outbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" } } } - } - }, - "ConferenceParticipantPlaybackStartedEvent": { - "type": "object", - "title": "Conference Participant Playback Started Event", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceParticipantPlaybackStarted" + }, + "example": { + "friendly_name": "call-router", + "active": false, + "anchorsite_override": "Amsterdam, Netherlands", + "dtmf_type": "Inband", + "first_command_timeout": true, + "first_command_timeout_secs": 10, + "voice_url": "https://example.com", + "voice_fallback_url": "https://fallback.example.com", + "voice_method": "get", + "status_callback": "https://example.com", + "status_callback_method": "get", + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" + }, + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" } } }, - "ConferenceParticipantSpeakEnded": { + "CreatedAt": { + "title": "Created At", + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "2020-02-02T22:25:27.521Z" + }, + "CredentialConnection": { "type": "object", - "title": "Conference Participant Speak Ended", - "example": { - "record_type": "event", - "event_type": "conference.participant.speak.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "occured_at": "2018-02-02T22:25:27.521Z" - } - }, + "title": "Credential Connection", "properties": { + "id": { + "type": "string", + "format": "int64", + "description": "Identifies the type of resource.", + "example": "1293384261075731499" + }, "record_type": { "type": "string", - "example": "event", + "description": "Identifies the type of the resource.", + "example": "credential_connection" + }, + "active": { + "type": "boolean", + "description": "Defaults to true" + }, + "user_name": { + "type": "string", + "description": "The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters).", + "example": "myusername123" + }, + "password": { + "type": "string", + "description": "The password to be used as part of the credentials. Must be 8 to 128 characters long.", + "example": "my123secure456password789" + }, + "created_at": { + "type": "string", + "description": "ISO-8601 formatted date indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 formatted date indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { + "type": "string" + }, + "sip_uri_calling_preference": { + "type": "string", + "default": null, + "example": "disabled", + "description": "This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).", "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "disabled", + "unrestricted", + "internal" + ] }, - "event_type": { + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": true, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout." + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios." + }, + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings." + }, + "webhook_event_url": { "type": "string", - "example": "conference.participant.speak.ended", + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" + }, + "webhook_event_failover_url": { + "type": "string", + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" + }, + "webhook_api_version": { + "type": "string", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", "enum": [ - "conference.participant.speak.ended" + "1", + "2" ], - "description": "The type of event being delivered." + "example": "1", + "default": "1" }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Participant's call ID used to issue commands via Call Control API." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." - } - } + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" + }, + "inbound": { + "$ref": "#/components/schemas/CredentialInbound" + }, + "outbound": { + "$ref": "#/components/schemas/CredentialOutbound" + } + }, + "example": { + "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "record_type": "credential_connection", + "active": true, + "user_name": "myusername123", + "password": "my123secure456password789", + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z", + "anchorsite_override": "Latency", + "connection_name": "string", + "sip_uri_calling_preference": "disabled", + "default_on_hold_comfort_noise_enabled": true, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": true, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtp+1", + "capture_enabled": true, + "report_frequency_seconds": 10 + }, + "inbound": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": [ + "G722" + ], + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "timeout_1xx_secs": 10, + "timeout_2xx_secs": "15" + }, + "outbound": { + "call_parking_enabled": true, + "ani_override": "string", + "ani_override_type": "always", + "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "string", + "t38_reinvite_source": "telnyx", + "outbound_voice_profile_id": "1293384261075731499" } } }, - "ConferenceParticipantSpeakEndedEvent": { + "CredentialInbound": { "type": "object", - "title": "Conference Participant Speak Ended Event", + "title": "Credential Inbound", + "example": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": "G722", + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 + }, "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceParticipantSpeakEnded" + "ani_number_format": { + "type": "string", + "enum": [ + "+E.164", + "E.164", + "+E.164-national", + "E.164-national" + ], + "default": "E.164-national", + "description": "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls." + }, + "dnis_number_format": { + "type": "string", + "enum": [ + "+e164", + "e164", + "national" + ], + "default": "e164" + }, + "codecs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.", + "default": [ + "G722", + "G711U", + "G711A", + "G729", + "OPUS", + "H.264" + ] + }, + "channel_limit": { + "type": "integer", + "default": null, + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection." + }, + "generate_ringback_tone": { + "type": "boolean", + "default": false, + "description": "Generate ringback tone through 183 session progress message with early media." + }, + "isup_headers_enabled": { + "type": "boolean", + "default": false, + "description": "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)" + }, + "prack_enabled": { + "type": "boolean", + "description": "Enable PRACK messages as defined in RFC3262.", + "default": false + }, + "privacy_zone_enabled": { + "type": "boolean", + "description": "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.", + "default": false + }, + "sip_compact_headers_enabled": { + "type": "boolean", + "description": "Defaults to true.", + "default": true + }, + "timeout_1xx_secs": { + "type": "integer", + "description": "Time(sec) before aborting if connection is not made.", + "minimum": 1, + "maximum": 120, + "default": 3 + }, + "timeout_2xx_secs": { + "type": "string", + "description": "Time(sec) before aborting if call is unanswered (min: 1, max: 600).", + "minimum": 1, + "maximum": 600, + "default": "90" } } }, - "ConferenceParticipantSpeakStarted": { + "CredentialOutbound": { "type": "object", - "title": "Conference Participant Speak Started", + "title": "Credential Outbound", "example": { - "record_type": "event", - "event_type": "conference.participant.speak.started", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "connection_id": "7267xxxxxxxxxxxxxx", - "call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "occured_at": "2018-02-02T22:25:27.521Z" - } + "call_parking_enabled": true, + "ani_override": "always", + "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "US", + "t38_reinvite_source": "telnyx", + "outbound_voice_profile_id": "1293384261075731499" }, "properties": { - "record_type": { + "call_parking_enabled": { + "type": "boolean", + "default": false, + "description": "Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next." + }, + "ani_override": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "description": "Set a phone number as the ani_override value to override caller id number on outbound calls.", + "default": "" }, - "event_type": { + "ani_override_type": { "type": "string", - "example": "conference.participant.speak.started", "enum": [ - "conference.participant.speak.started" + "always", + "normal", + "emergency" ], - "description": "The type of event being delivered." + "description": "Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.", + "default": "always" }, - "id": { + "channel_limit": { + "type": "integer", + "default": null, + "description": "When set, this will limit the total number of outbound calls to phone numbers associated with this connection." + }, + "instant_ringback_enabled": { + "type": "boolean", + "default": true, + "description": "When set, ringback will not wait for indication before sending ringback tone to calling party." + }, + "generate_ringback_tone": { + "type": "boolean", + "default": false, + "description": "Generate ringback tone through 183 session progress message with early media." + }, + "localization": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "default": "US", + "description": "A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.", + "example": "US" }, - "payload": { - "type": "object", - "properties": { - "call_control_id": { - "type": "string", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "description": "Participant's call ID used to issue commands via Call Control API." - }, - "call_leg_id": { - "type": "string", - "example": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "description": "ID that is unique to the call and can be used to correlate webhook events." - }, - "call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session and can be used to correlate webhook events." - }, - "client_state": { - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "description": "State received from a command." - }, - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." - } - } + "t38_reinvite_source": { + "type": "string", + "enum": [ + "telnyx", + "customer", + "disabled", + "passthru", + "caller-passthru", + "callee-passthru" + ], + "description": "This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite.", + "default": "telnyx" + }, + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" } } }, - "ConferenceParticipantSpeakStartedEvent": { + "CsvDownload": { "type": "object", - "title": "Conference Participant Speak Started Event", "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceParticipantSpeakStarted" + "id": { + "type": "string", + "example": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + "description": "Identifies the resource.", + "readOnly": true + }, + "record_type": { + "type": "string", + "example": "csv_download", + "description": "Identifies the type of the resource.", + "readOnly": true + }, + "url": { + "type": "string", + "example": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + "description": "The URL at which the CSV file can be retrieved." + }, + "status": { + "type": "string", + "enum": [ + "pending", + "complete", + "failed", + "expired" + ], + "default": "pending", + "example": "pending", + "description": "Indicates the completion level of the CSV report. Only complete CSV download requests will be able to be retrieved." } + }, + "example": { + "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + "record_type": "csv_download", + "url": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + "status": "pending" } }, - "ConferencePlayRequest": { + "CustomSipHeader": { + "type": "object", + "title": "Custom SIP Header", "required": [ - "audio_url" + "name", + "value" ], - "type": "object", - "title": "Conference Play Request", "properties": { - "audio_url": { - "description": "The URL of the file to be played back in the conference. The URL can point to either a WAV or MP3 file.", + "name": { + "description": "The name of the header to add.", "type": "string", - "example": "http://www.example.com/sounds/greeting.wav" - }, - "loop": { - "description": "The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string `infinity` for an endless loop.", - "example": "infinity", - "default": 1, - "$ref": "#/components/schemas/Loopcount" + "example": "head_1" }, - "call_control_ids": { - "description": "List of call control ids identifying participants the audio file should be played to. If not given, the audio file will be played to the entire conference.", - "type": "array", - "items": { - "type": "string" - } + "value": { + "description": "The value of the header.", + "type": "string", + "example": "val_1" } }, "example": { - "audio_url": "http://www.example.com/sounds/greeting.wav" + "name": "head_1", + "value": "val_1" } }, - "ConferencePlaybackEnded": { + "DtmfType": { + "title": "DTMF Type", + "type": "string", + "description": "Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.", + "enum": [ + "RFC 2833", + "Inband", + "SIP INFO" + ], + "default": "RFC 2833", + "example": "Inband" + }, + "EmergencySettings": { + "description": "The emergency services settings for a phone number.", "type": "object", - "title": "Conference Playback Ended", - "example": { - "record_type": "event", - "event_type": "conference.playback.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "connection_id": "7267xxxxxxxxxxxxxx", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "media_url": "https://www.example.com/audio.mp3", - "occured_at": "2018-02-02T22:25:27.521Z" + "properties": { + "emergency_enabled": { + "type": "boolean", + "default": false, + "description": "Allows you to enable or disable emergency services on the phone number. In order to enable emergency services, you must also set an emergency_address_id." + }, + "emergency_address_id": { + "type": "string", + "format": "int64", + "description": "Identifies the address to be used with emergency services." + }, + "emergency_status": { + "type": "string", + "description": "Represents the state of the number regarding emergency activation.", + "default": "disabled", + "enum": [ + "disabled", + "active", + "provisioning", + "deprovisioning" + ] } }, + "example": { + "emergency_enabled": true, + "emergency_address_id": "1315261609962112019" + } + }, + "EncryptedMedia": { + "type": "string", + "enum": [ + "SRTP", + "ZRTP" + ], + "nullable": true, + "example": "SRTP", + "description": "Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS." + }, + "Error": { + "required": [ + "code", + "title" + ], "properties": { - "record_type": { + "code": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "format": "integer", + "example": "10015" }, - "event_type": { + "title": { "type": "string", - "example": "conference.playback.ended", - "enum": [ - "conference.playback.ended" - ], - "description": "The type of event being delivered." + "example": "Invalid sorting value" }, - "id": { + "detail": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "example": "The value provided for sorting is not valid. Check the value used and try again." }, - "payload": { + "source": { "type": "object", "properties": { - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." - }, - "media_url": { + "pointer": { + "description": "JSON pointer (RFC6901) to the offending entity.", "type": "string", - "example": "https://www.example.com/audio.mp3", - "description": "The URL to the audio file being played." + "format": "json-pointer", + "example": "/sort" }, - "occurred_at": { + "parameter": { + "description": "Indicates which query parameter caused the error.", + "type": "string" + } + } + }, + "meta": { + "type": "object", + "properties": { + "url": { "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." + "description": "URL with additional information on the error.", + "example": "https://developers.telnyx.com/docs/overview/errors/10015" } } } } }, - "ConferencePlaybackEndedEvent": { - "type": "object", - "title": "Conference Playback Ended Event", + "Errors": { "properties": { - "data": { - "$ref": "#/components/schemas/ConferencePlaybackEnded" + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + } } } }, - "ConferencePlaybackStarted": { + "FaxApplication": { "type": "object", - "title": "Conference Playback Started", - "example": { - "record_type": "event", - "event_type": "conference.playback.started", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "connection_id": "7267xxxxxxxxxxxxxx", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "media_url": "https://www.example.com/audio.mp3", - "occured_at": "2018-02-02T22:25:27.521Z" - } - }, + "title": "Fax Application", "properties": { + "id": { + "$ref": "#/components/schemas/IntId" + }, "record_type": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "description": "Identifies the type of the resource.", + "example": "fax_application" }, - "event_type": { - "type": "string", - "example": "conference.playback.started", - "enum": [ - "conference.playback.started" - ], - "description": "The type of event being delivered." + "application_name": { + "$ref": "#/components/schemas/ApplicationName" }, - "id": { - "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "active": { + "$ref": "#/components/schemas/ConnectionActive" }, - "payload": { + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "webhook_event_url": { + "$ref": "#/components/schemas/WebhookEventUrl" + }, + "webhook_event_failover_url": { + "$ref": "#/components/schemas/WebhookEventFailoverUrl" + }, + "webhook_timeout_secs": { + "$ref": "#/components/schemas/WebhookTimeoutSecs" + }, + "inbound": { "type": "object", "properties": { - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - "conference_id": { + "sip_subdomain": { "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", + "default": null, + "example": "example" }, - "media_url": { + "sip_subdomain_receive_settings": { "type": "string", - "example": "https://www.example.com/audio.mp3", - "description": "The URL to the audio file being played." + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "default": "from_anyone", + "example": "only_my_connections" + } + } + }, + "outbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" } } + }, + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" } + }, + "example": { + "id": "1293384261075731499", + "record_type": "fax_application", + "application_name": "fax-router", + "active": false, + "anchorsite_override": "Amsterdam, Netherlands", + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_timeout_secs": 25, + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" + }, + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + }, + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z" } }, - "ConferencePlaybackStartedEvent": { + "FirstCommandTimeout": { + "title": "First Command Timeout", + "type": "boolean", + "description": "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.", + "default": false, + "example": true + }, + "FirstCommandTimeoutSecs": { + "title": "First Command Timeout Secs", + "type": "integer", + "description": "Specifies how many seconds to wait before timing out a dial command.", + "default": 30, + "example": 10 + }, + "Fqdn": { "type": "object", - "title": "Conference Playback Started Event", + "title": "Fqdn", "properties": { - "data": { - "$ref": "#/components/schemas/ConferencePlaybackStarted" + "id": { + "type": "string", + "format": "int64", + "description": "Identifies the resource.", + "example": "1293384261075731499" + }, + "record_type": { + "type": "string", + "description": "Identifies the type of the resource.", + "example": "fqdn" + }, + "connection_id": { + "type": "string", + "description": "ID of the FQDN connection to which this FQDN is attached." + }, + "fqdn": { + "type": "string", + "description": "FQDN represented by this resource.", + "example": "example.com" + }, + "port": { + "type": "integer", + "description": "Port to use when connecting to this FQDN.", + "default": 5060, + "example": 5060 + }, + "dns_record_type": { + "type": "string", + "description": "The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used.", + "example": "a" + }, + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" } + }, + "example": { + "id": "1293384261075731499", + "record_type": "fqdn", + "connection_id": "1516447646313612565", + "fqdn": "example.com", + "port": 5060, + "dns_record_type": "a", + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z" } }, - "ConferenceSpeakEnded": { + "FqdnConnection": { "type": "object", - "title": "Conference Speak Ended", - "example": { - "record_type": "event", - "event_type": "conference.speak.ended", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "connection_id": "7267xxxxxxxxxxxxxx", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "occured_at": "2018-02-02T22:25:27.521Z" - } - }, + "title": "Fqdn Connection", + "required": [ + "connection_name" + ], "properties": { + "id": { + "type": "string", + "format": "int64", + "description": "Identifies the resource.", + "example": "1293384261075731499" + }, "record_type": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "description": "Identifies the type of the resource.", + "example": "fqdn_connection" + }, + "active": { + "type": "boolean", + "description": "Defaults to true" + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { + "type": "string" + }, + "transport_protocol": { + "$ref": "#/components/schemas/FqdnConnectionTransportProtocol" + }, + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": true, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout." + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios." + }, + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings." + }, + "webhook_event_url": { + "type": "string", + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" }, - "event_type": { + "webhook_event_failover_url": { "type": "string", - "example": "conference.speak.ended", + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" + }, + "webhook_api_version": { + "type": "string", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", "enum": [ - "conference.speak.ended" + "1", + "2" ], - "description": "The type of event being delivered." + "example": "1", + "default": "1" }, - "id": { + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true + }, + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" + }, + "created_at": { "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." + "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" }, - "payload": { - "type": "object", - "properties": { - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." - } - } + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" + }, + "inbound": { + "$ref": "#/components/schemas/InboundFqdn" + } + }, + "example": { + "id": "1293384261075731499", + "record_type": "fqdn_connection", + "active": true, + "anchorsite_override": "Latency", + "connection_name": "string", + "transport_protocol": "UDP", + "default_on_hold_comfort_noise_enabled": true, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": true, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_secs": 10 + }, + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z", + "inbound": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": [ + "G722" + ], + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "string", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 10 } } }, - "ConferenceSpeakEndedEvent": { + "FqdnConnectionTransportProtocol": { + "type": "string", + "description": "One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.", + "default": "UDP", + "enum": [ + "UDP", + "TCP", + "TLS" + ] + }, + "GatherUsingAudioRequest": { "type": "object", - "title": "Conference Speak Ended Event", + "title": "Gather Using Audio Request", + "required": [ + "audio_url" + ], "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceSpeakEnded" + "audio_url": { + "type": "string", + "example": "http://example.com/message.wav", + "description": "The URL of a file to be played back at the beginning of each prompt. The URL can point to either a WAV or MP3 file." + }, + "invalid_audio_url": { + "type": "string", + "description": "The URL of a file to play when digits don't match the `valid_digits` parameter or the number of digits is not between `min` and `max`. The URL can point to either a WAV or MP3 file.", + "example": "http://example.com/invalid.wav" + }, + "minimum_digits": { + "description": "The minimum number of digits to fetch. This parameter has a minimum value of 1.", + "default": 1, + "type": "integer", + "example": 1, + "format": "int32" + }, + "maximum_digits": { + "description": "The maximum number of digits to fetch. This parameter has a maximum value of 128.", + "default": 128, + "type": "integer", + "example": 10, + "format": "int32" + }, + "maximum_tries": { + "description": "The maximum number of times the file should be played if there is no input from the user on the call.", + "default": 3, + "type": "integer", + "example": 3, + "format": "int32" + }, + "timeout_millis": { + "description": "The number of milliseconds to wait for a DTMF response after file playback ends before a replaying the sound file.", + "default": 60000, + "type": "integer", + "example": 60000, + "format": "int32" + }, + "terminating_digit": { + "description": "The digit used to terminate input if fewer than `maximum_digits` digits have been gathered.", + "default": "#", + "type": "string", + "example": "#" + }, + "valid_digits": { + "description": "A list of all digits accepted as valid.", + "default": "0123456789#*", + "type": "string", + "example": "123" + }, + "inter_digit_timeout_millis": { + "description": "The number of milliseconds to wait for input between digits.", + "default": 5000, + "type": "integer", + "example": 10000, + "format": "int32" + }, + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } + }, + "example": { + "audio_url": "http://example.com/message.wav", + "invalid_audio_url": "http://example.com/message.wav", + "minimum_digits": 1, + "maximum_digits": 10, + "timeout_millis": 10000, + "terminating_digit": "#", + "valid_digits": "123", + "inter_digit_timeout_millis": 10000, + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "ConferenceSpeakRequest": { + "GatherUsingSpeakRequest": { "type": "object", - "title": "Conference Speak Request", + "title": "Gather Using Speak Request", "required": [ - "payload", "voice", - "language" + "language", + "payload" ], "properties": { - "call_control_ids": { - "description": "Call Control IDs of participants who will hear the spoken text. When empty all participants will hear the spoken text.", - "type": "array", - "items": { - "type": "string" - } - }, "payload": { "description": "The text or SSML to be converted into speech. There is a 5,000 character limit.", "type": "string", - "example": "Say this to participants" + "example": "Say this on the call" + }, + "invalid_payload": { + "description": "The text or SSML to be converted into speech when digits don't match the `valid_digits` parameter or the number of digits is not between `min` and `max`. There is a 5,000 character limit.", + "type": "string", + "example": "Say this on the call" }, "payload_type": { "description": "The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML).", @@ -10245,8 +15489,18 @@ ], "example": "ssml" }, + "service_level": { + "description": "This parameter impacts speech quality, language options and payload types. When using `basic`, only the `en-US` language and payload type `text` are allowed.", + "default": "premium", + "type": "string", + "enum": [ + "basic", + "premium" + ], + "example": "premium" + }, "voice": { - "description": "The gender of the voice used to speak the text.", + "description": "The gender of the voice used to speak back the text.", "type": "string", "enum": [ "male", @@ -10255,7 +15509,7 @@ "example": "female" }, "language": { - "description": "The language used to speak the text.", + "description": "The language you want spoken.", "type": "string", "enum": [ "arb", @@ -10290,1423 +15544,1756 @@ ], "example": "en-US" }, + "minimum_digits": { + "description": "The minimum number of digits to fetch. This parameter has a minimum value of 1.", + "default": 1, + "type": "integer", + "example": 1, + "format": "int32" + }, + "maximum_digits": { + "description": "The maximum number of digits to fetch. This parameter has a maximum value of 128.", + "default": 128, + "type": "integer", + "example": 10, + "format": "int32" + }, + "maximum_tries": { + "description": "The maximum number of times that a file should be played back if there is no input from the user on the call.", + "default": 3, + "type": "integer", + "example": 3, + "format": "int32" + }, + "timeout_millis": { + "description": "The number of milliseconds to wait for a DTMF response after speak ends before a replaying the sound file.", + "default": 60000, + "type": "integer", + "example": 60000, + "format": "int32" + }, + "terminating_digit": { + "description": "The digit used to terminate input if fewer than `maximum_digits` digits have been gathered.", + "default": "#", + "type": "string", + "example": "#" + }, + "valid_digits": { + "description": "A list of all digits accepted as valid.", + "default": "0123456789#*", + "type": "string", + "example": "123" + }, + "inter_digit_timeout_millis": { + "description": "The number of milliseconds to wait for input between digits.", + "default": 5000, + "type": "integer", + "example": 10000, + "format": "int32" + }, + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, "command_id": { - "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, "example": { - "call_control_ids": [ - "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" - ], - "payload": "Say this to participants", + "payload": "say this on call", + "invalid_payload": "say this on call", "payload_type": "text", - "voice": "female", - "language": "en-US", + "service_level": "premium", + "voice": "male", + "language": "arb", + "minimum_digits": 1, + "maximum_digits": 10, + "terminating_digit": "#", + "valid_digits": "123", + "inter_digit_timeout_millis": 10000, + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "ConferenceSpeakStarted": { + "HangupRequest": { "type": "object", - "title": "Conference Speak Started", - "example": { - "record_type": "event", - "event_type": "conference.speak.started", - "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "occurred_at": "2018-02-02T22:25:27.521992Z", - "payload": { - "connection_id": "7267xxxxxxxxxxxxxx", - "creator_call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1", - "conference_id": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "occured_at": "2018-02-02T22:25:27.521Z" - } - }, + "title": "Hangup Request", "properties": { - "record_type": { - "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." - }, - "event_type": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "example": "conference.speak.started", - "enum": [ - "conference.speak.started" - ], - "description": "The type of event being delivered." + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" }, - "id": { + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", - "format": "uuid", - "example": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", - "description": "Identifies the type of resource." - }, - "payload": { - "type": "object", - "properties": { - "connection_id": { - "type": "string", - "example": "7267xxxxxxxxxxxxxx", - "description": "Telnyx connection ID used in the call." - }, - "creator_call_session_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID that is unique to the call session that started the conference." - }, - "conference_id": { - "type": "string", - "example": "428c31b6-abf3-3bc1-b7f4-5013ef9657c1", - "description": "ID of the conference the text was spoken in." - }, - "occurred_at": { - "type": "string", - "format": "date-time", - "example": "2018-02-02T22:25:27.521Z", - "description": "ISO 8601 datetime of when the event occurred." - } - } - } - } - }, - "ConferenceSpeakStartedEvent": { - "type": "object", - "title": "Conference Speak Started Event", - "properties": { - "data": { - "$ref": "#/components/schemas/ConferenceSpeakStarted" - } - } - }, - "ConferenceUnholdRequest": { - "required": [ - "call_control_ids" - ], - "type": "object", - "title": "Conference Unhold Request", - "properties": { - "call_control_ids": { - "description": "List of unique identifiers and tokens for controlling the call. Enter each call control ID to be unheld.", - "type": "array", - "items": { - "type": "string" - } + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, "example": { - "call_control_ids": [ - "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" - ] + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "ConferenceUnmuteRequest": { - "type": "object", - "title": "Conference Unmute Request", - "properties": { - "call_control_ids": { - "description": "List of unique identifiers and tokens for controlling the call. Enter each call control ID to be unmuted. When empty all participants will be unmuted.", - "type": "array", - "items": { - "type": "string" - } + "HostedNumber": { + "example": [ + { + "record_type": "messaging_hosted_number", + "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", + "phone_number": "+18665550001", + "status": "successful" } - }, - "example": { - "call_control_ids": [ - "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ" - ] - } - }, - "CostInformation": { + ], "type": "object", "properties": { - "upfront_cost": { + "record_type": { "type": "string", - "example": "3.21" + "example": "messaging_hosted_number" }, - "monthly_cost": { + "id": { "type": "string", - "example": "6.54" + "format": "uuid", + "description": "Identifies the type of resource.", + "readOnly": true }, - "currency": { + "phone_number": { "type": "string", - "description": "The ISO 4217 code for the currency.", - "example": "USD" + "format": "+E.164", + "description": "The messaging hosted phone number (+E.164 format)" + }, + "status": { + "type": "string", + "enum": [ + "deleted", + "failed", + "pending", + "successful" + ] } - }, - "example": { - "upfront_cost": "3.21", - "monthly_cost": "6.54", - "currency": "USD" } }, - "CreateCallControlApplicationRequest": { + "InboundFqdn": { "type": "object", - "title": "Create Call Control Application Request", - "required": [ - "application_name", - "webhook_event_url" - ], + "title": "Inbound Fqdn", "properties": { - "application_name": { + "ani_number_format": { "type": "string", - "description": "A user-assigned name to help manage the application.", - "example": "call-router" + "enum": [ + "+E.164", + "E.164", + "+E.164-national", + "E.164-national" + ], + "default": "E.164-national", + "description": "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls." }, - "webhook_event_url": { + "dnis_number_format": { "type": "string", - "format": "url", - "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", - "example": "https://example.com" + "enum": [ + "+e164", + "e164", + "national" + ], + "default": "e164" }, - "active": { + "codecs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.", + "default": [ + "G722", + "G711U", + "G711A", + "G729", + "OPUS", + "H.264" + ] + }, + "default_routing_method": { + "type": "string", + "enum": [ + "sequential", + "round-robin" + ], + "nullable": true, + "default": null, + "description": "Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or null, other values are not allowed." + }, + "channel_limit": { + "type": "integer", + "default": null, + "nullable": true, + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection." + }, + "generate_ringback_tone": { "type": "boolean", - "description": "Specifies whether the connection can be used.", + "default": false, + "description": "Generate ringback tone through 183 session progress message with early media." + }, + "isup_headers_enabled": { + "type": "boolean", + "default": false, + "description": "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)" + }, + "prack_enabled": { + "type": "boolean", + "description": "Enable PRACK messages as defined in RFC3262.", + "default": false + }, + "privacy_zone_enabled": { + "type": "boolean", + "description": "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.", + "default": false + }, + "sip_compact_headers_enabled": { + "type": "boolean", + "description": "Defaults to true.", "default": true }, - "anchorsite_override": { + "sip_region": { + "type": "string", + "default": "US", + "description": "Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used.", + "enum": [ + "US", + "Europe", + "Australia" + ] + }, + "sip_subdomain": { + "type": "string", + "default": null, + "nullable": true, + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls." + }, + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "default": "from_anyone" + }, + "timeout_1xx_secs": { + "type": "integer", + "description": "Time(sec) before aborting if connection is not made.", + "minimum": 1, + "maximum": 120, + "default": 3 + }, + "timeout_2xx_secs": { + "type": "integer", + "description": "Time(sec) before aborting if call is unanswered (min: 1, max: 600).", + "default": 90 + } + }, + "example": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": [ + "G722" + ], + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "test", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 + } + }, + "InboundIp": { + "type": "object", + "title": "Inbound Ip", + "example": { + "ani_number_format": "+E.164", + "dns_number_format": "+e164", + "codecs": "G722", + "default_primary_ip_id": "192.168.0.0", + "default_tertiary_ip_id": "192.168.0.0", + "default_secondary_ip_id": "192.168.0.0", + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "test", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 + }, + "properties": { + "ani_number_format": { "type": "string", - "description": "Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.\n", "enum": [ - "\"Latency\"", - "\"Chicago, IL\"", - "\"Ashburn, VA\"", - "\"San Jose, CA\"" + "+E.164", + "E.164", + "+E.164-national", + "E.164-national" ], - "example": "\"Amsterdam, Netherlands\"", - "default": "\"Latency\"" + "default": "E.164-national", + "description": "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls." }, - "dtmf_type": { + "dnis_number_format": { "type": "string", - "description": "Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.", "enum": [ - "RFC 2833", - "Inband", - "SIP INFO" + "+e164", + "e164", + "national" ], - "example": "Inband", - "default": "RFC 2833" + "default": "e164" }, - "first_command_timeout": { - "type": "boolean", - "description": "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.", - "example": true, - "default": false + "codecs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.", + "default": [ + "G722", + "G711U", + "G711A", + "G729", + "OPUS", + "H.264" + ] }, - "first_command_timeout_secs": { - "type": "integer", - "description": "Specifies how many seconds to wait before timing out a dial command.", - "example": 10, - "default": 30 + "default_primary_ip_id": { + "type": "string", + "description": "The default primary IP to use for the number. Only settable if the connection is\n of IP authentication type. Value must be the ID of an authorized IP set on the connection.", + "example": "192.168.0.0" }, - "inbound": { - "$ref": "#/components/schemas/CallControlApplicationInbound" + "default_secondary_ip_id": { + "type": "string", + "description": "The default secondary IP to use for the number. Only settable if the connection is\n of IP authentication type. Value must be the ID of an authorized IP set on the connection.", + "example": "192.168.0.0" }, - "outbound": { - "$ref": "#/components/schemas/CallControlApplicationOutbound" + "default_tertiary_ip_id": { + "type": "string", + "description": "The default tertiary IP to use for the number. Only settable if the connection is\n of IP authentication type. Value must be the ID of an authorized IP set on the connection.", + "example": "192.168.0.0" }, - "webhook_api_version": { + "default_routing_method": { "type": "string", - "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", "enum": [ - "1", - "2" + "sequential", + "round-robin" ], - "example": "1", - "default": "1" - }, - "webhook_event_failover_url": { - "type": "string", - "format": "url", - "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", - "example": "https://failover.example.com", - "nullable": true, - "default": "" + "description": "Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed." }, - "webhook_timeout_secs": { + "channel_limit": { "type": "integer", - "minimum": 0, - "maximum": 30, - "description": "Specifies how many seconds to wait before timing out a webhook.", - "example": 25, "default": null, - "nullable": true - } - }, - "example": { - "application_name": "call-router", - "webhook_event_url": "https://example.com", - "active": false, - "anchorsite_override": "\"Latency\"", - "dtmf_type": "Inband", - "first_command_timeout": true, - "first_command_timeout_secs": 10, - "inbound": { - "channel_limit": 10, - "sip_subdomain": "example", - "sip_subdomain_receive_settings": "only_my_connections" - }, - "outbound": { - "channel_limit": 10, - "outbound_voice_profile_id": "1293384261075731499" + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.", + "example": 10 }, - "webhook_api_version": "1", - "webhook_event_failover_url": "https://failover.example.com", - "webhook_timeout_secs": 25 - } - }, - "CreateConferenceRequest": { - "required": [ - "call_control_id", - "name" - ], - "type": "object", - "title": "Create Conference Request", - "properties": { - "call_control_id": { - "description": "Unique identifier and token for controlling the call", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", - "type": "string" + "generate_ringback_tone": { + "type": "boolean", + "default": false, + "description": "Generate ringback tone through 183 session progress message with early media." }, - "name": { - "description": "Name of the conference", - "example": "Business", - "type": "string" + "isup_headers_enabled": { + "type": "boolean", + "default": false, + "description": "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)" }, - "beep_enabled": { - "description": "Whether a beep sound should be played when participants join and/or leave the conference.", - "enum": [ - "always", - "never", - "on_enter", - "on_exit" - ], - "example": "on_exit", - "type": "string" + "prack_enabled": { + "type": "boolean", + "description": "Enable PRACK messages as defined in RFC3262.", + "default": false }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "type": "string" + "privacy_zone_enabled": { + "type": "boolean", + "description": "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.", + "default": false }, - "comfort_noise": { - "description": "Toggle background comfort noise.", - "example": false, + "sip_compact_headers_enabled": { "type": "boolean", + "description": "Defaults to true.", "default": true }, - "command_id": { - "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901", - "type": "string" + "sip_region": { + "type": "string", + "default": "US", + "description": "Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used.", + "enum": [ + "US", + "Europe", + "Australia" + ] }, - "duration_minutes": { - "description": "Time length (minutes) after which the conference will end.", - "example": 5, - "type": "integer" + "sip_subdomain": { + "type": "string", + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls." }, - "hold_audio_url": { - "description": "The URL to an audio file to be played to participants joining the conference. Takes effect only when \"start_conference_on_create\" is set to \"false\".", - "example": "http://www.example.com/audio.wav", - "type": "string" + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ] }, - "start_conference_on_create": { - "description": "Whether the conference should be started on creation. If the conference isn't started all participants that join are automatically put on hold. Defaults to \"true\".", - "example": false, - "type": "boolean" + "timeout_1xx_secs": { + "type": "integer", + "description": "Time(sec) before aborting if connection is not made.", + "minimum": 1, + "maximum": 120, + "default": 3 + }, + "timeout_2xx_secs": { + "type": "integer", + "description": "Time(sec) before aborting if call is unanswered (min: 1, max: 600).", + "default": 90 } - }, - "example": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "name": "Business", - "beep_enabled": "always", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "duration_minutes": 5, - "hold_audio_url": "http://www.example.com/audio.wav", - "start_conference_on_create": false } }, - "CreateLongCodeMessageRequest": { + "InboundMessage": { "type": "object", - "required": [ - "from", - "to" - ], "properties": { - "from": { + "record_type": { "type": "string", - "format": "address", - "description": "Phone number, in +E.164 format, used to send the message." + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." }, - "to": { - "$ref": "#/components/schemas/ToNumber" + "id": { + "type": "string", + "format": "uuid", + "description": "Identifies the type of resource." }, - "text": { + "event_type": { "type": "string", - "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" + "example": "message.received", + "enum": [ + "message.received" + ], + "description": "The type of event being delivered." }, - "subject": { + "occurred_at": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the resource was created." + }, + "payload": { + "$ref": "#/components/schemas/InboundMessagePayload" + } + }, + "example": { + "record_type": "event", + "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", + "event_type": "message.received", + "occurred_at": "date-time", + "payload": { + "record_type": "message", + "direction": "inbound", + "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", + "type": "SMS", + "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", + "from": { + "phone_number": "+18665550001", + "carrier": "T-MOBILE USA, INC.", + "line_type": "Wireless" + }, + "to": [ + { + "phone_number": "+18445550001", + "status": "delivered", + "carrier": "TELNYX LLC", + "line_type": "VoIP" + } + ], + "text": "Hello, World!", + "subject": "From Telnyx!", + "media": [], + "webhook_url": "https://www.example.com/hooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "encoding": "GSM-7", + "parts": 1, + "tags": [ + "Greetings" + ], + "cost": null, + "received_at": "2019-01-23T18:10:02.574Z", + "sent_at": null, + "completed_at": null, + "valid_until": null, + "errors": [] + } + } + }, + "InboundMessageEvent": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InboundMessage" + } + } + }, + "InboundMessagePayload": { + "properties": { + "record_type": { "type": "string", - "description": "Subject of multimedia message" - }, - "media_urls": { - "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", - "type": "array", - "items": { - "type": "string", - "format": "url" - } + "example": "message", + "enum": [ + "message" + ], + "description": "Identifies the type of the resource." }, - "webhook_url": { - "description": "The URL where webhooks related to this message will be sent.", + "direction": { "type": "string", - "format": "url" + "example": "inbound", + "enum": [ + "inbound" + ], + "description": "The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you." }, - "webhook_failover_url": { - "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", + "id": { "type": "string", - "format": "url" - }, - "use_profile_webhooks": { - "type": "boolean", - "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", - "default": true + "format": "uuid", + "description": "Identifies the type of resource." }, "type": { - "description": "The protocol for sending the message, either SMS or MMS.", "type": "string", "enum": [ "SMS", "MMS" - ] - }, - "auto_detect": { - "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", - "type": "boolean", - "default": false - } - }, - "example": { - "from": "+18445550001", - "to": "+13125550002", - "text": "Hello, World!", - "subject": "From Telnyx!", - "media_urls": [ - "http://example.com" - ], - "webhook_url": "http://example.com/webhooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "use_profile_webhooks": true, - "type": "MMS" - } - }, - "CreateMessageRequest": { - "type": "object", - "required": [ - "to" - ], - "properties": { - "from": { - "type": "string", - "format": "address", - "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code).\n\n**Required if sending with a phone number, short code, or alphanumeric sender ID.**\n" + ], + "description": "The type of message. This value can be either 'sms' or 'mms'." }, "messaging_profile_id": { "type": "string", - "description": "Unique identifier for a messaging profile.\n\n**Required if sending via number pool or with an alphanumeric sender ID.**\n" + "description": "Unique identifier for a messaging profile." }, "to": { - "$ref": "#/components/schemas/ToNumber" + "type": "array", + "items": { + "type": "object", + "properties": { + "phone_number": { + "type": "string", + "format": "address", + "description": "Receiving address (+E.164 formatted phone number or short code)." + }, + "status": { + "type": "string", + "enum": [ + "queued", + "sending", + "sent", + "delivered", + "sending_failed", + "delivery_failed", + "delivery_unconfirmed", + "webhook_delivered" + ] + }, + "carrier": { + "type": "string", + "description": "The carrier of the receiver." + }, + "line_type": { + "type": "string", + "description": "The line-type of the receiver.", + "enum": [ + "Wireline", + "Wireless", + "VoWiFi", + "VoIP", + "Pre-Paid Wireless", + "" + ] + } + } + } + }, + "cc": { + "type": "array", + "items": { + "type": "object", + "properties": { + "phone_number": { + "type": "string", + "format": "address", + "description": "Receiving address (+E.164 formatted phone number or short code)." + }, + "status": { + "type": "string", + "enum": [ + "queued", + "sending", + "sent", + "delivered", + "sending_failed", + "delivery_failed", + "delivery_unconfirmed" + ] + }, + "carrier": { + "type": "string", + "description": "The carrier of the receiver." + }, + "line_type": { + "type": "string", + "description": "The line-type of the receiver.", + "enum": [ + "Wireline", + "Wireless", + "VoWiFi", + "VoIP", + "Pre-Paid Wireless", + "" + ] + } + } + } + }, + "from": { + "type": "object", + "properties": { + "phone_number": { + "type": "string", + "format": "address", + "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code)." + }, + "status": { + "type": "string", + "enum": [ + "received", + "delivered" + ] + }, + "carrier": { + "type": "string", + "description": "The carrier of the sender." + }, + "line_type": { + "type": "string", + "description": "The line-type of the sender.", + "enum": [ + "Wireline", + "Wireless", + "VoWiFi", + "VoIP", + "Pre-Paid Wireless", + "" + ] + } + } }, "text": { "type": "string", "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" }, - "subject": { + "media": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "url", + "description": "The url of the media requested to be sent." + }, + "content_type": { + "type": "string", + "format": "mime-type", + "description": "The MIME type of the requested media." + }, + "size": { + "type": "integer", + "description": "The size of the requested media." + }, + "hash_sha256": { + "type": "string", + "minLength": 32, + "maxLength": 32, + "description": "The SHA256 hash of the requested media." + } + } + } + }, + "webhook_url": { "type": "string", - "description": "Subject of multimedia message" + "format": "url", + "nullable": true, + "description": "The URL where webhooks related to this message will be sent." }, - "media_urls": { - "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", + "webhook_failover_url": { + "type": "string", + "format": "url", + "nullable": true, + "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails." + }, + "encoding": { + "type": "string", + "description": "Encoding scheme used for the message body." + }, + "parts": { + "type": "integer", + "minimum": 1, + "maximum": 10, + "description": "Number of parts into which the message's body must be split." + }, + "tags": { "type": "array", + "description": "Tags associated with the resource.", "items": { - "type": "string", - "format": "url" + "type": "string" + } + }, + "cost": { + "type": "object", + "nullable": true, + "properties": { + "amount": { + "type": "string", + "format": "decimal", + "description": "The amount deducted from your account." + }, + "currency": { + "type": "string", + "format": "iso4217", + "description": "The ISO 4217 currency identifier." + } } }, - "webhook_url": { - "description": "The URL where webhooks related to this message will be sent.", + "received_at": { "type": "string", - "format": "url" + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the message request was received." }, - "webhook_failover_url": { - "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", + "sent_at": { "type": "string", - "format": "url" + "format": "date-time", + "nullable": true, + "description": "Not used for inbound messages." }, - "use_profile_webhooks": { - "type": "boolean", - "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", - "default": true + "completed_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Not used for inbound messages." }, - "type": { - "description": "The protocol for sending the message, either SMS or MMS.", + "valid_until": { "type": "string", - "enum": [ - "SMS", - "MMS" - ] + "description": "Not used for inbound messages.", + "format": "date-time", + "nullable": true }, - "auto_detect": { - "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", - "type": "boolean", - "default": false + "errors": { + "type": "array", + "description": "These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses.", + "items": { + "$ref": "#/components/schemas/Error" + } } }, "example": { - "from": "+18445550001", - "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", - "to": "+18445550001", + "record_type": "message", + "direction": "inbound", + "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", + "type": "SMS", + "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", + "from": { + "phone_number": "+18665550001", + "status": "delivered", + "carrier": "T-MOBILE USA, INC.", + "line_type": "Wireless" + }, + "to": [ + { + "phone_number": "+18445550001", + "status": "delivered", + "carrier": "TELNYX LLC", + "line_type": "VoIP" + } + ], "text": "Hello, World!", "subject": "From Telnyx!", - "media_urls": [ - "http://example.com" - ], - "webhook_url": "http://example.com/webhooks", + "media": [], + "webhook_url": "https://www.example.com/hooks", "webhook_failover_url": "https://backup.example.com/hooks", - "use_profile_webhooks": true, - "type": "MMS" + "encoding": "GSM-7", + "parts": 1, + "tags": [ + "Greetings" + ], + "cost": null, + "received_at": "2019-01-23T18:10:02.574Z", + "sent_at": null, + "completed_at": null, + "valid_until": null, + "errors": [] } }, - "CreateMessagingHostedNumberOrderRequest": { - "type": "object", - "example": { - "messaging_profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", - "phone_numbers": [ - "+18665550001", - "+18665550002" - ] - }, - "properties": { - "phone_numbers": { - "type": "array", - "items": { - "type": "string", - "format": "+E.164" - }, - "description": "Phone numbers to be used for hosted messaging." - }, - "messaging_profile_id": { - "type": "string", - "description": "Automatically associate the number with this messaging profile ID when the order is complete." - } - } + "IntId": { + "type": "string", + "format": "int64", + "description": "Identifies the resource.", + "example": "1293384261075731499", + "readOnly": true }, - "CreateMessagingProfileRequest": { + "Ip": { "type": "object", - "required": [ - "name" - ], + "title": "Ip", "properties": { - "name": { - "description": "A user friendly name for the messaging profile.", - "type": "string" - }, - "enabled": { - "description": "Specifies whether the messaging profile is enabled or not.", - "type": "boolean", - "default": true + "id": { + "type": "string", + "format": "int64", + "description": "Identifies the type of resource.", + "example": "1293384261075731499" }, - "webhook_url": { - "description": "The URL where webhooks related to this messaging profile will be sent.", + "record_type": { "type": "string", - "format": "url", - "default": "", - "nullable": true + "description": "Identifies the type of the resource.", + "example": "ip" }, - "webhook_failover_url": { - "description": "The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails.", + "connection_id": { "type": "string", - "format": "url", - "default": "", - "nullable": true + "description": "ID of the IP Connection to which this IP should be attached." }, - "webhook_api_version": { - "description": "Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.", + "ip_address": { "type": "string", - "enum": [ - "1", - "2", - "2010-04-01" - ], - "default": "2" + "description": "IP adddress represented by this resource.", + "example": "192.168.0.0" }, - "number_pool_settings": { - "$ref": "#/components/schemas/NumberPoolSettings" + "port": { + "type": "integer", + "description": "Port to use when connecting to this IP.", + "default": 5060, + "example": 5060 }, - "url_shortener_settings": { - "$ref": "#/components/schemas/UrlShortenerSettings" + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" } }, "example": { - "name": "My name", - "enabled": true, - "webhook_url": "https://www.example.com/hooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "webhook_api_version": "2", - "number_pool_settings": { - "toll_free_weight": 10, - "long_code_weight": 1, - "skip_unhealthy": true, - "sticky_sender": false, - "geomatch": false - }, - "url_shortener_settings": { - "domain": "example.ex", - "prefix": "", - "replace_blacklist_only": true, - "send_webhooks": false - } + "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "record_type": "ip", + "connection_id": "3456789987654", + "ip_address": "192.168.0.0", + "port": 5060, + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z" } }, - "CreateNumberOrderDocumentRequest": { + "IpConnection": { + "type": "object", + "title": "Ip Connection", "properties": { "id": { "type": "string", - "format": "uuid", - "example": "387d1e31-a218-4375-8151-103f2d5e2d2c", - "readOnly": true + "format": "int64", + "description": "Identifies the type of resource.", + "example": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" }, "record_type": { "type": "string", - "example": "number_order_document", - "readOnly": true + "description": "Identifies the type of the resource.", + "example": "ip_connection" }, - "file_id": { - "type": "string", - "description": "The id of the file to associate as a number order document.", - "example": "1e3c5822-0362-4702-8e46-5a129f0d3976" + "active": { + "type": "boolean", + "description": "Defaults to true", + "example": true }, - "requirements_id": { - "type": "string", - "description": "Unique id for a requirement.", - "example": "36aaf27d-986b-493c-bd1b-de16af2e4292" + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" }, - "customer_reference": { + "connection_name": { "type": "string", - "description": "A customer reference string for customer look ups.", - "example": "MY REF 001" + "example": "string" }, - "requirement_type": { + "transport_protocol": { "type": "string", + "description": "One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.", + "default": "UDP", "enum": [ - "address_proof", - "identification", - "reg_form" + "UDP", + "TCP", + "TLS" ], - "readOnly": true - }, - "created_at": { - "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string denoting when the number order document was uploaded.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true - } - }, - "example": { - "id": "387d1e31-a218-4375-8151-103f2d5e2d2c", - "record_type": "number_order_document", - "file_id": "1e3c5822-0362-4702-8e46-5a129f0d3976", - "requirements_id": "36aaf27d-986b-493c-bd1b-de16af2e4292", - "customer_reference": "MY REF 001", - "requirement_type": "address_proof", - "created_at": "2018-01-01T00:00:00.000000Z" - } - }, - "CreateNumberOrderRequest": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "example": "12ade33a-21c0-473b-b055-b3c836e1c292", - "readOnly": true + "example": "UDP" }, - "record_type": { - "type": "string", - "example": "number_order", - "readOnly": true + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": true, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.", + "example": true }, - "phone_numbers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhoneNumber" - }, - "writeOnly": true + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" }, - "phone_numbers_count": { - "type": "integer", - "description": "The count of phone numbers in the number order.", - "example": 1, - "readOnly": true + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.", + "example": true }, - "connection_id": { + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.", + "example": false + }, + "webhook_event_url": { "type": "string", - "example": "346789098765567", - "description": "Identifies the connection associated with this phone number." + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" }, - "messaging_profile_id": { + "webhook_event_failover_url": { "type": "string", - "example": "abc85f64-5717-4562-b3fc-2c9600", - "description": "Identifies the messaging profile associated with the phone number." + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, - "status": { + "webhook_api_version": { "type": "string", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", "enum": [ - "pending", - "success", - "failure" + "1", + "2" ], - "description": "The status of the order.", - "readOnly": true + "example": "1", + "default": "1" }, - "customer_reference": { - "type": "string", - "description": "A customer reference string for customer look ups.", - "example": "MY REF 001" + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true + }, + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" }, "created_at": { "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string denoting when the number order was created.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true + "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" }, "updated_at": { "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string for when the number order was updated.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" }, - "requirements_met": { - "type": "boolean", - "description": "True if all requirements are met for every phone number, false otherwise.", - "example": true, - "readOnly": true + "inbound": { + "$ref": "#/components/schemas/InboundIp" + }, + "outbound": { + "$ref": "#/components/schemas/OutboundIp" } }, "example": { - "id": "12ade33a-21c0-473b-b055-b3c836e1c292", - "phone_numbers": [ - { - "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "record_type": "number_order_phone_number", - "phone_number": "+19705555098", - "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "regulatory_requirements": [ - { - "record_type": "phone_number_regulatory_requirement", - "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", - "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", - "field_type": "address_id" - } - ], - "requirements_met": true, - "status": "success" - } - ], - "record_type": "number_order", - "phone_numbers_count": 1, - "connection_id": "346789098765567", - "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600", - "status": "pending", - "customer_reference": "MY REF 001", - "created_at": "2018-01-01T00:00:00.000000Z", - "updated_at": "2018-01-01T00:00:00.000000Z", - "requirements_met": true + "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "record_type": "ip_connection", + "active": true, + "anchorsite_override": "Latency", + "connection_name": "string", + "transport_protocol": "UDP", + "default_on_hold_comfort_noise_enabled": true, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": true, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_secs": 10 + }, + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z", + "inbound": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": [ + "G722" + ], + "default_primary_ip_id": "192.0.2.1", + "default_secondary_ip_id": "198.51.100.1", + "default_tertiary_ip_id": "203.0.113.1", + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "string", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 10 + }, + "outbound": { + "call_parking_enabled": true, + "ani_override": "string", + "ani_override_type": "always", + "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "string", + "t38_reinvite_source": "telnyx", + "tech_prefix": "string", + "ip_authentication_method": "token", + "ip_authentication_token": "string", + "outbound_voice_profile_id": "1293384261075731499" + } } }, - "CreateNumberPoolMessageRequest": { - "type": "object", + "JoinConferenceRequest": { "required": [ - "to", - "messaging_profile_id" + "call_control_id" ], + "type": "object", + "title": "Join Conference Request", "properties": { - "messaging_profile_id": { - "type": "string", - "description": "Unique identifier for a messaging profile." + "call_control_id": { + "description": "Unique identifier and token for controlling the call", + "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", + "type": "string" }, - "to": { - "$ref": "#/components/schemas/ToNumber" + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "type": "string" }, - "text": { - "type": "string", - "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" + "command_id": { + "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901", + "type": "string" }, - "subject": { + "end_conference_on_exit": { + "description": "Whether the conference should end and all remaining participants be hung up after the participant leaves the conference. Defaults to \"false\".", + "example": true, + "type": "boolean" + }, + "soft_end_conference_on_exit": { + "description": "Whether the conference should end after the participant leaves the conference. NOTE this doesn't hang up the other participants. Defaults to \"false\".", + "example": true, + "type": "boolean" + }, + "hold": { + "description": "Whether the participant should be put on hold immediately after joining the conference. Defaults to \"false\".", + "example": true, + "type": "boolean" + }, + "hold_audio_url": { + "description": "The URL of an audio file to be played to the participant when they are put on hold after joining the conference. This property takes effect only if \"hold\" is set to \"true\".", + "example": "http://www.example.com/audio.wav", + "type": "string" + }, + "mute": { + "description": "Whether the participant should be muted immediately after joining the conference. Defaults to \"false\".", + "example": true, + "type": "boolean" + }, + "start_conference_on_enter": { + "description": "Whether the conference should be started after the participant joins the conference. Defaults to \"false\".", + "example": true, + "type": "boolean" + }, + "supervisor_role": { + "description": "Sets the joining participant as a supervisor for the conference. A conference can have multiple supervisors. \"barge\" means the supervisor enters the conference as a normal participant. This is the same as \"none\". \"monitor\" means the supervisor is muted but can hear all participants. \"whisper\" means that only the specified \"whisper_call_control_ids\" can hear the supervisor. Defaults to \"none\".", + "example": "whisper", "type": "string", - "description": "Subject of multimedia message" + "enum": [ + "barge", + "monitor", + "none", + "whisper" + ] }, - "media_urls": { - "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", + "whisper_call_control_ids": { + "description": "Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only.", + "example": [ + "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + ], "type": "array", "items": { - "type": "string", - "format": "url" + "type": "string" } + } + }, + "example": { + "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "end_conference_on_exit": true, + "hold": true, + "hold_audio_url": "http://www.example.com/audio.wav", + "mute": true, + "start_conference_on_enter": true, + "supervisor_role": "whisper", + "whisper_call_control_ids": [ + "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + ] + } + }, + "Loopcount": { + "oneOf": [ + { + "type": "string" }, - "webhook_url": { - "description": "The URL where webhooks related to this message will be sent.", - "type": "string", - "format": "url" + { + "type": "integer" + } + ] + }, + "MediaFeatures": { + "description": "The media features settings for a phone number.", + "type": "object", + "properties": { + "rtp_auto_adjust_enabled": { + "type": "boolean", + "default": true, + "description": "When RTP Auto-Adjust is enabled, the destination RTP address port will be automatically changed to match the source of the incoming RTP packets." }, - "webhook_failover_url": { - "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", + "media_handling_mode": { "type": "string", - "format": "url" + "default": "default", + "enum": [ + "default", + "proxy" + ], + "description": "Controls how media is handled for the phone number. default: media routed through Telnyx with transcode support. proxy: media routed through Telnyx with no transcode support." + }, + "accept_any_rtp_packets_enabled": { + "type": "boolean", + "default": false, + "description": "When enabled, Telnyx will accept RTP packets from any customer-side IP address and port, not just those to which Telnyx is sending RTP." }, - "use_profile_webhooks": { + "t38_fax_gateway_enabled": { "type": "boolean", - "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", - "default": true + "default": false, + "description": "Controls whether Telnyx will accept a T.38 re-INVITE for this phone number. Note that Telnyx will not send a T.38 re-INVITE; this option only controls whether one will be accepted." + } + }, + "example": { + "rtp_auto_adjust_enabled": true, + "media_handling_mode": "default", + "accept_any_rtp_packets_enabled": true, + "t38_fax_gateway_enabled": true + } + }, + "MessagingFeatureSet": { + "type": "object", + "nullable": true, + "required": [ + "domestic_two_way", + "international_inbound", + "international_outbound" + ], + "description": "The set of features available for a specific messaging use case (SMS or MMS). Features\ncan vary depending on the characteristics the phone number, as well as its current\nproduct configuration.\n", + "properties": { + "domestic_two_way": { + "type": "boolean", + "description": "Send messages to and receive messages from numbers in the same country." }, - "type": { - "description": "The protocol for sending the message, either SMS or MMS.", - "type": "string", - "enum": [ - "SMS", - "MMS" - ] + "international_inbound": { + "type": "boolean", + "description": "Receive messages from numbers in other countries." }, - "auto_detect": { - "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", + "international_outbound": { "type": "boolean", - "default": false + "description": "Send messages to numbers in other countries." } }, "example": { - "from": "+18445550001", - "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", - "to": [ - "+13125550002" - ], - "text": "Hello, World!", - "subject": "From Telnyx!", - "media_urls": [ - "http://example.com" - ], - "webhook_url": "http://example.com/webhooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "use_profile_webhooks": true, - "type": "MMS" + "domestic_two_way": true, + "international_inbound": false, + "international_outbound": true } }, - "CreateNumberReservationRequest": { + "MessagingHostedNumberOrder": { + "type": "object", + "example": { + "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + "record_type": "messaging_hosted_number_order", + "profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", + "status": "pending", + "phone_numbers": [ + { + "record_type": "messaging_hosted_number", + "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", + "phone_number": "+18665550001", + "status": "pending" + }, + { + "record_type": "messaging_hosted_number", + "id": "464bd54e-a328-4b11-a131-28e6793cb6f2", + "phone_number": "+18665550002", + "status": "pending" + } + ] + }, "properties": { - "id": { + "record_type": { "type": "string", - "format": "uuid", - "example": "12ade33a-21c0-473b-b055-b3c836e1c292", + "example": "messaging_hosted_number_order", + "description": "Identifies the type of the resource.", "readOnly": true }, - "record_type": { + "id": { "type": "string", - "example": "number_reservation", + "format": "uuid", + "description": "Resource unique identifier.", "readOnly": true }, - "phone_numbers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReservedPhoneNumber" - } + "messaging_profile_id": { + "type": "string", + "nullable": true, + "description": "Automatically associate the number with this messaging profile ID when the order is complete." }, "status": { "type": "string", "enum": [ + "failed", "pending", - "success", - "failure" - ], - "description": "The status of the entire reservation.", - "readOnly": true - }, - "customer_reference": { - "type": "string", - "description": "A customer reference string for customer look ups.", - "example": "MY REF 001" - }, - "created_at": { - "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string denoting when the numbers reservation was created.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true + "successful" + ] }, - "updated_at": { - "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string for when the number reservation was updated.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true - } - }, - "example": { - "id": "12ade33a-21c0-473b-b055-b3c836e1c292", - "record_type": "number_reservation", - "phone_numbers": [ - { - "id": "12ade33a-21c0-473b-b055-b3c836e1c292", - "record_type": "reserved_phone_number", - "phone_number": "+19705555098", - "status": "pending", - "created_at": "2018-01-01T00:00:00.000000Z", - "updated_at": "2018-01-01T00:00:00.000000Z", - "expired_at": "2018-01-01T00:00:00.000000Z" + "phone_numbers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HostedNumber" } - ], - "status": "pending", - "customer_reference": "MY REF 001", - "created_at": "2018-01-01T00:00:00.000000Z", - "updated_at": "2018-01-01T00:00:00.000000Z" + } } }, - "CreateShortCodeMessageRequest": { + "MessagingProfile": { "type": "object", - "required": [ - "from", - "to" - ], "properties": { - "from": { + "record_type": { + "description": "Identifies the type of the resource.", "type": "string", - "format": "address", - "description": "Phone number, in +E.164 format, used to send the message." - }, - "to": { - "$ref": "#/components/schemas/ToNumber" + "enum": [ + "messaging_profile" + ], + "readOnly": true }, - "text": { + "id": { + "description": "Identifies the type of resource.", "type": "string", - "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" + "format": "uuid", + "readOnly": true }, - "subject": { - "type": "string", - "description": "Subject of multimedia message" + "name": { + "description": "A user friendly name for the messaging profile.", + "type": "string" }, - "media_urls": { - "description": "A list of media URLs. The total media size must be less than 1 MB.\n\n**Required for MMS**", - "type": "array", - "items": { - "type": "string", - "format": "url" - } + "enabled": { + "description": "Specifies whether the messaging profile is enabled or not.", + "type": "boolean" }, "webhook_url": { - "description": "The URL where webhooks related to this message will be sent.", + "description": "The URL where webhooks related to this messaging profile will be sent.", "type": "string", - "format": "url" + "format": "url", + "nullable": true }, "webhook_failover_url": { - "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.", + "description": "The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails.", "type": "string", - "format": "url" - }, - "use_profile_webhooks": { - "type": "boolean", - "description": "If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.", - "default": true + "format": "url", + "nullable": true }, - "type": { - "description": "The protocol for sending the message, either SMS or MMS.", + "webhook_api_version": { + "description": "Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.", "type": "string", "enum": [ - "SMS", - "MMS" + "1", + "2", + "2010-04-01" ] }, - "auto_detect": { - "description": "Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.", - "type": "boolean", - "default": false - } - }, - "example": { - "from": "+18445550001", - "to": "+18445550001", - "text": "Hello, World!", - "subject": "From Telnyx!", - "media_urls": [ - "http://example.com" - ], - "webhook_url": "http://example.com/webhooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "use_profile_webhooks": true, - "type": "MMS" - } - }, - "CsvDownload": { - "type": "object", - "properties": { - "id": { + "whitelisted_destinations": { + "description": "Destinations to which the messaging profile is allowed to send. If set to `null`, all destinations will be allowed. Setting a value of `[\"*\"]` has the equivalent effect. The elements in the list must be valid ISO 3166-1 alpha-2 country codes.", + "type": "array", + "nullable": true, + "items": { + "description": "ISO 3166-1 alpha-2 country code.", + "type": "string", + "pattern": "^[A-Z]{2}$" + } + }, + "created_at": { + "description": "ISO 8601 formatted date indicating when the resource was created.", "type": "string", - "example": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", - "description": "Identifies the resource.", + "format": "date-time", "readOnly": true }, - "record_type": { + "updated_at": { + "description": "ISO 8601 formatted date indicating when the resource was updated.", "type": "string", - "example": "csv_download", - "description": "Identifies the type of the resource.", + "format": "date-time", "readOnly": true }, - "url": { - "type": "string", - "example": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7", - "description": "The URL at which the CSV file can be retrieved." + "v1_secret": { + "description": "Secret used to authenticate with v1 endpoints.", + "type": "string" }, - "status": { - "type": "string", - "enum": [ - "pending", - "complete", - "failed", - "expired" - ], - "default": "pending", - "example": "pending", - "description": "Indicates the completion level of the CSV report. Only complete CSV download requests will be able to be retrieved." + "number_pool_settings": { + "$ref": "#/components/schemas/NumberPoolSettings" + }, + "url_shortener_settings": { + "$ref": "#/components/schemas/UrlShortenerSettings" } }, "example": { - "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", - "record_type": "csv_download", - "url": "https://www.telnyx.com/sample/42587e44-3a3e-46de-9255-0c9a7a1d1ec7", - "status": "pending" + "record_type": "messaging_profile", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "name": "Profile for Messages", + "webhook_url": "https://www.example.com/hooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "enabled": true, + "webhook_api_version": "2", + "whitelisted_destinations": [ + "US" + ], + "created_at": "2019-01-23T18:10:02.574Z", + "updated_at": "2019-01-23T18:10:02.574Z", + "number_pool_settings": { + "toll_free_weight": 10, + "long_code_weight": 2, + "skip_unhealthy": false, + "sticky_sender": true, + "geomatch": false + }, + "url_shortener_settings": { + "domain": "example.ex", + "prefix": "cmpny", + "replace_blacklist_only": true, + "send_webhooks": false + }, + "v1_secret": "rP1VamejkU2v0qIUxntqLW2c" } }, - "CustomSipHeader": { + "MessagingProfileDetailedMetric": { "type": "object", - "title": "Custom SIP Header", - "required": [ - "name", - "value" - ], "properties": { - "name": { - "description": "The name of the header to add.", + "timestamp": { "type": "string", - "example": "head_1" + "description": "The timestamp of the aggregated data.", + "example": "2019-01-23T18:10:02.574Z", + "readOnly": true }, - "value": { - "description": "The value of the header.", - "type": "string", - "example": "val_1" + "metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessagingProfileMessageTypeMetrics" + } } - }, - "example": { - "name": "head_1", - "value": "val_1" } }, - "EmergencySettings": { - "description": "The emergency services settings for a phone number.", + "MessagingProfileDetailedMetrics": { "type": "object", "properties": { - "emergency_enabled": { - "type": "boolean", - "default": false, - "description": "Allows you to enable or disable emergency services on the phone number. In order to enable emergency services, you must also set an emergency_address_id." - }, - "emergency_address_id": { - "type": "string", - "format": "int64", - "description": "Identifies the address to be used with emergency services." + "overview": { + "$ref": "#/components/schemas/MessagingProfileHighLevelMetrics" }, - "emergency_status": { - "type": "string", - "description": "Represents the state of the number regarding emergency activation.", - "default": "disabled", - "enum": [ - "disabled", - "active", - "provisioning", - "deprovisioning" - ] + "detailed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessagingProfileDetailedMetric" + } } }, "example": { - "emergency_enabled": true, - "emergency_address_id": "1315261609962112019" + "detailed": [ + { + "metrics": [ + { + "label": "longcode", + "sent": 1000, + "delivered": 990, + "errors": 0.01, + "received": 750 + } + ], + "timestamp": "2019-01-23T18:10:02.574Z" + } + ], + "overview": { + "record_type": "messaging_profile_metrics", + "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "phone_numbers": 250, + "outbound": { + "sent": 1000, + "delivered": 990, + "errors": 0.01 + }, + "inbound": { + "received": 850 + } + } } }, - "Error": { - "required": [ - "code", - "title" - ], + "MessagingProfileHighLevelMetrics": { + "type": "object", + "example": { + "record_type": "messaging_profile_metrics", + "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "phone_numbers": 250, + "outbound": { + "sent": 1000, + "delivered": 990, + "errors": 0.01 + }, + "inbound": { + "received": 850 + } + }, "properties": { - "code": { + "record_type": { "type": "string", - "format": "integer", - "example": "10015" + "example": "messaging_profile_metrics", + "enum": [ + "messaging_profile_metrics" + ], + "description": "Identifies the type of the resource.", + "readOnly": true }, - "title": { + "messaging_profile_id": { "type": "string", - "example": "Invalid sorting value" + "format": "uuid", + "description": "Identifies the type of resource.", + "readOnly": true }, - "detail": { - "type": "string", - "example": "The value provided for sorting is not valid. Check the value used and try again." + "phone_numbers": { + "type": "number", + "description": "The number of phone numbers associated with the messaging profile.", + "readOnly": true }, - "source": { + "outbound": { "type": "object", "properties": { - "pointer": { - "description": "JSON pointer (RFC6901) to the offending entity.", - "type": "string", - "format": "json-pointer", - "example": "/sort" + "sent": { + "type": "number", + "description": "The number of outbound messages sent.", + "readOnly": true }, - "parameter": { - "description": "Indicates which query parameter caused the error.", - "type": "string" + "delivered": { + "type": "number", + "description": "The number of outbound messages successfully delivered.", + "readOnly": true + }, + "error_ratio": { + "type": "number", + "description": "The ratio of messages sent that resulted in errors.", + "readOnly": true } } }, - "meta": { + "inbound": { "type": "object", "properties": { - "url": { - "type": "string", - "description": "URL with additional information on the error.", - "example": "https://developers.telnyx.com/docs/overview/errors/10015" + "received": { + "type": "number", + "description": "The number of inbound messages received.", + "readOnly": true } } } } }, - "Errors": { + "MessagingProfileMessageTypeMetrics": { + "type": "object", + "example": { + "label": "longcode", + "sent": 1000, + "delivered": 990, + "errors": 0.01, + "received": 750 + }, "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - } + "label": { + "type": "string", + "description": "The metric type.", + "readOnly": true + }, + "sent": { + "type": "number", + "description": "The number of outbound messages sent.", + "readOnly": true + }, + "delivered": { + "type": "number", + "description": "The number of outbound messages successfully delivered.", + "readOnly": true + }, + "outbound_error_ratio": { + "type": "number", + "description": "The ratio of outbound messages sent that resulted in errors.", + "readOnly": true + }, + "received": { + "type": "number", + "description": "The number of inbound messages received.", + "readOnly": true } } }, - "GatherUsingAudioRequest": { + "MessagingUrlDomain": { "type": "object", - "title": "Gather Using Audio Request", - "required": [ - "audio_url" - ], "properties": { - "audio_url": { - "type": "string", - "example": "http://example.com/message.wav", - "description": "The URL of a file to be played back at the beginning of each prompt. The URL can point to either a WAV or MP3 file." - }, - "invalid_audio_url": { - "type": "string", - "description": "The URL of a file to play when digits don't match the `valid_digits` parameter or the number of digits is not between `min` and `max`. The URL can point to either a WAV or MP3 file.", - "example": "http://example.com/invalid.wav" - }, - "minimum_digits": { - "description": "The minimum number of digits to fetch. This parameter has a minimum value of 1.", - "default": 1, - "type": "integer", - "example": 1, - "format": "int32" - }, - "maximum_digits": { - "description": "The maximum number of digits to fetch. This parameter has a maximum value of 128.", - "default": 128, - "type": "integer", - "example": 10, - "format": "int32" - }, - "maximum_tries": { - "description": "The maximum number of times the file should be played if there is no input from the user on the call.", - "default": 3, - "type": "integer", - "example": 3, - "format": "int32" - }, - "timeout_millis": { - "description": "The number of milliseconds to wait for a DTMF response after file playback ends before a replaying the sound file.", - "default": 60000, - "type": "integer", - "example": 60000, - "format": "int32" - }, - "terminating_digit": { - "description": "The digit used to terminate input if fewer than `maximum_digits` digits have been gathered.", - "default": "#", - "type": "string", - "example": "#" - }, - "valid_digits": { - "description": "A list of all digits accepted as valid.", - "default": "0123456789#*", - "type": "string", - "example": "123" + "record_type": { + "type": "string" }, - "inter_digit_timeout_millis": { - "description": "The number of milliseconds to wait for input between digits.", - "default": 5000, - "type": "integer", - "example": 10000, - "format": "int32" + "id": { + "type": "string" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "url_domain": { + "type": "string" }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "use_case": { + "type": "string" } }, "example": { - "audio_url": "http://example.com/message.wav", - "invalid_audio_url": "http://example.com/message.wav", - "minimum_digits": 1, - "maximum_digits": 10, - "timeout_millis": 10000, - "terminating_digit": "#", - "valid_digits": "123", - "inter_digit_timeout_millis": 10000, - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + "record_type": "messaging_url_domain", + "id": "464bd54e-a328-4b11-a131-28e6793cb6f2", + "url_domain": "http://example.com", + "use_case": "test" } }, - "GatherUsingSpeakRequest": { + "NumberHealthMetrics": { "type": "object", - "title": "Gather Using Speak Request", + "nullable": false, "required": [ - "voice", - "language", - "payload" + "message_count", + "inbound_outbound_ratio", + "success_ratio", + "spam_ratio" ], + "description": "High level health metrics about the number and it's messaging sending patterns.\n", "properties": { - "payload": { - "description": "The text or SSML to be converted into speech. There is a 5,000 character limit.", - "type": "string", - "example": "Say this on the call" + "message_count": { + "type": "integer", + "description": "The number of messages analyzed for the health metrics." }, - "invalid_payload": { - "description": "The text or SSML to be converted into speech when digits don't match the `valid_digits` parameter or the number of digits is not between `min` and `max`. There is a 5,000 character limit.", - "type": "string", - "example": "Say this on the call" + "inbound_outbound_ratio": { + "type": "number", + "format": "float", + "description": "The ratio of messages received to the number of messages sent." }, - "payload_type": { - "description": "The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML).", - "default": "text", - "type": "string", - "enum": [ - "text", - "ssml" - ], - "example": "ssml" + "success_ratio": { + "type": "number", + "format": "float", + "description": "The ratio of messages sucessfully delivered to the number of messages attempted." }, - "service_level": { - "description": "This parameter impacts speech quality, language options and payload types. When using `basic`, only the `en-US` language and payload type `text` are allowed.", - "default": "premium", + "spam_ratio": { + "type": "number", + "format": "float", + "description": "The ratio of messages blocked for spam to the number of messages attempted." + } + }, + "example": { + "message_count": 10, + "inbound_outbound_ratio": 1, + "success_ratio": 2, + "spam_ratio": 10 + } + }, + "NumberOrder": { + "properties": { + "id": { "type": "string", - "enum": [ - "basic", - "premium" - ], - "example": "premium" + "format": "uuid", + "example": "12ade33a-21c0-473b-b055-b3c836e1c292", + "readOnly": true }, - "voice": { - "description": "The gender of the voice used to speak back the text.", + "record_type": { "type": "string", - "enum": [ - "male", - "female" - ], - "example": "female" + "example": "number_order", + "readOnly": true }, - "language": { - "description": "The language you want spoken.", - "type": "string", - "enum": [ - "arb", - "cmn-CN", - "cy-GB", - "da-DK", - "de-DE", - "en-AU", - "en-GB", - "en-GB-WLS", - "en-IN", - "en-US", - "es-ES", - "es-MX", - "es-US", - "fr-CA", - "fr-FR", - "hi-IN", - "is-IS", - "it-IT", - "ja-JP", - "ko-KR", - "nb-NO", - "nl-NL", - "pl-PL", - "pt-BR", - "pt-PT", - "ro-RO", - "ru-RU", - "sv-SE", - "tr-TR" - ], - "example": "en-US" + "phone_numbers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumber" + }, + "writeOnly": true }, - "minimum_digits": { - "description": "The minimum number of digits to fetch. This parameter has a minimum value of 1.", - "default": 1, + "phone_numbers_count": { "type": "integer", + "description": "The count of phone numbers in the number order.", "example": 1, - "format": "int32" - }, - "maximum_digits": { - "description": "The maximum number of digits to fetch. This parameter has a maximum value of 128.", - "default": 128, - "type": "integer", - "example": 10, - "format": "int32" + "readOnly": true }, - "maximum_tries": { - "description": "The maximum number of times that a file should be played back if there is no input from the user on the call.", - "default": 3, - "type": "integer", - "example": 3, - "format": "int32" + "connection_id": { + "type": "string", + "example": "346789098765567", + "description": "Identifies the connection associated with this phone number." }, - "timeout_millis": { - "description": "The number of milliseconds to wait for a DTMF response after speak ends before a replaying the sound file.", - "default": 60000, - "type": "integer", - "example": 60000, - "format": "int32" + "messaging_profile_id": { + "type": "string", + "example": "abc85f64-5717-4562-b3fc-2c9600", + "description": "Identifies the messaging profile associated with the phone number." }, - "terminating_digit": { - "description": "The digit used to terminate input if fewer than `maximum_digits` digits have been gathered.", - "default": "#", + "status": { "type": "string", - "example": "#" + "enum": [ + "pending", + "success", + "failure" + ], + "description": "The status of the order.", + "readOnly": true }, - "valid_digits": { - "description": "A list of all digits accepted as valid.", - "default": "0123456789#*", + "customer_reference": { "type": "string", - "example": "123" - }, - "inter_digit_timeout_millis": { - "description": "The number of milliseconds to wait for input between digits.", - "default": 5000, - "type": "integer", - "example": 10000, - "format": "int32" + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "created_at": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "format": "datetime", + "description": "An ISO 8901 datetime string denoting when the number order was created.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "updated_at": { "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "format": "datetime", + "description": "An ISO 8901 datetime string for when the number order was updated.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true + }, + "requirements_met": { + "type": "boolean", + "description": "True if all requirements are met for every phone number, false otherwise.", + "example": true, + "readOnly": true } }, "example": { - "payload": "say this on call", - "invalid_payload": "say this on call", - "payload_type": "text", - "service_level": "premium", - "voice": "male", - "language": "arb", - "minimum_digits": 1, - "maximum_digits": 10, - "terminating_digit": "#", - "valid_digits": "123", - "inter_digit_timeout_millis": 10000, - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + "phone_numbers": [ + { + "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + "record_type": "number_order_phone_number", + "phone_number": "+19705555098", + "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + "regulatory_requirements": [ + { + "record_type": "phone_number_regulatory_requirement", + "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", + "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", + "field_type": "address_id" + } + ], + "requirements_met": true, + "status": "success" + } + ], + "record_type": "number_order", + "connection_id": "346789098765567", + "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600", + "phone_numbers_count": 1, + "status": "pending", + "customer_reference": "MY REF 001", + "created_at": "2018-01-01T00:00:00.000000Z", + "updated_at": "2018-01-01T00:00:00.000000Z", + "requirements_met": true } }, - "HangupRequest": { - "type": "object", - "title": "Hangup Request", + "NumberOrderDocument": { "properties": { - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "id": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "format": "uuid", + "example": "387d1e31-a218-4375-8151-103f2d5e2d2c", + "readOnly": true }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "example": { - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "HostedNumber": { - "example": [ - { - "record_type": "messaging_hosted_number", - "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", - "phone_number": "+18665550001", - "status": "successful" - } - ], - "type": "object", - "properties": { "record_type": { "type": "string", - "example": "messaging_hosted_number" + "example": "number_order_document", + "readOnly": true }, - "id": { + "file_id": { "type": "string", - "format": "uuid", - "description": "Identifies the type of resource.", - "readOnly": true + "description": "The id of the file to associate as a number order document.", + "example": "1e3c5822-0362-4702-8e46-5a129f0d3976" }, - "phone_number": { + "requirements_id": { "type": "string", - "format": "+E.164", - "description": "The messaging hosted phone number (+E.164 format)" + "description": "Unique id for a requirement.", + "example": "36aaf27d-986b-493c-bd1b-de16af2e4292" }, - "status": { + "customer_reference": { + "type": "string", + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" + }, + "requirement_type": { "type": "string", "enum": [ - "deleted", - "failed", - "pending", - "successful" - ] + "address_proof", + "identification", + "reg_form" + ], + "readOnly": true + }, + "created_at": { + "type": "string", + "format": "datetime", + "description": "An ISO 8901 datetime string denoting when the number order document was uploaded.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true } + }, + "example": { + "id": "387d1e31-a218-4375-8151-103f2d5e2d2c", + "record_type": "number_order_document", + "file_id": "1e3c5822-0362-4702-8e46-5a129f0d3976", + "requirements_id": "36aaf27d-986b-493c-bd1b-de16af2e4292", + "customer_reference": "MY REF 001", + "requirement_type": "address_proof", + "created_at": "2018-01-01T00:00:00.000000Z" } }, - "InboundMessage": { + "NumberOrdered": { "type": "object", + "title": "Number Order Event Data", "properties": { "record_type": { "type": "string", @@ -11723,10 +17310,7 @@ }, "event_type": { "type": "string", - "example": "message.received", - "enum": [ - "message.received" - ], + "example": "number_order.complete", "description": "The type of event being delivered." }, "occurred_at": { @@ -11735,955 +17319,1004 @@ "description": "ISO 8601 formatted date indicating when the resource was created." }, "payload": { - "$ref": "#/components/schemas/InboundMessagePayload" - } - }, - "example": { - "record_type": "event", - "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", - "event_type": "message.received", - "occurred_at": "date-time", - "payload": { - "record_type": "message", - "direction": "inbound", - "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", - "type": "SMS", - "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", - "from": { - "phone_number": "+18665550001", - "carrier": "T-MOBILE USA, INC.", - "line_type": "Wireless" - }, - "to": [ - { - "phone_number": "+18445550001", - "status": "delivered", - "carrier": "TELNYX LLC", - "line_type": "VoIP" - } - ], - "text": "Hello, World!", - "subject": "From Telnyx!", - "media": [], - "webhook_url": "https://www.example.com/hooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "encoding": "GSM-7", - "parts": 1, - "tags": [ - "Greetings" - ], - "cost": null, - "received_at": "2019-01-23T18:10:02.574Z", - "sent_at": null, - "completed_at": null, - "valid_until": null, - "errors": [] + "$ref": "#/components/schemas/NumberOrder" } } }, - "InboundMessageEvent": { + "NumberOrderedEvent": { "type": "object", + "title": "Number Order Event", "properties": { "data": { - "$ref": "#/components/schemas/InboundMessage" + "$ref": "#/components/schemas/NumberOrdered" + } + } + }, + "NumberPoolSettings": { + "type": "object", + "nullable": true, + "required": [ + "toll_free_weight", + "long_code_weight", + "skip_unhealthy" + ], + "description": "Number Pool allows you to send messages from a pool of numbers of different types, assigning\nweights to each type. The pool consists of all the long code and toll free numbers\nassigned to the messaging profile.\n\nTo disable this feature, set the object field to `null`.\n", + "properties": { + "toll_free_weight": { + "type": "number", + "example": 10, + "description": "Defines the probability weight for a Toll Free number to be selected when sending a message.\nThe higher the weight the higher the probability. The sum of the weights for all number types\ndoes not necessarily need to add to 100. Weight must be a non-negative number, and when equal\nto zero it will remove the number type from the pool.\n" + }, + "long_code_weight": { + "type": "number", + "example": 1, + "description": "Defines the probability weight for a Long Code number to be selected when sending a message.\nThe higher the weight the higher the probability. The sum of the weights for all number types\ndoes not necessarily need to add to 100. Weight must be a non-negative number, and when equal\nto zero it will remove the number type from the pool.\n" + }, + "skip_unhealthy": { + "type": "boolean", + "example": true, + "description": "If set to true all unhealthy numbers will be automatically excluded from the pool.\nHealth metrics per number are calculated on a regular basis, taking into account the deliverability\nrate and the amount of messages marked as spam by upstream carriers.\nNumbers with a deliverability rate below 25% or spam ratio over 75% will be considered unhealthy.\n" + }, + "sticky_sender": { + "type": "boolean", + "default": false, + "description": "If set to true, Number Pool will try to choose the same sending number for all messages to a particular\nrecipient. If the sending number becomes unhealthy and `skip_unhealthy` is set to true, a new\nnumber will be chosen.\n" + }, + "geomatch": { + "type": "boolean", + "default": false, + "description": "If set to true, Number Pool will try to choose a sending number with the same area code as the destination\nnumber. If there are no such numbers available, a nunber with a different area code will be chosen. Currently\nonly NANP numbers are supported.\n" } + }, + "example": { + "toll_free_weight": 10, + "long_code_weight": 1, + "skip_unhealthy": true, + "sticky_sender": false, + "geomatch": false } }, - "InboundMessagePayload": { + "NumberReservation": { "properties": { + "id": { + "type": "string", + "format": "uuid", + "example": "12ade33a-21c0-473b-b055-b3c836e1c292", + "readOnly": true + }, "record_type": { "type": "string", - "example": "message", - "enum": [ - "message" - ], - "description": "Identifies the type of the resource." + "example": "number_reservation", + "readOnly": true }, - "direction": { + "phone_numbers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReservedPhoneNumber" + } + }, + "status": { "type": "string", - "example": "inbound", "enum": [ - "inbound" + "pending", + "success", + "failure" ], - "description": "The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you." + "description": "The status of the entire reservation.", + "readOnly": true }, - "id": { + "customer_reference": { "type": "string", - "format": "uuid", - "description": "Identifies the type of resource." + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" }, - "type": { + "created_at": { "type": "string", - "enum": [ - "SMS", - "MMS" - ], - "description": "The type of message. This value can be either 'sms' or 'mms'." + "format": "datetime", + "description": "An ISO 8901 datetime string denoting when the numbers reservation was created.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true }, - "messaging_profile_id": { + "updated_at": { "type": "string", - "description": "Unique identifier for a messaging profile." - }, - "to": { - "type": "array", - "items": { - "type": "object", - "properties": { - "phone_number": { - "type": "string", - "format": "address", - "description": "Receiving address (+E.164 formatted phone number or short code)." - }, - "status": { - "type": "string", - "enum": [ - "queued", - "sending", - "sent", - "delivered", - "sending_failed", - "delivery_failed", - "delivery_unconfirmed", - "webhook_delivered" - ] - }, - "carrier": { - "type": "string", - "description": "The carrier of the receiver." - }, - "line_type": { - "type": "string", - "description": "The line-type of the receiver.", - "enum": [ - "Wireline", - "Wireless", - "VoWiFi", - "VoIP", - "Pre-Paid Wireless", - "" - ] - } - } + "format": "datetime", + "description": "An ISO 8901 datetime string for when the number reservation was updated.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true + } + }, + "example": { + "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + "record_type": "number_reservation", + "phone_numbers": [ + { + "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + "record_type": "reserved_phone_number", + "phone_number": "+19705555098", + "status": "pending", + "created_at": "2018-01-01T00:00:00.000000Z", + "updated_at": "2018-01-01T00:00:00.000000Z", + "expired_at": "2018-01-01T00:00:00.000000Z", + "errors": "" } + ], + "status": "pending", + "customer_reference": "MY REF 001", + "created_at": "2018-01-01T00:00:00.000000Z", + "updated_at": "2018-01-01T00:00:00.000000Z" + } + }, + "OutboundCallRecording": { + "type": "object", + "example": { + "call_recording_type": "by_caller_phone_number", + "call_recording_caller_phone_numbers": [ + "+19705555098" + ], + "call_recording_channels": "dual", + "call_recording_format": "mp3" + }, + "properties": { + "call_recording_type": { + "type": "string", + "description": "Specifies which calls are recorded.", + "enum": [ + "all", + "none", + "by_caller_phone_number" + ] }, - "cc": { + "call_recording_caller_phone_numbers": { "type": "array", "items": { - "type": "object", - "properties": { - "phone_number": { - "type": "string", - "format": "address", - "description": "Receiving address (+E.164 formatted phone number or short code)." - }, - "status": { - "type": "string", - "enum": [ - "queued", - "sending", - "sent", - "delivered", - "sending_failed", - "delivery_failed", - "delivery_unconfirmed" - ] - }, - "carrier": { - "type": "string", - "description": "The carrier of the receiver." - }, - "line_type": { - "type": "string", - "description": "The line-type of the receiver.", - "enum": [ - "Wireline", - "Wireless", - "VoWiFi", - "VoIP", - "Pre-Paid Wireless", - "" - ] - } - } - } + "type": "string" + }, + "description": "When call_recording_type is 'by_caller_phone_number', only outbound calls using one of these numbers will be recorded. Numbers must be specified in E164 format.", + "example": [ + "+19705555098" + ] }, - "from": { - "type": "object", - "properties": { - "phone_number": { - "type": "string", - "format": "address", - "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code)." - }, - "status": { - "type": "string", - "enum": [ - "received", - "delivered" - ] - }, - "carrier": { - "type": "string", - "description": "The carrier of the sender." - }, - "line_type": { - "type": "string", - "description": "The line-type of the sender.", - "enum": [ - "Wireline", - "Wireless", - "VoWiFi", - "VoIP", - "Pre-Paid Wireless", - "" - ] - } - } + "call_recording_channels": { + "type": "string", + "description": "When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B.", + "example": "dual", + "default": "single", + "enum": [ + "single", + "dual" + ] }, - "text": { + "call_recording_format": { "type": "string", - "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" + "description": "The audio file format for calls being recorded.", + "example": "mp3", + "default": "wav", + "enum": [ + "wav", + "mp3" + ] + } + } + }, + "OutboundIp": { + "type": "object", + "title": "Outband Ip", + "properties": { + "call_parking_enabled": { + "type": "boolean", + "default": false, + "description": "Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next." }, - "media": { - "type": "array", - "items": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "url", - "description": "The url of the media requested to be sent." - }, - "content_type": { - "type": "string", - "format": "mime-type", - "description": "The MIME type of the requested media." - }, - "size": { - "type": "integer", - "description": "The size of the requested media." - }, - "hash_sha256": { - "type": "string", - "minLength": 32, - "maxLength": 32, - "description": "The SHA256 hash of the requested media." - } - } - } + "ani_override": { + "type": "string", + "description": "Set a phone number as the ani_override value to override caller id number on outbound calls.", + "default": "" }, - "webhook_url": { + "ani_override_type": { "type": "string", - "format": "url", - "nullable": true, - "description": "The URL where webhooks related to this message will be sent." + "enum": [ + "always", + "normal", + "emergency" + ], + "description": "Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.", + "default": "always" }, - "webhook_failover_url": { + "channel_limit": { + "type": "integer", + "default": null, + "description": "When set, this will limit the total number of outbound calls to phone numbers associated with this connection." + }, + "instant_ringback_enabled": { + "type": "boolean", + "default": true, + "description": "When set, ringback will not wait for indication before sending ringback tone to calling party." + }, + "generate_ringback_tone": { + "type": "boolean", + "default": false, + "description": "Generate ringback tone through 183 session progress message with early media." + }, + "localization": { "type": "string", - "format": "url", - "nullable": true, - "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails." + "default": null, + "description": "A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default." }, - "encoding": { + "t38_reinvite_source": { "type": "string", - "description": "Encoding scheme used for the message body." + "enum": [ + "telnyx", + "customer", + "disabled", + "passthru", + "caller-passthru", + "callee-passthru" + ], + "description": "This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite.", + "default": "telnyx" }, - "parts": { - "type": "integer", - "minimum": 1, - "maximum": 10, - "description": "Number of parts into which the message's body must be split." + "tech_prefix": { + "type": "string", + "description": "Numerical chars only, exactly 4 characters.", + "default": "" }, - "tags": { - "type": "array", - "description": "Tags associated with the resource.", - "items": { - "type": "string" - } + "ip_authentication_method": { + "type": "string", + "default": "tech-prefixp-charge-info", + "example": "tech-prefixp-charge-info", + "enum": [ + "tech-prefixp-charge-info", + "token" + ] }, - "cost": { - "type": "object", - "nullable": true, - "properties": { - "amount": { - "type": "string", - "format": "decimal", - "description": "The amount deducted from your account." - }, - "currency": { - "type": "string", - "format": "iso4217", - "description": "The ISO 4217 currency identifier." - } - } + "ip_authentication_token": { + "type": "string", + "default": null }, - "received_at": { + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" + } + }, + "example": { + "call_parking_enabled": true, + "ani_override": "string", + "ani_override_type": "always", + "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "string", + "t38_reinvite_source": "telnyx", + "tech_prefix": "string", + "ip_authentication_method": "token", + "ip_authentication_token": "string", + "outbound_voice_profile_id": "1293384261075731499" + } + }, + "OutboundMessage": { + "properties": { + "record_type": { "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the message request was received." + "example": "event", + "enum": [ + "event" + ], + "description": "Identifies the type of the resource." }, - "sent_at": { + "id": { "type": "string", - "format": "date-time", - "nullable": true, - "description": "Not used for inbound messages." + "format": "uuid", + "description": "Identifies the type of resource." }, - "completed_at": { + "event_type": { "type": "string", - "format": "date-time", - "nullable": true, - "description": "Not used for inbound messages." + "example": "message.sent", + "enum": [ + "message.sent", + "message.finalized" + ], + "description": "The type of event being delivered." }, - "valid_until": { + "occurred_at": { "type": "string", - "description": "Not used for inbound messages.", "format": "date-time", - "nullable": true + "description": "ISO 8601 formatted date indicating when the resource was created." }, - "errors": { - "type": "array", - "description": "These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses.", - "items": { - "$ref": "#/components/schemas/Error" - } + "payload": { + "$ref": "#/components/schemas/OutboundMessagePayload" } }, "example": { - "record_type": "message", - "direction": "inbound", - "id": "7ee4241c-f127-47e5-9c34-3aac291f8058", - "type": "SMS", - "messaging_profile_id": "0f512bda-ae1e-4597-8e11-e5f5686b97d3", - "from": { - "phone_number": "+18665550001", - "status": "delivered", - "carrier": "T-MOBILE USA, INC.", - "line_type": "Wireless" - }, - "to": [ - { + "record_type": "event", + "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + "event_type": "message.sent", + "occurred_at": "date-time", + "payload": { + "record_type": "message", + "direction": "outbound", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "MMS", + "messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6", + "from": { "phone_number": "+18445550001", - "status": "delivered", "carrier": "TELNYX LLC", "line_type": "VoIP" - } - ], - "text": "Hello, World!", - "subject": "From Telnyx!", - "media": [], - "webhook_url": "https://www.example.com/hooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "encoding": "GSM-7", - "parts": 1, - "tags": [ - "Greetings" - ], - "cost": null, - "received_at": "2019-01-23T18:10:02.574Z", - "sent_at": null, - "completed_at": null, - "valid_until": null, - "errors": [] + }, + "to": [ + { + "phone_number": "+18665550001", + "status": "queued", + "carrier": "T-MOBILE USA, INC.", + "line_type": "Wireless" + } + ], + "text": "Hello, World!", + "subject": "From Telnyx!", + "media": [ + { + "url": "https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png", + "content_type": null, + "sha256": null, + "size": null + } + ], + "webhook_url": "https://www.example.com/hooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "encoding": "GSM-7", + "parts": 1, + "tags": [ + "Greetings" + ], + "cost": null, + "received_at": "2019-01-23T18:10:02.574Z", + "sent_at": null, + "completed_at": null, + "valid_until": null, + "errors": [] + } } }, - "IntId": { - "type": "string", - "format": "int64", - "description": "Identifies the resource.", - "example": "1293384261075731499", - "readOnly": true + "OutboundMessageEvent": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/OutboundMessage" + } + } }, - "JoinConferenceRequest": { - "required": [ - "call_control_id" - ], + "OutboundMessagePayload": { "type": "object", - "title": "Join Conference Request", "properties": { - "call_control_id": { - "description": "Unique identifier and token for controlling the call", - "example": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ==", - "type": "string" - }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "type": "string" + "record_type": { + "type": "string", + "example": "message", + "enum": [ + "message" + ], + "description": "Identifies the type of the resource." }, - "command_id": { - "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901", - "type": "string" + "direction": { + "type": "string", + "example": "outbound", + "enum": [ + "outbound" + ], + "description": "The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you." }, - "end_conference_on_exit": { - "description": "Whether the conference should end and all remaining participants be hung up after the participant leaves the conference. Defaults to \"false\".", - "example": true, - "type": "boolean" + "id": { + "type": "string", + "format": "uuid", + "description": "Identifies the type of resource." }, - "soft_end_conference_on_exit": { - "description": "Whether the conference should end after the participant leaves the conference. NOTE this doesn't hang up the other participants. Defaults to \"false\".", - "example": true, - "type": "boolean" + "type": { + "type": "string", + "enum": [ + "SMS", + "MMS" + ], + "description": "The type of message." }, - "hold": { - "description": "Whether the participant should be put on hold immediately after joining the conference. Defaults to \"false\".", - "example": true, - "type": "boolean" + "messaging_profile_id": { + "type": "string", + "description": "Unique identifier for a messaging profile." }, - "hold_audio_url": { - "description": "The URL of an audio file to be played to the participant when they are put on hold after joining the conference. This property takes effect only if \"hold\" is set to \"true\".", - "example": "http://www.example.com/audio.wav", - "type": "string" + "from": { + "type": "object", + "properties": { + "phone_number": { + "type": "string", + "format": "address", + "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code)." + }, + "carrier": { + "type": "string", + "description": "The carrier of the receiver." + }, + "line_type": { + "type": "string", + "description": "The line-type of the receiver.", + "enum": [ + "Wireline", + "Wireless", + "VoWiFi", + "VoIP", + "Pre-Paid Wireless", + "" + ] + } + } }, - "mute": { - "description": "Whether the participant should be muted immediately after joining the conference. Defaults to \"false\".", - "example": true, - "type": "boolean" + "to": { + "type": "array", + "items": { + "type": "object", + "properties": { + "phone_number": { + "type": "string", + "format": "address", + "description": "Receiving address (+E.164 formatted phone number or short code)." + }, + "status": { + "type": "string", + "description": "The delivery status of the message.", + "enum": [ + "queued", + "sending", + "sent", + "expired", + "sending_failed", + "delivery_unconfirmed", + "delivered", + "delivery_failed" + ] + }, + "carrier": { + "type": "string", + "description": "The carrier of the receiver." + }, + "line_type": { + "type": "string", + "description": "The line-type of the receiver.", + "enum": [ + "Wireline", + "Wireless", + "VoWiFi", + "VoIP", + "Pre-Paid Wireless", + "" + ] + } + } + } }, - "start_conference_on_enter": { - "description": "Whether the conference should be started after the participant joins the conference. Defaults to \"false\".", - "example": true, - "type": "boolean" + "text": { + "type": "string", + "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" }, - "supervisor_role": { - "description": "Sets the joining participant as a supervisor for the conference. A conference can have multiple supervisors. \"barge\" means the supervisor enters the conference as a normal participant. This is the same as \"none\". \"monitor\" means the supervisor is muted but can hear all participants. \"whisper\" means that only the specified \"whisper_call_control_ids\" can hear the supervisor. Defaults to \"none\".", - "example": "whisper", + "subject": { "type": "string", - "enum": [ - "barge", - "monitor", - "none", - "whisper" - ] + "nullable": true, + "description": "Subject of multimedia message" }, - "whisper_call_control_ids": { - "description": "Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only.", - "example": [ - "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", - "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" - ], + "media": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "url", + "description": "The url of the media requested to be sent." + }, + "content_type": { + "type": "string", + "format": "mime-type", + "nullable": true, + "description": "The MIME type of the requested media." + }, + "sha256": { + "type": "string", + "nullable": true, + "description": "The SHA256 hash of the requested media." + }, + "size": { + "type": "integer", + "nullable": true, + "description": "The size of the requested media." + } + } } - } - }, - "example": { - "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "end_conference_on_exit": true, - "hold": true, - "hold_audio_url": "http://www.example.com/audio.wav", - "mute": true, - "start_conference_on_enter": true, - "supervisor_role": "whisper", - "whisper_call_control_ids": [ - "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", - "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" - ] - } - }, - "Loopcount": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "MediaFeatures": { - "description": "The media features settings for a phone number.", - "type": "object", - "properties": { - "rtp_auto_adjust_enabled": { - "type": "boolean", - "default": true, - "description": "When RTP Auto-Adjust is enabled, the destination RTP address port will be automatically changed to match the source of the incoming RTP packets." }, - "media_handling_mode": { + "webhook_url": { "type": "string", - "default": "default", - "enum": [ - "default", - "proxy" - ], - "description": "Controls how media is handled for the phone number. default: media routed through Telnyx with transcode support. proxy: media routed through Telnyx with no transcode support." + "format": "url", + "nullable": true, + "description": "The URL where webhooks related to this message will be sent." }, - "accept_any_rtp_packets_enabled": { - "type": "boolean", - "default": false, - "description": "When enabled, Telnyx will accept RTP packets from any customer-side IP address and port, not just those to which Telnyx is sending RTP." + "webhook_failover_url": { + "type": "string", + "format": "url", + "nullable": true, + "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails." }, - "t38_fax_gateway_enabled": { - "type": "boolean", - "default": false, - "description": "Controls whether Telnyx will accept a T.38 re-INVITE for this phone number. Note that Telnyx will not send a T.38 re-INVITE; this option only controls whether one will be accepted." - } - }, - "example": { - "rtp_auto_adjust_enabled": true, - "media_handling_mode": "default", - "accept_any_rtp_packets_enabled": true, - "t38_fax_gateway_enabled": true - } - }, - "MessagingFeatureSet": { - "type": "object", - "nullable": true, - "required": [ - "domestic_two_way", - "international_inbound", - "international_outbound" - ], - "description": "The set of features available for a specific messaging use case (SMS or MMS). Features\ncan vary depending on the characteristics the phone number, as well as its current\nproduct configuration.\n", - "properties": { - "domestic_two_way": { - "type": "boolean", - "description": "Send messages to and receive messages from numbers in the same country." + "encoding": { + "type": "string", + "description": "Encoding scheme used for the message body." }, - "international_inbound": { - "type": "boolean", - "description": "Receive messages from numbers in other countries." + "parts": { + "type": "integer", + "minimum": 1, + "maximum": 10, + "description": "Number of parts into which the message's body must be split." }, - "international_outbound": { - "type": "boolean", - "description": "Send messages to numbers in other countries." - } - }, - "example": { - "domestic_two_way": true, - "international_inbound": false, - "international_outbound": true - } - }, - "MessagingHostedNumberOrder": { - "type": "object", - "example": { - "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", - "record_type": "messaging_hosted_number_order", - "profile_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", - "status": "pending", - "phone_numbers": [ - { - "record_type": "messaging_hosted_number", - "id": "bf6307bd-884d-4c1f-b6ea-c62b8c495d3c", - "phone_number": "+18665550001", - "status": "pending" - }, - { - "record_type": "messaging_hosted_number", - "id": "464bd54e-a328-4b11-a131-28e6793cb6f2", - "phone_number": "+18665550002", - "status": "pending" + "tags": { + "type": "array", + "description": "Tags associated with the resource.", + "items": { + "type": "string" + } + }, + "cost": { + "type": "object", + "nullable": true, + "properties": { + "amount": { + "type": "string", + "format": "decimal", + "description": "The amount deducted from your account." + }, + "currency": { + "type": "string", + "format": "iso4217", + "description": "The ISO 4217 currency identifier." + } } - ] - }, - "properties": { - "record_type": { + }, + "received_at": { "type": "string", - "example": "messaging_hosted_number_order", - "description": "Identifies the type of the resource.", - "readOnly": true + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the message request was received." }, - "id": { + "sent_at": { "type": "string", - "format": "uuid", - "description": "Resource unique identifier.", - "readOnly": true + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the message was sent." }, - "messaging_profile_id": { + "completed_at": { "type": "string", - "nullable": true, - "description": "Automatically associate the number with this messaging profile ID when the order is complete." + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the message was finalized." }, - "status": { + "valid_until": { "type": "string", - "enum": [ - "failed", - "pending", - "successful" - ] + "description": "Message must be out of the queue by this time or else it will be discarded and marked as 'sending_failed'. Once the message moves out of the queue, this field will be nulled", + "format": "date-time", + "nullable": true }, - "phone_numbers": { + "errors": { "type": "array", + "description": "These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses.", "items": { - "$ref": "#/components/schemas/HostedNumber" + "$ref": "#/components/schemas/Error" } } + }, + "example": { + "record_type": "message", + "direction": "outbound", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "MMS", + "messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6", + "from": { + "phone_number": "+18445550001", + "carrier": "TELNYX LLC", + "line_type": "VoIP" + }, + "to": [ + { + "phone_number": "+18665550001", + "status": "queued", + "carrier": "T-MOBILE USA, INC.", + "line_type": "Wireless" + } + ], + "text": "Hello, World!", + "subject": "From Telnyx!", + "media": [ + { + "url": "https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png", + "content_type": null, + "sha256": null, + "size": null + } + ], + "webhook_url": "https://www.example.com/hooks", + "webhook_failover_url": "https://backup.example.com/hooks", + "encoding": "GSM-7", + "parts": 1, + "tags": [ + "Greetings" + ], + "cost": null, + "received_at": "2019-01-23T18:10:02.574Z", + "sent_at": null, + "completed_at": null, + "valid_until": null, + "errors": [] } }, - "MessagingProfile": { + "OutboundVoiceProfile": { "type": "object", - "properties": { - "record_type": { - "description": "Identifies the type of the resource.", - "type": "string", - "enum": [ - "messaging_profile" + "title": "Outbound Voice Profile", + "example": { + "id": "1293384261075731499", + "record_type": "outbound_voice_profile", + "name": "office", + "connections_count": 12, + "traffic_type": "conversational", + "service_plan": "global", + "concurrent_call_limit": 10, + "enabled": true, + "tags": [ + "office-profile" + ], + "usage_payment_method": "rate-deck", + "whitelisted_destinations": [ + "US", + "BR", + "AU" + ], + "max_destination_rate": 10, + "daily_spend_limit": "100.00", + "daily_spend_limit_enabled": true, + "call_recording": { + "call_recording_type": "by_caller_phone_number", + "call_recording_caller_phone_numbers": [ + "+19705555098" ], - "readOnly": true + "call_recording_channels": "dual", + "call_recording_format": "mp3" }, + "billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "created_at": "2018-02-02T22:25:27.521Z", + "updated_at": "2018-02-02T22:25:27.521Z" + }, + "properties": { "id": { - "description": "Identifies the type of resource.", "type": "string", - "format": "uuid", - "readOnly": true + "format": "int64", + "description": "Identifies the resource.", + "example": "1293384261075731499" + }, + "record_type": { + "type": "string", + "description": "Identifies the type of the resource.", + "example": "outbound_voice_profile" }, "name": { - "description": "A user friendly name for the messaging profile.", - "type": "string" + "type": "string", + "description": "A user-supplied name to help with organization.", + "example": "office", + "default": "" }, - "enabled": { - "description": "Specifies whether the messaging profile is enabled or not.", - "type": "boolean" + "connections_count": { + "type": "integer", + "description": "Amount of connections associated with this outbound voice profile.", + "example": 12 }, - "webhook_url": { - "description": "The URL where webhooks related to this messaging profile will be sent.", - "type": "string", - "format": "url", - "nullable": true + "traffic_type": { + "$ref": "#/components/schemas/TrafficType" }, - "webhook_failover_url": { - "description": "The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails.", - "type": "string", - "format": "url", + "service_plan": { + "$ref": "#/components/schemas/ServicePlan" + }, + "concurrent_call_limit": { + "type": "integer", + "description": "Must be no more than your global concurrent call limit. Null means no limit.", + "example": 10, "nullable": true }, - "webhook_api_version": { - "description": "Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.", - "type": "string", - "enum": [ - "1", - "2", - "2010-04-01" + "enabled": { + "type": "boolean", + "description": "Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.", + "example": true, + "default": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "office-profile" ] }, + "usage_payment_method": { + "$ref": "#/components/schemas/UsagePaymentMethod" + }, "whitelisted_destinations": { - "description": "Destinations to which the messaging profile is allowed to send. If set to `null`, all destinations will be allowed. Setting a value of `[\"*\"]` has the equivalent effect. The elements in the list must be valid ISO 3166-1 alpha-2 country codes.", "type": "array", - "nullable": true, "items": { - "description": "ISO 3166-1 alpha-2 country code.", - "type": "string", - "pattern": "^[A-Z]{2}$" - } + "type": "string" + }, + "description": "The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.", + "example": [ + "US", + "BR", + "AU" + ], + "default": [ + "US", + "CA" + ] }, - "created_at": { - "description": "ISO 8601 formatted date indicating when the resource was created.", - "type": "string", - "format": "date-time", - "readOnly": true + "max_destination_rate": { + "type": "number", + "description": "Maximum rate (price per minute) for a Destination to be allowed when making outbound calls." }, - "updated_at": { - "description": "ISO 8601 formatted date indicating when the resource was updated.", + "daily_spend_limit": { "type": "string", - "format": "date-time", - "readOnly": true + "description": "The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.", + "example": "100.00" }, - "v1_secret": { - "description": "Secret used to authenticate with v1 endpoints.", - "type": "string" + "daily_spend_limit_enabled": { + "type": "boolean", + "description": "Specifies whether to enforce the daily_spend_limit on this outbound voice profile.", + "example": true, + "default": false }, - "number_pool_settings": { - "$ref": "#/components/schemas/NumberPoolSettings" + "call_recording": { + "$ref": "#/components/schemas/OutboundCallRecording" }, - "url_shortener_settings": { - "$ref": "#/components/schemas/UrlShortenerSettings" - } - }, - "example": { - "record_type": "messaging_profile", - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "name": "Profile for Messages", - "webhook_url": "https://www.example.com/hooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "enabled": true, - "webhook_api_version": "2", - "whitelisted_destinations": [ - "US" - ], - "created_at": "2019-01-23T18:10:02.574Z", - "updated_at": "2019-01-23T18:10:02.574Z", - "number_pool_settings": { - "toll_free_weight": 10, - "long_code_weight": 2, - "skip_unhealthy": false, - "sticky_sender": true, - "geomatch": false + "billing_group_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).", + "example": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "default": null, + "nullable": true }, - "url_shortener_settings": { - "domain": "example.ex", - "prefix": "cmpny", - "replace_blacklist_only": true, - "send_webhooks": false + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date-time indicating when the resource was created.", + "example": "2018-02-02T22:25:27.521Z" }, - "v1_secret": "rP1VamejkU2v0qIUxntqLW2c" + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date-time indicating when the resource was updated.", + "example": "2018-02-02T22:25:27.521Z" + } } }, - "MessagingProfileDetailedMetric": { + "OutboundVoiceProfileId": { + "title": "Outbound Voice Profile ID", + "type": "string", + "description": "Identifies the associated outbound voice profile.", + "format": "int64", + "example": "1293384261075731499" + }, + "PaginationMeta": { "type": "object", "properties": { - "timestamp": { - "type": "string", - "description": "The timestamp of the aggregated data.", - "example": "2019-01-23T18:10:02.574Z", - "readOnly": true + "total_pages": { + "type": "integer", + "example": 3 + }, + "total_results": { + "type": "integer", + "example": 55 }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessagingProfileMessageTypeMetrics" - } + "page_number": { + "type": "integer", + "example": 2 + }, + "page_size": { + "type": "integer", + "example": 25 } } }, - "MessagingProfileDetailedMetrics": { + "PaginationMetaSimple": { "type": "object", "properties": { - "overview": { - "$ref": "#/components/schemas/MessagingProfileHighLevelMetrics" + "page_number": { + "type": "integer", + "example": 2 }, - "detailed": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessagingProfileDetailedMetric" - } - } - }, - "example": { - "detailed": [ - { - "metrics": [ - { - "label": "longcode", - "sent": 1000, - "delivered": 990, - "errors": 0.01, - "received": 750 - } - ], - "timestamp": "2019-01-23T18:10:02.574Z" - } - ], - "overview": { - "record_type": "messaging_profile_metrics", - "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "phone_numbers": 250, - "outbound": { - "sent": 1000, - "delivered": 990, - "errors": 0.01 - }, - "inbound": { - "received": 850 - } + "page_size": { + "type": "integer", + "example": 25 + }, + "total_pages": { + "type": "integer", + "example": 3 + }, + "total_results": { + "type": "integer", + "example": 55 } } }, - "MessagingProfileHighLevelMetrics": { + "Participant": { "type": "object", - "example": { - "record_type": "messaging_profile_metrics", - "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "phone_numbers": 250, - "outbound": { - "sent": 1000, - "delivered": 990, - "errors": 0.01 - }, - "inbound": { - "received": 850 - } - }, + "title": "Participant", + "required": [ + "record_type", + "id", + "call_leg_id", + "call_control_id", + "conference", + "whisper_call_control_ids", + "created_at", + "updated_at", + "end_conference_on_exit", + "soft_end_conference_on_exit", + "status", + "muted", + "on_hold" + ], "properties": { "record_type": { "type": "string", - "example": "messaging_profile_metrics", "enum": [ - "messaging_profile_metrics" + "participant" ], - "description": "Identifies the type of the resource.", - "readOnly": true + "example": "participant" }, - "messaging_profile_id": { + "id": { "type": "string", - "format": "uuid", - "description": "Identifies the type of resource.", - "readOnly": true + "description": "Uniquely identifies the participant", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "phone_numbers": { - "type": "number", - "description": "The number of phone numbers associated with the messaging profile.", - "readOnly": true + "call_leg_id": { + "type": "string", + "description": "Uniquely identifies the call leg associated with the participant", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "outbound": { + "call_control_id": { + "type": "string", + "description": "Call Control ID associated with the partiipant of the conference", + "example": "v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ" + }, + "conference": { "type": "object", + "description": "Info about the conference that the participant is in", "properties": { - "sent": { - "type": "number", - "description": "The number of outbound messages sent.", - "readOnly": true - }, - "delivered": { - "type": "number", - "description": "The number of outbound messages successfully delivered.", - "readOnly": true + "id": { + "type": "string", + "description": "Uniquely identifies the conference", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "error_ratio": { - "type": "number", - "description": "The ratio of messages sent that resulted in errors.", - "readOnly": true + "name": { + "type": "string", + "description": "Name of the conference", + "example": "All hands meeting" } } }, - "inbound": { - "type": "object", - "properties": { - "received": { - "type": "number", - "description": "The number of inbound messages received.", - "readOnly": true - } + "whisper_call_control_ids": { + "description": "Array of unique call_control_ids the participant can whisper to..", + "example": [ + "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + ], + "type": "array", + "items": { + "type": "string" } - } - } - }, - "MessagingProfileMessageTypeMetrics": { - "type": "object", - "example": { - "label": "longcode", - "sent": 1000, - "delivered": 990, - "errors": 0.01, - "received": 750 - }, - "properties": { - "label": { - "type": "string", - "description": "The metric type.", - "readOnly": true }, - "sent": { - "type": "number", - "description": "The number of outbound messages sent.", - "readOnly": true + "created_at": { + "type": "string", + "description": "ISO 8601 formatted date of when the participant was created", + "example": "2019-01-23T18:10:02.574Z" }, - "delivered": { - "type": "number", - "description": "The number of outbound messages successfully delivered.", - "readOnly": true + "updated_at": { + "type": "string", + "description": "ISO 8601 formatted date of when the participant was last updated", + "example": "2019-01-23T18:10:02.574Z" }, - "outbound_error_ratio": { - "type": "number", - "description": "The ratio of outbound messages sent that resulted in errors.", - "readOnly": true + "end_conference_on_exit": { + "type": "boolean", + "description": "Whether the conference will end and all remaining participants be hung up after the participant leaves the conference.", + "example": true }, - "received": { - "type": "number", - "description": "The number of inbound messages received.", - "readOnly": true - } - } - }, - "MessagingUrlDomain": { - "type": "object", - "properties": { - "record_type": { - "type": "string" + "soft_end_conference_on_exit": { + "type": "boolean", + "description": "Whether the conference will end after the participant leaves the conference.", + "example": true }, - "id": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "joining", + "joined", + "left" + ], + "description": "The status of the participant with respect to the lifecycle within the conference", + "example": "joining" }, - "url_domain": { - "type": "string" + "muted": { + "type": "boolean", + "description": "Whether the participant is muted.", + "example": true }, - "use_case": { - "type": "string" + "on_hold": { + "type": "boolean", + "description": "Whether the participant is put on_hold.", + "example": true + } + }, + "example": { + "record_type": "participant", + "created_at": "2019-01-23T18:10:02.574Z", + "updated_at": "2019-01-23T18:10:02.574Z", + "end_conference_on_exit": true, + "soft_end_conference_on_exit": true, + "status": "joining", + "muted": false, + "on_hold": true, + "call_control_id": "v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ", + "whisper_call_control_ids": [ + "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", + "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + ], + "id": "dfadada7-af74-47bc-83a4-554275f55f5c", + "call_leg_id": "3a15df2d-c801-4729-adf5-b56dd42e2abb", + "conference": { + "id": "41b9acd4-f4da-4ff5-a85c-e07e90b53f46", + "name": "1" } - }, - "example": { - "record_type": "messaging_url_domain", - "id": "464bd54e-a328-4b11-a131-28e6793cb6f2", - "url_domain": "http://example.com", - "use_case": "test" } }, - "NumberHealthMetrics": { + "PauseRecordingRequest": { "type": "object", - "nullable": false, - "required": [ - "message_count", - "inbound_outbound_ratio", - "success_ratio", - "spam_ratio" - ], - "description": "High level health metrics about the number and it's messaging sending patterns.\n", + "title": "Pause Recording Request", "properties": { - "message_count": { - "type": "integer", - "description": "The number of messages analyzed for the health metrics." - }, - "inbound_outbound_ratio": { - "type": "number", - "format": "float", - "description": "The ratio of messages received to the number of messages sent." - }, - "success_ratio": { - "type": "number", - "format": "float", - "description": "The ratio of messages sucessfully delivered to the number of messages attempted." + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" }, - "spam_ratio": { - "type": "number", - "format": "float", - "description": "The ratio of messages blocked for spam to the number of messages attempted." + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } - }, - "example": { - "message_count": 10, - "inbound_outbound_ratio": 1, - "success_ratio": 2, - "spam_ratio": 10 } }, - "NumberOrder": { + "PhoneNumber": { "properties": { "id": { "type": "string", "format": "uuid", - "example": "12ade33a-21c0-473b-b055-b3c836e1c292", + "example": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", "readOnly": true }, "record_type": { "type": "string", - "example": "number_order", + "example": "number_order_phone_number", "readOnly": true }, - "phone_numbers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhoneNumber" - }, - "writeOnly": true + "phone_number": { + "type": "string", + "format": "e164_phone_number", + "example": "+19705555098" }, - "phone_numbers_count": { - "type": "integer", - "description": "The count of phone numbers in the number order.", - "example": 1, + "regulatory_group_id": { + "type": "string", + "example": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", "readOnly": true }, - "connection_id": { - "type": "string", - "example": "346789098765567", - "description": "Identifies the connection associated with this phone number." + "regulatory_requirements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumberRegulatoryRequirement" + } }, - "messaging_profile_id": { - "type": "string", - "example": "abc85f64-5717-4562-b3fc-2c9600", - "description": "Identifies the messaging profile associated with the phone number." + "requirements_met": { + "type": "boolean", + "description": "True if all requirements are met for a phone number, false otherwise.", + "example": true, + "readOnly": true }, "status": { "type": "string", @@ -12692,1382 +18325,1215 @@ "success", "failure" ], - "description": "The status of the order.", - "readOnly": true - }, - "customer_reference": { - "type": "string", - "description": "A customer reference string for customer look ups.", - "example": "MY REF 001" - }, - "created_at": { - "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string denoting when the number order was created.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true - }, - "updated_at": { - "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string for when the number order was updated.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true - }, - "requirements_met": { - "type": "boolean", - "description": "True if all requirements are met for every phone number, false otherwise.", - "example": true, + "description": "The status of the phone number in the order.", "readOnly": true } }, "example": { - "id": "12ade33a-21c0-473b-b055-b3c836e1c292", - "phone_numbers": [ + "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + "record_type": "number_order_phone_number", + "phone_number": "+19705555098", + "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", + "regulatory_requirements": [ { - "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "record_type": "number_order_phone_number", - "phone_number": "+19705555098", - "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "regulatory_requirements": [ - { - "record_type": "phone_number_regulatory_requirement", - "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", - "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", - "field_type": "address_id" - } - ], - "requirements_met": true, - "status": "success" + "record_type": "phone_number_regulatory_requirement", + "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", + "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", + "field_type": "address_id" } ], - "record_type": "number_order", - "connection_id": "346789098765567", - "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600", - "phone_numbers_count": 1, - "status": "pending", - "customer_reference": "MY REF 001", - "created_at": "2018-01-01T00:00:00.000000Z", - "updated_at": "2018-01-01T00:00:00.000000Z", - "requirements_met": true + "requirements_met": true, + "status": "success" } }, - "NumberOrderDocument": { + "PhoneNumberDetailed": { + "type": "object", + "example": { + "id": "1293384261075731499", + "record_type": "phone_number", + "phone_number": "+19705555098", + "status": "active", + "tags": [ + "tag_1", + "tag_2" + ], + "external_pin": "1234", + "connection_id": "1293384261075731499", + "connection_name": "connection-name", + "customer_reference": "customer-reference", + "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", + "messaging_profile_name": "regional-customers", + "billing_group_id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", + "emergency_enabled": true, + "emergency_address_id": "1315261609962112019", + "call_forwarding_enabled": true, + "cnam_listing_enabled": true, + "caller_id_name_enabled": true, + "call_recording_enabled": true, + "t38_fax_gateway_enabled": true, + "purchased_at": "2019-10-23T18:10:00.000Z", + "created_at": "2019-10-23T18:10:00.000Z", + "updated_at": "2019-10-24T18:10:00.000Z" + }, "properties": { "id": { - "type": "string", - "format": "uuid", - "example": "387d1e31-a218-4375-8151-103f2d5e2d2c", - "readOnly": true + "$ref": "#/components/schemas/IntId" }, "record_type": { "type": "string", - "example": "number_order_document", + "example": "phone_number", + "description": "Identifies the type of the resource.", "readOnly": true }, - "file_id": { - "type": "string", - "description": "The id of the file to associate as a number order document.", - "example": "1e3c5822-0362-4702-8e46-5a129f0d3976" - }, - "requirements_id": { - "type": "string", - "description": "Unique id for a requirement.", - "example": "36aaf27d-986b-493c-bd1b-de16af2e4292" - }, - "customer_reference": { + "phone_number": { "type": "string", - "description": "A customer reference string for customer look ups.", - "example": "MY REF 001" + "description": "The +E.164-formatted phone number associated with this record.", + "readOnly": true }, - "requirement_type": { + "status": { "type": "string", + "description": "The phone number's current status.", "enum": [ - "address_proof", - "identification", - "reg_form" + "purchase-pending", + "purchase-failed", + "port-pending", + "port-failed", + "active", + "deleted", + "emergency-only", + "ported-out", + "port-out-pending" ], "readOnly": true }, - "created_at": { - "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string denoting when the number order document was uploaded.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true - } - }, - "example": { - "id": "387d1e31-a218-4375-8151-103f2d5e2d2c", - "record_type": "number_order_document", - "file_id": "1e3c5822-0362-4702-8e46-5a129f0d3976", - "requirements_id": "36aaf27d-986b-493c-bd1b-de16af2e4292", - "customer_reference": "MY REF 001", - "requirement_type": "address_proof", - "created_at": "2018-01-01T00:00:00.000000Z" - } - }, - "NumberOrdered": { - "type": "object", - "title": "Number Order Event Data", - "properties": { - "record_type": { + "tags": { + "type": "array", + "description": "A list of user-assigned tags to help manage the phone number.", + "items": { + "type": "string" + } + }, + "external_pin": { "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." + "description": "If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, Telnyx will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism." }, - "id": { + "connection_name": { "type": "string", - "format": "uuid", - "description": "Identifies the type of resource." + "description": "The user-assigned name of the connection to be associated with this phone number.", + "readOnly": true }, - "event_type": { + "customer_reference": { "type": "string", - "example": "number_order.complete", - "description": "The type of event being delivered." + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" }, - "occurred_at": { + "connection_id": { "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the resource was created." + "description": "Identifies the connection associated with the phone number." }, - "payload": { - "$ref": "#/components/schemas/NumberOrder" - } - } - }, - "NumberOrderedEvent": { - "type": "object", - "title": "Number Order Event", - "properties": { - "data": { - "$ref": "#/components/schemas/NumberOrdered" - } - } - }, - "NumberPoolSettings": { - "type": "object", - "nullable": true, - "required": [ - "toll_free_weight", - "long_code_weight", - "skip_unhealthy" - ], - "description": "Number Pool allows you to send messages from a pool of numbers of different types, assigning\nweights to each type. The pool consists of all the long code and toll free numbers\nassigned to the messaging profile.\n\nTo disable this feature, set the object field to `null`.\n", - "properties": { - "toll_free_weight": { - "type": "number", - "example": 10, - "description": "Defines the probability weight for a Toll Free number to be selected when sending a message.\nThe higher the weight the higher the probability. The sum of the weights for all number types\ndoes not necessarily need to add to 100. Weight must be a non-negative number, and when equal\nto zero it will remove the number type from the pool.\n" + "messaging_profile_id": { + "type": "string", + "description": "Identifies the messaging profile associated with the phone number." }, - "long_code_weight": { - "type": "number", - "example": 1, - "description": "Defines the probability weight for a Long Code number to be selected when sending a message.\nThe higher the weight the higher the probability. The sum of the weights for all number types\ndoes not necessarily need to add to 100. Weight must be a non-negative number, and when equal\nto zero it will remove the number type from the pool.\n" + "messaging_profile_name": { + "type": "string", + "description": "The name of the messaging profile associated with the phone number.", + "example": "regional-customers" }, - "skip_unhealthy": { + "billing_group_id": { + "type": "string", + "description": "Identifies the billing group associated with the phone number." + }, + "emergency_enabled": { "type": "boolean", - "example": true, - "description": "If set to true all unhealthy numbers will be automatically excluded from the pool.\nHealth metrics per number are calculated on a regular basis, taking into account the deliverability\nrate and the amount of messages marked as spam by upstream carriers.\nNumbers with a deliverability rate below 25% or spam ratio over 75% will be considered unhealthy.\n" + "description": "Indicates whether emergency services are enabled for this number.", + "readOnly": true }, - "sticky_sender": { + "emergency_address_id": { + "type": "string", + "format": "int64", + "description": "Identifies the emergency address associated with the phone number.", + "readOnly": true + }, + "call_forwarding_enabled": { "type": "boolean", - "default": false, - "description": "If set to true, Number Pool will try to choose the same sending number for all messages to a particular\nrecipient. If the sending number becomes unhealthy and `skip_unhealthy` is set to true, a new\nnumber will be chosen.\n" + "default": true, + "description": "Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints.", + "readOnly": true }, - "geomatch": { + "cnam_listing_enabled": { "type": "boolean", - "default": false, - "description": "If set to true, Number Pool will try to choose a sending number with the same area code as the destination\nnumber. If there are no such numbers available, a nunber with a different area code will be chosen. Currently\nonly NANP numbers are supported.\n" - } - }, - "example": { - "toll_free_weight": 10, - "long_code_weight": 1, - "skip_unhealthy": true, - "sticky_sender": false, - "geomatch": false - } - }, - "NumberReservation": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "example": "12ade33a-21c0-473b-b055-b3c836e1c292", + "description": "Indicates whether a CNAM listing is enabled for this number.", "readOnly": true }, - "record_type": { - "type": "string", - "example": "number_reservation", + "caller_id_name_enabled": { + "type": "boolean", + "description": "Indicates whether caller ID is enabled for this number.", "readOnly": true }, - "phone_numbers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReservedPhoneNumber" - } + "call_recording_enabled": { + "type": "boolean", + "description": "Indicates whether call recording is enabled for this number.", + "readOnly": true }, - "status": { - "type": "string", - "enum": [ - "pending", - "success", - "failure" - ], - "description": "The status of the entire reservation.", + "t38_fax_gateway_enabled": { + "type": "boolean", + "description": "Indicates whether T38 Fax Gateway for inbound calls to this number.", "readOnly": true }, - "customer_reference": { + "purchased_at": { "type": "string", - "description": "A customer reference string for customer look ups.", - "example": "MY REF 001" + "description": "ISO 8601 formatted date indicating when the resource was purchased.", + "readOnly": true }, "created_at": { "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string denoting when the numbers reservation was created.", - "example": "2018-01-01T00:00:00.000000Z", + "description": "ISO 8601 formatted date indicating when the resource was created.", "readOnly": true }, "updated_at": { "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string for when the number reservation was updated.", - "example": "2018-01-01T00:00:00.000000Z", + "description": "ISO 8601 formatted date indicating when the resource was updated.", "readOnly": true } - }, - "example": { - "id": "12ade33a-21c0-473b-b055-b3c836e1c292", - "record_type": "number_reservation", - "phone_numbers": [ - { - "id": "12ade33a-21c0-473b-b055-b3c836e1c292", - "record_type": "reserved_phone_number", - "phone_number": "+19705555098", - "status": "pending", - "created_at": "2018-01-01T00:00:00.000000Z", - "updated_at": "2018-01-01T00:00:00.000000Z", - "expired_at": "2018-01-01T00:00:00.000000Z", - "errors": "" - } - ], - "status": "pending", - "customer_reference": "MY REF 001", - "created_at": "2018-01-01T00:00:00.000000Z", - "updated_at": "2018-01-01T00:00:00.000000Z" } }, - "OutboundMessage": { + "PhoneNumberEnableEmergencyRequest": { + "type": "object", + "required": [ + "emergency_enabled", + "emergency_address_id" + ], "properties": { - "record_type": { - "type": "string", - "example": "event", - "enum": [ - "event" - ], - "description": "Identifies the type of the resource." - }, - "id": { - "type": "string", - "format": "uuid", - "description": "Identifies the type of resource." - }, - "event_type": { - "type": "string", - "example": "message.sent", - "enum": [ - "message.sent", - "message.finalized" - ], - "description": "The type of event being delivered." + "emergency_enabled": { + "type": "boolean", + "description": "Indicates whether to enable emergency services on this number." }, - "occurred_at": { + "emergency_address_id": { "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the resource was created." - }, - "payload": { - "$ref": "#/components/schemas/OutboundMessagePayload" + "format": "int64", + "description": "Identifies the address to be used with emergency services." } }, "example": { - "record_type": "event", - "id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", - "event_type": "message.sent", - "occurred_at": "date-time", - "payload": { - "record_type": "message", - "direction": "outbound", - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "type": "MMS", - "messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6", - "from": { - "phone_number": "+18445550001", - "carrier": "TELNYX LLC", - "line_type": "VoIP" - }, - "to": [ - { - "phone_number": "+18665550001", - "status": "queued", - "carrier": "T-MOBILE USA, INC.", - "line_type": "Wireless" - } - ], - "text": "Hello, World!", - "subject": "From Telnyx!", - "media": [ - { - "url": "https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png", - "content_type": null, - "sha256": null, - "size": null - } - ], - "webhook_url": "https://www.example.com/hooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "encoding": "GSM-7", - "parts": 1, - "tags": [ - "Greetings" - ], - "cost": null, - "received_at": "2019-01-23T18:10:02.574Z", - "sent_at": null, - "completed_at": null, - "valid_until": null, - "errors": [] - } + "emergency_enabled": true, + "emergency_address_id": "53829456729313" } }, - "OutboundMessageEvent": { - "type": "object", + "PhoneNumberRegulatoryGroup": { "properties": { - "data": { - "$ref": "#/components/schemas/OutboundMessage" + "record_type": { + "type": "string", + "example": "phone_number_regulatory_requirement", + "readOnly": true + }, + "phone_number": { + "type": "string", + "format": "e164_phone_number", + "example": "+19705555098" + }, + "regulatory_group_id": { + "type": "string", + "format": "uuid", + "example": "d70873cd-7c98-401a-81b6-b1ae08246995" + }, + "regulatory_requirements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegulatoryRequirement" + } } + }, + "example": { + "record_type": "phone_number_regulatory_requirement", + "phone_number": "+19705555098", + "regulatory_group_id": "d70873cd-7c98-401a-81b6-b1ae08246995", + "regulatory_requirements": [ + { + "record_type": "regulatory_requirement", + "requirement_type": "end user proof of address", + "label": "Proof of Address", + "field_type": "address", + "description": "Requirement for providing Proof of Address." + } + ] } }, - "OutboundMessagePayload": { - "type": "object", + "PhoneNumberRegulatoryRequirement": { "properties": { "record_type": { "type": "string", - "example": "message", - "enum": [ - "message" - ], - "description": "Identifies the type of the resource." + "example": "phone_number_regulatory_requirement", + "readOnly": true }, - "direction": { + "requirement_id": { "type": "string", - "example": "outbound", - "enum": [ - "outbound" - ], - "description": "The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you." + "format": "uuid", + "description": "Unique id for a requirement.", + "example": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576" }, - "id": { + "field_value": { "type": "string", - "format": "uuid", - "description": "Identifies the type of resource." + "description": "The value of the requirement, this could be an id to a resource or a string value.", + "example": "45f45a04-b4be-4592-95b1-9306b9db2b21" }, - "type": { + "field_type": { "type": "string", "enum": [ - "SMS", - "MMS" + "string", + "datetime", + "address_id", + "number_order_document_id" ], - "description": "The type of message." + "example": "address_id", + "readOnly": true + } + }, + "example": { + "record_type": "phone_number_regulatory_requirement", + "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", + "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", + "field_type": "address_id" + } + }, + "PhoneNumberWithMessagingSettings": { + "type": "object", + "example": { + "record_type": "messaging_settings", + "id": "1293384261075731499", + "phone_number": "+18005550001", + "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2019-01-23T18:10:02.574Z", + "updated_at": "2019-01-23T18:10:02.574Z", + "country_code": "US", + "type": "toll-free", + "health": { + "message_count": 122, + "inbound_outbound_ratio": 0.43, + "success_ratio": 0.94, + "spam_ratio": 0.06 }, - "messaging_profile_id": { + "eligible_messaging_products": [ + "A2P" + ], + "traffic_type": "A2P", + "messaging_product": "A2P", + "features": { + "sms": { + "domestic_two_way": true, + "international_inbound": true, + "international_outbound": true + }, + "mms": null + } + }, + "properties": { + "record_type": { "type": "string", - "description": "Unique identifier for a messaging profile." - }, - "from": { - "type": "object", - "properties": { - "phone_number": { - "type": "string", - "format": "address", - "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code)." - }, - "carrier": { - "type": "string", - "description": "The carrier of the receiver." - }, - "line_type": { - "type": "string", - "description": "The line-type of the receiver.", - "enum": [ - "Wireline", - "Wireless", - "VoWiFi", - "VoIP", - "Pre-Paid Wireless", - "" - ] - } - } + "example": "messaging_settings", + "enum": [ + "messaging_phone_number", + "messaging_settings" + ], + "description": "Identifies the type of the resource.", + "readOnly": true }, - "to": { - "type": "array", - "items": { - "type": "object", - "properties": { - "phone_number": { - "type": "string", - "format": "address", - "description": "Receiving address (+E.164 formatted phone number or short code)." - }, - "status": { - "type": "string", - "description": "The delivery status of the message.", - "enum": [ - "queued", - "sending", - "sent", - "expired", - "sending_failed", - "delivery_unconfirmed", - "delivered", - "delivery_failed" - ] - }, - "carrier": { - "type": "string", - "description": "The carrier of the receiver." - }, - "line_type": { - "type": "string", - "description": "The line-type of the receiver.", - "enum": [ - "Wireline", - "Wireless", - "VoWiFi", - "VoIP", - "Pre-Paid Wireless", - "" - ] - } - } - } + "id": { + "type": "string", + "description": "Identifies the type of resource.", + "readOnly": true }, - "text": { + "phone_number": { "type": "string", - "description": "Message body (i.e., content) as a non-empty string.\n\n**Required for SMS**" + "format": "e164", + "description": "+E.164 formatted phone number.", + "readOnly": true }, - "subject": { + "messaging_profile_id": { "type": "string", "nullable": true, - "description": "Subject of multimedia message" - }, - "media": { - "type": "array", - "items": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "url", - "description": "The url of the media requested to be sent." - }, - "content_type": { - "type": "string", - "format": "mime-type", - "nullable": true, - "description": "The MIME type of the requested media." - }, - "sha256": { - "type": "string", - "nullable": true, - "description": "The SHA256 hash of the requested media." - }, - "size": { - "type": "integer", - "nullable": true, - "description": "The size of the requested media." - } - } - } + "description": "Unique identifier for a messaging profile." }, - "webhook_url": { + "created_at": { "type": "string", - "format": "url", - "nullable": true, - "description": "The URL where webhooks related to this message will be sent." + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the resource was created.", + "readOnly": true }, - "webhook_failover_url": { + "updated_at": { "type": "string", - "format": "url", - "nullable": true, - "description": "The failover URL where webhooks related to this message will be sent if sending to the primary URL fails." + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "readOnly": true + }, + "country_code": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code.", + "pattern": "^[A-Z]{2}$", + "example": "US", + "readOnly": true }, - "encoding": { + "type": { "type": "string", - "description": "Encoding scheme used for the message body." + "description": "The type of the phone number", + "enum": [ + "long-code", + "toll-free", + "short-code", + "longcode", + "tollfree", + "shortcode" + ], + "readOnly": true }, - "parts": { - "type": "integer", - "minimum": 1, - "maximum": 10, - "description": "Number of parts into which the message's body must be split." + "health": { + "$ref": "#/components/schemas/NumberHealthMetrics" }, - "tags": { + "eligible_messaging_products": { "type": "array", - "description": "Tags associated with the resource.", + "description": "The messaging products that this number can be registered to use", + "readOnly": true, "items": { "type": "string" } }, - "cost": { + "traffic_type": { + "type": "string", + "description": "The messaging traffic or use case for which the number is currently configured.", + "example": "P2P", + "readOnly": true + }, + "messaging_product": { + "type": "string", + "description": "The messaging product that the number is registered to use", + "example": "P2P" + }, + "features": { "type": "object", - "nullable": true, + "readOnly": true, "properties": { - "amount": { - "type": "string", - "format": "decimal", - "description": "The amount deducted from your account." + "sms": { + "$ref": "#/components/schemas/MessagingFeatureSet" }, - "currency": { - "type": "string", - "format": "iso4217", - "description": "The ISO 4217 currency identifier." + "mms": { + "$ref": "#/components/schemas/MessagingFeatureSet" } } - }, - "received_at": { + } + } + }, + "PhoneNumberWithVoiceSettings": { + "type": "object", + "properties": { + "id": { "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the message request was received." + "example": "1293384261075731499", + "description": "Identifies the type of resource.", + "readOnly": true }, - "sent_at": { + "record_type": { "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the message was sent." + "example": "voice_settings", + "description": "Identifies the type of the resource.", + "readOnly": true }, - "completed_at": { + "phone_number": { "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the message was finalized." + "example": "+13035551234", + "description": "The phone number in +E164 format.", + "readOnly": true }, - "valid_until": { + "connection_id": { "type": "string", - "description": "Message must be out of the queue by this time or else it will be discarded and marked as 'sending_failed'. Once the message moves out of the queue, this field will be nulled", - "format": "date-time", - "nullable": true - }, - "errors": { - "type": "array", - "description": "These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses.", - "items": { - "$ref": "#/components/schemas/Error" - } - } - }, - "example": { - "record_type": "message", - "direction": "outbound", - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "type": "MMS", - "messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6", - "from": { - "phone_number": "+18445550001", - "carrier": "TELNYX LLC", - "line_type": "VoIP" + "example": "1d0e6cb8-8668-462e-94c6-49ae0f0ed48b", + "description": "Identifies the connection associated with this phone number." }, - "to": [ - { - "phone_number": "+18665550001", - "status": "queued", - "carrier": "T-MOBILE USA, INC.", - "line_type": "Wireless" - } - ], - "text": "Hello, World!", - "subject": "From Telnyx!", - "media": [ - { - "url": "https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png", - "content_type": null, - "sha256": null, - "size": null - } - ], - "webhook_url": "https://www.example.com/hooks", - "webhook_failover_url": "https://backup.example.com/hooks", - "encoding": "GSM-7", - "parts": 1, - "tags": [ - "Greetings" - ], - "cost": null, - "received_at": "2019-01-23T18:10:02.574Z", - "sent_at": null, - "completed_at": null, - "valid_until": null, - "errors": [] - } - }, - "PaginationMeta": { - "type": "object", - "properties": { - "total_pages": { - "type": "integer", - "example": 3 + "customer_reference": { + "type": "string", + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" }, - "total_results": { - "type": "integer", - "example": 55 + "tech_prefix_enabled": { + "type": "boolean", + "default": false, + "example": false, + "description": "Controls whether a tech prefix is enabled for this phone number." }, - "page_number": { - "type": "integer", - "example": 2 + "translated_number": { + "type": "string", + "example": "+13035559999", + "default": "", + "description": "This field allows you to rewrite the destination number of an inbound call before the call is routed to you. The value of this field may be any alphanumeric value, and the value will replace the number originally dialed." }, - "page_size": { - "type": "integer", - "example": 25 - } - } - }, - "PaginationMetaSimple": { - "type": "object", - "properties": { - "page_number": { - "type": "integer", - "example": 2 + "call_forwarding": { + "$ref": "#/components/schemas/CallForwarding" }, - "page_size": { - "type": "integer", - "example": 25 + "cnam_listing": { + "$ref": "#/components/schemas/CnamListing" }, - "total_pages": { - "type": "integer", - "example": 3 + "emergency": { + "$ref": "#/components/schemas/EmergencySettings" }, - "total_results": { - "type": "integer", - "example": 55 - } - } - }, - "Participant": { - "type": "object", - "title": "Participant", - "required": [ - "record_type", - "id", - "call_leg_id", - "call_control_id", - "conference", - "whisper_call_control_ids", - "created_at", - "updated_at", - "end_conference_on_exit", - "soft_end_conference_on_exit", - "status", - "muted", - "on_hold" - ], - "properties": { - "record_type": { + "usage_payment_method": { "type": "string", "enum": [ - "participant" + "pay-per-minute", + "channel" ], - "example": "participant" + "default": "pay-per-minute", + "example": "pay-per-minute", + "description": "Controls whether a number is billed per minute or uses your concurrent channels." + }, + "media_features": { + "$ref": "#/components/schemas/MediaFeatures" + }, + "call_recording": { + "$ref": "#/components/schemas/CallRecording" + } + }, + "example": { + "id": "1293384261075731499", + "record_type": "voice_settings", + "connection_id": "1d0e6cb8-8668-462e-94c6-49ae0f0ed48b", + "customer_reference": "customer_reference", + "tech_prefix_enabled": false, + "translated_number": "+13035559999", + "call_forwarding": { + "call_forwarding_enabled": true, + "forwards_to": "+13035559123", + "forwarding_type": "always" + }, + "cnam_listing": { + "cnam_listing_enabled": true, + "cnam_listing_details": "example" + }, + "emergency": { + "emergency_enabled": true, + "emergency_address_id": "1315261609962112019" + }, + "usage_payment_method": "pay-per-minute", + "media_features": { + "rtp_auto_adjust_enabled": true, + "media_handling_mode": "default", + "accept_any_rtp_packets_enabled": true, + "t38_fax_gateway_enabled": true }, + "call_recording": { + "inbound_call_recording_enabled": true, + "inbound_call_recording_format": "wav", + "inbound_call_recording_channels": "single" + } + } + }, + "PhoneNumbersJob": { + "type": "object", + "properties": { "id": { "type": "string", - "description": "Uniquely identifies the participant", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "format": "uuid", + "example": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + "description": "Identifies the resource.", + "readOnly": true }, - "call_leg_id": { + "record_type": { "type": "string", - "description": "Uniquely identifies the call leg associated with the participant", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "example": "phone_numbers_job", + "description": "Identifies the type of the resource.", + "readOnly": true }, - "call_control_id": { + "status": { "type": "string", - "description": "Call Control ID associated with the partiipant of the conference", - "example": "v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ" - }, - "conference": { - "type": "object", - "description": "Info about the conference that the participant is in", - "properties": { - "id": { - "type": "string", - "description": "Uniquely identifies the conference", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" - }, - "name": { - "type": "string", - "description": "Name of the conference", - "example": "All hands meeting" - } - } + "enum": [ + "pending", + "in_progress", + "completed", + "failed", + "expired" + ], + "default": "pending", + "example": "pending", + "description": "Indicates the completion status of the background update.", + "readOnly": true }, - "whisper_call_control_ids": { - "description": "Array of unique call_control_ids the participant can whisper to..", - "example": [ - "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", - "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + "type": { + "type": "string", + "enum": [ + "update_emergency_settings", + "delete_phone_numbers" ], - "type": "array", - "items": { - "type": "string" - } + "example": "update_emergency_settings", + "description": "Identifies the type of the background job.", + "readOnly": true + }, + "etc": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the estimated time of completion of the background job.", + "readOnly": true }, "created_at": { "type": "string", - "description": "ISO 8601 formatted date of when the participant was created", - "example": "2019-01-23T18:10:02.574Z" + "description": "ISO 8601 formatted date indicating when the resource was created.", + "readOnly": true }, "updated_at": { "type": "string", - "description": "ISO 8601 formatted date of when the participant was last updated", - "example": "2019-01-23T18:10:02.574Z" - }, - "end_conference_on_exit": { - "type": "boolean", - "description": "Whether the conference will end and all remaining participants be hung up after the participant leaves the conference.", - "example": true - }, - "soft_end_conference_on_exit": { - "type": "boolean", - "description": "Whether the conference will end after the participant leaves the conference.", - "example": true + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "readOnly": true }, - "status": { + "created_by": { "type": "string", - "enum": [ - "joining", - "joined", - "left" - ], - "description": "The status of the participant with respect to the lifecycle within the conference", - "example": "joining" + "format": "uuid", + "example": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + "description": "Identifies the user which created the resource.", + "readOnly": true }, - "muted": { - "type": "boolean", - "description": "Whether the participant is muted.", - "example": true + "successful_operations": { + "type": "array", + "items": { + "description": "The phone numbers successfully updated.", + "$ref": "#/components/schemas/PhoneNumbersJobSuccessfulOperation" + }, + "readOnly": true }, - "on_hold": { - "type": "boolean", - "description": "Whether the participant is put on_hold.", - "example": true + "failed_operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhoneNumbersJobFailedOperation" + }, + "readOnly": true } }, "example": { - "record_type": "participant", - "created_at": "2019-01-23T18:10:02.574Z", - "updated_at": "2019-01-23T18:10:02.574Z", - "end_conference_on_exit": true, - "soft_end_conference_on_exit": true, - "status": "joining", - "muted": false, - "on_hold": true, - "call_control_id": "v2:v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQczRrZvZakpWxBlpw48KyZQ", - "whisper_call_control_ids": [ - "v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ", - "v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw" + "id": "42587e44-3a3e-46de-9255-0c9a7a1d1ec7", + "record_type": "phone_numbers_job", + "status": "pending", + "type": "update_emergency_settings", + "etc": "2020-10-30T18:10:00.000Z", + "created_at": "2020-10-23T18:10:00.000Z", + "updated_at": "2020-10-23T18:10:01.000Z", + "created_by": "015e81fc-11b7-4170-974d-5592ce987da7", + "successful_operations": [ + { + "id": "2637816387126861836", + "phone_number": "+19705555098" + }, + { + "id": "33081887126861836", + "phone_number": "+19715555098" + } ], - "id": "dfadada7-af74-47bc-83a4-554275f55f5c", - "call_leg_id": "3a15df2d-c801-4729-adf5-b56dd42e2abb", - "conference": { - "id": "41b9acd4-f4da-4ff5-a85c-e07e90b53f46", - "name": "1" - } + "failed_operations": [ + { + "id": "3388768018273", + "phone_number": "+19705551234", + "errors": [ + { + "code": "10015", + "title": "Bad Request", + "detail": "The field is invalid.", + "source": "/emergency_address_id" + } + ] + } + ] } }, - "PauseRecordingRequest": { + "PhoneNumbersJobDeletePhoneNumbersRequest": { "type": "object", - "title": "Pause Recording Request", + "required": [ + "phone_numbers" + ], "properties": { - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" - }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "phone_numbers": { + "type": "array", + "items": { + "type": "string", + "description": "The phone numbers or IDs to be updated." + } } + }, + "example": { + "phone_numbers": [ + "+19705555098", + "+19715555098", + "32873127836" + ] } }, - "PhoneNumber": { + "PhoneNumbersJobFailedOperation": { "properties": { - "id": { + "phone_number": { "type": "string", - "format": "uuid", - "example": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "readOnly": true + "description": "The phone number in e164 format.", + "format": "e164" }, - "record_type": { + "id": { "type": "string", - "example": "number_order_phone_number", - "readOnly": true + "format": "int64", + "description": "The phone number's ID" }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "PhoneNumbersJobSuccessfulOperation": { + "properties": { "phone_number": { "type": "string", - "format": "e164_phone_number", - "example": "+19705555098" + "description": "The phone number in e164 format.", + "format": "e164" }, - "regulatory_group_id": { + "id": { "type": "string", - "example": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "readOnly": true - }, - "regulatory_requirements": { + "format": "int64", + "description": "The phone number's ID" + } + } + }, + "PhoneNumbersJobUpdateEmergencySettingsRequest": { + "type": "object", + "required": [ + "emergency_enabled", + "emergency_address_id", + "phone_numbers" + ], + "properties": { + "phone_numbers": { "type": "array", "items": { - "$ref": "#/components/schemas/PhoneNumberRegulatoryRequirement" + "type": "string", + "description": "The phone numbers or IDs to be updated." } }, - "requirements_met": { + "emergency_enabled": { + "type": "boolean", + "description": "Indicates whether to enable emergency services on this number." + }, + "emergency_address_id": { + "type": "string", + "format": "int64", + "description": "Identifies the address to be used with emergency services." + } + }, + "example": { + "emergency_enabled": true, + "emergency_address_id": "53829456729313", + "phone_numbers": [ + "+19705555098", + "+19715555098", + "32873127836" + ] + } + }, + "PlayAudioUrlRequest": { + "type": "object", + "title": "Play Audio URL Request", + "required": [ + "audio_url" + ], + "properties": { + "audio_url": { + "description": "The URL of the file to be played back on the call. The URL can point to either a WAV or MP3 file.", + "type": "string", + "example": "http://www.example.com/sounds/greeting.wav" + }, + "loop": { + "description": "The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string `infinity` for an endless loop.", + "example": "infinity", + "default": 1, + "$ref": "#/components/schemas/Loopcount" + }, + "overlay": { + "description": "When enabled, audio will be mixed on top of any other audio that is actively being played back. Note that `overlay: true` will only work if there is another audio file already being played on the call.", "type": "boolean", - "description": "True if all requirements are met for a phone number, false otherwise.", "example": true, - "readOnly": true + "default": false + }, + "stop": { + "description": "When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue.", + "type": "string", + "example": "current" + }, + "target_legs": { + "description": "Specifies the leg or legs on which audio will be played. If supplied, the value must be either `self`, `opposite` or `both`.", + "type": "string", + "default": "self", + "example": "self" }, - "status": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "enum": [ - "pending", - "success", - "failure" - ], - "description": "The status of the phone number in the order.", - "readOnly": true + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, "example": { - "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "record_type": "number_order_phone_number", - "phone_number": "+19705555098", - "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", - "regulatory_requirements": [ - { - "record_type": "phone_number_regulatory_requirement", - "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", - "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", - "field_type": "address_id" - } - ], - "requirements_met": true, - "status": "success" + "audio_url": "http://www.example.com/sounds/greeting.wav", + "loop": "infinity", + "overlay": true, + "stop": "current", + "target_legs": "self", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "PhoneNumberDetailed": { + "PlaybackStopRequest": { "type": "object", - "example": { - "id": "1293384261075731499", - "record_type": "phone_number", - "phone_number": "+19705555098", - "status": "active", - "tags": [ - "tag_1", - "tag_2" - ], - "external_pin": "1234", - "connection_id": "1293384261075731499", - "connection_name": "connection-name", - "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000", - "messaging_profile_name": "regional-customers", - "billing_group_id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323", - "emergency_enabled": true, - "emergency_address_id": "1315261609962112019", - "call_forwarding_enabled": true, - "cnam_listing_enabled": true, - "caller_id_name_enabled": true, - "call_recording_enabled": true, - "t38_fax_gateway_enabled": true, - "purchased_at": "2019-10-23T18:10:00.000Z", - "created_at": "2019-10-23T18:10:00.000Z", - "updated_at": "2019-10-24T18:10:00.000Z" - }, + "title": "Playback Stop Request", "properties": { - "id": { - "$ref": "#/components/schemas/IntId" - }, - "record_type": { + "stop": { + "description": "Use `current` to stop only the current audio or `all` to stop all audios in the queue.", "type": "string", - "example": "phone_number", - "description": "Identifies the type of the resource.", - "readOnly": true + "default": "all", + "example": "current" }, - "phone_number": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "description": "The +E.164-formatted phone number associated with this record.", - "readOnly": true + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" }, - "status": { + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + } + }, + "example": { + "stop": "all", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + } + }, + "Recording": { + "type": "object", + "title": "Recording", + "required": [ + "record_type", + "id", + "created_at", + "updated_at", + "recording_started_at", + "recording_ended_at", + "duration_millis", + "status", + "channels", + "source", + "download_urls" + ], + "properties": { + "record_type": { "type": "string", - "description": "The phone number's current status.", "enum": [ - "purchase-pending", - "purchase-failed", - "port-pending", - "port-failed", - "active", - "deleted", - "emergency-only", - "ported-out", - "port-out-pending" + "recording" ], - "readOnly": true - }, - "tags": { - "type": "array", - "description": "A list of user-assigned tags to help manage the phone number.", - "items": { - "type": "string" - } - }, - "external_pin": { - "type": "string", - "description": "If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, Telnyx will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism." + "example": "recording" }, - "connection_name": { + "id": { "type": "string", - "description": "The user-assigned name of the connection to be associated with this phone number.", - "readOnly": true + "description": "Uniquely identifies the recording", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "connection_id": { + "created_at": { "type": "string", - "description": "Identifies the connection associated with the phone number." + "description": "ISO 8601 formatted date of when the recording was created", + "example": "2019-01-23T18:10:02.574Z" }, - "messaging_profile_id": { + "updated_at": { "type": "string", - "description": "Identifies the messaging profile associated with the phone number." + "description": "ISO 8601 formatted date of when the recording was last updated", + "example": "2019-01-23T18:10:02.574Z" }, - "messaging_profile_name": { + "recording_started_at": { "type": "string", - "description": "The name of the messaging profile associated with the phone number.", - "example": "regional-customers" + "description": "ISO 8601 formatted date of when the recording started", + "example": "2019-01-23T18:10:02.574Z" }, - "billing_group_id": { + "recording_ended_at": { "type": "string", - "description": "Identifies the billing group associated with the phone number." + "description": "ISO 8601 formatted date of when the recording ended", + "example": "2019-01-23T18:10:02.574Z" }, - "emergency_enabled": { - "type": "boolean", - "description": "Indicates whether emergency services are enabled for this number.", - "readOnly": true + "duration_millis": { + "description": "The duration of the recording in milliseconds", + "type": "integer", + "format": "int32", + "example": 60000 }, - "emergency_address_id": { + "status": { "type": "string", - "format": "int64", - "description": "Identifies the emergency address associated with the phone number.", - "readOnly": true - }, - "call_forwarding_enabled": { - "type": "boolean", - "default": true, - "description": "Indicates if call forwarding will be enabled for this number if forwards_to and forwarding_type are filled in. Defaults to true for backwards compatibility with APIV1 use of numbers endpoints.", - "readOnly": true - }, - "cnam_listing_enabled": { - "type": "boolean", - "description": "Indicates whether a CNAM listing is enabled for this number.", - "readOnly": true - }, - "caller_id_name_enabled": { - "type": "boolean", - "description": "Indicates whether caller ID is enabled for this number.", - "readOnly": true + "enum": [ + "completed" + ], + "description": "The status of the recording. Only resources for `completed` recordings are currently supported", + "example": "completed" }, - "call_recording_enabled": { - "type": "boolean", - "description": "Indicates whether call recording is enabled for this number.", - "readOnly": true + "channels": { + "type": "string", + "enum": [ + "single", + "dual" + ], + "description": "When `dual`, final audio file has the first leg on channel A, and the rest on channel B.", + "example": "single" }, - "t38_fax_gateway_enabled": { - "type": "boolean", - "description": "Indicates whether T38 Fax Gateway for inbound calls to this number.", - "readOnly": true + "source": { + "type": "string", + "enum": [ + "conference", + "call" + ], + "description": "The kind of event that led to this recording being created", + "example": "conference" }, - "purchased_at": { + "conference_id": { "type": "string", - "description": "ISO 8601 formatted date indicating when the resource was purchased.", - "readOnly": true + "description": "If a conference recording, uniquely identifies the recorded conference", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "created_at": { + "call_leg_id": { "type": "string", - "description": "ISO 8601 formatted date indicating when the resource was created.", - "readOnly": true + "description": "If a call recording, uniquely identifies the recorded call leg", + "example": "11111111-5717-4562-b3fc-2c963f66afa6" }, - "updated_at": { + "call_session_id": { "type": "string", - "description": "ISO 8601 formatted date indicating when the resource was updated.", - "readOnly": true + "description": "If a call recording, uniquely identifies the recorded call session", + "example": "22222222-5717-4562-b3fc-2c963f66afa6" + }, + "download_urls": { + "type": "object", + "description": "The links to download the recording files", + "properties": { + "mp3": { + "type": "string", + "description": "Link to download the recording in mp3 format" + }, + "wav": { + "type": "string", + "description": "Link to download the recording in wav format" + } + } + } + }, + "example": { + "record_type": "recording", + "id": "dfadada7-af74-47bc-83a4-554275f55f5c", + "created_at": "2019-03-29T13:10:00Z", + "updated_at": "2019-03-29T14:10:00Z", + "recording_started_at": "2019-03-29T11:10:00Z", + "recording_ended_at": "2019-03-29T12:10:00Z", + "duration_millis": 50000, + "status": "completed", + "channels": "single", + "source": "conference", + "conference_id": "41b9acd4-f4da-4ff5-a85c-e07e90b53f46", + "call_leg_id": "11111111-5717-4562-b3fc-2c963f66afa6", + "call_session_id": "22222222-5717-4562-b3fc-2c963f66afa6", + "download_urls": { + "mp3": "https://s3.amazonaws.com/some/path" } } }, - "PhoneNumberEnableEmergencyRequest": { + "ReferRequest": { "type": "object", + "title": "Refer request", "required": [ - "emergency_enabled", - "emergency_address_id" + "sip_address" ], "properties": { - "emergency_enabled": { - "type": "boolean", - "description": "Indicates whether to enable emergency services on this number." - }, - "emergency_address_id": { + "sip_address": { + "description": "The SIP URI to which the call will be referred to.", "type": "string", - "format": "int64", - "description": "Identifies the address to be used with emergency services." + "example": "sip:username@sip.non-telnyx-address.com" + }, + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "type": "string" + }, + "command_id": { + "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901", + "type": "string" + }, + "custom_headers": { + "description": "Custom headers to be added to the SIP INVITE.", + "type": "array", + "example": [ + { + "name": "head_1", + "value": "val_1" + }, + { + "name": "head_2", + "value": "val_2" + } + ], + "items": { + "$ref": "#/components/schemas/CustomSipHeader" + } + }, + "sip_auth_username": { + "description": "SIP Authentication username used for SIP challenges.", + "type": "string" + }, + "sip_auth_password": { + "description": "SIP Authentication password used for SIP challenges.", + "type": "string" } }, "example": { - "emergency_enabled": true, - "emergency_address_id": "53829456729313" + "sip_address": "sip:username@sip.non-telnyx-address.com" } }, - "PhoneNumberRegulatoryGroup": { + "RegionInformation": { "properties": { - "record_type": { - "type": "string", - "example": "phone_number_regulatory_requirement", - "readOnly": true - }, - "phone_number": { + "region_type": { "type": "string", - "format": "e164_phone_number", - "example": "+19705555098" + "example": "country_code", + "enum": [ + "country_code", + "rate_center", + "state", + "location" + ] }, - "regulatory_group_id": { + "region_name": { "type": "string", - "format": "uuid", - "example": "d70873cd-7c98-401a-81b6-b1ae08246995" - }, - "regulatory_requirements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RegulatoryRequirement" - } + "example": "US" } }, "example": { - "record_type": "phone_number_regulatory_requirement", - "phone_number": "+19705555098", - "regulatory_group_id": "d70873cd-7c98-401a-81b6-b1ae08246995", - "regulatory_requirements": [ - { - "record_type": "regulatory_requirement", - "requirement_type": "end user proof of address", - "label": "Proof of Address", - "field_type": "address", - "description": "Requirement for providing Proof of Address." - } - ] + "region_type": "country_code", + "region_name": "US" } }, - "PhoneNumberRegulatoryRequirement": { + "RegulatoryRequirement": { "properties": { "record_type": { "type": "string", - "example": "phone_number_regulatory_requirement", + "description": "Identifies the type of the resource.", + "example": "regulatory_requirement", "readOnly": true }, - "requirement_id": { + "requirement_type": { "type": "string", - "format": "uuid", - "description": "Unique id for a requirement.", - "example": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576" + "enum": [ + "end user proof of address", + "entity identification", + "end user address" + ] }, - "field_value": { + "label": { "type": "string", - "description": "The value of the requirement, this could be an id to a resource or a string value.", - "example": "45f45a04-b4be-4592-95b1-9306b9db2b21" + "example": "Proof of Address" }, "field_type": { "type": "string", "enum": [ - "string", - "datetime", - "address_id", - "number_order_document_id" - ], - "example": "address_id", - "readOnly": true + "file upload", + "text field", + "address", + "datetime" + ] + }, + "description": { + "type": "string", + "example": "Requirement for providing Proof of Address." } }, "example": { - "record_type": "phone_number_regulatory_requirement", - "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576", - "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21", - "field_type": "address_id" + "record_type": "regulatory_requirement", + "requirement_type": "end user proof of address", + "label": "Proof of Address", + "field_type": "address", + "description": "Requirement for providing Proof of Address." } }, - "PhoneNumberWithMessagingSettings": { - "type": "object", - "example": { - "record_type": "messaging_settings", - "id": "1293384261075731499", - "phone_number": "+18005550001", - "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2019-01-23T18:10:02.574Z", - "updated_at": "2019-01-23T18:10:02.574Z", - "country_code": "US", - "type": "toll-free", - "health": { - "message_count": 122, - "inbound_outbound_ratio": 0.43, - "success_ratio": 0.94, - "spam_ratio": 0.06 - }, - "eligible_messaging_products": [ - "A2P" - ], - "traffic_type": "A2P", - "messaging_product": "A2P", - "features": { - "sms": { - "domestic_two_way": true, - "international_inbound": true, - "international_outbound": true - }, - "mms": null - } - }, + "RegulatoryRequirementCriteria": { "properties": { "record_type": { "type": "string", - "example": "messaging_settings", - "enum": [ - "messaging_phone_number", - "messaging_settings" - ], - "description": "Identifies the type of the resource.", - "readOnly": true - }, - "id": { - "type": "string", - "description": "Identifies the type of resource.", + "example": "phone_number_regulatory_requirement_criteria", "readOnly": true }, - "phone_number": { + "criteria_type": { "type": "string", - "format": "e164", - "description": "+E.164 formatted phone number.", + "enum": [ + "country", + "phone_number_type" + ], "readOnly": true }, - "messaging_profile_id": { - "type": "string", - "nullable": true, - "description": "Unique identifier for a messaging profile." - }, - "created_at": { + "criteria_value": { "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the resource was created.", + "example": "AU", "readOnly": true - }, - "updated_at": { + } + }, + "example": { + "record_type": "phone_number_regulatory_requirement_criteria", + "criteria_type": "country", + "criteria_value": "AU" + } + }, + "RejectRequest": { + "type": "object", + "title": "Reject Request", + "required": [ + "cause" + ], + "properties": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the resource was updated.", - "readOnly": true + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" }, - "country_code": { + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", - "description": "ISO 3166-1 alpha-2 country code.", - "pattern": "^[A-Z]{2}$", - "example": "US", - "readOnly": true + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" }, - "type": { + "cause": { + "description": "Cause for call rejection.", "type": "string", - "description": "The type of the phone number", "enum": [ - "long-code", - "toll-free", - "short-code", - "longcode", - "tollfree", - "shortcode" + "CALL_REJECTED", + "USER_BUSY" ], - "readOnly": true - }, - "health": { - "$ref": "#/components/schemas/NumberHealthMetrics" + "example": "USER_BUSY" + } + }, + "example": { + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "cause": "USER_BUSY" + } + }, + "ReplacedLinkClick": { + "type": "object", + "properties": { + "record_type": { + "type": "string", + "example": "link_clicked", + "description": "Identifies the type of the resource." }, - "eligible_messaging_products": { - "type": "array", - "description": "The messaging products that this number can be registered to use", - "readOnly": true, - "items": { - "type": "string" - } + "url": { + "type": "string", + "example": "link_clicked", + "description": "The original link that was sent in the message." }, - "traffic_type": { + "to": { "type": "string", - "description": "The messaging traffic or use case for which the number is currently configured.", - "example": "P2P", - "readOnly": true + "format": "address", + "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code)." }, - "messaging_product": { + "message_id": { "type": "string", - "description": "The messaging product that the number is registered to use", - "example": "P2P" + "format": "uuid", + "description": "The message ID associated with the clicked link." }, - "features": { - "type": "object", - "readOnly": true, - "properties": { - "sms": { - "$ref": "#/components/schemas/MessagingFeatureSet" - }, - "mms": { - "$ref": "#/components/schemas/MessagingFeatureSet" - } - } + "time_clicked": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the message request was received." } + }, + "example": { + "record_type": "link_clicked", + "url": "https://telnyx.com", + "to": "18445550001", + "message_id": "7ee4241c-f127-47e5-9c34-3aac291f8058", + "time_clicked": "2019-04-01T14:45:45.450Z" } }, - "PhoneNumberWithVoiceSettings": { + "ReplacedLinkClickEvent": { "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ReplacedLinkClick" + } + } + }, + "ReservedPhoneNumber": { "properties": { "id": { "type": "string", - "example": "1293384261075731499", - "description": "Identifies the type of resource.", + "format": "uuid", + "example": "12ade33a-21c0-473b-b055-b3c836e1c292", "readOnly": true }, "record_type": { "type": "string", - "example": "voice_settings", - "description": "Identifies the type of the resource.", + "example": "reserved_phone_number", "readOnly": true }, "phone_number": { "type": "string", - "example": "+13035551234", - "description": "The phone number in +E164 format.", - "readOnly": true + "format": "e164_phone_number", + "example": "+19705555098" }, - "connection_id": { + "status": { "type": "string", - "example": "1d0e6cb8-8668-462e-94c6-49ae0f0ed48b", - "description": "Identifies the connection associated with this phone number." - }, - "tech_prefix_enabled": { - "type": "boolean", - "default": false, - "example": false, - "description": "Controls whether a tech prefix is enabled for this phone number." + "enum": [ + "pending", + "success", + "failure" + ], + "description": "The status of the phone number's reservation.", + "readOnly": true }, - "translated_number": { + "created_at": { "type": "string", - "example": "+13035559999", - "default": "", - "description": "This field allows you to rewrite the destination number of an inbound call before the call is routed to you. The value of this field may be any alphanumeric value, and the value will replace the number originally dialed." - }, - "call_forwarding": { - "$ref": "#/components/schemas/CallForwarding" - }, - "cnam_listing": { - "$ref": "#/components/schemas/CnamListing" - }, - "emergency": { - "$ref": "#/components/schemas/EmergencySettings" + "format": "datetime", + "description": "An ISO 8901 datetime string denoting when the individual number reservation was created.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true }, - "usage_payment_method": { + "updated_at": { "type": "string", - "enum": [ - "pay-per-minute", - "channel" - ], - "default": "pay-per-minute", - "example": "pay-per-minute", - "description": "Controls whether a number is billed per minute or uses your concurrent channels." + "format": "datetime", + "description": "An ISO 8901 datetime string for when the the individual number reservation was updated.", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true }, - "media_features": { - "$ref": "#/components/schemas/MediaFeatures" + "expired_at": { + "type": "string", + "format": "datetime", + "description": "An ISO 8901 datetime string for when the individual number reservation is going to expire", + "example": "2018-01-01T00:00:00.000000Z", + "readOnly": true }, - "call_recording": { - "$ref": "#/components/schemas/CallRecording" + "errors": { + "type": "string", + "description": "Errors the reservation could happen upon", + "example": "Number is already on hold", + "readOnly": true } }, "example": { - "id": "1293384261075731499", - "record_type": "voice_settings", - "connection_id": "1d0e6cb8-8668-462e-94c6-49ae0f0ed48b", - "tech_prefix_enabled": false, - "translated_number": "+13035559999", - "call_forwarding": { - "call_forwarding_enabled": true, - "forwards_to": "+13035559123", - "forwarding_type": "always" - }, - "cnam_listing": { - "cnam_listing_enabled": true, - "cnam_listing_details": "example" - }, - "emergency": { - "emergency_enabled": true, - "emergency_address_id": "1315261609962112019" - }, - "usage_payment_method": "pay-per-minute", - "media_features": { - "rtp_auto_adjust_enabled": true, - "media_handling_mode": "default", - "accept_any_rtp_packets_enabled": true, - "t38_fax_gateway_enabled": true - }, - "call_recording": { - "inbound_call_recording_enabled": true, - "inbound_call_recording_format": "wav", - "inbound_call_recording_channels": "single" - } + "id": "12ade33a-21c0-473b-b055-b3c836e1c292", + "record_type": "reserved_phone_number", + "phone_number": "+19705555098", + "status": "pending", + "created_at": "2018-01-01T00:00:00.000000Z", + "updated_at": "2018-01-01T00:00:00.000000Z", + "expired_at": "2018-01-01T00:00:00.000000Z" } }, - "PlayAudioUrlRequest": { + "ResumeRecordingRequest": { "type": "object", - "title": "Play Audio URL Request", - "required": [ - "audio_url" - ], + "title": "Pause Recording Request", "properties": { - "audio_url": { - "description": "The URL of the file to be played back on the call. The URL can point to either a WAV or MP3 file.", - "type": "string", - "example": "http://www.example.com/sounds/greeting.wav" - }, - "loop": { - "description": "The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string `infinity` for an endless loop.", - "example": "infinity", - "default": 1, - "$ref": "#/components/schemas/Loopcount" - }, - "overlay": { - "description": "When enabled, audio will be mixed on top of any other audio that is actively being played back. Note that `overlay: true` will only work if there is another audio file already being played on the call.", - "type": "boolean", - "example": true, - "default": false - }, - "stop": { - "description": "When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue.", - "type": "string", - "example": "current" - }, - "target_legs": { - "description": "Specifies the leg or legs on which audio will be played. If supplied, the value must be either `self`, `opposite` or `both`.", - "type": "string", - "default": "self", - "example": "self" - }, "client_state": { "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", @@ -14078,26 +19544,26 @@ "type": "string", "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } - }, - "example": { - "audio_url": "http://www.example.com/sounds/greeting.wav", - "loop": "infinity", - "overlay": true, - "stop": "current", - "target_legs": "self", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "PlaybackStopRequest": { + "SendDTMFRequest": { "type": "object", - "title": "Playback Stop Request", + "title": "Send DTMF Request", + "required": [ + "digits" + ], "properties": { - "stop": { - "description": "Use `current` to stop only the current audio or `all` to stop all audios in the queue.", + "digits": { + "description": "DTMF digits to send. Valid digits are 0-9, A-D, *, and #. Pauses can be added using w (0.5s) and W (1s).", "type": "string", - "default": "all", - "example": "current" + "example": "1www2WABCDw9" + }, + "duration_millis": { + "description": "Specifies for how many milliseconds each digit will be played in the audio stream. Ranges from 100 to 500ms", + "type": "integer", + "format": "int32", + "example": 500, + "default": 250 }, "client_state": { "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", @@ -14111,290 +19577,292 @@ } }, "example": { - "stop": "all", + "digits": "1www2WABCDw9", + "duration_millis": 500, "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "Recording": { + "ServicePlan": { + "type": "string", + "description": "Indicates the coverage of the termination regions. International and Global are the same but International may only be used for high volume/short duration Outbound Voice Profiles.", + "enum": [ + "us", + "international", + "global" + ], + "example": "global", + "default": "global" + }, + "ShortCode": { "type": "object", - "title": "Recording", "required": [ - "record_type", - "id", - "created_at", - "updated_at", - "recording_started_at", - "recording_ended_at", - "duration_millis", - "status", - "channels", - "source", - "download_urls" + "messaging_profile_id" ], + "example": { + "record_type": "short_code", + "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "short_code": "12345", + "country_code": "US", + "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2019-01-23T18:10:02.574Z", + "updated_at": "2019-01-23T18:10:02.574Z" + }, "properties": { "record_type": { "type": "string", + "example": "short_code", "enum": [ - "recording" + "short_code" ], - "example": "recording" + "description": "Identifies the type of the resource.", + "readOnly": true }, "id": { "type": "string", - "description": "Uniquely identifies the recording", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "format": "uuid", + "description": "Identifies the type of resource.", + "readOnly": true }, - "created_at": { + "short_code": { "type": "string", - "description": "ISO 8601 formatted date of when the recording was created", - "example": "2019-01-23T18:10:02.574Z" + "description": "Short digit sequence used to address messages.", + "readOnly": true }, - "updated_at": { + "country_code": { "type": "string", - "description": "ISO 8601 formatted date of when the recording was last updated", - "example": "2019-01-23T18:10:02.574Z" + "description": "ISO 3166-1 alpha-2 country code.", + "pattern": "^[A-Z]{2}$", + "example": "US", + "readOnly": true }, - "recording_started_at": { + "messaging_profile_id": { "type": "string", - "description": "ISO 8601 formatted date of when the recording started", - "example": "2019-01-23T18:10:02.574Z" + "nullable": true, + "description": "Unique identifier for a messaging profile." }, - "recording_ended_at": { + "created_at": { "type": "string", - "description": "ISO 8601 formatted date of when the recording ended", - "example": "2019-01-23T18:10:02.574Z" - }, - "duration_millis": { - "description": "The duration of the recording in milliseconds", - "type": "integer", - "format": "int32", - "example": 60000 + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the resource was created.", + "readOnly": true }, - "status": { + "updated_at": { "type": "string", - "enum": [ - "completed" - ], - "description": "The status of the recording. Only resources for `completed` recordings are currently supported", - "example": "completed" + "format": "date-time", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "readOnly": true + } + } + }, + "SpeakRequest": { + "type": "object", + "title": "Speak Request", + "required": [ + "payload", + "voice", + "language" + ], + "properties": { + "payload": { + "description": "The text or SSML to be converted into speech. There is a 5,000 character limit.", + "type": "string", + "example": "Say this on the call" }, - "channels": { + "payload_type": { + "description": "The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML).", + "default": "text", "type": "string", "enum": [ - "single", - "dual" + "text", + "ssml" ], - "description": "When `dual`, final audio file has the first leg on channel A, and the rest on channel B.", - "example": "single" + "example": "ssml" }, - "source": { + "service_level": { + "description": "This parameter impacts speech quality, language options and payload types. When using `basic`, only the `en-US` language and payload type `text` are allowed.", + "default": "premium", "type": "string", "enum": [ - "conference", - "call" + "basic", + "premium" ], - "description": "The kind of event that led to this recording being created", - "example": "conference" - }, - "conference_id": { - "type": "string", - "description": "If a conference recording, uniquely identifies the recorded conference", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" - }, - "call_leg_id": { - "type": "string", - "description": "If a call recording, uniquely identifies the recorded call leg", - "example": "11111111-5717-4562-b3fc-2c963f66afa6" + "example": "premium" }, - "call_session_id": { + "stop": { + "description": "When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue.", "type": "string", - "description": "If a call recording, uniquely identifies the recorded call session", - "example": "22222222-5717-4562-b3fc-2c963f66afa6" + "default": null, + "example": "current" }, - "download_urls": { - "type": "object", - "description": "The links to download the recording files", - "properties": { - "mp3": { - "type": "string", - "description": "Link to download the recording in mp3 format" - }, - "wav": { - "type": "string", - "description": "Link to download the recording in wav format" - } - } - } - }, - "example": { - "record_type": "recording", - "id": "dfadada7-af74-47bc-83a4-554275f55f5c", - "created_at": "2019-03-29T13:10:00Z", - "updated_at": "2019-03-29T14:10:00Z", - "recording_started_at": "2019-03-29T11:10:00Z", - "recording_ended_at": "2019-03-29T12:10:00Z", - "duration_millis": 50000, - "status": "completed", - "channels": "single", - "source": "conference", - "conference_id": "41b9acd4-f4da-4ff5-a85c-e07e90b53f46", - "call_leg_id": "11111111-5717-4562-b3fc-2c963f66afa6", - "call_session_id": "22222222-5717-4562-b3fc-2c963f66afa6", - "download_urls": { - "mp3": "https://s3.amazonaws.com/some/path" - } - } - }, - "ReferRequest": { - "type": "object", - "title": "Refer request", - "required": [ - "sip_address" - ], - "properties": { - "sip_address": { - "description": "The SIP URI to which the call will be referred to.", + "voice": { + "description": "The gender of the voice used to speak back the text.", "type": "string", - "example": "sip:username@sip.non-telnyx-address.com" - }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "type": "string" - }, - "command_id": { - "description": "Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same `command_id` as one that has already been executed.", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901", - "type": "string" - }, - "custom_headers": { - "description": "Custom headers to be added to the SIP INVITE.", - "type": "array", - "example": [ - { - "name": "head_1", - "value": "val_1" - }, - { - "name": "head_2", - "value": "val_2" - } + "enum": [ + "male", + "female" ], - "items": { - "$ref": "#/components/schemas/CustomSipHeader" - } + "example": "female" }, - "sip_auth_username": { - "description": "SIP Authentication username used for SIP challenges.", - "type": "string" + "language": { + "description": "The language you want spoken.", + "type": "string", + "enum": [ + "arb", + "cmn-CN", + "cy-GB", + "da-DK", + "de-DE", + "en-AU", + "en-GB", + "en-GB-WLS", + "en-IN", + "en-US", + "es-ES", + "es-MX", + "es-US", + "fr-CA", + "fr-FR", + "hi-IN", + "is-IS", + "it-IT", + "ja-JP", + "ko-KR", + "nb-NO", + "nl-NL", + "pl-PL", + "pt-BR", + "pt-PT", + "ro-RO", + "ru-RU", + "sv-SE", + "tr-TR" + ], + "example": "en-US" }, - "sip_auth_password": { - "description": "SIP Authentication password used for SIP challenges.", - "type": "string" - } - }, - "example": { - "sip_address": "sip:username@sip.non-telnyx-address.com" - } - }, - "RegionInformation": { - "properties": { - "region_type": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "example": "country_code", - "enum": [ - "country_code", - "rate_center", - "state", - "location" - ] + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" }, - "region_name": { + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", - "example": "US" + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, "example": { - "region_type": "country_code", - "region_name": "US" + "payload": "Say this on the call", + "payload_type": "text", + "service_level": "basic", + "stop": "current", + "voice": "female", + "language": "arb", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "RegulatoryRequirement": { + "StartForkingRequest": { + "type": "object", + "title": "Start Forking Request", "properties": { - "record_type": { + "target": { + "description": "The network target, , where the call's RTP media packets should be forwarded. Both incoming and outgoing media packets will be delivered to the specified target, and information about the stream will be included in the encapsulation protocol header, including the direction (0 = inbound; 1 = outbound), leg (0 = A-leg; 1 = B-leg), and call_leg_id.", "type": "string", - "description": "Identifies the type of the resource.", - "example": "regulatory_requirement", - "readOnly": true + "example": "udp:192.0.2.1:9000" }, - "requirement_type": { + "rx": { + "description": "The network target, , where the call's incoming RTP media packets should be forwarded.", + "type": "string", + "example": "192.0.2.1:9000" + }, + "stream_type": { + "description": "Optionally specify a media type to stream. If `decrpyted` selected, Telnyx will decrypt incoming SIP media before forking to the target. `rx` and `tx` are required fields if `decrypted` selected.", "type": "string", "enum": [ - "end user proof of address", - "entity identification", - "end user address" - ] + "raw", + "decrypted" + ], + "default": "raw", + "example": "decrypted" }, - "label": { + "tx": { + "description": "The network target, , where the call's outgoing RTP media packets should be forwarded.", "type": "string", - "example": "Proof of Address" + "example": "192.0.2.1:9001" }, - "field_type": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "enum": [ - "file upload", - "text field", - "address", - "datetime" - ] + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" }, - "description": { + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", - "example": "Requirement for providing Proof of Address." + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, "example": { - "record_type": "regulatory_requirement", - "requirement_type": "end user proof of address", - "label": "Proof of Address", - "field_type": "address", - "description": "Requirement for providing Proof of Address." + "target": "udp:192.0.2.1:9000", + "rx": "192.0.2.1:9000", + "tx": "192.0.2.1:9001", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "RegulatoryRequirementCriteria": { + "StartRecordingRequest": { + "type": "object", + "title": "Start Recording Request", + "required": [ + "format", + "channels" + ], "properties": { - "record_type": { + "format": { + "description": "The audio file format used when storing the call recording. Can be either `mp3` or `wav`.", "type": "string", - "example": "phone_number_regulatory_requirement_criteria", - "readOnly": true + "enum": [ + "wav", + "mp3" + ], + "example": "mp3" }, - "criteria_type": { - "type": "string", + "channels": { + "description": "When `dual`, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B.", "enum": [ - "country", - "phone_number_type" + "single", + "dual" ], - "readOnly": true + "type": "string", + "example": "single" }, - "criteria_value": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "example": "AU", - "readOnly": true + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + }, + "play_beep": { + "description": "If enabled, a beep sound will be played at the start of a recording.", + "type": "boolean", + "example": true } }, "example": { - "record_type": "phone_number_regulatory_requirement_criteria", - "criteria_type": "country", - "criteria_value": "AU" + "format": "wav", + "channels": "single", + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "play_beep": true } }, - "RejectRequest": { + "StopForkingRequest": { "type": "object", - "title": "Reject Request", - "required": [ - "cause" - ], + "title": "Stop Forking Request", "properties": { "client_state": { "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", @@ -14405,168 +19873,390 @@ "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", "example": "891510ac-f3e4-11e8-af5b-de00688a4901" - }, - "cause": { - "description": "Cause for call rejection.", - "type": "string", - "enum": [ - "CALL_REJECTED", - "USER_BUSY" - ], - "example": "USER_BUSY" } }, "example": { "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "cause": "USER_BUSY" + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "ReplacedLinkClick": { + "StopGatherRequest": { "type": "object", + "title": "Stop Gather Request", "properties": { - "record_type": { - "type": "string", - "example": "link_clicked", - "description": "Identifies the type of the resource." - }, - "url": { - "type": "string", - "example": "link_clicked", - "description": "The original link that was sent in the message." - }, - "to": { - "type": "string", - "format": "address", - "description": "Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code)." - }, - "message_id": { + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", "type": "string", - "format": "uuid", - "description": "The message ID associated with the clicked link." + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" }, - "time_clicked": { + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the message request was received." + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, "example": { - "record_type": "link_clicked", - "url": "https://telnyx.com", - "to": "18445550001", - "message_id": "7ee4241c-f127-47e5-9c34-3aac291f8058", - "time_clicked": "2019-04-01T14:45:45.450Z" + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "ReplacedLinkClickEvent": { + "StopRecordingRequest": { "type": "object", + "title": "Stop Recording Request", "properties": { - "data": { - "$ref": "#/components/schemas/ReplacedLinkClick" + "client_state": { + "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "type": "string", + "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + }, + "command_id": { + "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "type": "string", + "example": "891510ac-f3e4-11e8-af5b-de00688a4901" } + }, + "example": { + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } }, - "ReservedPhoneNumber": { + "TexmlApplication": { + "type": "object", + "title": "Texml Application", "properties": { "id": { - "type": "string", - "format": "uuid", - "example": "12ade33a-21c0-473b-b055-b3c836e1c292", - "readOnly": true + "$ref": "#/components/schemas/IntId" }, "record_type": { "type": "string", - "example": "reserved_phone_number", - "readOnly": true + "description": "Identifies the type of the resource.", + "example": "texml_application" }, - "phone_number": { + "friendly_name": { + "$ref": "#/components/schemas/ApplicationName" + }, + "active": { + "$ref": "#/components/schemas/ConnectionActive" + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "first_command_timeout": { + "$ref": "#/components/schemas/FirstCommandTimeout" + }, + "first_command_timeout_secs": { + "$ref": "#/components/schemas/FirstCommandTimeoutSecs" + }, + "voice_url": { "type": "string", - "format": "e164_phone_number", - "example": "+19705555098" + "description": "URL to which Telnyx will deliver your XML Translator webhooks.", + "format": "url", + "example": "https://example.com" + }, + "voice_fallback_url": { + "type": "string", + "description": "URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url.", + "default": null, + "format": "url", + "example": "https://fallback.example.com" }, - "status": { + "voice_method": { "type": "string", + "description": "HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'.", "enum": [ - "pending", - "success", - "failure" + "get", + "post" ], - "description": "The status of the phone number's reservation.", - "readOnly": true + "default": "post", + "example": "get" }, - "created_at": { + "status_callback": { "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string denoting when the individual number reservation was created.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true + "description": "URL for Telnyx to send requests to containing information about call progress events.", + "default": null, + "format": "url", + "example": "https://example.com" }, - "updated_at": { + "status_callback_method": { "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string for when the the individual number reservation was updated.", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true + "description": "HTTP request method Telnyx should use when requesting the status_callback URL.", + "enum": [ + "get", + "post" + ], + "default": "post", + "example": "get" }, - "expired_at": { - "type": "string", - "format": "datetime", - "description": "An ISO 8901 datetime string for when the individual number reservation is going to expire", - "example": "2018-01-01T00:00:00.000000Z", - "readOnly": true + "inbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 + }, + "sip_subdomain": { + "type": "string", + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", + "default": null, + "example": "example" + }, + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "default": "from_anyone", + "example": "only_my_connections" + } + } }, - "errors": { - "type": "string", - "description": "Errors the reservation could happen upon", - "example": "Number is already on hold", - "readOnly": true + "outbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 + }, + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" + } + } + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" } }, "example": { - "id": "12ade33a-21c0-473b-b055-b3c836e1c292", - "record_type": "reserved_phone_number", - "phone_number": "+19705555098", - "status": "pending", - "created_at": "2018-01-01T00:00:00.000000Z", - "updated_at": "2018-01-01T00:00:00.000000Z", - "expired_at": "2018-01-01T00:00:00.000000Z" - } - }, - "ResumeRecordingRequest": { - "type": "object", - "title": "Pause Recording Request", - "properties": { - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "id": "1293384261075731499", + "record_type": "texml_application", + "active": false, + "friendly_name": "call-router", + "anchorsite_override": "Amsterdam, Netherlands", + "dtmf_type": "Inband", + "first_command_timeout": true, + "first_command_timeout_secs": 10, + "voice_url": "https://example.com", + "voice_fallback_url": "https://fallback.example.com", + "voice_method": "get", + "status_callback": "https://example.com", + "status_callback_method": "get", + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" - } + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + }, + "created_at": "2020-02-02T22:25:27.521Z", + "updated_at": "2020-02-03T22:25:27.521Z" } }, - "SendDTMFRequest": { + "ToNumber": { + "type": "string", + "format": "address", + "description": "Receiving address (+E.164 formatted phone number or short code).", + "example": "+E.164" + }, + "TrafficType": { + "type": "string", + "description": "Specifies the type of traffic allowed in this profile.", + "enum": [ + "conversational", + "short_duration" + ], + "example": "conversational", + "default": "conversational" + }, + "TransferCallRequest": { "type": "object", - "title": "Send DTMF Request", + "title": "Transfer Call Request", "required": [ - "digits" + "to" ], + "example": { + "to": "+18005550100 or sip:username@sip.telnyx.com", + "from": "+18005550101", + "audio_url": "http://www.example.com/sounds/greeting.wav", + "timeout_secs": 60, + "timeout_limit_secs": 60, + "webhook_url": "https://www.example.com/server-b/", + "webhook_url_method": "POST", + "answering_machine_detection": "detect", + "answering_machine_detection_config": { + "total_analysis_time_millis": 5000, + "after_greeting_silence_millis": 1000, + "between_words_silence_millis": 1000, + "greeting_duration_millis": 1000, + "initial_silence_millis": 1000, + "maximum_number_of_words": 1000, + "maximum_word_length_millis": 2000, + "silence_threshold": 512, + "greeting_total_analysis_time_millis": 50000, + "greeting_silence_duration_millis": 2000 + }, + "custom_headers": [ + { + "name": "head_1", + "value": "val_1" + }, + { + "name": "head_2", + "value": "val_2" + } + ], + "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", + "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", + "sip_auth_username": "username", + "sip_auth_password": "password" + }, "properties": { - "digits": { - "description": "DTMF digits to send. Valid digits are 0-9, A-D, *, and #. Pauses can be added using w (0.5s) and W (1s).", + "to": { + "description": "The DID or SIP URI to dial out and bridge to the given call.", "type": "string", - "example": "1www2WABCDw9" + "example": "+18005550100 or sip:username@sip.telnyx.com" + }, + "from": { + "description": "The `from` number to be used as the caller id presented to the destination (`to` number). The number should be in +E164 format. This attribute will default to the `from` number of the original call if omitted.", + "type": "string", + "example": "+18005550101" + }, + "audio_url": { + "description": "Audio URL to be played back when the transfer destination answers before bridging the call. The URL can point to either a WAV or MP3 file.", + "type": "string", + "example": "http://www.example.com/sounds/greeting.wav" + }, + "timeout_secs": { + "description": "The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being transferred. If the timeout is reached before an answer is received, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be sent. Minimum value is 5 seconds. Maximum value is 120 seconds.", + "default": 30, + "type": "integer", + "example": 60, + "format": "int32" + }, + "time_limit_secs": { + "description": "Sets the maximum duration of a Call Control Leg in seconds. If the time limit is reached, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `time_limit` will be sent. For example, by setting a time limit of 120 seconds, a Call Leg will be automatically terminated two minutes after being answered. The default time limit is 14400 seconds or 4 hours and this is also the maximum allowed call length.", + "default": 14400, + "type": "integer", + "example": 600, + "format": "int32" + }, + "answering_machine_detection": { + "description": "Enables Answering Machine Detection. When a call is answered, Telnyx runs real-time detection to determine if it was picked up by a human or a machine and sends an `call.machine.detection.ended` webhook with the analysis result. If 'greeting_end' or 'detect_words' is used and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' webhook when the answering machine greeting ends with a beep or silence. If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' if a beep is detected.", + "default": "disabled", + "type": "string", + "enum": [ + "detect", + "detect_beep", + "detect_words", + "greeting_end", + "disabled" + ] + }, + "answering_machine_detection_config": { + "description": "Optional configuration parameters to modify 'answering_machine_detection' performance.", + "type": "object", + "properties": { + "total_analysis_time_millis": { + "description": "Maximum timeout threshold for overall detection.", + "default": 3500, + "type": "integer", + "example": 5000, + "format": "int32" + }, + "after_greeting_silence_millis": { + "description": "Silence duration threshold after a greeting message or voice for it be considered human.", + "default": 800, + "type": "integer", + "example": 1000, + "format": "int32" + }, + "between_words_silence_millis": { + "description": "Maximum threshold for silence between words.", + "default": 50, + "type": "integer", + "example": 100, + "format": "int32" + }, + "greeting_duration_millis": { + "description": "Maximum threshold of a human greeting. If greeting longer than this value, considered machine.", + "default": 3500, + "type": "integer", + "example": 1500, + "format": "int32" + }, + "initial_silence_millis": { + "description": "If initial silence duration is greater than this value, consider it a machine.", + "default": 3500, + "type": "integer", + "example": 1800, + "format": "int32" + }, + "maximum_number_of_words": { + "description": "If number of detected words is greater than this value, consder it a machine.", + "default": 5, + "type": "integer", + "example": 3, + "format": "int32" + }, + "maximum_word_length_millis": { + "description": "If a single word lasts longer than this threshold, consider it a machine.", + "default": 3500, + "type": "integer", + "example": 2000, + "format": "int32" + }, + "silence_threshold": { + "description": "Minimum noise threshold for any analysis.", + "default": 256, + "type": "integer", + "example": 512, + "format": "int32" + }, + "greeting_total_analysis_time_millis": { + "description": "If machine already detected, maximum timeout threshold to determine the end of the machine greeting.", + "default": 5000, + "type": "integer", + "example": 7500, + "format": "int32" + }, + "greeting_silence_duration_millis": { + "description": "If machine already detected, maximum threshold for silence between words. If exceeded, the greeting is considered ended.", + "default": 1500, + "type": "integer", + "example": 2000, + "format": "int32" + } + } }, - "duration_millis": { - "description": "Specifies for how many milliseconds each digit will be played in the audio stream. Ranges from 100 to 500ms", - "type": "integer", - "format": "int32", - "example": 500, - "default": 250 + "custom_headers": { + "description": "Custom headers to be added to the SIP INVITE.", + "type": "array", + "example": [ + { + "name": "head_1", + "value": "val_1" + }, + { + "name": "head_2", + "value": "val_2" + } + ], + "items": { + "$ref": "#/components/schemas/CustomSipHeader" + } }, "client_state": { "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", @@ -14577,625 +20267,587 @@ "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", "type": "string", "example": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "example": { - "digits": "1www2WABCDw9", - "duration_millis": 500, - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "ShortCode": { - "type": "object", - "required": [ - "messaging_profile_id" - ], - "example": { - "record_type": "short_code", - "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "short_code": "12345", - "country_code": "US", - "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2019-01-23T18:10:02.574Z", - "updated_at": "2019-01-23T18:10:02.574Z" - }, - "properties": { - "record_type": { - "type": "string", - "example": "short_code", - "enum": [ - "short_code" - ], - "description": "Identifies the type of the resource.", - "readOnly": true - }, - "id": { - "type": "string", - "format": "uuid", - "description": "Identifies the type of resource.", - "readOnly": true }, - "short_code": { - "type": "string", - "description": "Short digit sequence used to address messages.", - "readOnly": true - }, - "country_code": { + "sip_auth_username": { + "description": "SIP Authentication username used for SIP challenges.", "type": "string", - "description": "ISO 3166-1 alpha-2 country code.", - "pattern": "^[A-Z]{2}$", - "example": "US", - "readOnly": true + "example": "username" }, - "messaging_profile_id": { + "sip_auth_password": { + "description": "SIP Authentication password used for SIP challenges.", "type": "string", - "nullable": true, - "description": "Unique identifier for a messaging profile." + "example": "password" }, - "created_at": { + "webhook_url": { + "description": "Use this field to override the URL for which Telnyx will send subsuqeunt webhooks to for this call.", "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the resource was created.", - "readOnly": true + "example": "https://www.example.com/server-b/" }, - "updated_at": { + "webhook_url_method": { + "description": "HTTP request type used for `webhook_url`.", + "default": "POST", "type": "string", - "format": "date-time", - "description": "ISO 8601 formatted date indicating when the resource was updated.", - "readOnly": true + "enum": [ + "POST", + "GET" + ], + "example": "GET" } } }, - "SpeakRequest": { + "UpdateCallControlApplicationRequest": { "type": "object", - "title": "Speak Request", + "title": "Update Call Control Application Request", "required": [ - "payload", - "voice", - "language" + "application_name", + "webhook_event_url" ], "properties": { - "payload": { - "description": "The text or SSML to be converted into speech. There is a 5,000 character limit.", - "type": "string", - "example": "Say this on the call" - }, - "payload_type": { - "description": "The type of the provided payload. The payload can either be plain text, or Speech Synthesis Markup Language (SSML).", - "default": "text", + "application_name": { "type": "string", - "enum": [ - "text", - "ssml" - ], - "example": "ssml" + "description": "A user-assigned name to help manage the application.", + "example": "call-router" }, - "service_level": { - "description": "This parameter impacts speech quality, language options and payload types. When using `basic`, only the `en-US` language and payload type `text` are allowed.", - "default": "premium", + "webhook_event_url": { "type": "string", - "enum": [ - "basic", - "premium" - ], - "example": "premium" + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" }, - "stop": { - "description": "When specified, it stops the current audio being played. Specify `current` to stop the current audio being played, and to play the next file in the queue. Specify `all` to stop the current audio file being played and to also clear all audio files from the queue.", - "type": "string", - "default": null, - "example": "current" + "active": { + "type": "boolean", + "description": "Specifies whether the connection can be used.", + "default": true }, - "voice": { - "description": "The gender of the voice used to speak back the text.", + "anchorsite_override": { "type": "string", + "description": "Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.\n", "enum": [ - "male", - "female" + "\"Latency\"", + "\"Chicago, IL\"", + "\"Ashburn, VA\"", + "\"San Jose, CA\"" ], - "example": "female" + "example": "\"Amsterdam, Netherlands\"", + "default": "\"Latency\"" }, - "language": { - "description": "The language you want spoken.", + "dtmf_type": { "type": "string", + "description": "Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.", "enum": [ - "arb", - "cmn-CN", - "cy-GB", - "da-DK", - "de-DE", - "en-AU", - "en-GB", - "en-GB-WLS", - "en-IN", - "en-US", - "es-ES", - "es-MX", - "es-US", - "fr-CA", - "fr-FR", - "hi-IN", - "is-IS", - "it-IT", - "ja-JP", - "ko-KR", - "nb-NO", - "nl-NL", - "pl-PL", - "pt-BR", - "pt-PT", - "ro-RO", - "ru-RU", - "sv-SE", - "tr-TR" + "RFC 2833", + "Inband", + "SIP INFO" ], - "example": "en-US" + "example": "Inband", + "default": "RFC 2833" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "first_command_timeout": { + "type": "boolean", + "description": "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.", + "example": true, + "default": false }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "example": { - "payload": "Say this on the call", - "payload_type": "text", - "service_level": "basic", - "stop": "current", - "voice": "female", - "language": "arb", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "StartForkingRequest": { - "type": "object", - "title": "Start Forking Request", - "properties": { - "target": { - "description": "The network target, , where the call's RTP media packets should be forwarded. Both incoming and outgoing media packets will be delivered to the specified target, and information about the stream will be included in the encapsulation protocol header, including the direction (0 = inbound; 1 = outbound), leg (0 = A-leg; 1 = B-leg), and call_leg_id.", - "type": "string", - "example": "udp:192.0.2.1:9000" + "first_command_timeout_secs": { + "type": "integer", + "description": "Specifies how many seconds to wait before timing out a dial command.", + "example": 10, + "default": 30 }, - "rx": { - "description": "The network target, , where the call's incoming RTP media packets should be forwarded.", - "type": "string", - "example": "192.0.2.1:9000" + "inbound": { + "$ref": "#/components/schemas/CallControlApplicationInbound" }, - "stream_type": { - "description": "Optionally specify a media type to stream. If `decrpyted` selected, Telnyx will decrypt incoming SIP media before forking to the target. `rx` and `tx` are required fields if `decrypted` selected.", - "type": "string", - "enum": [ - "raw", - "decrypted" - ], - "default": "raw", - "example": "decrypted" + "outbound": { + "$ref": "#/components/schemas/CallControlApplicationOutbound" }, - "tx": { - "description": "The network target, , where the call's outgoing RTP media packets should be forwarded.", + "webhook_api_version": { "type": "string", - "example": "192.0.2.1:9001" + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "enum": [ + "1", + "2" + ], + "example": "1", + "default": "1" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "webhook_event_failover_url": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true } }, "example": { - "target": "udp:192.0.2.1:9000", - "rx": "192.0.2.1:9000", - "tx": "192.0.2.1:9001", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" + "application_name": "call-router", + "webhook_event_url": "https://example.com", + "active": false, + "anchorsite_override": "\"Latency\"", + "dtmf_type": "Inband", + "first_command_timeout": true, + "first_command_timeout_secs": 10, + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" + }, + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + }, + "webhook_api_version": "1", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_timeout_secs": 25 } }, - "StartRecordingRequest": { + "UpdateCredentialConnectionRequest": { "type": "object", - "title": "Start Recording Request", - "required": [ - "format", - "channels" - ], + "title": "Update Credential Connection Request", "properties": { - "format": { - "description": "The audio file format used when storing the call recording. Can be either `mp3` or `wav`.", - "type": "string", - "enum": [ - "wav", - "mp3" - ], - "example": "mp3" + "active": { + "type": "boolean", + "description": "Defaults to true" }, - "channels": { - "description": "When `dual`, final audio file will be stereo recorded with the first leg on channel A, and the rest on channel B.", - "enum": [ - "single", - "dual" - ], + "user_name": { "type": "string", - "example": "single" + "description": "The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters).", + "example": "myusername123" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "password": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "description": "The password to be used as part of the credentials. Must be 8 to 128 characters long.", + "example": "my123secure456password789" }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { + "type": "string" + }, + "sip_uri_calling_preference": { "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "default": "disabled", + "description": "This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).", + "enum": [ + "disabled", + "unrestricted", + "internal" + ] }, - "play_beep": { - "description": "If enabled, a beep sound will be played at the start of a recording.", + "default_on_hold_comfort_noise_enabled": { "type": "boolean", - "example": true - } - }, - "example": { - "format": "wav", - "channels": "single", - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "play_beep": true - } - }, - "StopForkingRequest": { - "type": "object", - "title": "Stop Forking Request", - "properties": { - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "default": false, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout." }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios." + }, + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings." + }, + "webhook_event_url": { "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "example": { - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "StopGatherRequest": { - "type": "object", - "title": "Stop Gather Request", - "properties": { - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" + }, + "webhook_event_failover_url": { "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", + "webhook_api_version": { "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "enum": [ + "1", + "2" + ], + "example": "1", + "default": "1" + }, + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true + }, + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" + }, + "inbound": { + "$ref": "#/components/schemas/CredentialInbound" + }, + "outbound": { + "$ref": "#/components/schemas/CredentialOutbound" } }, "example": { - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" - } - }, - "StopRecordingRequest": { - "type": "object", - "title": "Stop Recording Request", - "properties": { - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "active": true, + "password": "my123secure456password789", + "user_name": "myusername123", + "anchorsite_override": "Latency", + "connection_name": "my name", + "sip_uri_calling_preference": " disabled", + "default_on_hold_comfort_noise_enabled": false, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": true, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_seconds": 10 }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "inbound": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": "G722", + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 + }, + "outbound": { + "call_parking_enabled": true, + "ani_override": "always", + "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "US", + "t38_reinvite_source": "telnyx", + "outbound_voice_profile_id": "1293384261075731499" } - }, - "example": { - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901" } - }, - "ToNumber": { - "type": "string", - "format": "address", - "description": "Receiving address (+E.164 formatted phone number or short code).", - "example": "+E.164" - }, - "TransferCallRequest": { - "type": "object", - "title": "Transfer Call Request", - "required": [ - "to" - ], - "example": { - "to": "+18005550100 or sip:username@sip.telnyx.com", - "from": "+18005550101", - "audio_url": "http://www.example.com/sounds/greeting.wav", - "timeout_secs": 60, - "timeout_limit_secs": 60, - "webhook_url": "https://www.example.com/server-b/", - "webhook_url_method": "POST", - "answering_machine_detection": "detect", - "answering_machine_detection_config": { - "total_analysis_time_millis": 5000, - "after_greeting_silence_millis": 1000, - "between_words_silence_millis": 1000, - "greeting_duration_millis": 1000, - "initial_silence_millis": 1000, - "maximum_number_of_words": 1000, - "maximum_word_length_millis": 2000, - "silence_threshold": 512, - "greeting_total_analysis_time_millis": 50000, - "greeting_silence_duration_millis": 2000 - }, - "custom_headers": [ - { - "name": "head_1", - "value": "val_1" - }, - { - "name": "head_2", - "value": "val_2" - } - ], - "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d", - "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901", - "sip_auth_username": "username", - "sip_auth_password": "password" - }, + }, + "UpdateFaxApplicationRequest": { + "type": "object", + "title": "Update Fax Application Request", + "required": [ + "application_name", + "webhook_event_url" + ], "properties": { - "to": { - "description": "The DID or SIP URI to dial out and bridge to the given call.", - "type": "string", - "example": "+18005550100 or sip:username@sip.telnyx.com" + "application_name": { + "$ref": "#/components/schemas/ApplicationName" }, - "from": { - "description": "The `from` number to be used as the caller id presented to the destination (`to` number). The number should be in +E164 format. This attribute will default to the `from` number of the original call if omitted.", - "type": "string", - "example": "+18005550101" + "active": { + "$ref": "#/components/schemas/ConnectionActive" }, - "audio_url": { - "description": "Audio URL to be played back when the transfer destination answers before bridging the call. The URL can point to either a WAV or MP3 file.", - "type": "string", - "example": "http://www.example.com/sounds/greeting.wav" + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" }, - "timeout_secs": { - "description": "The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being transferred. If the timeout is reached before an answer is received, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `timeout` will be sent. Minimum value is 5 seconds. Maximum value is 120 seconds.", - "default": 30, - "type": "integer", - "example": 60, - "format": "int32" + "webhook_event_url": { + "$ref": "#/components/schemas/WebhookEventUrl" }, - "time_limit_secs": { - "description": "Sets the maximum duration of a Call Control Leg in seconds. If the time limit is reached, the call will hangup and a `call.hangup` webhook with a `hangup_cause` of `time_limit` will be sent. For example, by setting a time limit of 120 seconds, a Call Leg will be automatically terminated two minutes after being answered. The default time limit is 14400 seconds or 4 hours and this is also the maximum allowed call length.", - "default": 14400, - "type": "integer", - "example": 600, - "format": "int32" + "webhook_event_failover_url": { + "$ref": "#/components/schemas/WebhookEventFailoverUrl" }, - "answering_machine_detection": { - "description": "Enables Answering Machine Detection. When a call is answered, Telnyx runs real-time detection to determine if it was picked up by a human or a machine and sends an `call.machine.detection.ended` webhook with the analysis result. If 'greeting_end' or 'detect_words' is used and a 'machine' is detected, you will receive another 'call.machine.greeting.ended' webhook when the answering machine greeting ends with a beep or silence. If `detect_beep` is used, you will only receive 'call.machine.greeting.ended' if a beep is detected.", - "default": "disabled", - "type": "string", - "enum": [ - "detect", - "detect_beep", - "detect_words", - "greeting_end", - "disabled" - ] + "webhook_timeout_secs": { + "$ref": "#/components/schemas/WebhookTimeoutSecs" }, - "answering_machine_detection_config": { - "description": "Optional configuration parameters to modify 'answering_machine_detection' performance.", + "inbound": { "type": "object", "properties": { - "total_analysis_time_millis": { - "description": "Maximum timeout threshold for overall detection.", - "default": 3500, - "type": "integer", - "example": 5000, - "format": "int32" - }, - "after_greeting_silence_millis": { - "description": "Silence duration threshold after a greeting message or voice for it be considered human.", - "default": 800, - "type": "integer", - "example": 1000, - "format": "int32" - }, - "between_words_silence_millis": { - "description": "Maximum threshold for silence between words.", - "default": 50, - "type": "integer", - "example": 100, - "format": "int32" - }, - "greeting_duration_millis": { - "description": "Maximum threshold of a human greeting. If greeting longer than this value, considered machine.", - "default": 3500, - "type": "integer", - "example": 1500, - "format": "int32" - }, - "initial_silence_millis": { - "description": "If initial silence duration is greater than this value, consider it a machine.", - "default": 3500, - "type": "integer", - "example": 1800, - "format": "int32" - }, - "maximum_number_of_words": { - "description": "If number of detected words is greater than this value, consder it a machine.", - "default": 5, - "type": "integer", - "example": 3, - "format": "int32" - }, - "maximum_word_length_millis": { - "description": "If a single word lasts longer than this threshold, consider it a machine.", - "default": 3500, - "type": "integer", - "example": 2000, - "format": "int32" - }, - "silence_threshold": { - "description": "Minimum noise threshold for any analysis.", - "default": 256, + "channel_limit": { "type": "integer", - "example": 512, - "format": "int32" + "description": "When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - "greeting_total_analysis_time_millis": { - "description": "If machine already detected, maximum timeout threshold to determine the end of the machine greeting.", - "default": 5000, - "type": "integer", - "example": 7500, - "format": "int32" + "sip_subdomain": { + "type": "string", + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", + "default": null, + "example": "example" }, - "greeting_silence_duration_millis": { - "description": "If machine already detected, maximum threshold for silence between words. If exceeded, the greeting is considered ended.", - "default": 1500, - "type": "integer", - "example": 2000, - "format": "int32" + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "default": "from_anyone", + "example": "only_my_connections" } } }, - "custom_headers": { - "description": "Custom headers to be added to the SIP INVITE.", - "type": "array", - "example": [ - { - "name": "head_1", - "value": "val_1" + "outbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 }, - { - "name": "head_2", - "value": "val_2" + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" } - ], - "items": { - "$ref": "#/components/schemas/CustomSipHeader" } + } + }, + "example": { + "application_name": "fax-router", + "active": false, + "anchorsite_override": "Amsterdam, Netherlands", + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_timeout_secs": 25, + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" }, - "client_state": { - "description": "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", - "type": "string", - "example": "aGF2ZSBhIG5pY2UgZGF5ID1d" + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + } + } + }, + "UpdateFqdnConnectionRequest": { + "title": "Update Fqdn Connection Request", + "properties": { + "active": { + "type": "boolean", + "description": "Defaults to true" }, - "command_id": { - "description": "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same `command_id`.", - "type": "string", - "example": "891510ac-f3e4-11e8-af5b-de00688a4901" + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" }, - "sip_auth_username": { - "description": "SIP Authentication username used for SIP challenges.", - "type": "string", - "example": "username" + "connection_name": { + "type": "string" }, - "sip_auth_password": { - "description": "SIP Authentication password used for SIP challenges.", + "transport_protocol": { + "$ref": "#/components/schemas/FqdnConnectionTransportProtocol" + }, + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": true, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout." + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "encode_contact_header_enabled": { + "type": "boolean", + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios." + }, + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" + }, + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings." + }, + "webhook_event_url": { "type": "string", - "example": "password" + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" }, - "webhook_url": { - "description": "Use this field to override the URL for which Telnyx will send subsuqeunt webhooks to for this call.", + "webhook_event_failover_url": { "type": "string", - "example": "https://www.example.com/server-b/" + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, - "webhook_url_method": { - "description": "HTTP request type used for `webhook_url`.", - "default": "POST", + "webhook_api_version": { "type": "string", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", "enum": [ - "POST", - "GET" + "1", + "2" ], - "example": "GET" + "example": "1", + "default": "1" + }, + "webhook_timeout_secs": { + "type": "integer", + "minimum": 0, + "maximum": 30, + "description": "Specifies how many seconds to wait before timing out a webhook.", + "example": 25, + "default": null, + "nullable": true + }, + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" + }, + "inbound": { + "$ref": "#/components/schemas/InboundFqdn" + } + }, + "example": { + "active": true, + "anchorsite_override": "Latency", + "connection_name": "string", + "transport_protocol": "UDP", + "default_on_hold_comfort_noise_enabled": true, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": true, + "webhook_event_url": "https://example.com", + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_secs": 10 + }, + "inbound": { + "ani_number_format": "+E.164", + "dnis_number_format": "+e164", + "codecs": [ + "G722" + ], + "default_routing_method": "sequential", + "channel_limit": 10, + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "string", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 10 } } }, - "UpdateCallControlApplicationRequest": { + "UpdateFqdnRequest": { + "title": "Update Fqdn Request", "type": "object", - "title": "Update Call Control Application Request", - "required": [ - "application_name", - "webhook_event_url" - ], "properties": { - "application_name": { + "connection_id": { "type": "string", - "description": "A user-assigned name to help manage the application.", - "example": "call-router" + "description": "ID of the FQDN connection to which this IP should be attached." }, - "webhook_event_url": { + "fqdn": { "type": "string", - "format": "url", - "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", - "example": "https://example.com" + "description": "FQDN represented by this resource.", + "example": "example.com" }, + "port": { + "type": "integer", + "description": "Port to use when connecting to this FQDN.", + "default": 5060, + "example": 5060, + "nullable": true + }, + "dns_record_type": { + "type": "string", + "description": "The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used.", + "example": "a" + } + }, + "example": { + "connection_id": "1516447646313612565", + "fqdn": "example.com", + "port": 8080, + "dns_record_type": "a" + } + }, + "UpdateIpConnectionRequest": { + "title": "Update Ip Connection Request", + "properties": { "active": { "type": "boolean", - "description": "Specifies whether the connection can be used.", - "default": true + "description": "Defaults to true" }, "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "connection_name": { + "type": "string" + }, + "transport_protocol": { "type": "string", - "description": "Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.\n", + "description": "One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.", + "default": "UDP", "enum": [ - "\"Latency\"", - "\"Chicago, IL\"", - "\"Ashburn, VA\"", - "\"San Jose, CA\"" - ], - "example": "\"Amsterdam, Netherlands\"", - "default": "\"Latency\"" + "UDP", + "TCP", + "TLS" + ] + }, + "default_on_hold_comfort_noise_enabled": { + "type": "boolean", + "default": true, + "description": "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout." }, "dtmf_type": { - "type": "string", - "description": "Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.", - "enum": [ - "RFC 2833", - "Inband", - "SIP INFO" - ], - "example": "Inband", - "default": "RFC 2833" + "$ref": "#/components/schemas/DtmfType" }, - "first_command_timeout": { + "encode_contact_header_enabled": { "type": "boolean", - "description": "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.", - "example": true, - "default": false + "default": false, + "description": "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios." }, - "first_command_timeout_secs": { - "type": "integer", - "description": "Specifies how many seconds to wait before timing out a dial command.", - "example": 10, - "default": 30 + "encrypted_media": { + "$ref": "#/components/schemas/EncryptedMedia" }, - "inbound": { - "$ref": "#/components/schemas/CallControlApplicationInbound" + "onnet_t38_passthrough_enabled": { + "type": "boolean", + "default": false, + "description": "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings." }, - "outbound": { - "$ref": "#/components/schemas/CallControlApplicationOutbound" + "webhook_event_url": { + "type": "string", + "format": "url", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "example": "https://example.com" + }, + "webhook_event_failover_url": { + "type": "string", + "format": "url", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "example": "https://failover.example.com", + "nullable": true, + "default": "" }, "webhook_api_version": { "type": "string", @@ -15207,14 +20859,6 @@ "example": "1", "default": "1" }, - "webhook_event_failover_url": { - "type": "string", - "format": "url", - "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", - "example": "https://failover.example.com", - "nullable": true, - "default": "" - }, "webhook_timeout_secs": { "type": "integer", "minimum": 0, @@ -15223,28 +20867,99 @@ "example": 25, "default": null, "nullable": true + }, + "rtcp_settings": { + "$ref": "#/components/schemas/ConnectionRtcpSettings" + }, + "inbound": { + "$ref": "#/components/schemas/InboundIp" + }, + "outbound": { + "$ref": "#/components/schemas/OutboundIp" } }, "example": { - "application_name": "call-router", + "active": true, + "anchorsite_override": "Latency", + "connection_name": "string", + "transport_protocol": "UDP", + "default_on_hold_comfort_noise_enabled": true, + "dtmf_type": "RFC 2833", + "encode_contact_header_enabled": true, + "encrypted_media": "SRTP", + "onnet_t38_passthrough_enabled": false, "webhook_event_url": "https://example.com", - "active": false, - "anchorsite_override": "\"Latency\"", - "dtmf_type": "Inband", - "first_command_timeout": true, - "first_command_timeout_secs": 10, - "inbound": { + "webhook_event_failover_url": "https://failover.example.com", + "webhook_api_version": "1", + "webhook_timeout_secs": 25, + "rtcp_settings": { + "port": "rtcp-mux", + "capture_enabled": true, + "report_frequency_secs": 10 + }, + "inbound:": { + "ani_number_format": "+E.164", + "dns_number_format": "+e164", + "codecs": "G722", + "default_primary_ip_id": "192.168.0.0", + "default_tertiary_ip_id": "192.168.0.0", + "default_secondary_ip_id": "192.168.0.0", + "default_routing_method": "sequential", "channel_limit": 10, - "sip_subdomain": "example", - "sip_subdomain_receive_settings": "only_my_connections" + "generate_ringback_tone": true, + "isup_headers_enabled": true, + "prack_enabled": true, + "privacy_zone_enabled": true, + "sip_compact_headers_enabled": true, + "sip_region": "US", + "sip_subdomain": "test", + "sip_subdomain_receive_settings": "only_my_connections", + "timeout_1xx_secs": 10, + "timeout_2xx_secs": 20 }, "outbound": { + "call_parking_enabled": true, + "ani_override": "string", + "ani_override_type": "always", "channel_limit": 10, + "instant_ringback_enabled": true, + "generate_ringback_tone": true, + "localization": "string", + "t38_reinvite_source": "telnyx", + "tech_prefix": "string", + "ip_authentication_method": "token", + "ip_authentication_token": "string", "outbound_voice_profile_id": "1293384261075731499" + } + } + }, + "UpdateIpRequest": { + "title": "Update Ip Request", + "type": "object", + "required": [ + "ip_address" + ], + "properties": { + "connection_id": { + "type": "string", + "description": "ID of the IP Connection to which this IP should be attached." }, - "webhook_api_version": "1", - "webhook_event_failover_url": "https://failover.example.com", - "webhook_timeout_secs": 25 + "ip_address": { + "type": "string", + "description": "IP adddress represented by this resource.", + "example": "192.168.0.0" + }, + "port": { + "type": "integer", + "description": "Port to use when connecting to this IP.", + "default": 5060, + "example": 5060 + } + }, + "example": { + "connection_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "ip_address": "192.168.0.0", + "port": 5060 } }, "UpdateMessagingProfileRequest": { @@ -15497,6 +21212,110 @@ "requirements_met": true } }, + "UpdateOutboundVoiceProfileRequest": { + "type": "object", + "title": "Outbound Voice Profile", + "example": { + "name": "office", + "traffic_type": "conversational", + "service_plan": "global", + "concurrent_call_limit": 10, + "enabled": true, + "tags": [ + "office-profile" + ], + "usage_payment_method": "rate-deck", + "whitelisted_destinations": [ + "US", + "BR", + "AU" + ], + "max_destination_rate": 10, + "daily_spend_limit": "100.00", + "daily_spend_limit_enabled": true, + "billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58" + }, + "properties": { + "name": { + "type": "string", + "description": "A user-supplied name to help with organization.", + "example": "office", + "default": "" + }, + "traffic_type": { + "$ref": "#/components/schemas/TrafficType" + }, + "service_plan": { + "$ref": "#/components/schemas/ServicePlan" + }, + "concurrent_call_limit": { + "type": "integer", + "description": "Must be no more than your global concurrent call limit. Null means no limit.", + "example": 10, + "nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.", + "example": true, + "default": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "office-profile" + ] + }, + "usage_payment_method": { + "$ref": "#/components/schemas/UsagePaymentMethod" + }, + "whitelisted_destinations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.", + "example": [ + "US", + "BR", + "AU" + ], + "default": [ + "US", + "CA" + ] + }, + "max_destination_rate": { + "type": "number", + "description": "Maximum rate (price per minute) for a Destination to be allowed when making outbound calls." + }, + "daily_spend_limit": { + "type": "string", + "description": "The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.", + "example": "100.00" + }, + "daily_spend_limit_enabled": { + "type": "boolean", + "description": "Specifies whether to enforce the daily_spend_limit on this outbound voice profile.", + "example": true, + "default": false + }, + "call_recording": { + "$ref": "#/components/schemas/OutboundCallRecording" + }, + "billing_group_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).", + "example": "6a09cdc3-8948-47f0-aa62-74ac943d6c58", + "default": null, + "nullable": true + } + } + }, "UpdatePhoneNumberMessagingSettingsRequest": { "type": "object", "properties": { @@ -15534,6 +21353,11 @@ "type": "string", "description": "If someone attempts to port your phone number away from Telnyx and your phone number has an external PIN set, we will attempt to verify that you provided the correct external PIN to the winning carrier. Note that not all carriers cooperate with this security mechanism." }, + "customer_reference": { + "type": "string", + "description": "A customer reference string for customer look ups.", + "example": "MY REF 001" + }, "connection_id": { "type": "string", "description": "Identifies the connection associated with the phone number." @@ -15550,6 +21374,7 @@ ], "address_id": "dc8f39ac-953d-4520-b93b-786ae87db0da", "external_pin": "1234", + "customer_reference": "customer-reference", "connection_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494", "billing_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494" } @@ -15629,6 +21454,143 @@ "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000" } }, + "UpdateTexmlApplicationRequest": { + "type": "object", + "title": "Update Texml Application Request", + "required": [ + "friendly_name", + "voice_url" + ], + "properties": { + "friendly_name": { + "$ref": "#/components/schemas/ApplicationName" + }, + "active": { + "$ref": "#/components/schemas/ConnectionActive" + }, + "anchorsite_override": { + "$ref": "#/components/schemas/AnchorsiteOverride" + }, + "dtmf_type": { + "$ref": "#/components/schemas/DtmfType" + }, + "first_command_timeout": { + "$ref": "#/components/schemas/FirstCommandTimeout" + }, + "first_command_timeout_secs": { + "$ref": "#/components/schemas/FirstCommandTimeoutSecs" + }, + "voice_url": { + "type": "string", + "description": "URL to which Telnyx will deliver your XML Translator webhooks.", + "format": "url", + "example": "https://example.com" + }, + "voice_fallback_url": { + "type": "string", + "description": "URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url.", + "default": null, + "format": "url", + "example": "https://fallback.example.com" + }, + "voice_method": { + "type": "string", + "description": "HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'.", + "enum": [ + "get", + "post" + ], + "default": "post", + "example": "get" + }, + "status_callback": { + "type": "string", + "description": "URL for Telnyx to send requests to containing information about call progress events.", + "default": null, + "format": "url", + "example": "https://example.com" + }, + "status_callback_method": { + "type": "string", + "description": "HTTP request method Telnyx should use when requesting the status_callback URL.", + "enum": [ + "get", + "post" + ], + "default": "post", + "example": "get" + }, + "inbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 + }, + "sip_subdomain": { + "type": "string", + "description": "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.", + "default": null, + "example": "example" + }, + "sip_subdomain_receive_settings": { + "type": "string", + "description": "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).", + "enum": [ + "only_my_connections", + "from_anyone" + ], + "default": "from_anyone", + "example": "only_my_connections" + } + } + }, + "outbound": { + "type": "object", + "properties": { + "channel_limit": { + "type": "integer", + "description": "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.", + "default": null, + "example": 10 + }, + "outbound_voice_profile_id": { + "$ref": "#/components/schemas/OutboundVoiceProfileId" + } + } + } + }, + "example": { + "friendly_name": "call-router", + "active": false, + "anchorsite_override": "Amsterdam, Netherlands", + "dtmf_type": "Inband", + "first_command_timeout": true, + "first_command_timeout_secs": 10, + "voice_url": "https://example.com", + "voice_fallback_url": "https://fallback.example.com", + "voice_method": "get", + "status_callback": "https://example.com", + "status_callback_method": "get", + "inbound": { + "channel_limit": 10, + "sip_subdomain": "example", + "sip_subdomain_receive_settings": "only_my_connections" + }, + "outbound": { + "channel_limit": 10, + "outbound_voice_profile_id": "1293384261075731499" + } + } + }, + "UpdatedAt": { + "title": "Updated At", + "type": "string", + "description": "ISO 8601 formatted date indicating when the resource was updated.", + "example": "2020-02-03T22:25:27.521Z" + }, "UploadFileMessagingHostedNumberOrderRequest": { "type": "object", "example": { @@ -15683,6 +21645,53 @@ "replace_blacklist_only": true, "send_webhooks": false } + }, + "UsagePaymentMethod": { + "type": "string", + "description": "Setting for how costs for outbound profile are calculated.", + "enum": [ + "tariff", + "rate-deck" + ], + "example": "tariff", + "default": "rate-deck" + }, + "WebhookApiVersion": { + "title": "Webhook API Version", + "description": "Determines which webhook format will be used, Telnyx API v1 or v2.", + "type": "string", + "enum": [ + "1", + "2" + ], + "default": "1", + "example": "1" + }, + "WebhookEventFailoverUrl": { + "title": "Webhook Event Failover URL", + "description": "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.", + "type": "string", + "format": "url", + "default": "", + "nullable": true, + "example": "https://failover.example.com" + }, + "WebhookEventUrl": { + "title": "Webhook Event URL", + "description": "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.", + "type": "string", + "format": "url", + "example": "https://example.com" + }, + "WebhookTimeoutSecs": { + "title": "Webhook Timeout Secs", + "type": "integer", + "description": "Specifies how many seconds to wait before timing out a webhook.", + "minimum": 0, + "maximum": 30, + "nullable": true, + "default": null, + "example": 25 } }, "securitySchemes": { diff --git a/pom.xml b/pom.xml index ae85d067..45449119 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ telnyx jar telnyx - 2.2.0 + 2.3.0 https://github.com/team-telnyx/telnyx-java/ Telnyx Java SDK diff --git a/src/main/java/com/telnyx/sdk/api/CallControlApplicationsApi.java b/src/main/java/com/telnyx/sdk/api/CallControlApplicationsApi.java index 0a2d083c..89448935 100644 --- a/src/main/java/com/telnyx/sdk/api/CallControlApplicationsApi.java +++ b/src/main/java/com/telnyx/sdk/api/CallControlApplicationsApi.java @@ -192,7 +192,7 @@ public ApiResponse deleteCallControlApplicationW localVarAuthNames, localVarReturnType, false); } -private ApiResponse listCallControlApplicationsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterApplicationNameContains, String filterOutboundOutboundVoiceProfileId, String sort) throws ApiException { +private ApiResponse listCallControlApplicationsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterApplicationNameContains, String filterOutboundVoiceProfileId, String sort) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -207,7 +207,7 @@ private ApiResponse listCallControlApplicat localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[application_name][contains]", filterApplicationNameContains)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[outbound.outbound_voice_profile_id]", filterOutboundOutboundVoiceProfileId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[outbound_voice_profile_id]", filterOutboundVoiceProfileId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); @@ -236,7 +236,7 @@ public class APIlistCallControlApplicationsRequest { private Integer pageNumber; private Integer pageSize; private String filterApplicationNameContains; - private String filterOutboundOutboundVoiceProfileId; + private String filterOutboundVoiceProfileId; private String sort; private APIlistCallControlApplicationsRequest() { @@ -244,7 +244,7 @@ private APIlistCallControlApplicationsRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistCallControlApplicationsRequest */ public APIlistCallControlApplicationsRequest pageNumber(Integer pageNumber) { @@ -254,7 +254,7 @@ public APIlistCallControlApplicationsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistCallControlApplicationsRequest */ public APIlistCallControlApplicationsRequest pageSize(Integer pageSize) { @@ -273,12 +273,12 @@ public APIlistCallControlApplicationsRequest filterApplicationNameContains(Strin } /** - * Set filterOutboundOutboundVoiceProfileId - * @param filterOutboundOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * Set filterOutboundVoiceProfileId + * @param filterOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) * @return APIlistCallControlApplicationsRequest */ - public APIlistCallControlApplicationsRequest filterOutboundOutboundVoiceProfileId(String filterOutboundOutboundVoiceProfileId) { - this.filterOutboundOutboundVoiceProfileId = filterOutboundOutboundVoiceProfileId; + public APIlistCallControlApplicationsRequest filterOutboundVoiceProfileId(String filterOutboundVoiceProfileId) { + this.filterOutboundVoiceProfileId = filterOutboundVoiceProfileId; return this; } @@ -326,7 +326,7 @@ public ListCallControlApplicationsResponse execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return listCallControlApplicationsWithHttpInfo(pageNumber, pageSize, filterApplicationNameContains, filterOutboundOutboundVoiceProfileId, sort); + return listCallControlApplicationsWithHttpInfo(pageNumber, pageSize, filterApplicationNameContains, filterOutboundVoiceProfileId, sort); } } diff --git a/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java b/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java index 98ecb20e..33108fc8 100644 --- a/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java +++ b/src/main/java/com/telnyx/sdk/api/ConferenceCommandsApi.java @@ -1029,7 +1029,7 @@ public APIlistConferenceParticipantsRequest filterWhispering(Boolean filterWhisp /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistConferenceParticipantsRequest */ public APIlistConferenceParticipantsRequest pageNumber(Integer pageNumber) { @@ -1039,7 +1039,7 @@ public APIlistConferenceParticipantsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistConferenceParticipantsRequest */ public APIlistConferenceParticipantsRequest pageSize(Integer pageSize) { @@ -1156,7 +1156,7 @@ public APIlistConferencesRequest filterName(String filterName) { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistConferencesRequest */ public APIlistConferencesRequest pageNumber(Integer pageNumber) { @@ -1166,7 +1166,7 @@ public APIlistConferencesRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistConferencesRequest */ public APIlistConferencesRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/ConnectionsApi.java b/src/main/java/com/telnyx/sdk/api/ConnectionsApi.java new file mode 100644 index 00000000..c27e60e6 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/ConnectionsApi.java @@ -0,0 +1,273 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.ConnectionResponse; +import com.telnyx.sdk.model.ListConnectionsResponse; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConnectionsApi { + private ApiClient apiClient; + + public ConnectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ConnectionsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + +private ApiResponse listConnectionsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterConnectionNameContains, String filterOutboundVoiceProfileId, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/connections"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[connection_name][contains]", filterConnectionNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[outbound_voice_profile_id]", filterOutboundVoiceProfileId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("ConnectionsApi.listConnections", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistConnectionsRequest { + private Integer pageNumber; + private Integer pageSize; + private String filterConnectionNameContains; + private String filterOutboundVoiceProfileId; + private String sort; + + private APIlistConnectionsRequest() { + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistConnectionsRequest + */ + public APIlistConnectionsRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistConnectionsRequest + */ + public APIlistConnectionsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterConnectionNameContains + * @param filterConnectionNameContains If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @return APIlistConnectionsRequest + */ + public APIlistConnectionsRequest filterConnectionNameContains(String filterConnectionNameContains) { + this.filterConnectionNameContains = filterConnectionNameContains; + return this; + } + + /** + * Set filterOutboundVoiceProfileId + * @param filterOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * @return APIlistConnectionsRequest + */ + public APIlistConnectionsRequest filterOutboundVoiceProfileId(String filterOutboundVoiceProfileId) { + this.filterOutboundVoiceProfileId = filterOutboundVoiceProfileId; + return this; + } + + /** + * Set sort + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return APIlistConnectionsRequest + */ + public APIlistConnectionsRequest sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Execute listConnections request + * @return ListConnectionsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + + public ListConnectionsResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listConnections request with HTTP info returned + * @return ApiResponse<ListConnectionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listConnectionsWithHttpInfo(pageNumber, pageSize, filterConnectionNameContains, filterOutboundVoiceProfileId, sort); + } + } + + /** + * List connections + * Returns a list of your connections irrespective of type. + * @return listConnectionsRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistConnectionsRequest listConnections() throws ApiException { + return new APIlistConnectionsRequest(); + } + /** + * Retrieve a connection + * Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type. + * @param id IP Connection ID (required) + * @return ConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ConnectionResponse retrieveConnection(String id) throws ApiException { + return retrieveConnectionWithHttpInfo(id).getData(); + } + + /** + * Retrieve a connection + * Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type. + * @param id IP Connection ID (required) + * @return ApiResponse<ConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse retrieveConnectionWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrieveConnection"); + } + + // create path and map variables + String localVarPath = "/connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("ConnectionsApi.retrieveConnection", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/CredentialConnectionsApi.java b/src/main/java/com/telnyx/sdk/api/CredentialConnectionsApi.java new file mode 100644 index 00000000..04fc0c05 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/CredentialConnectionsApi.java @@ -0,0 +1,499 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.CreateCredentialConnectionRequest; +import com.telnyx.sdk.model.CredentialConnectionResponse; +import com.telnyx.sdk.model.ListCredentialConnectionsResponse; +import com.telnyx.sdk.model.UpdateCredentialConnectionRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CredentialConnectionsApi { + private ApiClient apiClient; + + public CredentialConnectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public CredentialConnectionsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create a credential connection + * Creates a credential connection. + * @param createCredentialConnectionRequest Parameters that can be defined during credential connection creation (required) + * @return CredentialConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response with details about a credential connection. -
422 Bad request -
+ */ + public CredentialConnectionResponse createCredentialConnection(CreateCredentialConnectionRequest createCredentialConnectionRequest) throws ApiException { + return createCredentialConnectionWithHttpInfo(createCredentialConnectionRequest).getData(); + } + + /** + * Create a credential connection + * Creates a credential connection. + * @param createCredentialConnectionRequest Parameters that can be defined during credential connection creation (required) + * @return ApiResponse<CredentialConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response with details about a credential connection. -
422 Bad request -
+ */ + public ApiResponse createCredentialConnectionWithHttpInfo(CreateCredentialConnectionRequest createCredentialConnectionRequest) throws ApiException { + Object localVarPostBody = createCredentialConnectionRequest; + + // verify the required parameter 'createCredentialConnectionRequest' is set + if (createCredentialConnectionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createCredentialConnectionRequest' when calling createCredentialConnection"); + } + + // create path and map variables + String localVarPath = "/credential_connections"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("CredentialConnectionsApi.createCredentialConnection", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete a credential connection + * Deletes an existing credential connection. + * @param id Identifies the resource. (required) + * @return CredentialConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a credential connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public CredentialConnectionResponse deleteCredentialConnection(String id) throws ApiException { + return deleteCredentialConnectionWithHttpInfo(id).getData(); + } + + /** + * Delete a credential connection + * Deletes an existing credential connection. + * @param id Identifies the resource. (required) + * @return ApiResponse<CredentialConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a credential connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse deleteCredentialConnectionWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteCredentialConnection"); + } + + // create path and map variables + String localVarPath = "/credential_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("CredentialConnectionsApi.deleteCredentialConnection", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + +private ApiResponse listCredentialConnectionsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterConnectionNameContains, String filterOutboundOutboundVoiceProfileId, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/credential_connections"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[connection_name][contains]", filterConnectionNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[outbound.outbound_voice_profile_id]", filterOutboundOutboundVoiceProfileId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("CredentialConnectionsApi.listCredentialConnections", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistCredentialConnectionsRequest { + private Integer pageNumber; + private Integer pageSize; + private String filterConnectionNameContains; + private String filterOutboundOutboundVoiceProfileId; + private String sort; + + private APIlistCredentialConnectionsRequest() { + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistCredentialConnectionsRequest + */ + public APIlistCredentialConnectionsRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistCredentialConnectionsRequest + */ + public APIlistCredentialConnectionsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterConnectionNameContains + * @param filterConnectionNameContains If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @return APIlistCredentialConnectionsRequest + */ + public APIlistCredentialConnectionsRequest filterConnectionNameContains(String filterConnectionNameContains) { + this.filterConnectionNameContains = filterConnectionNameContains; + return this; + } + + /** + * Set filterOutboundOutboundVoiceProfileId + * @param filterOutboundOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * @return APIlistCredentialConnectionsRequest + */ + public APIlistCredentialConnectionsRequest filterOutboundOutboundVoiceProfileId(String filterOutboundOutboundVoiceProfileId) { + this.filterOutboundOutboundVoiceProfileId = filterOutboundOutboundVoiceProfileId; + return this; + } + + /** + * Set sort + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return APIlistCredentialConnectionsRequest + */ + public APIlistCredentialConnectionsRequest sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Execute listCredentialConnections request + * @return ListCredentialConnectionsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of credential connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + + public ListCredentialConnectionsResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listCredentialConnections request with HTTP info returned + * @return ApiResponse<ListCredentialConnectionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of credential connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listCredentialConnectionsWithHttpInfo(pageNumber, pageSize, filterConnectionNameContains, filterOutboundOutboundVoiceProfileId, sort); + } + } + + /** + * List credential connections + * Returns a list of your credential connections. + * @return listCredentialConnectionsRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistCredentialConnectionsRequest listCredentialConnections() throws ApiException { + return new APIlistCredentialConnectionsRequest(); + } + /** + * Retrieve a credential connection + * Retrieves the details of an existing credential connection. + * @param id Identifies the resource. (required) + * @return CredentialConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a credential connection. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ */ + public CredentialConnectionResponse retrieveCredentialConnection(String id) throws ApiException { + return retrieveCredentialConnectionWithHttpInfo(id).getData(); + } + + /** + * Retrieve a credential connection + * Retrieves the details of an existing credential connection. + * @param id Identifies the resource. (required) + * @return ApiResponse<CredentialConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a credential connection. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ */ + public ApiResponse retrieveCredentialConnectionWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrieveCredentialConnection"); + } + + // create path and map variables + String localVarPath = "/credential_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("CredentialConnectionsApi.retrieveCredentialConnection", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update a credential connection + * Updates settings of an existing credential connection. + * @param id Identifies the resource. (required) + * @param updateCredentialConnectionRequest Parameters that can be updated in a credential connection (required) + * @return CredentialConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a credential connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public CredentialConnectionResponse updateCredentialConnection(String id, UpdateCredentialConnectionRequest updateCredentialConnectionRequest) throws ApiException { + return updateCredentialConnectionWithHttpInfo(id, updateCredentialConnectionRequest).getData(); + } + + /** + * Update a credential connection + * Updates settings of an existing credential connection. + * @param id Identifies the resource. (required) + * @param updateCredentialConnectionRequest Parameters that can be updated in a credential connection (required) + * @return ApiResponse<CredentialConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about a credential connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse updateCredentialConnectionWithHttpInfo(String id, UpdateCredentialConnectionRequest updateCredentialConnectionRequest) throws ApiException { + Object localVarPostBody = updateCredentialConnectionRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateCredentialConnection"); + } + + // verify the required parameter 'updateCredentialConnectionRequest' is set + if (updateCredentialConnectionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'updateCredentialConnectionRequest' when calling updateCredentialConnection"); + } + + // create path and map variables + String localVarPath = "/credential_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("CredentialConnectionsApi.updateCredentialConnection", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/CsvDownloadsApi.java b/src/main/java/com/telnyx/sdk/api/CsvDownloadsApi.java index f2398bad..9dab848f 100644 --- a/src/main/java/com/telnyx/sdk/api/CsvDownloadsApi.java +++ b/src/main/java/com/telnyx/sdk/api/CsvDownloadsApi.java @@ -156,7 +156,7 @@ private APIlistCsvDownloadsRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistCsvDownloadsRequest */ public APIlistCsvDownloadsRequest pageNumber(Integer pageNumber) { @@ -166,7 +166,7 @@ public APIlistCsvDownloadsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistCsvDownloadsRequest */ public APIlistCsvDownloadsRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/DebuggingApi.java b/src/main/java/com/telnyx/sdk/api/DebuggingApi.java index 2421e53f..e096f0db 100644 --- a/src/main/java/com/telnyx/sdk/api/DebuggingApi.java +++ b/src/main/java/com/telnyx/sdk/api/DebuggingApi.java @@ -202,7 +202,7 @@ public APIlistCallEventsRequest filterEventTimestampEq(String filterEventTimesta /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistCallEventsRequest */ public APIlistCallEventsRequest pageNumber(Integer pageNumber) { @@ -212,7 +212,7 @@ public APIlistCallEventsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistCallEventsRequest */ public APIlistCallEventsRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/FqdNsApi.java b/src/main/java/com/telnyx/sdk/api/FqdNsApi.java new file mode 100644 index 00000000..d7cc2989 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/FqdNsApi.java @@ -0,0 +1,495 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.CreateFqdnRequest; +import com.telnyx.sdk.model.FqdnResponse; +import com.telnyx.sdk.model.ListFqdnsResponse; +import com.telnyx.sdk.model.UpdateFqdnRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FqdNsApi { + private ApiClient apiClient; + + public FqdNsApi() { + this(Configuration.getDefaultApiClient()); + } + + public FqdNsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create an Fqdn + * Create a new FQDN object. + * @param createFqdnRequest (optional) + * @return FqdnResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public FqdnResponse createFqdn(CreateFqdnRequest createFqdnRequest) throws ApiException { + return createFqdnWithHttpInfo(createFqdnRequest).getData(); + } + + /** + * Create an Fqdn + * Create a new FQDN object. + * @param createFqdnRequest (optional) + * @return ApiResponse<FqdnResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse createFqdnWithHttpInfo(CreateFqdnRequest createFqdnRequest) throws ApiException { + Object localVarPostBody = createFqdnRequest; + + // create path and map variables + String localVarPath = "/fqdns"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdNsApi.createFqdn", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete an Fqdn + * Delete an FQDN. + * @param id Identifies the resource. (required) + * @return FqdnResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public FqdnResponse deleteFqdn(String id) throws ApiException { + return deleteFqdnWithHttpInfo(id).getData(); + } + + /** + * Delete an Fqdn + * Delete an FQDN. + * @param id Identifies the resource. (required) + * @return ApiResponse<FqdnResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse deleteFqdnWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteFqdn"); + } + + // create path and map variables + String localVarPath = "/fqdns/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdNsApi.deleteFqdn", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + +private ApiResponse listFqdnsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterConnectionId, String filterFqdn, Integer filterPort, String filterDnsRecordType) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fqdns"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[connection_id]", filterConnectionId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[fqdn]", filterFqdn)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[port]", filterPort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[dns_record_type]", filterDnsRecordType)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdNsApi.listFqdns", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistFqdnsRequest { + private Integer pageNumber; + private Integer pageSize; + private String filterConnectionId; + private String filterFqdn; + private Integer filterPort; + private String filterDnsRecordType; + + private APIlistFqdnsRequest() { + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistFqdnsRequest + */ + public APIlistFqdnsRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistFqdnsRequest + */ + public APIlistFqdnsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterConnectionId + * @param filterConnectionId ID of the FQDN connection to which the FQDN belongs. (optional) + * @return APIlistFqdnsRequest + */ + public APIlistFqdnsRequest filterConnectionId(String filterConnectionId) { + this.filterConnectionId = filterConnectionId; + return this; + } + + /** + * Set filterFqdn + * @param filterFqdn FQDN represented by the resource. (optional) + * @return APIlistFqdnsRequest + */ + public APIlistFqdnsRequest filterFqdn(String filterFqdn) { + this.filterFqdn = filterFqdn; + return this; + } + + /** + * Set filterPort + * @param filterPort Port to use when connecting to the FQDN. (optional) + * @return APIlistFqdnsRequest + */ + public APIlistFqdnsRequest filterPort(Integer filterPort) { + this.filterPort = filterPort; + return this; + } + + /** + * Set filterDnsRecordType + * @param filterDnsRecordType DNS record type used by the FQDN. (optional) + * @return APIlistFqdnsRequest + */ + public APIlistFqdnsRequest filterDnsRecordType(String filterDnsRecordType) { + this.filterDnsRecordType = filterDnsRecordType; + return this; + } + + /** + * Execute listFqdns request + * @return ListFqdnsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with a list of FQDN connections. -
400 Bad request -
401 Unauthorized -
+ + */ + + public ListFqdnsResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listFqdns request with HTTP info returned + * @return ApiResponse<ListFqdnsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with a list of FQDN connections. -
400 Bad request -
401 Unauthorized -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listFqdnsWithHttpInfo(pageNumber, pageSize, filterConnectionId, filterFqdn, filterPort, filterDnsRecordType); + } + } + + /** + * List Fqdns + * Get all FQDNs belonging to the user that match the given filters. + * @return listFqdnsRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistFqdnsRequest listFqdns() throws ApiException { + return new APIlistFqdnsRequest(); + } + /** + * Retrieve an Fqdn + * Return the details regarding a specific FQDN. + * @param id Identifies the resource. (required) + * @return FqdnResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public FqdnResponse retrieveFqdn(String id) throws ApiException { + return retrieveFqdnWithHttpInfo(id).getData(); + } + + /** + * Retrieve an Fqdn + * Return the details regarding a specific FQDN. + * @param id Identifies the resource. (required) + * @return ApiResponse<FqdnResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse retrieveFqdnWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrieveFqdn"); + } + + // create path and map variables + String localVarPath = "/fqdns/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdNsApi.retrieveFqdn", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update an Fqdn + * Update the details of a specific FQDN. + * @param id Identifies the resource. (required) + * @param updateFqdnRequest (optional) + * @return FqdnResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public FqdnResponse updateFqdn(String id, UpdateFqdnRequest updateFqdnRequest) throws ApiException { + return updateFqdnWithHttpInfo(id, updateFqdnRequest).getData(); + } + + /** + * Update an Fqdn + * Update the details of a specific FQDN. + * @param id Identifies the resource. (required) + * @param updateFqdnRequest (optional) + * @return ApiResponse<FqdnResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse updateFqdnWithHttpInfo(String id, UpdateFqdnRequest updateFqdnRequest) throws ApiException { + Object localVarPostBody = updateFqdnRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateFqdn"); + } + + // create path and map variables + String localVarPath = "/fqdns/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdNsApi.updateFqdn", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/FqdnConnectionsApi.java b/src/main/java/com/telnyx/sdk/api/FqdnConnectionsApi.java new file mode 100644 index 00000000..9410cd4f --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/FqdnConnectionsApi.java @@ -0,0 +1,487 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.CreateFqdnConnectionRequest; +import com.telnyx.sdk.model.FqdnConnectionResponse; +import com.telnyx.sdk.model.ListFqdnConnectionsResponse; +import com.telnyx.sdk.model.UpdateFqdnConnectionRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FqdnConnectionsApi { + private ApiClient apiClient; + + public FqdnConnectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public FqdnConnectionsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create an Fqdn connection + * Creates a FQDN connection. + * @param createFqdnConnectionRequest Parameters that can be defined during FQDN connection creation (required) + * @return FqdnConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response with details about an FQDN connection. -
422 Bad request -
+ */ + public FqdnConnectionResponse createFqdnConnection(CreateFqdnConnectionRequest createFqdnConnectionRequest) throws ApiException { + return createFqdnConnectionWithHttpInfo(createFqdnConnectionRequest).getData(); + } + + /** + * Create an Fqdn connection + * Creates a FQDN connection. + * @param createFqdnConnectionRequest Parameters that can be defined during FQDN connection creation (required) + * @return ApiResponse<FqdnConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response with details about an FQDN connection. -
422 Bad request -
+ */ + public ApiResponse createFqdnConnectionWithHttpInfo(CreateFqdnConnectionRequest createFqdnConnectionRequest) throws ApiException { + Object localVarPostBody = createFqdnConnectionRequest; + + // verify the required parameter 'createFqdnConnectionRequest' is set + if (createFqdnConnectionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createFqdnConnectionRequest' when calling createFqdnConnection"); + } + + // create path and map variables + String localVarPath = "/fqdn_connections"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdnConnectionsApi.createFqdnConnection", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete an Fqdn connection + * Deletes an FQDN connection. + * @param id FQDN Connection ID (required) + * @return FqdnConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public FqdnConnectionResponse deleteFqdnConnection(String id) throws ApiException { + return deleteFqdnConnectionWithHttpInfo(id).getData(); + } + + /** + * Delete an Fqdn connection + * Deletes an FQDN connection. + * @param id FQDN Connection ID (required) + * @return ApiResponse<FqdnConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse deleteFqdnConnectionWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteFqdnConnection"); + } + + // create path and map variables + String localVarPath = "/fqdn_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdnConnectionsApi.deleteFqdnConnection", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + +private ApiResponse listFqdnConnectionsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterConnectionNameContains, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fqdn_connections"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[connection_name][contains]", filterConnectionNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdnConnectionsApi.listFqdnConnections", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistFqdnConnectionsRequest { + private Integer pageNumber; + private Integer pageSize; + private String filterConnectionNameContains; + private String sort; + + private APIlistFqdnConnectionsRequest() { + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistFqdnConnectionsRequest + */ + public APIlistFqdnConnectionsRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistFqdnConnectionsRequest + */ + public APIlistFqdnConnectionsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterConnectionNameContains + * @param filterConnectionNameContains If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @return APIlistFqdnConnectionsRequest + */ + public APIlistFqdnConnectionsRequest filterConnectionNameContains(String filterConnectionNameContains) { + this.filterConnectionNameContains = filterConnectionNameContains; + return this; + } + + /** + * Set sort + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return APIlistFqdnConnectionsRequest + */ + public APIlistFqdnConnectionsRequest sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Execute listFqdnConnections request + * @return ListFqdnConnectionsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of FQDN connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + + public ListFqdnConnectionsResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listFqdnConnections request with HTTP info returned + * @return ApiResponse<ListFqdnConnectionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of FQDN connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listFqdnConnectionsWithHttpInfo(pageNumber, pageSize, filterConnectionNameContains, sort); + } + } + + /** + * List Fqdn connections + * Returns a list of your FQDN connections. + * @return listFqdnConnectionsRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistFqdnConnectionsRequest listFqdnConnections() throws ApiException { + return new APIlistFqdnConnectionsRequest(); + } + /** + * Retrieve an Fqdn connection + * Retrieves the details of an existing FQDN connection. + * @param id FQDN Connection ID (required) + * @return FqdnConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public FqdnConnectionResponse retrieveFqdnConnection(String id) throws ApiException { + return retrieveFqdnConnectionWithHttpInfo(id).getData(); + } + + /** + * Retrieve an Fqdn connection + * Retrieves the details of an existing FQDN connection. + * @param id FQDN Connection ID (required) + * @return ApiResponse<FqdnConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse retrieveFqdnConnectionWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrieveFqdnConnection"); + } + + // create path and map variables + String localVarPath = "/fqdn_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdnConnectionsApi.retrieveFqdnConnection", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update an Fqdn connection + * Updates settings of an existing FQDN connection. + * @param id FQDN Connection ID (required) + * @param updateFqdnConnectionRequest Parameters that can be updated in a FQDN connection (required) + * @return FqdnConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public FqdnConnectionResponse updateFqdnConnection(String id, UpdateFqdnConnectionRequest updateFqdnConnectionRequest) throws ApiException { + return updateFqdnConnectionWithHttpInfo(id, updateFqdnConnectionRequest).getData(); + } + + /** + * Update an Fqdn connection + * Updates settings of an existing FQDN connection. + * @param id FQDN Connection ID (required) + * @param updateFqdnConnectionRequest Parameters that can be updated in a FQDN connection (required) + * @return ApiResponse<FqdnConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an FQDN connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse updateFqdnConnectionWithHttpInfo(String id, UpdateFqdnConnectionRequest updateFqdnConnectionRequest) throws ApiException { + Object localVarPostBody = updateFqdnConnectionRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateFqdnConnection"); + } + + // verify the required parameter 'updateFqdnConnectionRequest' is set + if (updateFqdnConnectionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'updateFqdnConnectionRequest' when calling updateFqdnConnection"); + } + + // create path and map variables + String localVarPath = "/fqdn_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FqdnConnectionsApi.updateFqdnConnection", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/IPsApi.java b/src/main/java/com/telnyx/sdk/api/IPsApi.java new file mode 100644 index 00000000..3ed1de26 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/IPsApi.java @@ -0,0 +1,484 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.CreateIpRequest; +import com.telnyx.sdk.model.IpResponse; +import com.telnyx.sdk.model.ListIpsResponse; +import java.util.UUID; +import com.telnyx.sdk.model.UpdateIpRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IPsApi { + private ApiClient apiClient; + + public IPsApi() { + this(Configuration.getDefaultApiClient()); + } + + public IPsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create an Ip + * Create a new IP object. + * @param createIpRequest (optional) + * @return IpResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public IpResponse createIp(CreateIpRequest createIpRequest) throws ApiException { + return createIpWithHttpInfo(createIpRequest).getData(); + } + + /** + * Create an Ip + * Create a new IP object. + * @param createIpRequest (optional) + * @return ApiResponse<IpResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse createIpWithHttpInfo(CreateIpRequest createIpRequest) throws ApiException { + Object localVarPostBody = createIpRequest; + + // create path and map variables + String localVarPath = "/ips"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IPsApi.createIp", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete an Ip + * Delete an IP. + * @param id Identifies the type of resource. (required) + * @return IpResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public IpResponse deleteIp(UUID id) throws ApiException { + return deleteIpWithHttpInfo(id).getData(); + } + + /** + * Delete an Ip + * Delete an IP. + * @param id Identifies the type of resource. (required) + * @return ApiResponse<IpResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse deleteIpWithHttpInfo(UUID id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteIp"); + } + + // create path and map variables + String localVarPath = "/ips/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IPsApi.deleteIp", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + +private ApiResponse listIpsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterConnectionId, String filterIpAddress, Integer filterPort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/ips"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[connection_id]", filterConnectionId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[ip_address]", filterIpAddress)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[port]", filterPort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IPsApi.listIps", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistIpsRequest { + private Integer pageNumber; + private Integer pageSize; + private String filterConnectionId; + private String filterIpAddress; + private Integer filterPort; + + private APIlistIpsRequest() { + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistIpsRequest + */ + public APIlistIpsRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistIpsRequest + */ + public APIlistIpsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterConnectionId + * @param filterConnectionId ID of the IP Connection to which this IP should be attached. (optional) + * @return APIlistIpsRequest + */ + public APIlistIpsRequest filterConnectionId(String filterConnectionId) { + this.filterConnectionId = filterConnectionId; + return this; + } + + /** + * Set filterIpAddress + * @param filterIpAddress IP adddress represented by this resource. (optional) + * @return APIlistIpsRequest + */ + public APIlistIpsRequest filterIpAddress(String filterIpAddress) { + this.filterIpAddress = filterIpAddress; + return this; + } + + /** + * Set filterPort + * @param filterPort Port to use when connecting to this IP. (optional) + * @return APIlistIpsRequest + */ + public APIlistIpsRequest filterPort(Integer filterPort) { + this.filterPort = filterPort; + return this; + } + + /** + * Execute listIps request + * @return ListIpsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with a list of IPs. -
400 Bad request -
401 Unauthorized -
+ + */ + + public ListIpsResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listIps request with HTTP info returned + * @return ApiResponse<ListIpsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with a list of IPs. -
400 Bad request -
401 Unauthorized -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listIpsWithHttpInfo(pageNumber, pageSize, filterConnectionId, filterIpAddress, filterPort); + } + } + + /** + * List Ips + * Get all IPs belonging to the user that match the given filters. + * @return listIpsRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistIpsRequest listIps() throws ApiException { + return new APIlistIpsRequest(); + } + /** + * Retrieve an Ip + * Return the details regarding a specific IP. + * @param id Identifies the type of resource. (required) + * @return IpResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public IpResponse retrieveIp(UUID id) throws ApiException { + return retrieveIpWithHttpInfo(id).getData(); + } + + /** + * Retrieve an Ip + * Return the details regarding a specific IP. + * @param id Identifies the type of resource. (required) + * @return ApiResponse<IpResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse retrieveIpWithHttpInfo(UUID id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrieveIp"); + } + + // create path and map variables + String localVarPath = "/ips/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IPsApi.retrieveIp", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update an Ip + * Update the details of a specific IP. + * @param id Identifies the type of resource. (required) + * @param updateIpRequest (optional) + * @return IpResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public IpResponse updateIp(UUID id, UpdateIpRequest updateIpRequest) throws ApiException { + return updateIpWithHttpInfo(id, updateIpRequest).getData(); + } + + /** + * Update an Ip + * Update the details of a specific IP. + * @param id Identifies the type of resource. (required) + * @param updateIpRequest (optional) + * @return ApiResponse<IpResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP. -
400 Bad request -
401 Unauthorized -
+ */ + public ApiResponse updateIpWithHttpInfo(UUID id, UpdateIpRequest updateIpRequest) throws ApiException { + Object localVarPostBody = updateIpRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateIp"); + } + + // create path and map variables + String localVarPath = "/ips/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IPsApi.updateIp", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/IpConnectionsApi.java b/src/main/java/com/telnyx/sdk/api/IpConnectionsApi.java new file mode 100644 index 00000000..b3b127b0 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/IpConnectionsApi.java @@ -0,0 +1,499 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.CreateIpConnectionRequest; +import com.telnyx.sdk.model.IpConnectionResponse; +import com.telnyx.sdk.model.ListIpConnectionsResponse; +import com.telnyx.sdk.model.UpdateIpConnectionRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IpConnectionsApi { + private ApiClient apiClient; + + public IpConnectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public IpConnectionsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create an Ip connection + * Creates an IP connection. + * @param createIpConnectionRequest Parameters that can be defined during IP connection creation (required) + * @return IpConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response with details about an IP connection. -
422 Bad request -
+ */ + public IpConnectionResponse createIpConnection(CreateIpConnectionRequest createIpConnectionRequest) throws ApiException { + return createIpConnectionWithHttpInfo(createIpConnectionRequest).getData(); + } + + /** + * Create an Ip connection + * Creates an IP connection. + * @param createIpConnectionRequest Parameters that can be defined during IP connection creation (required) + * @return ApiResponse<IpConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response with details about an IP connection. -
422 Bad request -
+ */ + public ApiResponse createIpConnectionWithHttpInfo(CreateIpConnectionRequest createIpConnectionRequest) throws ApiException { + Object localVarPostBody = createIpConnectionRequest; + + // verify the required parameter 'createIpConnectionRequest' is set + if (createIpConnectionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createIpConnectionRequest' when calling createIpConnection"); + } + + // create path and map variables + String localVarPath = "/ip_connections"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IpConnectionsApi.createIpConnection", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete an Ip connection + * Deletes an existing IP connection. + * @param id Identifies the type of resource. (required) + * @return IpConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public IpConnectionResponse deleteIpConnection(String id) throws ApiException { + return deleteIpConnectionWithHttpInfo(id).getData(); + } + + /** + * Delete an Ip connection + * Deletes an existing IP connection. + * @param id Identifies the type of resource. (required) + * @return ApiResponse<IpConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse deleteIpConnectionWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteIpConnection"); + } + + // create path and map variables + String localVarPath = "/ip_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IpConnectionsApi.deleteIpConnection", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + +private ApiResponse listIpConnectionsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterConnectionNameContains, String filterOutboundOutboundVoiceProfileId, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/ip_connections"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[connection_name][contains]", filterConnectionNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[outbound.outbound_voice_profile_id]", filterOutboundOutboundVoiceProfileId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IpConnectionsApi.listIpConnections", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistIpConnectionsRequest { + private Integer pageNumber; + private Integer pageSize; + private String filterConnectionNameContains; + private String filterOutboundOutboundVoiceProfileId; + private String sort; + + private APIlistIpConnectionsRequest() { + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistIpConnectionsRequest + */ + public APIlistIpConnectionsRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistIpConnectionsRequest + */ + public APIlistIpConnectionsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterConnectionNameContains + * @param filterConnectionNameContains If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @return APIlistIpConnectionsRequest + */ + public APIlistIpConnectionsRequest filterConnectionNameContains(String filterConnectionNameContains) { + this.filterConnectionNameContains = filterConnectionNameContains; + return this; + } + + /** + * Set filterOutboundOutboundVoiceProfileId + * @param filterOutboundOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * @return APIlistIpConnectionsRequest + */ + public APIlistIpConnectionsRequest filterOutboundOutboundVoiceProfileId(String filterOutboundOutboundVoiceProfileId) { + this.filterOutboundOutboundVoiceProfileId = filterOutboundOutboundVoiceProfileId; + return this; + } + + /** + * Set sort + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return APIlistIpConnectionsRequest + */ + public APIlistIpConnectionsRequest sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Execute listIpConnections request + * @return ListIpConnectionsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of IP connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + + public ListIpConnectionsResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listIpConnections request with HTTP info returned + * @return ApiResponse<ListIpConnectionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with a list of IP connections. -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listIpConnectionsWithHttpInfo(pageNumber, pageSize, filterConnectionNameContains, filterOutboundOutboundVoiceProfileId, sort); + } + } + + /** + * List Ip connections + * Returns a list of your IP connections. + * @return listIpConnectionsRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistIpConnectionsRequest listIpConnections() throws ApiException { + return new APIlistIpConnectionsRequest(); + } + /** + * Retrieve an Ip connection + * Retrieves the details of an existing ip connection. + * @param id IP Connection ID (required) + * @return IpConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public IpConnectionResponse retrieveIpConnection(String id) throws ApiException { + return retrieveIpConnectionWithHttpInfo(id).getData(); + } + + /** + * Retrieve an Ip connection + * Retrieves the details of an existing ip connection. + * @param id IP Connection ID (required) + * @return ApiResponse<IpConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse retrieveIpConnectionWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrieveIpConnection"); + } + + // create path and map variables + String localVarPath = "/ip_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IpConnectionsApi.retrieveIpConnection", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update an Ip connection + * Updates settings of an existing IP connection. + * @param id Identifies the type of resource. (required) + * @param updateIpConnectionRequest Parameters that can be updated in a IP connection (required) + * @return IpConnectionResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public IpConnectionResponse updateIpConnection(String id, UpdateIpConnectionRequest updateIpConnectionRequest) throws ApiException { + return updateIpConnectionWithHttpInfo(id, updateIpConnectionRequest).getData(); + } + + /** + * Update an Ip connection + * Updates settings of an existing IP connection. + * @param id Identifies the type of resource. (required) + * @param updateIpConnectionRequest Parameters that can be updated in a IP connection (required) + * @return ApiResponse<IpConnectionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response with details about an IP connection. -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse updateIpConnectionWithHttpInfo(String id, UpdateIpConnectionRequest updateIpConnectionRequest) throws ApiException { + Object localVarPostBody = updateIpConnectionRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateIpConnection"); + } + + // verify the required parameter 'updateIpConnectionRequest' is set + if (updateIpConnectionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'updateIpConnectionRequest' when calling updateIpConnection"); + } + + // create path and map variables + String localVarPath = "/ip_connections/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("IpConnectionsApi.updateIpConnection", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/MessagingHostedNumberApi.java b/src/main/java/com/telnyx/sdk/api/MessagingHostedNumberApi.java index 46374d73..0060e3ec 100644 --- a/src/main/java/com/telnyx/sdk/api/MessagingHostedNumberApi.java +++ b/src/main/java/com/telnyx/sdk/api/MessagingHostedNumberApi.java @@ -231,7 +231,7 @@ private APIlistMessagingHostedNumberOrderRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistMessagingHostedNumberOrderRequest */ public APIlistMessagingHostedNumberOrderRequest pageNumber(Integer pageNumber) { @@ -241,7 +241,7 @@ public APIlistMessagingHostedNumberOrderRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistMessagingHostedNumberOrderRequest */ public APIlistMessagingHostedNumberOrderRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/MessagingProfilesApi.java b/src/main/java/com/telnyx/sdk/api/MessagingProfilesApi.java index 5da43ef3..c71d63dd 100644 --- a/src/main/java/com/telnyx/sdk/api/MessagingProfilesApi.java +++ b/src/main/java/com/telnyx/sdk/api/MessagingProfilesApi.java @@ -244,7 +244,7 @@ private APIlistMessagingProfileMetricsRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistMessagingProfileMetricsRequest */ public APIlistMessagingProfileMetricsRequest pageNumber(Integer pageNumber) { @@ -254,7 +254,7 @@ public APIlistMessagingProfileMetricsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistMessagingProfileMetricsRequest */ public APIlistMessagingProfileMetricsRequest pageSize(Integer pageSize) { @@ -382,7 +382,7 @@ private APIlistMessagingProfilePhoneNumbersRequest(UUID id) { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistMessagingProfilePhoneNumbersRequest */ public APIlistMessagingProfilePhoneNumbersRequest pageNumber(Integer pageNumber) { @@ -392,7 +392,7 @@ public APIlistMessagingProfilePhoneNumbersRequest pageNumber(Integer pageNumber) /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistMessagingProfilePhoneNumbersRequest */ public APIlistMessagingProfilePhoneNumbersRequest pageSize(Integer pageSize) { @@ -501,7 +501,7 @@ private APIlistMessagingProfileShortCodesRequest(UUID id) { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistMessagingProfileShortCodesRequest */ public APIlistMessagingProfileShortCodesRequest pageNumber(Integer pageNumber) { @@ -511,7 +511,7 @@ public APIlistMessagingProfileShortCodesRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistMessagingProfileShortCodesRequest */ public APIlistMessagingProfileShortCodesRequest pageSize(Integer pageSize) { @@ -612,7 +612,7 @@ private APIlistMessagingProfilesRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistMessagingProfilesRequest */ public APIlistMessagingProfilesRequest pageNumber(Integer pageNumber) { @@ -622,7 +622,7 @@ public APIlistMessagingProfilesRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistMessagingProfilesRequest */ public APIlistMessagingProfilesRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/MessagingUrlDomainsApi.java b/src/main/java/com/telnyx/sdk/api/MessagingUrlDomainsApi.java index ba0acd5a..c41b5b34 100644 --- a/src/main/java/com/telnyx/sdk/api/MessagingUrlDomainsApi.java +++ b/src/main/java/com/telnyx/sdk/api/MessagingUrlDomainsApi.java @@ -93,7 +93,7 @@ private APIlistMessagingUrlDomainsRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistMessagingUrlDomainsRequest */ public APIlistMessagingUrlDomainsRequest pageNumber(Integer pageNumber) { @@ -103,7 +103,7 @@ public APIlistMessagingUrlDomainsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistMessagingUrlDomainsRequest */ public APIlistMessagingUrlDomainsRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/NumberBackgroundJobsApi.java b/src/main/java/com/telnyx/sdk/api/NumberBackgroundJobsApi.java new file mode 100644 index 00000000..31c3411d --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/NumberBackgroundJobsApi.java @@ -0,0 +1,454 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.Errors; +import com.telnyx.sdk.model.ListPhoneNumbersBackgroundJobsResponse; +import com.telnyx.sdk.model.PhoneNumbersEnableEmergency; +import com.telnyx.sdk.model.PhoneNumbersJob; +import com.telnyx.sdk.model.PhoneNumbersJobDeletePhoneNumbers; +import com.telnyx.sdk.model.PhoneNumbersJobDeletePhoneNumbersRequest; +import com.telnyx.sdk.model.PhoneNumbersJobUpdateEmergencySettingsRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NumberBackgroundJobsApi { + private ApiClient apiClient; + + public NumberBackgroundJobsApi() { + this(Configuration.getDefaultApiClient()); + } + + public NumberBackgroundJobsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + +private ApiResponse createPhoneNumbersJobDeletePhoneNumbersWithHttpInfo(PhoneNumbersJobDeletePhoneNumbersRequest phoneNumbersJobDeletePhoneNumbersRequest) throws ApiException { + Object localVarPostBody = phoneNumbersJobDeletePhoneNumbersRequest; + + // verify the required parameter 'phoneNumbersJobDeletePhoneNumbersRequest' is set + if (phoneNumbersJobDeletePhoneNumbersRequest == null) { + throw new ApiException(400, "Missing the required parameter 'phoneNumbersJobDeletePhoneNumbersRequest' when calling createPhoneNumbersJobDeletePhoneNumbers"); + } + + // create path and map variables + String localVarPath = "/phone_numbers/jobs/delete_phone_numbers"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("NumberBackgroundJobsApi.createPhoneNumbersJobDeletePhoneNumbers", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIcreatePhoneNumbersJobDeletePhoneNumbersRequest { + private PhoneNumbersJobDeletePhoneNumbersRequest phoneNumbersJobDeletePhoneNumbersRequest; + + private APIcreatePhoneNumbersJobDeletePhoneNumbersRequest() { + } + + /** + * Set phoneNumbersJobDeletePhoneNumbersRequest + * @param phoneNumbersJobDeletePhoneNumbersRequest (required) + * @return APIcreatePhoneNumbersJobDeletePhoneNumbersRequest + */ + public APIcreatePhoneNumbersJobDeletePhoneNumbersRequest phoneNumbersJobDeletePhoneNumbersRequest(PhoneNumbersJobDeletePhoneNumbersRequest phoneNumbersJobDeletePhoneNumbersRequest) { + this.phoneNumbersJobDeletePhoneNumbersRequest = phoneNumbersJobDeletePhoneNumbersRequest; + return this; + } + + /** + * Execute createPhoneNumbersJobDeletePhoneNumbers request + * @return PhoneNumbersJobDeletePhoneNumbers + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
202 Phone numbers job delete phone numbers requested. -
0 Unexpected error -
+ + */ + + public PhoneNumbersJobDeletePhoneNumbers execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute createPhoneNumbersJobDeletePhoneNumbers request with HTTP info returned + * @return ApiResponse<PhoneNumbersJobDeletePhoneNumbers> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
202 Phone numbers job delete phone numbers requested. -
0 Unexpected error -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createPhoneNumbersJobDeletePhoneNumbersWithHttpInfo(phoneNumbersJobDeletePhoneNumbersRequest); + } + } + + /** + * Delete a batch of numbers + * Creates a new background job to delete a batch of numbers. At most one thousand numbers can be updated per API call. + * @return createPhoneNumbersJobDeletePhoneNumbersRequest + * @throws ApiException if fails to make API call + + + */ + public APIcreatePhoneNumbersJobDeletePhoneNumbersRequest createPhoneNumbersJobDeletePhoneNumbers() throws ApiException { + return new APIcreatePhoneNumbersJobDeletePhoneNumbersRequest(); + } + /** + * Update the emergency settings from a batch of numbers + * Creates a background job to update the emergency settings of a collection of phone numbers. At most one thousand numbers can be updated per API call. + * @param phoneNumbersJobUpdateEmergencySettingsRequest (required) + * @return PhoneNumbersEnableEmergency + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
202 Phone numbers enable emergency requested. -
0 Unexpected error -
+ */ + public PhoneNumbersEnableEmergency createPhoneNumbersJobUpdateEmergencySettings(PhoneNumbersJobUpdateEmergencySettingsRequest phoneNumbersJobUpdateEmergencySettingsRequest) throws ApiException { + return createPhoneNumbersJobUpdateEmergencySettingsWithHttpInfo(phoneNumbersJobUpdateEmergencySettingsRequest).getData(); + } + + /** + * Update the emergency settings from a batch of numbers + * Creates a background job to update the emergency settings of a collection of phone numbers. At most one thousand numbers can be updated per API call. + * @param phoneNumbersJobUpdateEmergencySettingsRequest (required) + * @return ApiResponse<PhoneNumbersEnableEmergency> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
202 Phone numbers enable emergency requested. -
0 Unexpected error -
+ */ + public ApiResponse createPhoneNumbersJobUpdateEmergencySettingsWithHttpInfo(PhoneNumbersJobUpdateEmergencySettingsRequest phoneNumbersJobUpdateEmergencySettingsRequest) throws ApiException { + Object localVarPostBody = phoneNumbersJobUpdateEmergencySettingsRequest; + + // verify the required parameter 'phoneNumbersJobUpdateEmergencySettingsRequest' is set + if (phoneNumbersJobUpdateEmergencySettingsRequest == null) { + throw new ApiException(400, "Missing the required parameter 'phoneNumbersJobUpdateEmergencySettingsRequest' when calling createPhoneNumbersJobUpdateEmergencySettings"); + } + + // create path and map variables + String localVarPath = "/phone_numbers/jobs/update_emergency_settings"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("NumberBackgroundJobsApi.createPhoneNumbersJobUpdateEmergencySettings", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + +private ApiResponse listPhoneNumbersJobsWithHttpInfo(String filterType, Integer pageNumber, Integer pageSize, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/phone_numbers/jobs"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[type]", filterType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("NumberBackgroundJobsApi.listPhoneNumbersJobs", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistPhoneNumbersJobsRequest { + private String filterType; + private Integer pageNumber; + private Integer pageSize; + private String sort; + + private APIlistPhoneNumbersJobsRequest() { + } + + /** + * Set filterType + * @param filterType Filter the phone number jobs by type. (optional) + * @return APIlistPhoneNumbersJobsRequest + */ + public APIlistPhoneNumbersJobsRequest filterType(String filterType) { + this.filterType = filterType; + return this; + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistPhoneNumbersJobsRequest + */ + public APIlistPhoneNumbersJobsRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistPhoneNumbersJobsRequest + */ + public APIlistPhoneNumbersJobsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set sort + * @param sort Specifies the sort order for results. If not given, results are sorted by created_at in descending order. (optional) + * @return APIlistPhoneNumbersJobsRequest + */ + public APIlistPhoneNumbersJobsRequest sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Execute listPhoneNumbersJobs request + * @return ListPhoneNumbersBackgroundJobsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 Successful response with a list of phone numbers background jobs. -
0 Unexpected error -
+ + */ + + public ListPhoneNumbersBackgroundJobsResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listPhoneNumbersJobs request with HTTP info returned + * @return ApiResponse<ListPhoneNumbersBackgroundJobsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 Successful response with a list of phone numbers background jobs. -
0 Unexpected error -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listPhoneNumbersJobsWithHttpInfo(filterType, pageNumber, pageSize, sort); + } + } + + /** + * Lists the phone numbers jobs + * + * @return listPhoneNumbersJobsRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistPhoneNumbersJobsRequest listPhoneNumbersJobs() throws ApiException { + return new APIlistPhoneNumbersJobsRequest(); + } + +private ApiResponse retrievePhoneNumbersJobWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrievePhoneNumbersJob"); + } + + // create path and map variables + String localVarPath = "/phone_numbers/jobs/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("NumberBackgroundJobsApi.retrievePhoneNumbersJob", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIretrievePhoneNumbersJobRequest { + private String id; + + private APIretrievePhoneNumbersJobRequest(String id) { + this.id = id; + } + + /** + * Execute retrievePhoneNumbersJob request + * @return PhoneNumbersJob + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 Phone numbers job details. -
0 Unexpected error -
+ + */ + + public PhoneNumbersJob execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute retrievePhoneNumbersJob request with HTTP info returned + * @return ApiResponse<PhoneNumbersJob> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 Phone numbers job details. -
0 Unexpected error -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return retrievePhoneNumbersJobWithHttpInfo(id); + } + } + + /** + * Retrieve a phone numbers job + * + * @param id Identifies the Phone Numbers Job. (required) + * @return retrievePhoneNumbersJobRequest + * @throws ApiException if fails to make API call + + + */ + public APIretrievePhoneNumbersJobRequest retrievePhoneNumbersJob(String id) throws ApiException { + return new APIretrievePhoneNumbersJobRequest(id); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/NumberConfigurationsApi.java b/src/main/java/com/telnyx/sdk/api/NumberConfigurationsApi.java index d498a45d..ef9625d8 100644 --- a/src/main/java/com/telnyx/sdk/api/NumberConfigurationsApi.java +++ b/src/main/java/com/telnyx/sdk/api/NumberConfigurationsApi.java @@ -206,7 +206,7 @@ public ApiResponse enableEmergencyPhoneNumberWithHtt localVarAuthNames, localVarReturnType, false); } -private ApiResponse listPhoneNumbersWithHttpInfo(Integer pageNumber, Integer pageSize, String filterTag, String filterPhoneNumber, String filterStatus, String filterVoiceConnectionNameContains, String filterVoiceConnectionNameStartsWith, String filterVoiceConnectionNameEndsWith, String filterVoiceConnectionNameEq, String filterUsagePaymentMethod, String filterBillingGroupId, String filterEmergencyAddressId, String sort) throws ApiException { +private ApiResponse listPhoneNumbersWithHttpInfo(Integer pageNumber, Integer pageSize, String filterTag, String filterPhoneNumber, String filterStatus, String filterVoiceConnectionNameContains, String filterVoiceConnectionNameStartsWith, String filterVoiceConnectionNameEndsWith, String filterVoiceConnectionNameEq, String filterUsagePaymentMethod, String filterBillingGroupId, String filterEmergencyAddressId, String filterCustomerReference, String sort) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -230,6 +230,7 @@ private ApiResponse listPhoneNumbersWithHttpInfo(Integ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[usage_payment_method]", filterUsagePaymentMethod)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[billing_group_id]", filterBillingGroupId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[emergency_address_id]", filterEmergencyAddressId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[customer_reference]", filterCustomerReference)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); @@ -267,6 +268,7 @@ public class APIlistPhoneNumbersRequest { private String filterUsagePaymentMethod; private String filterBillingGroupId; private String filterEmergencyAddressId; + private String filterCustomerReference; private String sort; private APIlistPhoneNumbersRequest() { @@ -274,7 +276,7 @@ private APIlistPhoneNumbersRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistPhoneNumbersRequest */ public APIlistPhoneNumbersRequest pageNumber(Integer pageNumber) { @@ -284,7 +286,7 @@ public APIlistPhoneNumbersRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistPhoneNumbersRequest */ public APIlistPhoneNumbersRequest pageSize(Integer pageSize) { @@ -392,6 +394,16 @@ public APIlistPhoneNumbersRequest filterEmergencyAddressId(String filterEmergenc return this; } + /** + * Set filterCustomerReference + * @param filterCustomerReference Filter numbers via the customer_reference set. (optional) + * @return APIlistPhoneNumbersRequest + */ + public APIlistPhoneNumbersRequest filterCustomerReference(String filterCustomerReference) { + this.filterCustomerReference = filterCustomerReference; + return this; + } + /** * Set sort * @param sort Specifies the sort order for results. If not given, results are sorted by created_at in descending order. (optional) @@ -432,7 +444,7 @@ public ListPhoneNumbersResponse execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return listPhoneNumbersWithHttpInfo(pageNumber, pageSize, filterTag, filterPhoneNumber, filterStatus, filterVoiceConnectionNameContains, filterVoiceConnectionNameStartsWith, filterVoiceConnectionNameEndsWith, filterVoiceConnectionNameEq, filterUsagePaymentMethod, filterBillingGroupId, filterEmergencyAddressId, sort); + return listPhoneNumbersWithHttpInfo(pageNumber, pageSize, filterTag, filterPhoneNumber, filterStatus, filterVoiceConnectionNameContains, filterVoiceConnectionNameStartsWith, filterVoiceConnectionNameEndsWith, filterVoiceConnectionNameEq, filterUsagePaymentMethod, filterBillingGroupId, filterEmergencyAddressId, filterCustomerReference, sort); } } @@ -494,7 +506,7 @@ private APIlistPhoneNumbersWithMessagingSettingsRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistPhoneNumbersWithMessagingSettingsRequest */ public APIlistPhoneNumbersWithMessagingSettingsRequest pageNumber(Integer pageNumber) { @@ -504,7 +516,7 @@ public APIlistPhoneNumbersWithMessagingSettingsRequest pageNumber(Integer pageNu /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistPhoneNumbersWithMessagingSettingsRequest */ public APIlistPhoneNumbersWithMessagingSettingsRequest pageSize(Integer pageSize) { @@ -558,7 +570,7 @@ public APIlistPhoneNumbersWithMessagingSettingsRequest listPhoneNumbersWithMessa return new APIlistPhoneNumbersWithMessagingSettingsRequest(); } -private ApiResponse listPhoneNumbersWithVoiceSettingsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterPhoneNumber, String filterConnectionNameContains, String filterUsagePaymentMethod, String sort) throws ApiException { +private ApiResponse listPhoneNumbersWithVoiceSettingsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterPhoneNumber, String filterConnectionNameContains, String filterCustomerReference, String filterUsagePaymentMethod, String sort) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -574,6 +586,7 @@ private ApiResponse listPhoneNumbersW localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[phone_number]", filterPhoneNumber)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[connection_name][contains]", filterConnectionNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[customer_reference]", filterCustomerReference)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[usage_payment_method]", filterUsagePaymentMethod)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); @@ -604,6 +617,7 @@ public class APIlistPhoneNumbersWithVoiceSettingsRequest { private Integer pageSize; private String filterPhoneNumber; private String filterConnectionNameContains; + private String filterCustomerReference; private String filterUsagePaymentMethod; private String sort; @@ -612,7 +626,7 @@ private APIlistPhoneNumbersWithVoiceSettingsRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistPhoneNumbersWithVoiceSettingsRequest */ public APIlistPhoneNumbersWithVoiceSettingsRequest pageNumber(Integer pageNumber) { @@ -622,7 +636,7 @@ public APIlistPhoneNumbersWithVoiceSettingsRequest pageNumber(Integer pageNumber /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistPhoneNumbersWithVoiceSettingsRequest */ public APIlistPhoneNumbersWithVoiceSettingsRequest pageSize(Integer pageSize) { @@ -650,6 +664,16 @@ public APIlistPhoneNumbersWithVoiceSettingsRequest filterConnectionNameContains( return this; } + /** + * Set filterCustomerReference + * @param filterCustomerReference Filter numbers via the customer_reference set. (optional) + * @return APIlistPhoneNumbersWithVoiceSettingsRequest + */ + public APIlistPhoneNumbersWithVoiceSettingsRequest filterCustomerReference(String filterCustomerReference) { + this.filterCustomerReference = filterCustomerReference; + return this; + } + /** * Set filterUsagePaymentMethod * @param filterUsagePaymentMethod Filter by usage_payment_method. (optional) @@ -700,7 +724,7 @@ public ListPhoneNumbersWithVoiceSettingsResponse execute() throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return listPhoneNumbersWithVoiceSettingsWithHttpInfo(pageNumber, pageSize, filterPhoneNumber, filterConnectionNameContains, filterUsagePaymentMethod, sort); + return listPhoneNumbersWithVoiceSettingsWithHttpInfo(pageNumber, pageSize, filterPhoneNumber, filterConnectionNameContains, filterCustomerReference, filterUsagePaymentMethod, sort); } } diff --git a/src/main/java/com/telnyx/sdk/api/NumberOrderDocumentsApi.java b/src/main/java/com/telnyx/sdk/api/NumberOrderDocumentsApi.java index e24ee5ba..232806a2 100644 --- a/src/main/java/com/telnyx/sdk/api/NumberOrderDocumentsApi.java +++ b/src/main/java/com/telnyx/sdk/api/NumberOrderDocumentsApi.java @@ -201,7 +201,7 @@ public APIlistNumberOrderDocumentsRequest filterCreatedAtLt(String filterCreated /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistNumberOrderDocumentsRequest */ public APIlistNumberOrderDocumentsRequest pageNumber(Integer pageNumber) { @@ -211,7 +211,7 @@ public APIlistNumberOrderDocumentsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistNumberOrderDocumentsRequest */ public APIlistNumberOrderDocumentsRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/NumberOrderRegulatoryRequirementsApi.java b/src/main/java/com/telnyx/sdk/api/NumberOrderRegulatoryRequirementsApi.java index 27110fb0..7b4ee868 100644 --- a/src/main/java/com/telnyx/sdk/api/NumberOrderRegulatoryRequirementsApi.java +++ b/src/main/java/com/telnyx/sdk/api/NumberOrderRegulatoryRequirementsApi.java @@ -131,7 +131,7 @@ public APIlistNumberOrderRegulatoryRequirementsRequest filterRequirementType(Str /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistNumberOrderRegulatoryRequirementsRequest */ public APIlistNumberOrderRegulatoryRequirementsRequest pageNumber(Integer pageNumber) { @@ -141,7 +141,7 @@ public APIlistNumberOrderRegulatoryRequirementsRequest pageNumber(Integer pageNu /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistNumberOrderRegulatoryRequirementsRequest */ public APIlistNumberOrderRegulatoryRequirementsRequest pageSize(Integer pageSize) { @@ -253,7 +253,7 @@ public APIlistPhoneNumberRegulatoryRequirementsRequest filterPhoneNumber(List + Status Code Description Response Headers + 200 Successful response - + 401 Unauthorized - + 404 Resource not found - + 422 Bad request - + + */ + public OutboundVoiceProfileResponse createOutboundVoiceProfile(CreateOutboundVoiceProfileRequest createOutboundVoiceProfileRequest) throws ApiException { + return createOutboundVoiceProfileWithHttpInfo(createOutboundVoiceProfileRequest).getData(); + } + + /** + * Create an outbound voice profile + * Create an outbound voice profile. + * @param createOutboundVoiceProfileRequest Parameters that can be defined when creating an outbound voice profile (required) + * @return ApiResponse<OutboundVoiceProfileResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse createOutboundVoiceProfileWithHttpInfo(CreateOutboundVoiceProfileRequest createOutboundVoiceProfileRequest) throws ApiException { + Object localVarPostBody = createOutboundVoiceProfileRequest; + + // verify the required parameter 'createOutboundVoiceProfileRequest' is set + if (createOutboundVoiceProfileRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createOutboundVoiceProfileRequest' when calling createOutboundVoiceProfile"); + } + + // create path and map variables + String localVarPath = "/outbound_voice_profiles"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("OutboundVoiceProfilesApi.createOutboundVoiceProfile", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete an outbound voice profile + * Deletes an existing outbound voice profile. + * @param id Identifies the resource. (required) + * @return OutboundVoiceProfileResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public OutboundVoiceProfileResponse deleteOutboundVoiceProfile(String id) throws ApiException { + return deleteOutboundVoiceProfileWithHttpInfo(id).getData(); + } + + /** + * Delete an outbound voice profile + * Deletes an existing outbound voice profile. + * @param id Identifies the resource. (required) + * @return ApiResponse<OutboundVoiceProfileResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse deleteOutboundVoiceProfileWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteOutboundVoiceProfile"); + } + + // create path and map variables + String localVarPath = "/outbound_voice_profiles/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("OutboundVoiceProfilesApi.deleteOutboundVoiceProfile", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + +private ApiResponse listOutboundVoiceProfilesWithHttpInfo(Integer pageNumber, Integer pageSize, String filterNameContains, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/outbound_voice_profiles"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name][contains]", filterNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("OutboundVoiceProfilesApi.listOutboundVoiceProfiles", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIlistOutboundVoiceProfilesRequest { + private Integer pageNumber; + private Integer pageSize; + private String filterNameContains; + private String sort; + + private APIlistOutboundVoiceProfilesRequest() { + } + + /** + * Set pageNumber + * @param pageNumber The page number to load. (optional, default to 1) + * @return APIlistOutboundVoiceProfilesRequest + */ + public APIlistOutboundVoiceProfilesRequest pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize + * @param pageSize The size of the page. (optional, default to 20) + * @return APIlistOutboundVoiceProfilesRequest + */ + public APIlistOutboundVoiceProfilesRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterNameContains + * @param filterNameContains Optional filter on outbound voice profile name. (optional) + * @return APIlistOutboundVoiceProfilesRequest + */ + public APIlistOutboundVoiceProfilesRequest filterNameContains(String filterNameContains) { + this.filterNameContains = filterNameContains; + return this; + } + + /** + * Set sort + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code>-</code> prefix.<br/><br/> That is: <ul> <li> <code>name</code>: sorts the result by the <code>name</code> field in ascending order. </li> <li> <code>-name</code>: sorts the result by the <code>name</code> field in descending order. </li> </ul> <br/> (optional, default to -created_at) + * @return APIlistOutboundVoiceProfilesRequest + */ + public APIlistOutboundVoiceProfilesRequest sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Execute listOutboundVoiceProfiles request + * @return ListOutboundVoiceProfilesResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
422 Bad request -
+ + */ + + public ListOutboundVoiceProfilesResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute listOutboundVoiceProfiles request with HTTP info returned + * @return ApiResponse<ListOutboundVoiceProfilesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
422 Bad request -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listOutboundVoiceProfilesWithHttpInfo(pageNumber, pageSize, filterNameContains, sort); + } + } + + /** + * Get all outbound voice profiles + * Get all outbound voice profiles belonging to the user that match the given filters. + * @return listOutboundVoiceProfilesRequest + * @throws ApiException if fails to make API call + + + */ + public APIlistOutboundVoiceProfilesRequest listOutboundVoiceProfiles() throws ApiException { + return new APIlistOutboundVoiceProfilesRequest(); + } + /** + * Retrieve an outbound voice profile + * Retrieves the details of an existing outbound voice profile. + * @param id Identifies the resource. (required) + * @return OutboundVoiceProfileResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public OutboundVoiceProfileResponse retrieveOutboundVoiceProfile(String id) throws ApiException { + return retrieveOutboundVoiceProfileWithHttpInfo(id).getData(); + } + + /** + * Retrieve an outbound voice profile + * Retrieves the details of an existing outbound voice profile. + * @param id Identifies the resource. (required) + * @return ApiResponse<OutboundVoiceProfileResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse retrieveOutboundVoiceProfileWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling retrieveOutboundVoiceProfile"); + } + + // create path and map variables + String localVarPath = "/outbound_voice_profiles/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("OutboundVoiceProfilesApi.retrieveOutboundVoiceProfile", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Updates an existing outbound voice profile. + * Updates an existing outbound voice profile. + * @param id Identifies the resource. (required) + * @param updateOutboundVoiceProfileRequest Parameters that can be updated on an outbound voice profile (required) + * @return OutboundVoiceProfileResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public OutboundVoiceProfileResponse updateOutboundVoiceProfile(String id, UpdateOutboundVoiceProfileRequest updateOutboundVoiceProfileRequest) throws ApiException { + return updateOutboundVoiceProfileWithHttpInfo(id, updateOutboundVoiceProfileRequest).getData(); + } + + /** + * Updates an existing outbound voice profile. + * Updates an existing outbound voice profile. + * @param id Identifies the resource. (required) + * @param updateOutboundVoiceProfileRequest Parameters that can be updated on an outbound voice profile (required) + * @return ApiResponse<OutboundVoiceProfileResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse updateOutboundVoiceProfileWithHttpInfo(String id, UpdateOutboundVoiceProfileRequest updateOutboundVoiceProfileRequest) throws ApiException { + Object localVarPostBody = updateOutboundVoiceProfileRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateOutboundVoiceProfile"); + } + + // verify the required parameter 'updateOutboundVoiceProfileRequest' is set + if (updateOutboundVoiceProfileRequest == null) { + throw new ApiException(400, "Missing the required parameter 'updateOutboundVoiceProfileRequest' when calling updateOutboundVoiceProfile"); + } + + // create path and map variables + String localVarPath = "/outbound_voice_profiles/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("OutboundVoiceProfilesApi.updateOutboundVoiceProfile", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApi.java b/src/main/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApi.java new file mode 100644 index 00000000..6af8f7f5 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApi.java @@ -0,0 +1,430 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.CreateFaxApplicationRequest; +import com.telnyx.sdk.model.InlineResponse200; +import com.telnyx.sdk.model.InlineResponse201; +import com.telnyx.sdk.model.UpdateFaxApplicationRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ProgrammableFaxApplicationsApi { + private ApiClient apiClient; + + public ProgrammableFaxApplicationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProgrammableFaxApplicationsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Creates a Fax Application + * Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the `/phone_numbers` endpoint. + * @param createFaxApplicationRequest Parameters that can be set when creating a Fax Application (required) + * @return InlineResponse201 + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response -
422 Bad request -
+ */ + public InlineResponse201 createFaxApplication(CreateFaxApplicationRequest createFaxApplicationRequest) throws ApiException { + return createFaxApplicationWithHttpInfo(createFaxApplicationRequest).getData(); + } + + /** + * Creates a Fax Application + * Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the `/phone_numbers` endpoint. + * @param createFaxApplicationRequest Parameters that can be set when creating a Fax Application (required) + * @return ApiResponse<InlineResponse201> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response -
422 Bad request -
+ */ + public ApiResponse createFaxApplicationWithHttpInfo(CreateFaxApplicationRequest createFaxApplicationRequest) throws ApiException { + Object localVarPostBody = createFaxApplicationRequest; + + // verify the required parameter 'createFaxApplicationRequest' is set + if (createFaxApplicationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createFaxApplicationRequest' when calling createFaxApplication"); + } + + // create path and map variables + String localVarPath = "/fax_applications"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("ProgrammableFaxApplicationsApi.createFaxApplication", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Deletes a Fax Application + * Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers. + * @param id Identifies the resource. (required) + * @return InlineResponse201 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public InlineResponse201 deleteFaxApplication(String id) throws ApiException { + return deleteFaxApplicationWithHttpInfo(id).getData(); + } + + /** + * Deletes a Fax Application + * Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers. + * @param id Identifies the resource. (required) + * @return ApiResponse<InlineResponse201> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse deleteFaxApplicationWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteFaxApplication"); + } + + // create path and map variables + String localVarPath = "/fax_applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("ProgrammableFaxApplicationsApi.deleteFaxApplication", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Retrieve a Fax Application + * Return the details of an existing Fax Application inside the 'data' attribute of the response. + * @param id Identifies the resource. (required) + * @return InlineResponse201 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public InlineResponse201 getFaxApplication(String id) throws ApiException { + return getFaxApplicationWithHttpInfo(id).getData(); + } + + /** + * Retrieve a Fax Application + * Return the details of an existing Fax Application inside the 'data' attribute of the response. + * @param id Identifies the resource. (required) + * @return ApiResponse<InlineResponse201> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse getFaxApplicationWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getFaxApplication"); + } + + // create path and map variables + String localVarPath = "/fax_applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("ProgrammableFaxApplicationsApi.getFaxApplication", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * List all Fax Applications + * This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx. + * @param pageNumber The page number to load. (optional, default to 1) + * @param pageSize The size of the page. (optional, default to 20) + * @param filterApplicationNameContains If present, applications with <code>application_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @param filterOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return InlineResponse200 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ */ + public InlineResponse200 listFaxApplications(Integer pageNumber, Integer pageSize, String filterApplicationNameContains, String filterOutboundVoiceProfileId, String sort) throws ApiException { + return listFaxApplicationsWithHttpInfo(pageNumber, pageSize, filterApplicationNameContains, filterOutboundVoiceProfileId, sort).getData(); + } + + /** + * List all Fax Applications + * This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx. + * @param pageNumber The page number to load. (optional, default to 1) + * @param pageSize The size of the page. (optional, default to 20) + * @param filterApplicationNameContains If present, applications with <code>application_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @param filterOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return ApiResponse<InlineResponse200> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ */ + public ApiResponse listFaxApplicationsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterApplicationNameContains, String filterOutboundVoiceProfileId, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fax_applications"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[application_name][contains]", filterApplicationNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[outbound_voice_profile_id]", filterOutboundVoiceProfileId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("ProgrammableFaxApplicationsApi.listFaxApplications", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update a Fax Application + * Updates settings of an existing Fax Application based on the parameters of the request. + * @param id Identifies the resource. (required) + * @param updateFaxApplicationRequest Parameters to be updated for the Fax Application (required) + * @return InlineResponse201 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public InlineResponse201 updateFaxApplication(String id, UpdateFaxApplicationRequest updateFaxApplicationRequest) throws ApiException { + return updateFaxApplicationWithHttpInfo(id, updateFaxApplicationRequest).getData(); + } + + /** + * Update a Fax Application + * Updates settings of an existing Fax Application based on the parameters of the request. + * @param id Identifies the resource. (required) + * @param updateFaxApplicationRequest Parameters to be updated for the Fax Application (required) + * @return ApiResponse<InlineResponse201> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse updateFaxApplicationWithHttpInfo(String id, UpdateFaxApplicationRequest updateFaxApplicationRequest) throws ApiException { + Object localVarPostBody = updateFaxApplicationRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateFaxApplication"); + } + + // verify the required parameter 'updateFaxApplicationRequest' is set + if (updateFaxApplicationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'updateFaxApplicationRequest' when calling updateFaxApplication"); + } + + // create path and map variables + String localVarPath = "/fax_applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("ProgrammableFaxApplicationsApi.updateFaxApplication", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/api/RecordingsCommandsApi.java b/src/main/java/com/telnyx/sdk/api/RecordingsCommandsApi.java index 268bc53c..00df6399 100644 --- a/src/main/java/com/telnyx/sdk/api/RecordingsCommandsApi.java +++ b/src/main/java/com/telnyx/sdk/api/RecordingsCommandsApi.java @@ -129,7 +129,7 @@ public APIlistRecordingsRequest filterCreatedAtLte(String filterCreatedAtLte) { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistRecordingsRequest */ public APIlistRecordingsRequest pageNumber(Integer pageNumber) { @@ -139,7 +139,7 @@ public APIlistRecordingsRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistRecordingsRequest */ public APIlistRecordingsRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/ShortCodesApi.java b/src/main/java/com/telnyx/sdk/api/ShortCodesApi.java index e90798b3..a792e5e4 100644 --- a/src/main/java/com/telnyx/sdk/api/ShortCodesApi.java +++ b/src/main/java/com/telnyx/sdk/api/ShortCodesApi.java @@ -98,7 +98,7 @@ private APIlistShortCodesRequest() { /** * Set pageNumber - * @param pageNumber The page number to load (optional, default to 1) + * @param pageNumber The page number to load. (optional, default to 1) * @return APIlistShortCodesRequest */ public APIlistShortCodesRequest pageNumber(Integer pageNumber) { @@ -108,7 +108,7 @@ public APIlistShortCodesRequest pageNumber(Integer pageNumber) { /** * Set pageSize - * @param pageSize The size of the page (optional, default to 20) + * @param pageSize The size of the page. (optional, default to 20) * @return APIlistShortCodesRequest */ public APIlistShortCodesRequest pageSize(Integer pageSize) { diff --git a/src/main/java/com/telnyx/sdk/api/TeXmlApplicationsApi.java b/src/main/java/com/telnyx/sdk/api/TeXmlApplicationsApi.java new file mode 100644 index 00000000..297ab847 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/api/TeXmlApplicationsApi.java @@ -0,0 +1,430 @@ +package com.telnyx.sdk.api; + +import com.telnyx.sdk.ApiException; +import com.telnyx.sdk.ApiClient; +import com.telnyx.sdk.ApiResponse; +import com.telnyx.sdk.Configuration; +import com.telnyx.sdk.Pair; + +import javax.ws.rs.core.GenericType; + +import com.telnyx.sdk.model.CreateTexmlApplicationRequest; +import com.telnyx.sdk.model.InlineResponse2001; +import com.telnyx.sdk.model.InlineResponse2011; +import com.telnyx.sdk.model.UpdateTexmlApplicationRequest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TeXmlApplicationsApi { + private ApiClient apiClient; + + public TeXmlApplicationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public TeXmlApplicationsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API cilent + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API cilent + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Creates a TeXML Application + * Creates a TeXML Application. + * @param createTexmlApplicationRequest Parameters that can be set when creating a TeXML Application (required) + * @return InlineResponse2011 + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response -
422 Bad request -
+ */ + public InlineResponse2011 createTexmlApplication(CreateTexmlApplicationRequest createTexmlApplicationRequest) throws ApiException { + return createTexmlApplicationWithHttpInfo(createTexmlApplicationRequest).getData(); + } + + /** + * Creates a TeXML Application + * Creates a TeXML Application. + * @param createTexmlApplicationRequest Parameters that can be set when creating a TeXML Application (required) + * @return ApiResponse<InlineResponse2011> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
201 Successful response -
422 Bad request -
+ */ + public ApiResponse createTexmlApplicationWithHttpInfo(CreateTexmlApplicationRequest createTexmlApplicationRequest) throws ApiException { + Object localVarPostBody = createTexmlApplicationRequest; + + // verify the required parameter 'createTexmlApplicationRequest' is set + if (createTexmlApplicationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'createTexmlApplicationRequest' when calling createTexmlApplication"); + } + + // create path and map variables + String localVarPath = "/texml_applications"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("TeXmlApplicationsApi.createTexmlApplication", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Deletes a TeXML Application + * Deletes a TeXML Application. + * @param id Identifies the resource. (required) + * @return InlineResponse2011 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public InlineResponse2011 deleteTexmlApplication(String id) throws ApiException { + return deleteTexmlApplicationWithHttpInfo(id).getData(); + } + + /** + * Deletes a TeXML Application + * Deletes a TeXML Application. + * @param id Identifies the resource. (required) + * @return ApiResponse<InlineResponse2011> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse deleteTexmlApplicationWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteTexmlApplication"); + } + + // create path and map variables + String localVarPath = "/texml_applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("TeXmlApplicationsApi.deleteTexmlApplication", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * List all TeXML Applications + * Returns a list of your TeXML Applications. + * @param pageNumber The page number to load. (optional, default to 1) + * @param pageSize The size of the page. (optional, default to 20) + * @param filterFriendlyNameContains If present, applications with <code>friendly_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @param filterOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return InlineResponse2001 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ */ + public InlineResponse2001 findTexmlApplications(Integer pageNumber, Integer pageSize, String filterFriendlyNameContains, String filterOutboundVoiceProfileId, String sort) throws ApiException { + return findTexmlApplicationsWithHttpInfo(pageNumber, pageSize, filterFriendlyNameContains, filterOutboundVoiceProfileId, sort).getData(); + } + + /** + * List all TeXML Applications + * Returns a list of your TeXML Applications. + * @param pageNumber The page number to load. (optional, default to 1) + * @param pageSize The size of the page. (optional, default to 20) + * @param filterFriendlyNameContains If present, applications with <code>friendly_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. (optional, default to "null") + * @param filterOutboundVoiceProfileId Identifies the associated outbound voice profile. (optional) + * @param sort Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul> <li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order. (optional, default to created_at) + * @return ApiResponse<InlineResponse2001> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
400 Bad request -
401 Unauthorized -
404 Resource not found -
+ */ + public ApiResponse findTexmlApplicationsWithHttpInfo(Integer pageNumber, Integer pageSize, String filterFriendlyNameContains, String filterOutboundVoiceProfileId, String sort) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/texml_applications"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[friendly_name][contains]", filterFriendlyNameContains)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[outbound_voice_profile_id]", filterOutboundVoiceProfileId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("TeXmlApplicationsApi.findTexmlApplications", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Retrieve a TeXML Application + * Retrieves the details of an existing TeXML Application. + * @param id Identifies the resource. (required) + * @return InlineResponse2011 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public InlineResponse2011 getTexmlApplication(String id) throws ApiException { + return getTexmlApplicationWithHttpInfo(id).getData(); + } + + /** + * Retrieve a TeXML Application + * Retrieves the details of an existing TeXML Application. + * @param id Identifies the resource. (required) + * @return ApiResponse<InlineResponse2011> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse getTexmlApplicationWithHttpInfo(String id) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getTexmlApplication"); + } + + // create path and map variables + String localVarPath = "/texml_applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("TeXmlApplicationsApi.getTexmlApplication", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Update a TeXML Application + * Updates settings of an existing TeXML Application. + * @param id Identifies the resource. (required) + * @param updateTexmlApplicationRequest Parameters that can be updated in a TeXML Application (required) + * @return InlineResponse2011 + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public InlineResponse2011 updateTexmlApplication(String id, UpdateTexmlApplicationRequest updateTexmlApplicationRequest) throws ApiException { + return updateTexmlApplicationWithHttpInfo(id, updateTexmlApplicationRequest).getData(); + } + + /** + * Update a TeXML Application + * Updates settings of an existing TeXML Application. + * @param id Identifies the resource. (required) + * @param updateTexmlApplicationRequest Parameters that can be updated in a TeXML Application (required) + * @return ApiResponse<InlineResponse2011> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Successful response -
401 Unauthorized -
404 Resource not found -
422 Bad request -
+ */ + public ApiResponse updateTexmlApplicationWithHttpInfo(String id, UpdateTexmlApplicationRequest updateTexmlApplicationRequest) throws ApiException { + Object localVarPostBody = updateTexmlApplicationRequest; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateTexmlApplication"); + } + + // verify the required parameter 'updateTexmlApplicationRequest' is set + if (updateTexmlApplicationRequest == null) { + throw new ApiException(400, "Missing the required parameter 'updateTexmlApplicationRequest' when calling updateTexmlApplication"); + } + + // create path and map variables + String localVarPath = "/texml_applications/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "bearerAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("TeXmlApplicationsApi.updateTexmlApplication", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/telnyx/sdk/model/AnchorsiteOverride.java b/src/main/java/com/telnyx/sdk/model/AnchorsiteOverride.java new file mode 100644 index 00000000..9fc56f28 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/AnchorsiteOverride.java @@ -0,0 +1,79 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * `Latency` directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media. + */ +public enum AnchorsiteOverride { + + LATENCY("Latency"), + + CHICAGO_IL("Chicago, IL"), + + ASHBURN_VA("Ashburn, VA"), + + SAN_JOSE_CA("San Jose, CA"), + + SYDNEY_AUSTRALIA("Sydney, Australia"), + + AMSTERDAM_NETHERLANDS("Amsterdam, Netherlands"), + + LONDON_UK("London, UK"), + + TORONTO_CANADA("Toronto, Canada"), + + VANCOUVER_CANADA("Vancouver, Canada"), + + FRANKFURT_GERMANY("Frankfurt, Germany"); + + private String value; + + AnchorsiteOverride(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AnchorsiteOverride fromValue(String value) { + for (AnchorsiteOverride b : AnchorsiteOverride.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/Connection.java b/src/main/java/com/telnyx/sdk/model/Connection.java new file mode 100644 index 00000000..3a47bc85 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/Connection.java @@ -0,0 +1,468 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * Connection + */ +@JsonPropertyOrder({ + Connection.JSON_PROPERTY_ID, + Connection.JSON_PROPERTY_RECORD_TYPE, + Connection.JSON_PROPERTY_ACTIVE, + Connection.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + Connection.JSON_PROPERTY_CONNECTION_NAME, + Connection.JSON_PROPERTY_CREATED_AT, + Connection.JSON_PROPERTY_UPDATED_AT, + Connection.JSON_PROPERTY_WEBHOOK_EVENT_URL, + Connection.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + Connection.JSON_PROPERTY_WEBHOOK_API_VERSION, + Connection.JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Connection { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private JsonNullable webhookEventUrl = JsonNullable.of("null"); + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID = "outbound_voice_profile_id"; + private String outboundVoiceProfileId; + + + public Connection id(String id) { + this.id = id; + return this; + } + + /** + * Identifies the specific resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", value = "Identifies the specific resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public Connection recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ip_connection", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public Connection active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public Connection anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public Connection connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public Connection createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public Connection updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + public Connection webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = JsonNullable.of(webhookEventUrl); + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent.") + @JsonIgnore + + public String getWebhookEventUrl() { + return webhookEventUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventUrl_JsonNullable() { + return webhookEventUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + public void setWebhookEventUrl_JsonNullable(JsonNullable webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = JsonNullable.of(webhookEventUrl); + } + + + public Connection webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public Connection webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public Connection outboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + return this; + } + + /** + * Identifies the associated outbound voice profile. + * @return outboundVoiceProfileId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the associated outbound voice profile.") + @JsonProperty(JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutboundVoiceProfileId() { + return outboundVoiceProfileId; + } + + + public void setOutboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + } + + + /** + * Return true if this Connection object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Connection connection = (Connection) o; + return Objects.equals(this.id, connection.id) && + Objects.equals(this.recordType, connection.recordType) && + Objects.equals(this.active, connection.active) && + Objects.equals(this.anchorsiteOverride, connection.anchorsiteOverride) && + Objects.equals(this.connectionName, connection.connectionName) && + Objects.equals(this.createdAt, connection.createdAt) && + Objects.equals(this.updatedAt, connection.updatedAt) && + Objects.equals(this.webhookEventUrl, connection.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, connection.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, connection.webhookApiVersion) && + Objects.equals(this.outboundVoiceProfileId, connection.outboundVoiceProfileId); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, active, anchorsiteOverride, connectionName, createdAt, updatedAt, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, outboundVoiceProfileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Connection {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" outboundVoiceProfileId: ").append(toIndentedString(outboundVoiceProfileId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ConnectionResponse.java b/src/main/java/com/telnyx/sdk/model/ConnectionResponse.java new file mode 100644 index 00000000..0560084b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ConnectionResponse.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Connection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ConnectionResponse + */ +@JsonPropertyOrder({ + ConnectionResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConnectionResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Connection data; + + + public ConnectionResponse data(Connection data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Connection getData() { + return data; + } + + + public void setData(Connection data) { + this.data = data; + } + + + /** + * Return true if this Connection_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionResponse connectionResponse = (ConnectionResponse) o; + return Objects.equals(this.data, connectionResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ConnectionRtcpSettings.java b/src/main/java/com/telnyx/sdk/model/ConnectionRtcpSettings.java new file mode 100644 index 00000000..f55d95ad --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ConnectionRtcpSettings.java @@ -0,0 +1,204 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ConnectionRtcpSettings + */ +@JsonPropertyOrder({ + ConnectionRtcpSettings.JSON_PROPERTY_PORT, + ConnectionRtcpSettings.JSON_PROPERTY_CAPTURE_ENABLED, + ConnectionRtcpSettings.JSON_PROPERTY_REPORT_FREQUENCY_SECS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConnectionRtcpSettings { + /** + * RTCP port by default is rtp+1, it can also be set to rtcp-mux + */ + public enum PortEnum { + RTCP_MUX("rtcp-mux"), + + RTP_1("rtp+1"); + + private String value; + + PortEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PortEnum fromValue(String value) { + for (PortEnum b : PortEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PORT = "port"; + private PortEnum port = PortEnum.RTP_1; + + public static final String JSON_PROPERTY_CAPTURE_ENABLED = "capture_enabled"; + private Boolean captureEnabled = false; + + public static final String JSON_PROPERTY_REPORT_FREQUENCY_SECS = "report_frequency_secs"; + private Integer reportFrequencySecs = 5; + + + public ConnectionRtcpSettings port(PortEnum port) { + this.port = port; + return this; + } + + /** + * RTCP port by default is rtp+1, it can also be set to rtcp-mux + * @return port + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "RTCP port by default is rtp+1, it can also be set to rtcp-mux") + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PortEnum getPort() { + return port; + } + + + public void setPort(PortEnum port) { + this.port = port; + } + + + public ConnectionRtcpSettings captureEnabled(Boolean captureEnabled) { + this.captureEnabled = captureEnabled; + return this; + } + + /** + * BETA - Enable the capture and storage of RTCP messages to create QoS reports on the Telnyx Mission Control Portal. + * @return captureEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "BETA - Enable the capture and storage of RTCP messages to create QoS reports on the Telnyx Mission Control Portal.") + @JsonProperty(JSON_PROPERTY_CAPTURE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getCaptureEnabled() { + return captureEnabled; + } + + + public void setCaptureEnabled(Boolean captureEnabled) { + this.captureEnabled = captureEnabled; + } + + + public ConnectionRtcpSettings reportFrequencySecs(Integer reportFrequencySecs) { + this.reportFrequencySecs = reportFrequencySecs; + return this; + } + + /** + * RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds. + * @return reportFrequencySecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds.") + @JsonProperty(JSON_PROPERTY_REPORT_FREQUENCY_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getReportFrequencySecs() { + return reportFrequencySecs; + } + + + public void setReportFrequencySecs(Integer reportFrequencySecs) { + this.reportFrequencySecs = reportFrequencySecs; + } + + + /** + * Return true if this ConnectionRtcpSettings object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionRtcpSettings connectionRtcpSettings = (ConnectionRtcpSettings) o; + return Objects.equals(this.port, connectionRtcpSettings.port) && + Objects.equals(this.captureEnabled, connectionRtcpSettings.captureEnabled) && + Objects.equals(this.reportFrequencySecs, connectionRtcpSettings.reportFrequencySecs); + } + + @Override + public int hashCode() { + return Objects.hash(port, captureEnabled, reportFrequencySecs); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionRtcpSettings {\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append(" captureEnabled: ").append(toIndentedString(captureEnabled)).append("\n"); + sb.append(" reportFrequencySecs: ").append(toIndentedString(reportFrequencySecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateConferenceRequest.java b/src/main/java/com/telnyx/sdk/model/CreateConferenceRequest.java index 4b638fb9..9078f52a 100644 --- a/src/main/java/com/telnyx/sdk/model/CreateConferenceRequest.java +++ b/src/main/java/com/telnyx/sdk/model/CreateConferenceRequest.java @@ -90,7 +90,7 @@ public static BeepEnabledEnum fromValue(String value) { } public static final String JSON_PROPERTY_BEEP_ENABLED = "beep_enabled"; - private BeepEnabledEnum beepEnabled; + private BeepEnabledEnum beepEnabled = BeepEnabledEnum.NEVER; public static final String JSON_PROPERTY_CLIENT_STATE = "client_state"; private String clientState; diff --git a/src/main/java/com/telnyx/sdk/model/CreateCredentialConnectionRequest.java b/src/main/java/com/telnyx/sdk/model/CreateCredentialConnectionRequest.java new file mode 100644 index 00000000..ccc690e2 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateCredentialConnectionRequest.java @@ -0,0 +1,729 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CredentialInbound; +import com.telnyx.sdk.model.CredentialOutbound; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateCredentialConnectionRequest + */ +@JsonPropertyOrder({ + CreateCredentialConnectionRequest.JSON_PROPERTY_ACTIVE, + CreateCredentialConnectionRequest.JSON_PROPERTY_USER_NAME, + CreateCredentialConnectionRequest.JSON_PROPERTY_PASSWORD, + CreateCredentialConnectionRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + CreateCredentialConnectionRequest.JSON_PROPERTY_CONNECTION_NAME, + CreateCredentialConnectionRequest.JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE, + CreateCredentialConnectionRequest.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + CreateCredentialConnectionRequest.JSON_PROPERTY_DTMF_TYPE, + CreateCredentialConnectionRequest.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + CreateCredentialConnectionRequest.JSON_PROPERTY_ENCRYPTED_MEDIA, + CreateCredentialConnectionRequest.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + CreateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + CreateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + CreateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_API_VERSION, + CreateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + CreateCredentialConnectionRequest.JSON_PROPERTY_RTCP_SETTINGS, + CreateCredentialConnectionRequest.JSON_PROPERTY_INBOUND, + CreateCredentialConnectionRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCredentialConnectionRequest { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_USER_NAME = "user_name"; + private String userName; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + /** + * This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + */ + public enum SipUriCallingPreferenceEnum { + DISABLED("disabled"), + + UNRESTRICTED("unrestricted"), + + INTERNAL("internal"); + + private String value; + + SipUriCallingPreferenceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipUriCallingPreferenceEnum fromValue(String value) { + for (SipUriCallingPreferenceEnum b : SipUriCallingPreferenceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE = "sip_uri_calling_preference"; + private SipUriCallingPreferenceEnum sipUriCallingPreference = SipUriCallingPreferenceEnum.DISABLED; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = false; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CredentialInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CredentialOutbound outbound; + + + public CreateCredentialConnectionRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public CreateCredentialConnectionRequest userName(String userName) { + this.userName = userName; + return this; + } + + /** + * The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). + * @return userName + **/ + @ApiModelProperty(example = "myusername123", required = true, value = "The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters).") + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUserName() { + return userName; + } + + + public void setUserName(String userName) { + this.userName = userName; + } + + + public CreateCredentialConnectionRequest password(String password) { + this.password = password; + return this; + } + + /** + * The password to be used as part of the credentials. Must be 8 to 128 characters long. + * @return password + **/ + @ApiModelProperty(example = "my123secure456password789", required = true, value = "The password to be used as part of the credentials. Must be 8 to 128 characters long.") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public CreateCredentialConnectionRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public CreateCredentialConnectionRequest connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public CreateCredentialConnectionRequest sipUriCallingPreference(SipUriCallingPreferenceEnum sipUriCallingPreference) { + this.sipUriCallingPreference = sipUriCallingPreference; + return this; + } + + /** + * This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + * @return sipUriCallingPreference + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).") + @JsonProperty(JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipUriCallingPreferenceEnum getSipUriCallingPreference() { + return sipUriCallingPreference; + } + + + public void setSipUriCallingPreference(SipUriCallingPreferenceEnum sipUriCallingPreference) { + this.sipUriCallingPreference = sipUriCallingPreference; + } + + + public CreateCredentialConnectionRequest defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public CreateCredentialConnectionRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public CreateCredentialConnectionRequest encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public CreateCredentialConnectionRequest encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public CreateCredentialConnectionRequest onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public CreateCredentialConnectionRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public CreateCredentialConnectionRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public CreateCredentialConnectionRequest webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public CreateCredentialConnectionRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public CreateCredentialConnectionRequest rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public CreateCredentialConnectionRequest inbound(CredentialInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CredentialInbound getInbound() { + return inbound; + } + + + public void setInbound(CredentialInbound inbound) { + this.inbound = inbound; + } + + + public CreateCredentialConnectionRequest outbound(CredentialOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CredentialOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CredentialOutbound outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this CreateCredentialConnectionRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCredentialConnectionRequest createCredentialConnectionRequest = (CreateCredentialConnectionRequest) o; + return Objects.equals(this.active, createCredentialConnectionRequest.active) && + Objects.equals(this.userName, createCredentialConnectionRequest.userName) && + Objects.equals(this.password, createCredentialConnectionRequest.password) && + Objects.equals(this.anchorsiteOverride, createCredentialConnectionRequest.anchorsiteOverride) && + Objects.equals(this.connectionName, createCredentialConnectionRequest.connectionName) && + Objects.equals(this.sipUriCallingPreference, createCredentialConnectionRequest.sipUriCallingPreference) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, createCredentialConnectionRequest.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, createCredentialConnectionRequest.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, createCredentialConnectionRequest.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, createCredentialConnectionRequest.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, createCredentialConnectionRequest.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, createCredentialConnectionRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, createCredentialConnectionRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, createCredentialConnectionRequest.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, createCredentialConnectionRequest.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, createCredentialConnectionRequest.rtcpSettings) && + Objects.equals(this.inbound, createCredentialConnectionRequest.inbound) && + Objects.equals(this.outbound, createCredentialConnectionRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(active, userName, password, anchorsiteOverride, connectionName, sipUriCallingPreference, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCredentialConnectionRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" sipUriCallingPreference: ").append(toIndentedString(sipUriCallingPreference)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequest.java b/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequest.java new file mode 100644 index 00000000..437a23d9 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequest.java @@ -0,0 +1,345 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateFaxApplicationRequestInbound; +import com.telnyx.sdk.model.CreateFaxApplicationRequestOutbound; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateFaxApplicationRequest + */ +@JsonPropertyOrder({ + CreateFaxApplicationRequest.JSON_PROPERTY_APPLICATION_NAME, + CreateFaxApplicationRequest.JSON_PROPERTY_ACTIVE, + CreateFaxApplicationRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + CreateFaxApplicationRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + CreateFaxApplicationRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + CreateFaxApplicationRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + CreateFaxApplicationRequest.JSON_PROPERTY_INBOUND, + CreateFaxApplicationRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateFaxApplicationRequest { + public static final String JSON_PROPERTY_APPLICATION_NAME = "application_name"; + private String applicationName; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active = true; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CreateFaxApplicationRequestInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CreateFaxApplicationRequestOutbound outbound; + + + public CreateFaxApplicationRequest applicationName(String applicationName) { + this.applicationName = applicationName; + return this; + } + + /** + * A user-assigned name to help manage the application. + * @return applicationName + **/ + @ApiModelProperty(example = "call-router", required = true, value = "A user-assigned name to help manage the application.") + @JsonProperty(JSON_PROPERTY_APPLICATION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + + public CreateFaxApplicationRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Specifies whether the connection can be used. + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Specifies whether the connection can be used.") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public CreateFaxApplicationRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public CreateFaxApplicationRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @ApiModelProperty(example = "https://example.com", required = true, value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public CreateFaxApplicationRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public CreateFaxApplicationRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public CreateFaxApplicationRequest inbound(CreateFaxApplicationRequestInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateFaxApplicationRequestInbound getInbound() { + return inbound; + } + + + public void setInbound(CreateFaxApplicationRequestInbound inbound) { + this.inbound = inbound; + } + + + public CreateFaxApplicationRequest outbound(CreateFaxApplicationRequestOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateFaxApplicationRequestOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CreateFaxApplicationRequestOutbound outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this CreateFaxApplicationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFaxApplicationRequest createFaxApplicationRequest = (CreateFaxApplicationRequest) o; + return Objects.equals(this.applicationName, createFaxApplicationRequest.applicationName) && + Objects.equals(this.active, createFaxApplicationRequest.active) && + Objects.equals(this.anchorsiteOverride, createFaxApplicationRequest.anchorsiteOverride) && + Objects.equals(this.webhookEventUrl, createFaxApplicationRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, createFaxApplicationRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookTimeoutSecs, createFaxApplicationRequest.webhookTimeoutSecs) && + Objects.equals(this.inbound, createFaxApplicationRequest.inbound) && + Objects.equals(this.outbound, createFaxApplicationRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(applicationName, active, anchorsiteOverride, webhookEventUrl, webhookEventFailoverUrl, webhookTimeoutSecs, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFaxApplicationRequest {\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInbound.java b/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInbound.java new file mode 100644 index 00000000..07cc243f --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInbound.java @@ -0,0 +1,204 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateFaxApplicationRequestInbound + */ +@JsonPropertyOrder({ + CreateFaxApplicationRequestInbound.JSON_PROPERTY_CHANNEL_LIMIT, + CreateFaxApplicationRequestInbound.JSON_PROPERTY_SIP_SUBDOMAIN, + CreateFaxApplicationRequestInbound.JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateFaxApplicationRequestInbound { + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN = "sip_subdomain"; + private String sipSubdomain = "null"; + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + */ + public enum SipSubdomainReceiveSettingsEnum { + ONLY_MY_CONNECTIONS("only_my_connections"), + + FROM_ANYONE("from_anyone"); + + private String value; + + SipSubdomainReceiveSettingsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipSubdomainReceiveSettingsEnum fromValue(String value) { + for (SipSubdomainReceiveSettingsEnum b : SipSubdomainReceiveSettingsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS = "sip_subdomain_receive_settings"; + private SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings = SipSubdomainReceiveSettingsEnum.FROM_ANYONE; + + + public CreateFaxApplicationRequestInbound channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public CreateFaxApplicationRequestInbound sipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + return this; + } + + /** + * Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @return sipSubdomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "example", value = "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSipSubdomain() { + return sipSubdomain; + } + + + public void setSipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + } + + + public CreateFaxApplicationRequestInbound sipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + return this; + } + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + * @return sipSubdomainReceiveSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "only_my_connections", value = "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipSubdomainReceiveSettingsEnum getSipSubdomainReceiveSettings() { + return sipSubdomainReceiveSettings; + } + + + public void setSipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + } + + + /** + * Return true if this CreateFaxApplicationRequest_inbound object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFaxApplicationRequestInbound createFaxApplicationRequestInbound = (CreateFaxApplicationRequestInbound) o; + return Objects.equals(this.channelLimit, createFaxApplicationRequestInbound.channelLimit) && + Objects.equals(this.sipSubdomain, createFaxApplicationRequestInbound.sipSubdomain) && + Objects.equals(this.sipSubdomainReceiveSettings, createFaxApplicationRequestInbound.sipSubdomainReceiveSettings); + } + + @Override + public int hashCode() { + return Objects.hash(channelLimit, sipSubdomain, sipSubdomainReceiveSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFaxApplicationRequestInbound {\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" sipSubdomain: ").append(toIndentedString(sipSubdomain)).append("\n"); + sb.append(" sipSubdomainReceiveSettings: ").append(toIndentedString(sipSubdomainReceiveSettings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutbound.java b/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutbound.java new file mode 100644 index 00000000..848290a2 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutbound.java @@ -0,0 +1,139 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateFaxApplicationRequestOutbound + */ +@JsonPropertyOrder({ + CreateFaxApplicationRequestOutbound.JSON_PROPERTY_CHANNEL_LIMIT, + CreateFaxApplicationRequestOutbound.JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateFaxApplicationRequestOutbound { + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID = "outbound_voice_profile_id"; + private String outboundVoiceProfileId; + + + public CreateFaxApplicationRequestOutbound channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "When set, this will limit the number of concurrent outbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public CreateFaxApplicationRequestOutbound outboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + return this; + } + + /** + * Identifies the associated outbound voice profile. + * @return outboundVoiceProfileId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the associated outbound voice profile.") + @JsonProperty(JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutboundVoiceProfileId() { + return outboundVoiceProfileId; + } + + + public void setOutboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + } + + + /** + * Return true if this CreateFaxApplicationRequest_outbound object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFaxApplicationRequestOutbound createFaxApplicationRequestOutbound = (CreateFaxApplicationRequestOutbound) o; + return Objects.equals(this.channelLimit, createFaxApplicationRequestOutbound.channelLimit) && + Objects.equals(this.outboundVoiceProfileId, createFaxApplicationRequestOutbound.outboundVoiceProfileId); + } + + @Override + public int hashCode() { + return Objects.hash(channelLimit, outboundVoiceProfileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFaxApplicationRequestOutbound {\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" outboundVoiceProfileId: ").append(toIndentedString(outboundVoiceProfileId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateFqdnConnectionRequest.java b/src/main/java/com/telnyx/sdk/model/CreateFqdnConnectionRequest.java new file mode 100644 index 00000000..3c116713 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateFqdnConnectionRequest.java @@ -0,0 +1,604 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.FqdnConnectionTransportProtocol; +import com.telnyx.sdk.model.InboundFqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateFqdnConnectionRequest + */ +@JsonPropertyOrder({ + CreateFqdnConnectionRequest.JSON_PROPERTY_ACTIVE, + CreateFqdnConnectionRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + CreateFqdnConnectionRequest.JSON_PROPERTY_CONNECTION_NAME, + CreateFqdnConnectionRequest.JSON_PROPERTY_TRANSPORT_PROTOCOL, + CreateFqdnConnectionRequest.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + CreateFqdnConnectionRequest.JSON_PROPERTY_DTMF_TYPE, + CreateFqdnConnectionRequest.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + CreateFqdnConnectionRequest.JSON_PROPERTY_ENCRYPTED_MEDIA, + CreateFqdnConnectionRequest.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + CreateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + CreateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + CreateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_API_VERSION, + CreateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + CreateFqdnConnectionRequest.JSON_PROPERTY_RTCP_SETTINGS, + CreateFqdnConnectionRequest.JSON_PROPERTY_INBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateFqdnConnectionRequest { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active = true; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + public static final String JSON_PROPERTY_TRANSPORT_PROTOCOL = "transport_protocol"; + private FqdnConnectionTransportProtocol transportProtocol = FqdnConnectionTransportProtocol.UDP; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = true; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private InboundFqdn inbound; + + + public CreateFqdnConnectionRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public CreateFqdnConnectionRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public CreateFqdnConnectionRequest connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public CreateFqdnConnectionRequest transportProtocol(FqdnConnectionTransportProtocol transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * Get transportProtocol + * @return transportProtocol + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRANSPORT_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FqdnConnectionTransportProtocol getTransportProtocol() { + return transportProtocol; + } + + + public void setTransportProtocol(FqdnConnectionTransportProtocol transportProtocol) { + this.transportProtocol = transportProtocol; + } + + + public CreateFqdnConnectionRequest defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public CreateFqdnConnectionRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public CreateFqdnConnectionRequest encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public CreateFqdnConnectionRequest encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public CreateFqdnConnectionRequest onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public CreateFqdnConnectionRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public CreateFqdnConnectionRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public CreateFqdnConnectionRequest webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public CreateFqdnConnectionRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public CreateFqdnConnectionRequest rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public CreateFqdnConnectionRequest inbound(InboundFqdn inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public InboundFqdn getInbound() { + return inbound; + } + + + public void setInbound(InboundFqdn inbound) { + this.inbound = inbound; + } + + + /** + * Return true if this CreateFqdnConnectionRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFqdnConnectionRequest createFqdnConnectionRequest = (CreateFqdnConnectionRequest) o; + return Objects.equals(this.active, createFqdnConnectionRequest.active) && + Objects.equals(this.anchorsiteOverride, createFqdnConnectionRequest.anchorsiteOverride) && + Objects.equals(this.connectionName, createFqdnConnectionRequest.connectionName) && + Objects.equals(this.transportProtocol, createFqdnConnectionRequest.transportProtocol) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, createFqdnConnectionRequest.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, createFqdnConnectionRequest.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, createFqdnConnectionRequest.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, createFqdnConnectionRequest.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, createFqdnConnectionRequest.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, createFqdnConnectionRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, createFqdnConnectionRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, createFqdnConnectionRequest.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, createFqdnConnectionRequest.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, createFqdnConnectionRequest.rtcpSettings) && + Objects.equals(this.inbound, createFqdnConnectionRequest.inbound); + } + + @Override + public int hashCode() { + return Objects.hash(active, anchorsiteOverride, connectionName, transportProtocol, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, inbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFqdnConnectionRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateFqdnRequest.java b/src/main/java/com/telnyx/sdk/model/CreateFqdnRequest.java new file mode 100644 index 00000000..e6f3ca09 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateFqdnRequest.java @@ -0,0 +1,209 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateFqdnRequest + */ +@JsonPropertyOrder({ + CreateFqdnRequest.JSON_PROPERTY_CONNECTION_ID, + CreateFqdnRequest.JSON_PROPERTY_FQDN, + CreateFqdnRequest.JSON_PROPERTY_PORT, + CreateFqdnRequest.JSON_PROPERTY_DNS_RECORD_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateFqdnRequest { + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_FQDN = "fqdn"; + private String fqdn; + + public static final String JSON_PROPERTY_PORT = "port"; + private JsonNullable port = JsonNullable.of(5060); + + public static final String JSON_PROPERTY_DNS_RECORD_TYPE = "dns_record_type"; + private String dnsRecordType; + + + public CreateFqdnRequest connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * ID of the FQDN connection to which this IP should be attached. + * @return connectionId + **/ + @ApiModelProperty(required = true, value = "ID of the FQDN connection to which this IP should be attached.") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public CreateFqdnRequest fqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * FQDN represented by this resource. + * @return fqdn + **/ + @ApiModelProperty(example = "example.com", required = true, value = "FQDN represented by this resource.") + @JsonProperty(JSON_PROPERTY_FQDN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFqdn() { + return fqdn; + } + + + public void setFqdn(String fqdn) { + this.fqdn = fqdn; + } + + + public CreateFqdnRequest port(Integer port) { + this.port = JsonNullable.of(port); + return this; + } + + /** + * Port to use when connecting to this FQDN. + * @return port + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5060", value = "Port to use when connecting to this FQDN.") + @JsonIgnore + + public Integer getPort() { + return port.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPort_JsonNullable() { + return port; + } + + @JsonProperty(JSON_PROPERTY_PORT) + public void setPort_JsonNullable(JsonNullable port) { + this.port = port; + } + + public void setPort(Integer port) { + this.port = JsonNullable.of(port); + } + + + public CreateFqdnRequest dnsRecordType(String dnsRecordType) { + this.dnsRecordType = dnsRecordType; + return this; + } + + /** + * The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. + * @return dnsRecordType + **/ + @ApiModelProperty(example = "a", required = true, value = "The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used.") + @JsonProperty(JSON_PROPERTY_DNS_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getDnsRecordType() { + return dnsRecordType; + } + + + public void setDnsRecordType(String dnsRecordType) { + this.dnsRecordType = dnsRecordType; + } + + + /** + * Return true if this CreateFqdnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFqdnRequest createFqdnRequest = (CreateFqdnRequest) o; + return Objects.equals(this.connectionId, createFqdnRequest.connectionId) && + Objects.equals(this.fqdn, createFqdnRequest.fqdn) && + Objects.equals(this.port, createFqdnRequest.port) && + Objects.equals(this.dnsRecordType, createFqdnRequest.dnsRecordType); + } + + @Override + public int hashCode() { + return Objects.hash(connectionId, fqdn, port, dnsRecordType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFqdnRequest {\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" fqdn: ").append(toIndentedString(fqdn)).append("\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append(" dnsRecordType: ").append(toIndentedString(dnsRecordType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateInboundIpRequest.java b/src/main/java/com/telnyx/sdk/model/CreateInboundIpRequest.java new file mode 100644 index 00000000..e98237f7 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateInboundIpRequest.java @@ -0,0 +1,724 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateInboundIpRequest + */ +@JsonPropertyOrder({ + CreateInboundIpRequest.JSON_PROPERTY_ANI_NUMBER_FORMAT, + CreateInboundIpRequest.JSON_PROPERTY_DNIS_NUMBER_FORMAT, + CreateInboundIpRequest.JSON_PROPERTY_CODECS, + CreateInboundIpRequest.JSON_PROPERTY_DEFAULT_ROUTING_METHOD, + CreateInboundIpRequest.JSON_PROPERTY_CHANNEL_LIMIT, + CreateInboundIpRequest.JSON_PROPERTY_GENERATE_RINGBACK_TONE, + CreateInboundIpRequest.JSON_PROPERTY_ISUP_HEADERS_ENABLED, + CreateInboundIpRequest.JSON_PROPERTY_PRACK_ENABLED, + CreateInboundIpRequest.JSON_PROPERTY_PRIVACY_ZONE_ENABLED, + CreateInboundIpRequest.JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED, + CreateInboundIpRequest.JSON_PROPERTY_SIP_REGION, + CreateInboundIpRequest.JSON_PROPERTY_SIP_SUBDOMAIN, + CreateInboundIpRequest.JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS, + CreateInboundIpRequest.JSON_PROPERTY_TIMEOUT1XX_SECS, + CreateInboundIpRequest.JSON_PROPERTY_TIMEOUT2XX_SECS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateInboundIpRequest { + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + */ + public enum AniNumberFormatEnum { + _E_164("+E.164"), + + E_164("E.164"), + + _E_164_NATIONAL("+E.164-national"), + + E_164_NATIONAL("E.164-national"); + + private String value; + + AniNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AniNumberFormatEnum fromValue(String value) { + for (AniNumberFormatEnum b : AniNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ANI_NUMBER_FORMAT = "ani_number_format"; + private AniNumberFormatEnum aniNumberFormat = AniNumberFormatEnum.E_164_NATIONAL; + + /** + * Gets or Sets dnisNumberFormat + */ + public enum DnisNumberFormatEnum { + _E164("+e164"), + + E164("e164"), + + NATIONAL("national"); + + private String value; + + DnisNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DnisNumberFormatEnum fromValue(String value) { + for (DnisNumberFormatEnum b : DnisNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DNIS_NUMBER_FORMAT = "dnis_number_format"; + private DnisNumberFormatEnum dnisNumberFormat = DnisNumberFormatEnum.E164; + + public static final String JSON_PROPERTY_CODECS = "codecs"; + private List codecs = null; + + /** + * Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. + */ + public enum DefaultRoutingMethodEnum { + SEQUENTIAL("sequential"), + + ROUND_ROBIN("round-robin"); + + private String value; + + DefaultRoutingMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DefaultRoutingMethodEnum fromValue(String value) { + for (DefaultRoutingMethodEnum b : DefaultRoutingMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DEFAULT_ROUTING_METHOD = "default_routing_method"; + private DefaultRoutingMethodEnum defaultRoutingMethod; + + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_GENERATE_RINGBACK_TONE = "generate_ringback_tone"; + private Boolean generateRingbackTone = false; + + public static final String JSON_PROPERTY_ISUP_HEADERS_ENABLED = "isup_headers_enabled"; + private Boolean isupHeadersEnabled = false; + + public static final String JSON_PROPERTY_PRACK_ENABLED = "prack_enabled"; + private Boolean prackEnabled = false; + + public static final String JSON_PROPERTY_PRIVACY_ZONE_ENABLED = "privacy_zone_enabled"; + private Boolean privacyZoneEnabled = false; + + public static final String JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED = "sip_compact_headers_enabled"; + private Boolean sipCompactHeadersEnabled = true; + + /** + * Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + */ + public enum SipRegionEnum { + US("US"), + + EUROPE("Europe"), + + AUSTRALIA("Australia"); + + private String value; + + SipRegionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipRegionEnum fromValue(String value) { + for (SipRegionEnum b : SipRegionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_REGION = "sip_region"; + private SipRegionEnum sipRegion = SipRegionEnum.US; + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN = "sip_subdomain"; + private String sipSubdomain; + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + */ + public enum SipSubdomainReceiveSettingsEnum { + ONLY_MY_CONNECTIONS("only_my_connections"), + + FROM_ANYONE("from_anyone"); + + private String value; + + SipSubdomainReceiveSettingsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipSubdomainReceiveSettingsEnum fromValue(String value) { + for (SipSubdomainReceiveSettingsEnum b : SipSubdomainReceiveSettingsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS = "sip_subdomain_receive_settings"; + private SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings; + + public static final String JSON_PROPERTY_TIMEOUT1XX_SECS = "timeout_1xx_secs"; + private Integer timeout1xxSecs = 3; + + public static final String JSON_PROPERTY_TIMEOUT2XX_SECS = "timeout_2xx_secs"; + private Integer timeout2xxSecs = 90; + + + public CreateInboundIpRequest aniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + return this; + } + + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @return aniNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.") + @JsonProperty(JSON_PROPERTY_ANI_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AniNumberFormatEnum getAniNumberFormat() { + return aniNumberFormat; + } + + + public void setAniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + } + + + public CreateInboundIpRequest dnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + return this; + } + + /** + * Get dnisNumberFormat + * @return dnisNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DNIS_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DnisNumberFormatEnum getDnisNumberFormat() { + return dnisNumberFormat; + } + + + public void setDnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + } + + + public CreateInboundIpRequest codecs(List codecs) { + this.codecs = codecs; + return this; + } + + public CreateInboundIpRequest addCodecsItem(String codecsItem) { + if (this.codecs == null) { + this.codecs = new ArrayList<>(); + } + this.codecs.add(codecsItem); + return this; + } + + /** + * Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @return codecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.") + @JsonProperty(JSON_PROPERTY_CODECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCodecs() { + return codecs; + } + + + public void setCodecs(List codecs) { + this.codecs = codecs; + } + + + public CreateInboundIpRequest defaultRoutingMethod(DefaultRoutingMethodEnum defaultRoutingMethod) { + this.defaultRoutingMethod = defaultRoutingMethod; + return this; + } + + /** + * Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. + * @return defaultRoutingMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ROUTING_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DefaultRoutingMethodEnum getDefaultRoutingMethod() { + return defaultRoutingMethod; + } + + + public void setDefaultRoutingMethod(DefaultRoutingMethodEnum defaultRoutingMethod) { + this.defaultRoutingMethod = defaultRoutingMethod; + } + + + public CreateInboundIpRequest channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public CreateInboundIpRequest generateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + return this; + } + + /** + * Generate ringback tone through 183 session progress message with early media. + * @return generateRingbackTone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Generate ringback tone through 183 session progress message with early media.") + @JsonProperty(JSON_PROPERTY_GENERATE_RINGBACK_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getGenerateRingbackTone() { + return generateRingbackTone; + } + + + public void setGenerateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + } + + + public CreateInboundIpRequest isupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + return this; + } + + /** + * When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @return isupHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)") + @JsonProperty(JSON_PROPERTY_ISUP_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsupHeadersEnabled() { + return isupHeadersEnabled; + } + + + public void setIsupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + } + + + public CreateInboundIpRequest prackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + return this; + } + + /** + * Enable PRACK messages as defined in RFC3262. + * @return prackEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable PRACK messages as defined in RFC3262.") + @JsonProperty(JSON_PROPERTY_PRACK_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrackEnabled() { + return prackEnabled; + } + + + public void setPrackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + } + + + public CreateInboundIpRequest privacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + return this; + } + + /** + * By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @return privacyZoneEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.") + @JsonProperty(JSON_PROPERTY_PRIVACY_ZONE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrivacyZoneEnabled() { + return privacyZoneEnabled; + } + + + public void setPrivacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + } + + + public CreateInboundIpRequest sipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + return this; + } + + /** + * Defaults to true. + * @return sipCompactHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true.") + @JsonProperty(JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSipCompactHeadersEnabled() { + return sipCompactHeadersEnabled; + } + + + public void setSipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + } + + + public CreateInboundIpRequest sipRegion(SipRegionEnum sipRegion) { + this.sipRegion = sipRegion; + return this; + } + + /** + * Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + * @return sipRegion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used.") + @JsonProperty(JSON_PROPERTY_SIP_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipRegionEnum getSipRegion() { + return sipRegion; + } + + + public void setSipRegion(SipRegionEnum sipRegion) { + this.sipRegion = sipRegion; + } + + + public CreateInboundIpRequest sipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + return this; + } + + /** + * Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @return sipSubdomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSipSubdomain() { + return sipSubdomain; + } + + + public void setSipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + } + + + public CreateInboundIpRequest sipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + return this; + } + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + * @return sipSubdomainReceiveSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipSubdomainReceiveSettingsEnum getSipSubdomainReceiveSettings() { + return sipSubdomainReceiveSettings; + } + + + public void setSipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + } + + + public CreateInboundIpRequest timeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + return this; + } + + /** + * Time(sec) before aborting if connection is not made. + * minimum: 1 + * maximum: 120 + * @return timeout1xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if connection is not made.") + @JsonProperty(JSON_PROPERTY_TIMEOUT1XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTimeout1xxSecs() { + return timeout1xxSecs; + } + + + public void setTimeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + } + + + public CreateInboundIpRequest timeout2xxSecs(Integer timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + return this; + } + + /** + * Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @return timeout2xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if call is unanswered (min: 1, max: 600).") + @JsonProperty(JSON_PROPERTY_TIMEOUT2XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTimeout2xxSecs() { + return timeout2xxSecs; + } + + + public void setTimeout2xxSecs(Integer timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + } + + + /** + * Return true if this CreateInboundIpRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateInboundIpRequest createInboundIpRequest = (CreateInboundIpRequest) o; + return Objects.equals(this.aniNumberFormat, createInboundIpRequest.aniNumberFormat) && + Objects.equals(this.dnisNumberFormat, createInboundIpRequest.dnisNumberFormat) && + Objects.equals(this.codecs, createInboundIpRequest.codecs) && + Objects.equals(this.defaultRoutingMethod, createInboundIpRequest.defaultRoutingMethod) && + Objects.equals(this.channelLimit, createInboundIpRequest.channelLimit) && + Objects.equals(this.generateRingbackTone, createInboundIpRequest.generateRingbackTone) && + Objects.equals(this.isupHeadersEnabled, createInboundIpRequest.isupHeadersEnabled) && + Objects.equals(this.prackEnabled, createInboundIpRequest.prackEnabled) && + Objects.equals(this.privacyZoneEnabled, createInboundIpRequest.privacyZoneEnabled) && + Objects.equals(this.sipCompactHeadersEnabled, createInboundIpRequest.sipCompactHeadersEnabled) && + Objects.equals(this.sipRegion, createInboundIpRequest.sipRegion) && + Objects.equals(this.sipSubdomain, createInboundIpRequest.sipSubdomain) && + Objects.equals(this.sipSubdomainReceiveSettings, createInboundIpRequest.sipSubdomainReceiveSettings) && + Objects.equals(this.timeout1xxSecs, createInboundIpRequest.timeout1xxSecs) && + Objects.equals(this.timeout2xxSecs, createInboundIpRequest.timeout2xxSecs); + } + + @Override + public int hashCode() { + return Objects.hash(aniNumberFormat, dnisNumberFormat, codecs, defaultRoutingMethod, channelLimit, generateRingbackTone, isupHeadersEnabled, prackEnabled, privacyZoneEnabled, sipCompactHeadersEnabled, sipRegion, sipSubdomain, sipSubdomainReceiveSettings, timeout1xxSecs, timeout2xxSecs); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateInboundIpRequest {\n"); + sb.append(" aniNumberFormat: ").append(toIndentedString(aniNumberFormat)).append("\n"); + sb.append(" dnisNumberFormat: ").append(toIndentedString(dnisNumberFormat)).append("\n"); + sb.append(" codecs: ").append(toIndentedString(codecs)).append("\n"); + sb.append(" defaultRoutingMethod: ").append(toIndentedString(defaultRoutingMethod)).append("\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" generateRingbackTone: ").append(toIndentedString(generateRingbackTone)).append("\n"); + sb.append(" isupHeadersEnabled: ").append(toIndentedString(isupHeadersEnabled)).append("\n"); + sb.append(" prackEnabled: ").append(toIndentedString(prackEnabled)).append("\n"); + sb.append(" privacyZoneEnabled: ").append(toIndentedString(privacyZoneEnabled)).append("\n"); + sb.append(" sipCompactHeadersEnabled: ").append(toIndentedString(sipCompactHeadersEnabled)).append("\n"); + sb.append(" sipRegion: ").append(toIndentedString(sipRegion)).append("\n"); + sb.append(" sipSubdomain: ").append(toIndentedString(sipSubdomain)).append("\n"); + sb.append(" sipSubdomainReceiveSettings: ").append(toIndentedString(sipSubdomainReceiveSettings)).append("\n"); + sb.append(" timeout1xxSecs: ").append(toIndentedString(timeout1xxSecs)).append("\n"); + sb.append(" timeout2xxSecs: ").append(toIndentedString(timeout2xxSecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateIpConnectionRequest.java b/src/main/java/com/telnyx/sdk/model/CreateIpConnectionRequest.java new file mode 100644 index 00000000..31e9a76c --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateIpConnectionRequest.java @@ -0,0 +1,672 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CreateInboundIpRequest; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.OutboundIp; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateIpConnectionRequest + */ +@JsonPropertyOrder({ + CreateIpConnectionRequest.JSON_PROPERTY_ACTIVE, + CreateIpConnectionRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + CreateIpConnectionRequest.JSON_PROPERTY_CONNECTION_NAME, + CreateIpConnectionRequest.JSON_PROPERTY_TRANSPORT_PROTOCOL, + CreateIpConnectionRequest.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + CreateIpConnectionRequest.JSON_PROPERTY_DTMF_TYPE, + CreateIpConnectionRequest.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + CreateIpConnectionRequest.JSON_PROPERTY_ENCRYPTED_MEDIA, + CreateIpConnectionRequest.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + CreateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + CreateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + CreateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_API_VERSION, + CreateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + CreateIpConnectionRequest.JSON_PROPERTY_RTCP_SETTINGS, + CreateIpConnectionRequest.JSON_PROPERTY_INBOUND, + CreateIpConnectionRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIpConnectionRequest { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + /** + * One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + */ + public enum TransportProtocolEnum { + UDP("UDP"), + + TCP("TCP"), + + TLS("TLS"); + + private String value; + + TransportProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TransportProtocolEnum fromValue(String value) { + for (TransportProtocolEnum b : TransportProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TRANSPORT_PROTOCOL = "transport_protocol"; + private TransportProtocolEnum transportProtocol = TransportProtocolEnum.UDP; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = true; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CreateInboundIpRequest inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private OutboundIp outbound; + + + public CreateIpConnectionRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public CreateIpConnectionRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public CreateIpConnectionRequest connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public CreateIpConnectionRequest transportProtocol(TransportProtocolEnum transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + * @return transportProtocol + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "UDP", value = "One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.") + @JsonProperty(JSON_PROPERTY_TRANSPORT_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransportProtocolEnum getTransportProtocol() { + return transportProtocol; + } + + + public void setTransportProtocol(TransportProtocolEnum transportProtocol) { + this.transportProtocol = transportProtocol; + } + + + public CreateIpConnectionRequest defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public CreateIpConnectionRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public CreateIpConnectionRequest encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public CreateIpConnectionRequest encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public CreateIpConnectionRequest onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public CreateIpConnectionRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public CreateIpConnectionRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public CreateIpConnectionRequest webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public CreateIpConnectionRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public CreateIpConnectionRequest rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public CreateIpConnectionRequest inbound(CreateInboundIpRequest inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateInboundIpRequest getInbound() { + return inbound; + } + + + public void setInbound(CreateInboundIpRequest inbound) { + this.inbound = inbound; + } + + + public CreateIpConnectionRequest outbound(OutboundIp outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundIp getOutbound() { + return outbound; + } + + + public void setOutbound(OutboundIp outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this CreateIpConnectionRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIpConnectionRequest createIpConnectionRequest = (CreateIpConnectionRequest) o; + return Objects.equals(this.active, createIpConnectionRequest.active) && + Objects.equals(this.anchorsiteOverride, createIpConnectionRequest.anchorsiteOverride) && + Objects.equals(this.connectionName, createIpConnectionRequest.connectionName) && + Objects.equals(this.transportProtocol, createIpConnectionRequest.transportProtocol) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, createIpConnectionRequest.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, createIpConnectionRequest.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, createIpConnectionRequest.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, createIpConnectionRequest.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, createIpConnectionRequest.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, createIpConnectionRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, createIpConnectionRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, createIpConnectionRequest.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, createIpConnectionRequest.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, createIpConnectionRequest.rtcpSettings) && + Objects.equals(this.inbound, createIpConnectionRequest.inbound) && + Objects.equals(this.outbound, createIpConnectionRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(active, anchorsiteOverride, connectionName, transportProtocol, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIpConnectionRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateIpRequest.java b/src/main/java/com/telnyx/sdk/model/CreateIpRequest.java new file mode 100644 index 00000000..c04ab69e --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateIpRequest.java @@ -0,0 +1,168 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateIpRequest + */ +@JsonPropertyOrder({ + CreateIpRequest.JSON_PROPERTY_CONNECTION_ID, + CreateIpRequest.JSON_PROPERTY_IP_ADDRESS, + CreateIpRequest.JSON_PROPERTY_PORT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateIpRequest { + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_IP_ADDRESS = "ip_address"; + private String ipAddress; + + public static final String JSON_PROPERTY_PORT = "port"; + private Integer port = 5060; + + + public CreateIpRequest connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * ID of the IP Connection to which this IP should be attached. + * @return connectionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ID of the IP Connection to which this IP should be attached.") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public CreateIpRequest ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * IP adddress represented by this resource. + * @return ipAddress + **/ + @ApiModelProperty(example = "192.168.0.0", required = true, value = "IP adddress represented by this resource.") + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getIpAddress() { + return ipAddress; + } + + + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + + + public CreateIpRequest port(Integer port) { + this.port = port; + return this; + } + + /** + * Port to use when connecting to this IP. + * @return port + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5060", value = "Port to use when connecting to this IP.") + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPort() { + return port; + } + + + public void setPort(Integer port) { + this.port = port; + } + + + /** + * Return true if this CreateIpRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateIpRequest createIpRequest = (CreateIpRequest) o; + return Objects.equals(this.connectionId, createIpRequest.connectionId) && + Objects.equals(this.ipAddress, createIpRequest.ipAddress) && + Objects.equals(this.port, createIpRequest.port); + } + + @Override + public int hashCode() { + return Objects.hash(connectionId, ipAddress, port); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateIpRequest {\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequest.java b/src/main/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequest.java new file mode 100644 index 00000000..82a6a818 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequest.java @@ -0,0 +1,516 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundCallRecording; +import com.telnyx.sdk.model.ServicePlan; +import com.telnyx.sdk.model.TrafficType; +import com.telnyx.sdk.model.UsagePaymentMethod; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateOutboundVoiceProfileRequest + */ +@JsonPropertyOrder({ + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_NAME, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_TRAFFIC_TYPE, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_SERVICE_PLAN, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_CONCURRENT_CALL_LIMIT, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_ENABLED, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_TAGS, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_USAGE_PAYMENT_METHOD, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_WHITELISTED_DESTINATIONS, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_MAX_DESTINATION_RATE, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_DAILY_SPEND_LIMIT, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_CALL_RECORDING, + CreateOutboundVoiceProfileRequest.JSON_PROPERTY_BILLING_GROUP_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateOutboundVoiceProfileRequest { + public static final String JSON_PROPERTY_NAME = "name"; + private String name = ""; + + public static final String JSON_PROPERTY_TRAFFIC_TYPE = "traffic_type"; + private TrafficType trafficType = TrafficType.CONVERSATIONAL; + + public static final String JSON_PROPERTY_SERVICE_PLAN = "service_plan"; + private ServicePlan servicePlan = ServicePlan.GLOBAL; + + public static final String JSON_PROPERTY_CONCURRENT_CALL_LIMIT = "concurrent_call_limit"; + private JsonNullable concurrentCallLimit = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled = true; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_USAGE_PAYMENT_METHOD = "usage_payment_method"; + private UsagePaymentMethod usagePaymentMethod = UsagePaymentMethod.RATE_DECK; + + public static final String JSON_PROPERTY_WHITELISTED_DESTINATIONS = "whitelisted_destinations"; + private List whitelistedDestinations = null; + + public static final String JSON_PROPERTY_MAX_DESTINATION_RATE = "max_destination_rate"; + private BigDecimal maxDestinationRate; + + public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT = "daily_spend_limit"; + private String dailySpendLimit; + + public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED = "daily_spend_limit_enabled"; + private Boolean dailySpendLimitEnabled = false; + + public static final String JSON_PROPERTY_CALL_RECORDING = "call_recording"; + private OutboundCallRecording callRecording; + + public static final String JSON_PROPERTY_BILLING_GROUP_ID = "billing_group_id"; + private JsonNullable billingGroupId = JsonNullable.undefined(); + + + public CreateOutboundVoiceProfileRequest name(String name) { + this.name = name; + return this; + } + + /** + * A user-supplied name to help with organization. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "office", value = "A user-supplied name to help with organization.") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateOutboundVoiceProfileRequest trafficType(TrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Get trafficType + * @return trafficType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRAFFIC_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TrafficType getTrafficType() { + return trafficType; + } + + + public void setTrafficType(TrafficType trafficType) { + this.trafficType = trafficType; + } + + + public CreateOutboundVoiceProfileRequest servicePlan(ServicePlan servicePlan) { + this.servicePlan = servicePlan; + return this; + } + + /** + * Get servicePlan + * @return servicePlan + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SERVICE_PLAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ServicePlan getServicePlan() { + return servicePlan; + } + + + public void setServicePlan(ServicePlan servicePlan) { + this.servicePlan = servicePlan; + } + + + public CreateOutboundVoiceProfileRequest concurrentCallLimit(Integer concurrentCallLimit) { + this.concurrentCallLimit = JsonNullable.of(concurrentCallLimit); + return this; + } + + /** + * Must be no more than your global concurrent call limit. Null means no limit. + * @return concurrentCallLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "Must be no more than your global concurrent call limit. Null means no limit.") + @JsonIgnore + + public Integer getConcurrentCallLimit() { + return concurrentCallLimit.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONCURRENT_CALL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getConcurrentCallLimit_JsonNullable() { + return concurrentCallLimit; + } + + @JsonProperty(JSON_PROPERTY_CONCURRENT_CALL_LIMIT) + public void setConcurrentCallLimit_JsonNullable(JsonNullable concurrentCallLimit) { + this.concurrentCallLimit = concurrentCallLimit; + } + + public void setConcurrentCallLimit(Integer concurrentCallLimit) { + this.concurrentCallLimit = JsonNullable.of(concurrentCallLimit); + } + + + public CreateOutboundVoiceProfileRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. + * @return enabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.") + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEnabled() { + return enabled; + } + + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + + public CreateOutboundVoiceProfileRequest tags(List tags) { + this.tags = tags; + return this; + } + + public CreateOutboundVoiceProfileRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[\"office-profile\"]", value = "") + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + public void setTags(List tags) { + this.tags = tags; + } + + + public CreateOutboundVoiceProfileRequest usagePaymentMethod(UsagePaymentMethod usagePaymentMethod) { + this.usagePaymentMethod = usagePaymentMethod; + return this; + } + + /** + * Get usagePaymentMethod + * @return usagePaymentMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USAGE_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UsagePaymentMethod getUsagePaymentMethod() { + return usagePaymentMethod; + } + + + public void setUsagePaymentMethod(UsagePaymentMethod usagePaymentMethod) { + this.usagePaymentMethod = usagePaymentMethod; + } + + + public CreateOutboundVoiceProfileRequest whitelistedDestinations(List whitelistedDestinations) { + this.whitelistedDestinations = whitelistedDestinations; + return this; + } + + public CreateOutboundVoiceProfileRequest addWhitelistedDestinationsItem(String whitelistedDestinationsItem) { + if (this.whitelistedDestinations == null) { + this.whitelistedDestinations = new ArrayList<>(); + } + this.whitelistedDestinations.add(whitelistedDestinationsItem); + return this; + } + + /** + * The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. + * @return whitelistedDestinations + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[\"US\",\"BR\",\"AU\"]", value = "The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.") + @JsonProperty(JSON_PROPERTY_WHITELISTED_DESTINATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getWhitelistedDestinations() { + return whitelistedDestinations; + } + + + public void setWhitelistedDestinations(List whitelistedDestinations) { + this.whitelistedDestinations = whitelistedDestinations; + } + + + public CreateOutboundVoiceProfileRequest maxDestinationRate(BigDecimal maxDestinationRate) { + this.maxDestinationRate = maxDestinationRate; + return this; + } + + /** + * Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. + * @return maxDestinationRate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Maximum rate (price per minute) for a Destination to be allowed when making outbound calls.") + @JsonProperty(JSON_PROPERTY_MAX_DESTINATION_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getMaxDestinationRate() { + return maxDestinationRate; + } + + + public void setMaxDestinationRate(BigDecimal maxDestinationRate) { + this.maxDestinationRate = maxDestinationRate; + } + + + public CreateOutboundVoiceProfileRequest dailySpendLimit(String dailySpendLimit) { + this.dailySpendLimit = dailySpendLimit; + return this; + } + + /** + * The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. + * @return dailySpendLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "100.00", value = "The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.") + @JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDailySpendLimit() { + return dailySpendLimit; + } + + + public void setDailySpendLimit(String dailySpendLimit) { + this.dailySpendLimit = dailySpendLimit; + } + + + public CreateOutboundVoiceProfileRequest dailySpendLimitEnabled(Boolean dailySpendLimitEnabled) { + this.dailySpendLimitEnabled = dailySpendLimitEnabled; + return this; + } + + /** + * Specifies whether to enforce the daily_spend_limit on this outbound voice profile. + * @return dailySpendLimitEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether to enforce the daily_spend_limit on this outbound voice profile.") + @JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDailySpendLimitEnabled() { + return dailySpendLimitEnabled; + } + + + public void setDailySpendLimitEnabled(Boolean dailySpendLimitEnabled) { + this.dailySpendLimitEnabled = dailySpendLimitEnabled; + } + + + public CreateOutboundVoiceProfileRequest callRecording(OutboundCallRecording callRecording) { + this.callRecording = callRecording; + return this; + } + + /** + * Get callRecording + * @return callRecording + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CALL_RECORDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundCallRecording getCallRecording() { + return callRecording; + } + + + public void setCallRecording(OutboundCallRecording callRecording) { + this.callRecording = callRecording; + } + + + public CreateOutboundVoiceProfileRequest billingGroupId(UUID billingGroupId) { + this.billingGroupId = JsonNullable.of(billingGroupId); + return this; + } + + /** + * The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). + * @return billingGroupId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", value = "The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).") + @JsonIgnore + + public UUID getBillingGroupId() { + return billingGroupId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BILLING_GROUP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBillingGroupId_JsonNullable() { + return billingGroupId; + } + + @JsonProperty(JSON_PROPERTY_BILLING_GROUP_ID) + public void setBillingGroupId_JsonNullable(JsonNullable billingGroupId) { + this.billingGroupId = billingGroupId; + } + + public void setBillingGroupId(UUID billingGroupId) { + this.billingGroupId = JsonNullable.of(billingGroupId); + } + + + /** + * Return true if this CreateOutboundVoiceProfileRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOutboundVoiceProfileRequest createOutboundVoiceProfileRequest = (CreateOutboundVoiceProfileRequest) o; + return Objects.equals(this.name, createOutboundVoiceProfileRequest.name) && + Objects.equals(this.trafficType, createOutboundVoiceProfileRequest.trafficType) && + Objects.equals(this.servicePlan, createOutboundVoiceProfileRequest.servicePlan) && + Objects.equals(this.concurrentCallLimit, createOutboundVoiceProfileRequest.concurrentCallLimit) && + Objects.equals(this.enabled, createOutboundVoiceProfileRequest.enabled) && + Objects.equals(this.tags, createOutboundVoiceProfileRequest.tags) && + Objects.equals(this.usagePaymentMethod, createOutboundVoiceProfileRequest.usagePaymentMethod) && + Objects.equals(this.whitelistedDestinations, createOutboundVoiceProfileRequest.whitelistedDestinations) && + Objects.equals(this.maxDestinationRate, createOutboundVoiceProfileRequest.maxDestinationRate) && + Objects.equals(this.dailySpendLimit, createOutboundVoiceProfileRequest.dailySpendLimit) && + Objects.equals(this.dailySpendLimitEnabled, createOutboundVoiceProfileRequest.dailySpendLimitEnabled) && + Objects.equals(this.callRecording, createOutboundVoiceProfileRequest.callRecording) && + Objects.equals(this.billingGroupId, createOutboundVoiceProfileRequest.billingGroupId); + } + + @Override + public int hashCode() { + return Objects.hash(name, trafficType, servicePlan, concurrentCallLimit, enabled, tags, usagePaymentMethod, whitelistedDestinations, maxDestinationRate, dailySpendLimit, dailySpendLimitEnabled, callRecording, billingGroupId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOutboundVoiceProfileRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" trafficType: ").append(toIndentedString(trafficType)).append("\n"); + sb.append(" servicePlan: ").append(toIndentedString(servicePlan)).append("\n"); + sb.append(" concurrentCallLimit: ").append(toIndentedString(concurrentCallLimit)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" usagePaymentMethod: ").append(toIndentedString(usagePaymentMethod)).append("\n"); + sb.append(" whitelistedDestinations: ").append(toIndentedString(whitelistedDestinations)).append("\n"); + sb.append(" maxDestinationRate: ").append(toIndentedString(maxDestinationRate)).append("\n"); + sb.append(" dailySpendLimit: ").append(toIndentedString(dailySpendLimit)).append("\n"); + sb.append(" dailySpendLimitEnabled: ").append(toIndentedString(dailySpendLimitEnabled)).append("\n"); + sb.append(" callRecording: ").append(toIndentedString(callRecording)).append("\n"); + sb.append(" billingGroupId: ").append(toIndentedString(billingGroupId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequest.java b/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequest.java new file mode 100644 index 00000000..7031c654 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequest.java @@ -0,0 +1,541 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestInbound; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestOutbound; +import com.telnyx.sdk.model.DtmfType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateTexmlApplicationRequest + */ +@JsonPropertyOrder({ + CreateTexmlApplicationRequest.JSON_PROPERTY_FRIENDLY_NAME, + CreateTexmlApplicationRequest.JSON_PROPERTY_ACTIVE, + CreateTexmlApplicationRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + CreateTexmlApplicationRequest.JSON_PROPERTY_DTMF_TYPE, + CreateTexmlApplicationRequest.JSON_PROPERTY_FIRST_COMMAND_TIMEOUT, + CreateTexmlApplicationRequest.JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS, + CreateTexmlApplicationRequest.JSON_PROPERTY_VOICE_URL, + CreateTexmlApplicationRequest.JSON_PROPERTY_VOICE_FALLBACK_URL, + CreateTexmlApplicationRequest.JSON_PROPERTY_VOICE_METHOD, + CreateTexmlApplicationRequest.JSON_PROPERTY_STATUS_CALLBACK, + CreateTexmlApplicationRequest.JSON_PROPERTY_STATUS_CALLBACK_METHOD, + CreateTexmlApplicationRequest.JSON_PROPERTY_INBOUND, + CreateTexmlApplicationRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTexmlApplicationRequest { + public static final String JSON_PROPERTY_FRIENDLY_NAME = "friendly_name"; + private String friendlyName; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active = true; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_FIRST_COMMAND_TIMEOUT = "first_command_timeout"; + private Boolean firstCommandTimeout = false; + + public static final String JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS = "first_command_timeout_secs"; + private Integer firstCommandTimeoutSecs = 30; + + public static final String JSON_PROPERTY_VOICE_URL = "voice_url"; + private String voiceUrl; + + public static final String JSON_PROPERTY_VOICE_FALLBACK_URL = "voice_fallback_url"; + private String voiceFallbackUrl = "null"; + + /** + * HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + */ + public enum VoiceMethodEnum { + GET("get"), + + POST("post"); + + private String value; + + VoiceMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VoiceMethodEnum fromValue(String value) { + for (VoiceMethodEnum b : VoiceMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_VOICE_METHOD = "voice_method"; + private VoiceMethodEnum voiceMethod = VoiceMethodEnum.POST; + + public static final String JSON_PROPERTY_STATUS_CALLBACK = "status_callback"; + private String statusCallback = "null"; + + /** + * HTTP request method Telnyx should use when requesting the status_callback URL. + */ + public enum StatusCallbackMethodEnum { + GET("get"), + + POST("post"); + + private String value; + + StatusCallbackMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusCallbackMethodEnum fromValue(String value) { + for (StatusCallbackMethodEnum b : StatusCallbackMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS_CALLBACK_METHOD = "status_callback_method"; + private StatusCallbackMethodEnum statusCallbackMethod = StatusCallbackMethodEnum.POST; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CreateTexmlApplicationRequestInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CreateTexmlApplicationRequestOutbound outbound; + + + public CreateTexmlApplicationRequest friendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * A user-assigned name to help manage the application. + * @return friendlyName + **/ + @ApiModelProperty(example = "call-router", required = true, value = "A user-assigned name to help manage the application.") + @JsonProperty(JSON_PROPERTY_FRIENDLY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFriendlyName() { + return friendlyName; + } + + + public void setFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + } + + + public CreateTexmlApplicationRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Specifies whether the connection can be used. + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Specifies whether the connection can be used.") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public CreateTexmlApplicationRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public CreateTexmlApplicationRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public CreateTexmlApplicationRequest firstCommandTimeout(Boolean firstCommandTimeout) { + this.firstCommandTimeout = firstCommandTimeout; + return this; + } + + /** + * Specifies whether calls to phone numbers associated with this connection should hangup after timing out. + * @return firstCommandTimeout + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.") + @JsonProperty(JSON_PROPERTY_FIRST_COMMAND_TIMEOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getFirstCommandTimeout() { + return firstCommandTimeout; + } + + + public void setFirstCommandTimeout(Boolean firstCommandTimeout) { + this.firstCommandTimeout = firstCommandTimeout; + } + + + public CreateTexmlApplicationRequest firstCommandTimeoutSecs(Integer firstCommandTimeoutSecs) { + this.firstCommandTimeoutSecs = firstCommandTimeoutSecs; + return this; + } + + /** + * Specifies how many seconds to wait before timing out a dial command. + * @return firstCommandTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "Specifies how many seconds to wait before timing out a dial command.") + @JsonProperty(JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFirstCommandTimeoutSecs() { + return firstCommandTimeoutSecs; + } + + + public void setFirstCommandTimeoutSecs(Integer firstCommandTimeoutSecs) { + this.firstCommandTimeoutSecs = firstCommandTimeoutSecs; + } + + + public CreateTexmlApplicationRequest voiceUrl(String voiceUrl) { + this.voiceUrl = voiceUrl; + return this; + } + + /** + * URL to which Telnyx will deliver your XML Translator webhooks. + * @return voiceUrl + **/ + @ApiModelProperty(example = "https://example.com", required = true, value = "URL to which Telnyx will deliver your XML Translator webhooks.") + @JsonProperty(JSON_PROPERTY_VOICE_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getVoiceUrl() { + return voiceUrl; + } + + + public void setVoiceUrl(String voiceUrl) { + this.voiceUrl = voiceUrl; + } + + + public CreateTexmlApplicationRequest voiceFallbackUrl(String voiceFallbackUrl) { + this.voiceFallbackUrl = voiceFallbackUrl; + return this; + } + + /** + * URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. + * @return voiceFallbackUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://fallback.example.com", value = "URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url.") + @JsonProperty(JSON_PROPERTY_VOICE_FALLBACK_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVoiceFallbackUrl() { + return voiceFallbackUrl; + } + + + public void setVoiceFallbackUrl(String voiceFallbackUrl) { + this.voiceFallbackUrl = voiceFallbackUrl; + } + + + public CreateTexmlApplicationRequest voiceMethod(VoiceMethodEnum voiceMethod) { + this.voiceMethod = voiceMethod; + return this; + } + + /** + * HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + * @return voiceMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "get", value = "HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'.") + @JsonProperty(JSON_PROPERTY_VOICE_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public VoiceMethodEnum getVoiceMethod() { + return voiceMethod; + } + + + public void setVoiceMethod(VoiceMethodEnum voiceMethod) { + this.voiceMethod = voiceMethod; + } + + + public CreateTexmlApplicationRequest statusCallback(String statusCallback) { + this.statusCallback = statusCallback; + return this; + } + + /** + * URL for Telnyx to send requests to containing information about call progress events. + * @return statusCallback + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "URL for Telnyx to send requests to containing information about call progress events.") + @JsonProperty(JSON_PROPERTY_STATUS_CALLBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatusCallback() { + return statusCallback; + } + + + public void setStatusCallback(String statusCallback) { + this.statusCallback = statusCallback; + } + + + public CreateTexmlApplicationRequest statusCallbackMethod(StatusCallbackMethodEnum statusCallbackMethod) { + this.statusCallbackMethod = statusCallbackMethod; + return this; + } + + /** + * HTTP request method Telnyx should use when requesting the status_callback URL. + * @return statusCallbackMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "get", value = "HTTP request method Telnyx should use when requesting the status_callback URL.") + @JsonProperty(JSON_PROPERTY_STATUS_CALLBACK_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusCallbackMethodEnum getStatusCallbackMethod() { + return statusCallbackMethod; + } + + + public void setStatusCallbackMethod(StatusCallbackMethodEnum statusCallbackMethod) { + this.statusCallbackMethod = statusCallbackMethod; + } + + + public CreateTexmlApplicationRequest inbound(CreateTexmlApplicationRequestInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateTexmlApplicationRequestInbound getInbound() { + return inbound; + } + + + public void setInbound(CreateTexmlApplicationRequestInbound inbound) { + this.inbound = inbound; + } + + + public CreateTexmlApplicationRequest outbound(CreateTexmlApplicationRequestOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateTexmlApplicationRequestOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CreateTexmlApplicationRequestOutbound outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this CreateTexmlApplicationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTexmlApplicationRequest createTexmlApplicationRequest = (CreateTexmlApplicationRequest) o; + return Objects.equals(this.friendlyName, createTexmlApplicationRequest.friendlyName) && + Objects.equals(this.active, createTexmlApplicationRequest.active) && + Objects.equals(this.anchorsiteOverride, createTexmlApplicationRequest.anchorsiteOverride) && + Objects.equals(this.dtmfType, createTexmlApplicationRequest.dtmfType) && + Objects.equals(this.firstCommandTimeout, createTexmlApplicationRequest.firstCommandTimeout) && + Objects.equals(this.firstCommandTimeoutSecs, createTexmlApplicationRequest.firstCommandTimeoutSecs) && + Objects.equals(this.voiceUrl, createTexmlApplicationRequest.voiceUrl) && + Objects.equals(this.voiceFallbackUrl, createTexmlApplicationRequest.voiceFallbackUrl) && + Objects.equals(this.voiceMethod, createTexmlApplicationRequest.voiceMethod) && + Objects.equals(this.statusCallback, createTexmlApplicationRequest.statusCallback) && + Objects.equals(this.statusCallbackMethod, createTexmlApplicationRequest.statusCallbackMethod) && + Objects.equals(this.inbound, createTexmlApplicationRequest.inbound) && + Objects.equals(this.outbound, createTexmlApplicationRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(friendlyName, active, anchorsiteOverride, dtmfType, firstCommandTimeout, firstCommandTimeoutSecs, voiceUrl, voiceFallbackUrl, voiceMethod, statusCallback, statusCallbackMethod, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTexmlApplicationRequest {\n"); + sb.append(" friendlyName: ").append(toIndentedString(friendlyName)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" firstCommandTimeout: ").append(toIndentedString(firstCommandTimeout)).append("\n"); + sb.append(" firstCommandTimeoutSecs: ").append(toIndentedString(firstCommandTimeoutSecs)).append("\n"); + sb.append(" voiceUrl: ").append(toIndentedString(voiceUrl)).append("\n"); + sb.append(" voiceFallbackUrl: ").append(toIndentedString(voiceFallbackUrl)).append("\n"); + sb.append(" voiceMethod: ").append(toIndentedString(voiceMethod)).append("\n"); + sb.append(" statusCallback: ").append(toIndentedString(statusCallback)).append("\n"); + sb.append(" statusCallbackMethod: ").append(toIndentedString(statusCallbackMethod)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInbound.java b/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInbound.java new file mode 100644 index 00000000..ce7c12ec --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInbound.java @@ -0,0 +1,204 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateTexmlApplicationRequestInbound + */ +@JsonPropertyOrder({ + CreateTexmlApplicationRequestInbound.JSON_PROPERTY_CHANNEL_LIMIT, + CreateTexmlApplicationRequestInbound.JSON_PROPERTY_SIP_SUBDOMAIN, + CreateTexmlApplicationRequestInbound.JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTexmlApplicationRequestInbound { + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN = "sip_subdomain"; + private String sipSubdomain = "null"; + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + */ + public enum SipSubdomainReceiveSettingsEnum { + ONLY_MY_CONNECTIONS("only_my_connections"), + + FROM_ANYONE("from_anyone"); + + private String value; + + SipSubdomainReceiveSettingsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipSubdomainReceiveSettingsEnum fromValue(String value) { + for (SipSubdomainReceiveSettingsEnum b : SipSubdomainReceiveSettingsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS = "sip_subdomain_receive_settings"; + private SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings = SipSubdomainReceiveSettingsEnum.FROM_ANYONE; + + + public CreateTexmlApplicationRequestInbound channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public CreateTexmlApplicationRequestInbound sipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + return this; + } + + /** + * Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @return sipSubdomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "example", value = "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSipSubdomain() { + return sipSubdomain; + } + + + public void setSipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + } + + + public CreateTexmlApplicationRequestInbound sipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + return this; + } + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + * @return sipSubdomainReceiveSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "only_my_connections", value = "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipSubdomainReceiveSettingsEnum getSipSubdomainReceiveSettings() { + return sipSubdomainReceiveSettings; + } + + + public void setSipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + } + + + /** + * Return true if this CreateTexmlApplicationRequest_inbound object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTexmlApplicationRequestInbound createTexmlApplicationRequestInbound = (CreateTexmlApplicationRequestInbound) o; + return Objects.equals(this.channelLimit, createTexmlApplicationRequestInbound.channelLimit) && + Objects.equals(this.sipSubdomain, createTexmlApplicationRequestInbound.sipSubdomain) && + Objects.equals(this.sipSubdomainReceiveSettings, createTexmlApplicationRequestInbound.sipSubdomainReceiveSettings); + } + + @Override + public int hashCode() { + return Objects.hash(channelLimit, sipSubdomain, sipSubdomainReceiveSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTexmlApplicationRequestInbound {\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" sipSubdomain: ").append(toIndentedString(sipSubdomain)).append("\n"); + sb.append(" sipSubdomainReceiveSettings: ").append(toIndentedString(sipSubdomainReceiveSettings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutbound.java b/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutbound.java new file mode 100644 index 00000000..8b4cfc1c --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutbound.java @@ -0,0 +1,139 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CreateTexmlApplicationRequestOutbound + */ +@JsonPropertyOrder({ + CreateTexmlApplicationRequestOutbound.JSON_PROPERTY_CHANNEL_LIMIT, + CreateTexmlApplicationRequestOutbound.JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTexmlApplicationRequestOutbound { + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID = "outbound_voice_profile_id"; + private String outboundVoiceProfileId; + + + public CreateTexmlApplicationRequestOutbound channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public CreateTexmlApplicationRequestOutbound outboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + return this; + } + + /** + * Identifies the associated outbound voice profile. + * @return outboundVoiceProfileId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the associated outbound voice profile.") + @JsonProperty(JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutboundVoiceProfileId() { + return outboundVoiceProfileId; + } + + + public void setOutboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + } + + + /** + * Return true if this CreateTexmlApplicationRequest_outbound object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTexmlApplicationRequestOutbound createTexmlApplicationRequestOutbound = (CreateTexmlApplicationRequestOutbound) o; + return Objects.equals(this.channelLimit, createTexmlApplicationRequestOutbound.channelLimit) && + Objects.equals(this.outboundVoiceProfileId, createTexmlApplicationRequestOutbound.outboundVoiceProfileId); + } + + @Override + public int hashCode() { + return Objects.hash(channelLimit, outboundVoiceProfileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTexmlApplicationRequestOutbound {\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" outboundVoiceProfileId: ").append(toIndentedString(outboundVoiceProfileId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CredentialConnection.java b/src/main/java/com/telnyx/sdk/model/CredentialConnection.java new file mode 100644 index 00000000..9ec25c04 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CredentialConnection.java @@ -0,0 +1,852 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CredentialInbound; +import com.telnyx.sdk.model.CredentialOutbound; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CredentialConnection + */ +@JsonPropertyOrder({ + CredentialConnection.JSON_PROPERTY_ID, + CredentialConnection.JSON_PROPERTY_RECORD_TYPE, + CredentialConnection.JSON_PROPERTY_ACTIVE, + CredentialConnection.JSON_PROPERTY_USER_NAME, + CredentialConnection.JSON_PROPERTY_PASSWORD, + CredentialConnection.JSON_PROPERTY_CREATED_AT, + CredentialConnection.JSON_PROPERTY_UPDATED_AT, + CredentialConnection.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + CredentialConnection.JSON_PROPERTY_CONNECTION_NAME, + CredentialConnection.JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE, + CredentialConnection.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + CredentialConnection.JSON_PROPERTY_DTMF_TYPE, + CredentialConnection.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + CredentialConnection.JSON_PROPERTY_ENCRYPTED_MEDIA, + CredentialConnection.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + CredentialConnection.JSON_PROPERTY_WEBHOOK_EVENT_URL, + CredentialConnection.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + CredentialConnection.JSON_PROPERTY_WEBHOOK_API_VERSION, + CredentialConnection.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + CredentialConnection.JSON_PROPERTY_RTCP_SETTINGS, + CredentialConnection.JSON_PROPERTY_INBOUND, + CredentialConnection.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CredentialConnection { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_USER_NAME = "user_name"; + private String userName; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + /** + * This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + */ + public enum SipUriCallingPreferenceEnum { + DISABLED("disabled"), + + UNRESTRICTED("unrestricted"), + + INTERNAL("internal"); + + private String value; + + SipUriCallingPreferenceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipUriCallingPreferenceEnum fromValue(String value) { + for (SipUriCallingPreferenceEnum b : SipUriCallingPreferenceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE = "sip_uri_calling_preference"; + private SipUriCallingPreferenceEnum sipUriCallingPreference = null; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = true; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CredentialInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CredentialOutbound outbound; + + + public CredentialConnection id(String id) { + this.id = id; + return this; + } + + /** + * Identifies the type of resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the type of resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public CredentialConnection recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "credential_connection", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public CredentialConnection active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public CredentialConnection userName(String userName) { + this.userName = userName; + return this; + } + + /** + * The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). + * @return userName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "myusername123", value = "The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters).") + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUserName() { + return userName; + } + + + public void setUserName(String userName) { + this.userName = userName; + } + + + public CredentialConnection password(String password) { + this.password = password; + return this; + } + + /** + * The password to be used as part of the credentials. Must be 8 to 128 characters long. + * @return password + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "my123secure456password789", value = "The password to be used as part of the credentials. Must be 8 to 128 characters long.") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public CredentialConnection createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO-8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO-8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public CredentialConnection updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO-8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO-8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + public CredentialConnection anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public CredentialConnection connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public CredentialConnection sipUriCallingPreference(SipUriCallingPreferenceEnum sipUriCallingPreference) { + this.sipUriCallingPreference = sipUriCallingPreference; + return this; + } + + /** + * This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + * @return sipUriCallingPreference + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "disabled", value = "This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).") + @JsonProperty(JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipUriCallingPreferenceEnum getSipUriCallingPreference() { + return sipUriCallingPreference; + } + + + public void setSipUriCallingPreference(SipUriCallingPreferenceEnum sipUriCallingPreference) { + this.sipUriCallingPreference = sipUriCallingPreference; + } + + + public CredentialConnection defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public CredentialConnection dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public CredentialConnection encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public CredentialConnection encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public CredentialConnection onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public CredentialConnection webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public CredentialConnection webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public CredentialConnection webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public CredentialConnection webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public CredentialConnection rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public CredentialConnection inbound(CredentialInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CredentialInbound getInbound() { + return inbound; + } + + + public void setInbound(CredentialInbound inbound) { + this.inbound = inbound; + } + + + public CredentialConnection outbound(CredentialOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CredentialOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CredentialOutbound outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this CredentialConnection object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CredentialConnection credentialConnection = (CredentialConnection) o; + return Objects.equals(this.id, credentialConnection.id) && + Objects.equals(this.recordType, credentialConnection.recordType) && + Objects.equals(this.active, credentialConnection.active) && + Objects.equals(this.userName, credentialConnection.userName) && + Objects.equals(this.password, credentialConnection.password) && + Objects.equals(this.createdAt, credentialConnection.createdAt) && + Objects.equals(this.updatedAt, credentialConnection.updatedAt) && + Objects.equals(this.anchorsiteOverride, credentialConnection.anchorsiteOverride) && + Objects.equals(this.connectionName, credentialConnection.connectionName) && + Objects.equals(this.sipUriCallingPreference, credentialConnection.sipUriCallingPreference) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, credentialConnection.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, credentialConnection.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, credentialConnection.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, credentialConnection.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, credentialConnection.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, credentialConnection.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, credentialConnection.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, credentialConnection.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, credentialConnection.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, credentialConnection.rtcpSettings) && + Objects.equals(this.inbound, credentialConnection.inbound) && + Objects.equals(this.outbound, credentialConnection.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, active, userName, password, createdAt, updatedAt, anchorsiteOverride, connectionName, sipUriCallingPreference, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CredentialConnection {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" sipUriCallingPreference: ").append(toIndentedString(sipUriCallingPreference)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CredentialConnectionResponse.java b/src/main/java/com/telnyx/sdk/model/CredentialConnectionResponse.java new file mode 100644 index 00000000..193f61c6 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CredentialConnectionResponse.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.CredentialConnection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CredentialConnectionResponse + */ +@JsonPropertyOrder({ + CredentialConnectionResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CredentialConnectionResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private CredentialConnection data; + + + public CredentialConnectionResponse data(CredentialConnection data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CredentialConnection getData() { + return data; + } + + + public void setData(CredentialConnection data) { + this.data = data; + } + + + /** + * Return true if this Credential_Connection_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CredentialConnectionResponse credentialConnectionResponse = (CredentialConnectionResponse) o; + return Objects.equals(this.data, credentialConnectionResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CredentialConnectionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CredentialInbound.java b/src/main/java/com/telnyx/sdk/model/CredentialInbound.java new file mode 100644 index 00000000..cedb2df0 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CredentialInbound.java @@ -0,0 +1,499 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CredentialInbound + */ +@JsonPropertyOrder({ + CredentialInbound.JSON_PROPERTY_ANI_NUMBER_FORMAT, + CredentialInbound.JSON_PROPERTY_DNIS_NUMBER_FORMAT, + CredentialInbound.JSON_PROPERTY_CODECS, + CredentialInbound.JSON_PROPERTY_CHANNEL_LIMIT, + CredentialInbound.JSON_PROPERTY_GENERATE_RINGBACK_TONE, + CredentialInbound.JSON_PROPERTY_ISUP_HEADERS_ENABLED, + CredentialInbound.JSON_PROPERTY_PRACK_ENABLED, + CredentialInbound.JSON_PROPERTY_PRIVACY_ZONE_ENABLED, + CredentialInbound.JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED, + CredentialInbound.JSON_PROPERTY_TIMEOUT1XX_SECS, + CredentialInbound.JSON_PROPERTY_TIMEOUT2XX_SECS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CredentialInbound { + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + */ + public enum AniNumberFormatEnum { + _E_164("+E.164"), + + E_164("E.164"), + + _E_164_NATIONAL("+E.164-national"), + + E_164_NATIONAL("E.164-national"); + + private String value; + + AniNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AniNumberFormatEnum fromValue(String value) { + for (AniNumberFormatEnum b : AniNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ANI_NUMBER_FORMAT = "ani_number_format"; + private AniNumberFormatEnum aniNumberFormat = AniNumberFormatEnum.E_164_NATIONAL; + + /** + * Gets or Sets dnisNumberFormat + */ + public enum DnisNumberFormatEnum { + _E164("+e164"), + + E164("e164"), + + NATIONAL("national"); + + private String value; + + DnisNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DnisNumberFormatEnum fromValue(String value) { + for (DnisNumberFormatEnum b : DnisNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DNIS_NUMBER_FORMAT = "dnis_number_format"; + private DnisNumberFormatEnum dnisNumberFormat = DnisNumberFormatEnum.E164; + + public static final String JSON_PROPERTY_CODECS = "codecs"; + private List codecs = null; + + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_GENERATE_RINGBACK_TONE = "generate_ringback_tone"; + private Boolean generateRingbackTone = false; + + public static final String JSON_PROPERTY_ISUP_HEADERS_ENABLED = "isup_headers_enabled"; + private Boolean isupHeadersEnabled = false; + + public static final String JSON_PROPERTY_PRACK_ENABLED = "prack_enabled"; + private Boolean prackEnabled = false; + + public static final String JSON_PROPERTY_PRIVACY_ZONE_ENABLED = "privacy_zone_enabled"; + private Boolean privacyZoneEnabled = false; + + public static final String JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED = "sip_compact_headers_enabled"; + private Boolean sipCompactHeadersEnabled = true; + + public static final String JSON_PROPERTY_TIMEOUT1XX_SECS = "timeout_1xx_secs"; + private Integer timeout1xxSecs = 3; + + public static final String JSON_PROPERTY_TIMEOUT2XX_SECS = "timeout_2xx_secs"; + private String timeout2xxSecs = "90"; + + + public CredentialInbound aniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + return this; + } + + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @return aniNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.") + @JsonProperty(JSON_PROPERTY_ANI_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AniNumberFormatEnum getAniNumberFormat() { + return aniNumberFormat; + } + + + public void setAniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + } + + + public CredentialInbound dnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + return this; + } + + /** + * Get dnisNumberFormat + * @return dnisNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DNIS_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DnisNumberFormatEnum getDnisNumberFormat() { + return dnisNumberFormat; + } + + + public void setDnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + } + + + public CredentialInbound codecs(List codecs) { + this.codecs = codecs; + return this; + } + + public CredentialInbound addCodecsItem(String codecsItem) { + if (this.codecs == null) { + this.codecs = new ArrayList<>(); + } + this.codecs.add(codecsItem); + return this; + } + + /** + * Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @return codecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.") + @JsonProperty(JSON_PROPERTY_CODECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCodecs() { + return codecs; + } + + + public void setCodecs(List codecs) { + this.codecs = codecs; + } + + + public CredentialInbound channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public CredentialInbound generateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + return this; + } + + /** + * Generate ringback tone through 183 session progress message with early media. + * @return generateRingbackTone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Generate ringback tone through 183 session progress message with early media.") + @JsonProperty(JSON_PROPERTY_GENERATE_RINGBACK_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getGenerateRingbackTone() { + return generateRingbackTone; + } + + + public void setGenerateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + } + + + public CredentialInbound isupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + return this; + } + + /** + * When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @return isupHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)") + @JsonProperty(JSON_PROPERTY_ISUP_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsupHeadersEnabled() { + return isupHeadersEnabled; + } + + + public void setIsupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + } + + + public CredentialInbound prackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + return this; + } + + /** + * Enable PRACK messages as defined in RFC3262. + * @return prackEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable PRACK messages as defined in RFC3262.") + @JsonProperty(JSON_PROPERTY_PRACK_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrackEnabled() { + return prackEnabled; + } + + + public void setPrackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + } + + + public CredentialInbound privacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + return this; + } + + /** + * By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @return privacyZoneEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.") + @JsonProperty(JSON_PROPERTY_PRIVACY_ZONE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrivacyZoneEnabled() { + return privacyZoneEnabled; + } + + + public void setPrivacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + } + + + public CredentialInbound sipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + return this; + } + + /** + * Defaults to true. + * @return sipCompactHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true.") + @JsonProperty(JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSipCompactHeadersEnabled() { + return sipCompactHeadersEnabled; + } + + + public void setSipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + } + + + public CredentialInbound timeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + return this; + } + + /** + * Time(sec) before aborting if connection is not made. + * minimum: 1 + * maximum: 120 + * @return timeout1xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if connection is not made.") + @JsonProperty(JSON_PROPERTY_TIMEOUT1XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTimeout1xxSecs() { + return timeout1xxSecs; + } + + + public void setTimeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + } + + + public CredentialInbound timeout2xxSecs(String timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + return this; + } + + /** + * Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * minimum: 1 + * maximum: 600 + * @return timeout2xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if call is unanswered (min: 1, max: 600).") + @JsonProperty(JSON_PROPERTY_TIMEOUT2XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTimeout2xxSecs() { + return timeout2xxSecs; + } + + + public void setTimeout2xxSecs(String timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + } + + + /** + * Return true if this CredentialInbound object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CredentialInbound credentialInbound = (CredentialInbound) o; + return Objects.equals(this.aniNumberFormat, credentialInbound.aniNumberFormat) && + Objects.equals(this.dnisNumberFormat, credentialInbound.dnisNumberFormat) && + Objects.equals(this.codecs, credentialInbound.codecs) && + Objects.equals(this.channelLimit, credentialInbound.channelLimit) && + Objects.equals(this.generateRingbackTone, credentialInbound.generateRingbackTone) && + Objects.equals(this.isupHeadersEnabled, credentialInbound.isupHeadersEnabled) && + Objects.equals(this.prackEnabled, credentialInbound.prackEnabled) && + Objects.equals(this.privacyZoneEnabled, credentialInbound.privacyZoneEnabled) && + Objects.equals(this.sipCompactHeadersEnabled, credentialInbound.sipCompactHeadersEnabled) && + Objects.equals(this.timeout1xxSecs, credentialInbound.timeout1xxSecs) && + Objects.equals(this.timeout2xxSecs, credentialInbound.timeout2xxSecs); + } + + @Override + public int hashCode() { + return Objects.hash(aniNumberFormat, dnisNumberFormat, codecs, channelLimit, generateRingbackTone, isupHeadersEnabled, prackEnabled, privacyZoneEnabled, sipCompactHeadersEnabled, timeout1xxSecs, timeout2xxSecs); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CredentialInbound {\n"); + sb.append(" aniNumberFormat: ").append(toIndentedString(aniNumberFormat)).append("\n"); + sb.append(" dnisNumberFormat: ").append(toIndentedString(dnisNumberFormat)).append("\n"); + sb.append(" codecs: ").append(toIndentedString(codecs)).append("\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" generateRingbackTone: ").append(toIndentedString(generateRingbackTone)).append("\n"); + sb.append(" isupHeadersEnabled: ").append(toIndentedString(isupHeadersEnabled)).append("\n"); + sb.append(" prackEnabled: ").append(toIndentedString(prackEnabled)).append("\n"); + sb.append(" privacyZoneEnabled: ").append(toIndentedString(privacyZoneEnabled)).append("\n"); + sb.append(" sipCompactHeadersEnabled: ").append(toIndentedString(sipCompactHeadersEnabled)).append("\n"); + sb.append(" timeout1xxSecs: ").append(toIndentedString(timeout1xxSecs)).append("\n"); + sb.append(" timeout2xxSecs: ").append(toIndentedString(timeout2xxSecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/CredentialOutbound.java b/src/main/java/com/telnyx/sdk/model/CredentialOutbound.java new file mode 100644 index 00000000..381ea463 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/CredentialOutbound.java @@ -0,0 +1,429 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * CredentialOutbound + */ +@JsonPropertyOrder({ + CredentialOutbound.JSON_PROPERTY_CALL_PARKING_ENABLED, + CredentialOutbound.JSON_PROPERTY_ANI_OVERRIDE, + CredentialOutbound.JSON_PROPERTY_ANI_OVERRIDE_TYPE, + CredentialOutbound.JSON_PROPERTY_CHANNEL_LIMIT, + CredentialOutbound.JSON_PROPERTY_INSTANT_RINGBACK_ENABLED, + CredentialOutbound.JSON_PROPERTY_GENERATE_RINGBACK_TONE, + CredentialOutbound.JSON_PROPERTY_LOCALIZATION, + CredentialOutbound.JSON_PROPERTY_T38_REINVITE_SOURCE, + CredentialOutbound.JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CredentialOutbound { + public static final String JSON_PROPERTY_CALL_PARKING_ENABLED = "call_parking_enabled"; + private Boolean callParkingEnabled = false; + + public static final String JSON_PROPERTY_ANI_OVERRIDE = "ani_override"; + private String aniOverride = ""; + + /** + * Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. + */ + public enum AniOverrideTypeEnum { + ALWAYS("always"), + + NORMAL("normal"), + + EMERGENCY("emergency"); + + private String value; + + AniOverrideTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AniOverrideTypeEnum fromValue(String value) { + for (AniOverrideTypeEnum b : AniOverrideTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ANI_OVERRIDE_TYPE = "ani_override_type"; + private AniOverrideTypeEnum aniOverrideType = AniOverrideTypeEnum.ALWAYS; + + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_INSTANT_RINGBACK_ENABLED = "instant_ringback_enabled"; + private Boolean instantRingbackEnabled = true; + + public static final String JSON_PROPERTY_GENERATE_RINGBACK_TONE = "generate_ringback_tone"; + private Boolean generateRingbackTone = false; + + public static final String JSON_PROPERTY_LOCALIZATION = "localization"; + private String localization = "US"; + + /** + * This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. + */ + public enum T38ReinviteSourceEnum { + TELNYX("telnyx"), + + CUSTOMER("customer"), + + DISABLED("disabled"), + + PASSTHRU("passthru"), + + CALLER_PASSTHRU("caller-passthru"), + + CALLEE_PASSTHRU("callee-passthru"); + + private String value; + + T38ReinviteSourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static T38ReinviteSourceEnum fromValue(String value) { + for (T38ReinviteSourceEnum b : T38ReinviteSourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_T38_REINVITE_SOURCE = "t38_reinvite_source"; + private T38ReinviteSourceEnum t38ReinviteSource = T38ReinviteSourceEnum.TELNYX; + + public static final String JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID = "outbound_voice_profile_id"; + private String outboundVoiceProfileId; + + + public CredentialOutbound callParkingEnabled(Boolean callParkingEnabled) { + this.callParkingEnabled = callParkingEnabled; + return this; + } + + /** + * Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next. + * @return callParkingEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next.") + @JsonProperty(JSON_PROPERTY_CALL_PARKING_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getCallParkingEnabled() { + return callParkingEnabled; + } + + + public void setCallParkingEnabled(Boolean callParkingEnabled) { + this.callParkingEnabled = callParkingEnabled; + } + + + public CredentialOutbound aniOverride(String aniOverride) { + this.aniOverride = aniOverride; + return this; + } + + /** + * Set a phone number as the ani_override value to override caller id number on outbound calls. + * @return aniOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Set a phone number as the ani_override value to override caller id number on outbound calls.") + @JsonProperty(JSON_PROPERTY_ANI_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAniOverride() { + return aniOverride; + } + + + public void setAniOverride(String aniOverride) { + this.aniOverride = aniOverride; + } + + + public CredentialOutbound aniOverrideType(AniOverrideTypeEnum aniOverrideType) { + this.aniOverrideType = aniOverrideType; + return this; + } + + /** + * Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. + * @return aniOverrideType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.") + @JsonProperty(JSON_PROPERTY_ANI_OVERRIDE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AniOverrideTypeEnum getAniOverrideType() { + return aniOverrideType; + } + + + public void setAniOverrideType(AniOverrideTypeEnum aniOverrideType) { + this.aniOverrideType = aniOverrideType; + } + + + public CredentialOutbound channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public CredentialOutbound instantRingbackEnabled(Boolean instantRingbackEnabled) { + this.instantRingbackEnabled = instantRingbackEnabled; + return this; + } + + /** + * When set, ringback will not wait for indication before sending ringback tone to calling party. + * @return instantRingbackEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, ringback will not wait for indication before sending ringback tone to calling party.") + @JsonProperty(JSON_PROPERTY_INSTANT_RINGBACK_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getInstantRingbackEnabled() { + return instantRingbackEnabled; + } + + + public void setInstantRingbackEnabled(Boolean instantRingbackEnabled) { + this.instantRingbackEnabled = instantRingbackEnabled; + } + + + public CredentialOutbound generateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + return this; + } + + /** + * Generate ringback tone through 183 session progress message with early media. + * @return generateRingbackTone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Generate ringback tone through 183 session progress message with early media.") + @JsonProperty(JSON_PROPERTY_GENERATE_RINGBACK_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getGenerateRingbackTone() { + return generateRingbackTone; + } + + + public void setGenerateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + } + + + public CredentialOutbound localization(String localization) { + this.localization = localization; + return this; + } + + /** + * A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default. + * @return localization + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "US", value = "A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.") + @JsonProperty(JSON_PROPERTY_LOCALIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLocalization() { + return localization; + } + + + public void setLocalization(String localization) { + this.localization = localization; + } + + + public CredentialOutbound t38ReinviteSource(T38ReinviteSourceEnum t38ReinviteSource) { + this.t38ReinviteSource = t38ReinviteSource; + return this; + } + + /** + * This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. + * @return t38ReinviteSource + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite.") + @JsonProperty(JSON_PROPERTY_T38_REINVITE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public T38ReinviteSourceEnum getT38ReinviteSource() { + return t38ReinviteSource; + } + + + public void setT38ReinviteSource(T38ReinviteSourceEnum t38ReinviteSource) { + this.t38ReinviteSource = t38ReinviteSource; + } + + + public CredentialOutbound outboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + return this; + } + + /** + * Identifies the associated outbound voice profile. + * @return outboundVoiceProfileId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the associated outbound voice profile.") + @JsonProperty(JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutboundVoiceProfileId() { + return outboundVoiceProfileId; + } + + + public void setOutboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + } + + + /** + * Return true if this CredentialOutbound object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CredentialOutbound credentialOutbound = (CredentialOutbound) o; + return Objects.equals(this.callParkingEnabled, credentialOutbound.callParkingEnabled) && + Objects.equals(this.aniOverride, credentialOutbound.aniOverride) && + Objects.equals(this.aniOverrideType, credentialOutbound.aniOverrideType) && + Objects.equals(this.channelLimit, credentialOutbound.channelLimit) && + Objects.equals(this.instantRingbackEnabled, credentialOutbound.instantRingbackEnabled) && + Objects.equals(this.generateRingbackTone, credentialOutbound.generateRingbackTone) && + Objects.equals(this.localization, credentialOutbound.localization) && + Objects.equals(this.t38ReinviteSource, credentialOutbound.t38ReinviteSource) && + Objects.equals(this.outboundVoiceProfileId, credentialOutbound.outboundVoiceProfileId); + } + + @Override + public int hashCode() { + return Objects.hash(callParkingEnabled, aniOverride, aniOverrideType, channelLimit, instantRingbackEnabled, generateRingbackTone, localization, t38ReinviteSource, outboundVoiceProfileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CredentialOutbound {\n"); + sb.append(" callParkingEnabled: ").append(toIndentedString(callParkingEnabled)).append("\n"); + sb.append(" aniOverride: ").append(toIndentedString(aniOverride)).append("\n"); + sb.append(" aniOverrideType: ").append(toIndentedString(aniOverrideType)).append("\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" instantRingbackEnabled: ").append(toIndentedString(instantRingbackEnabled)).append("\n"); + sb.append(" generateRingbackTone: ").append(toIndentedString(generateRingbackTone)).append("\n"); + sb.append(" localization: ").append(toIndentedString(localization)).append("\n"); + sb.append(" t38ReinviteSource: ").append(toIndentedString(t38ReinviteSource)).append("\n"); + sb.append(" outboundVoiceProfileId: ").append(toIndentedString(outboundVoiceProfileId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/DtmfType.java b/src/main/java/com/telnyx/sdk/model/DtmfType.java new file mode 100644 index 00000000..252c0bd3 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/DtmfType.java @@ -0,0 +1,65 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats. + */ +public enum DtmfType { + + RFC_2833("RFC 2833"), + + INBAND("Inband"), + + SIP_INFO("SIP INFO"); + + private String value; + + DtmfType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DtmfType fromValue(String value) { + for (DtmfType b : DtmfType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/EncryptedMedia.java b/src/main/java/com/telnyx/sdk/model/EncryptedMedia.java new file mode 100644 index 00000000..971b1202 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/EncryptedMedia.java @@ -0,0 +1,63 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS. + */ +public enum EncryptedMedia { + + SRTP("SRTP"), + + ZRTP("ZRTP"); + + private String value; + + EncryptedMedia(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EncryptedMedia fromValue(String value) { + for (EncryptedMedia b : EncryptedMedia.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/FaxApplication.java b/src/main/java/com/telnyx/sdk/model/FaxApplication.java new file mode 100644 index 00000000..549a8569 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/FaxApplication.java @@ -0,0 +1,459 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateFaxApplicationRequestInbound; +import com.telnyx.sdk.model.CreateFaxApplicationRequestOutbound; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * FaxApplication + */ +@JsonPropertyOrder({ + FaxApplication.JSON_PROPERTY_ID, + FaxApplication.JSON_PROPERTY_RECORD_TYPE, + FaxApplication.JSON_PROPERTY_APPLICATION_NAME, + FaxApplication.JSON_PROPERTY_ACTIVE, + FaxApplication.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + FaxApplication.JSON_PROPERTY_WEBHOOK_EVENT_URL, + FaxApplication.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + FaxApplication.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + FaxApplication.JSON_PROPERTY_INBOUND, + FaxApplication.JSON_PROPERTY_OUTBOUND, + FaxApplication.JSON_PROPERTY_CREATED_AT, + FaxApplication.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxApplication { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_APPLICATION_NAME = "application_name"; + private String applicationName; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active = true; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CreateFaxApplicationRequestInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CreateFaxApplicationRequestOutbound outbound; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + + /** + * Identifies the resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + + + public FaxApplication recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fax_application", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public FaxApplication applicationName(String applicationName) { + this.applicationName = applicationName; + return this; + } + + /** + * A user-assigned name to help manage the application. + * @return applicationName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "call-router", value = "A user-assigned name to help manage the application.") + @JsonProperty(JSON_PROPERTY_APPLICATION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + + public FaxApplication active(Boolean active) { + this.active = active; + return this; + } + + /** + * Specifies whether the connection can be used. + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Specifies whether the connection can be used.") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public FaxApplication anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public FaxApplication webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public FaxApplication webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public FaxApplication webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public FaxApplication inbound(CreateFaxApplicationRequestInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateFaxApplicationRequestInbound getInbound() { + return inbound; + } + + + public void setInbound(CreateFaxApplicationRequestInbound inbound) { + this.inbound = inbound; + } + + + public FaxApplication outbound(CreateFaxApplicationRequestOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateFaxApplicationRequestOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CreateFaxApplicationRequestOutbound outbound) { + this.outbound = outbound; + } + + + public FaxApplication createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public FaxApplication updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this FaxApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxApplication faxApplication = (FaxApplication) o; + return Objects.equals(this.id, faxApplication.id) && + Objects.equals(this.recordType, faxApplication.recordType) && + Objects.equals(this.applicationName, faxApplication.applicationName) && + Objects.equals(this.active, faxApplication.active) && + Objects.equals(this.anchorsiteOverride, faxApplication.anchorsiteOverride) && + Objects.equals(this.webhookEventUrl, faxApplication.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, faxApplication.webhookEventFailoverUrl) && + Objects.equals(this.webhookTimeoutSecs, faxApplication.webhookTimeoutSecs) && + Objects.equals(this.inbound, faxApplication.inbound) && + Objects.equals(this.outbound, faxApplication.outbound) && + Objects.equals(this.createdAt, faxApplication.createdAt) && + Objects.equals(this.updatedAt, faxApplication.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, applicationName, active, anchorsiteOverride, webhookEventUrl, webhookEventFailoverUrl, webhookTimeoutSecs, inbound, outbound, createdAt, updatedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxApplication {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/Fqdn.java b/src/main/java/com/telnyx/sdk/model/Fqdn.java new file mode 100644 index 00000000..e4a4824b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/Fqdn.java @@ -0,0 +1,319 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * Fqdn + */ +@JsonPropertyOrder({ + Fqdn.JSON_PROPERTY_ID, + Fqdn.JSON_PROPERTY_RECORD_TYPE, + Fqdn.JSON_PROPERTY_CONNECTION_ID, + Fqdn.JSON_PROPERTY_FQDN, + Fqdn.JSON_PROPERTY_PORT, + Fqdn.JSON_PROPERTY_DNS_RECORD_TYPE, + Fqdn.JSON_PROPERTY_CREATED_AT, + Fqdn.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Fqdn { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_FQDN = "fqdn"; + private String fqdn; + + public static final String JSON_PROPERTY_PORT = "port"; + private Integer port = 5060; + + public static final String JSON_PROPERTY_DNS_RECORD_TYPE = "dns_record_type"; + private String dnsRecordType; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + + public Fqdn id(String id) { + this.id = id; + return this; + } + + /** + * Identifies the resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public Fqdn recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fqdn", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public Fqdn connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * ID of the FQDN connection to which this FQDN is attached. + * @return connectionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ID of the FQDN connection to which this FQDN is attached.") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public Fqdn fqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * FQDN represented by this resource. + * @return fqdn + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "example.com", value = "FQDN represented by this resource.") + @JsonProperty(JSON_PROPERTY_FQDN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFqdn() { + return fqdn; + } + + + public void setFqdn(String fqdn) { + this.fqdn = fqdn; + } + + + public Fqdn port(Integer port) { + this.port = port; + return this; + } + + /** + * Port to use when connecting to this FQDN. + * @return port + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5060", value = "Port to use when connecting to this FQDN.") + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPort() { + return port; + } + + + public void setPort(Integer port) { + this.port = port; + } + + + public Fqdn dnsRecordType(String dnsRecordType) { + this.dnsRecordType = dnsRecordType; + return this; + } + + /** + * The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. + * @return dnsRecordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "a", value = "The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used.") + @JsonProperty(JSON_PROPERTY_DNS_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDnsRecordType() { + return dnsRecordType; + } + + + public void setDnsRecordType(String dnsRecordType) { + this.dnsRecordType = dnsRecordType; + } + + + public Fqdn createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public Fqdn updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this Fqdn object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Fqdn fqdn = (Fqdn) o; + return Objects.equals(this.id, fqdn.id) && + Objects.equals(this.recordType, fqdn.recordType) && + Objects.equals(this.connectionId, fqdn.connectionId) && + Objects.equals(this.fqdn, fqdn.fqdn) && + Objects.equals(this.port, fqdn.port) && + Objects.equals(this.dnsRecordType, fqdn.dnsRecordType) && + Objects.equals(this.createdAt, fqdn.createdAt) && + Objects.equals(this.updatedAt, fqdn.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, connectionId, fqdn, port, dnsRecordType, createdAt, updatedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Fqdn {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" fqdn: ").append(toIndentedString(fqdn)).append("\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append(" dnsRecordType: ").append(toIndentedString(dnsRecordType)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/FqdnConnection.java b/src/main/java/com/telnyx/sdk/model/FqdnConnection.java new file mode 100644 index 00000000..07fa7b8c --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/FqdnConnection.java @@ -0,0 +1,724 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.FqdnConnectionTransportProtocol; +import com.telnyx.sdk.model.InboundFqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * FqdnConnection + */ +@JsonPropertyOrder({ + FqdnConnection.JSON_PROPERTY_ID, + FqdnConnection.JSON_PROPERTY_RECORD_TYPE, + FqdnConnection.JSON_PROPERTY_ACTIVE, + FqdnConnection.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + FqdnConnection.JSON_PROPERTY_CONNECTION_NAME, + FqdnConnection.JSON_PROPERTY_TRANSPORT_PROTOCOL, + FqdnConnection.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + FqdnConnection.JSON_PROPERTY_DTMF_TYPE, + FqdnConnection.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + FqdnConnection.JSON_PROPERTY_ENCRYPTED_MEDIA, + FqdnConnection.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + FqdnConnection.JSON_PROPERTY_WEBHOOK_EVENT_URL, + FqdnConnection.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + FqdnConnection.JSON_PROPERTY_WEBHOOK_API_VERSION, + FqdnConnection.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + FqdnConnection.JSON_PROPERTY_RTCP_SETTINGS, + FqdnConnection.JSON_PROPERTY_CREATED_AT, + FqdnConnection.JSON_PROPERTY_UPDATED_AT, + FqdnConnection.JSON_PROPERTY_INBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FqdnConnection { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + public static final String JSON_PROPERTY_TRANSPORT_PROTOCOL = "transport_protocol"; + private FqdnConnectionTransportProtocol transportProtocol = FqdnConnectionTransportProtocol.UDP; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = true; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private InboundFqdn inbound; + + + public FqdnConnection id(String id) { + this.id = id; + return this; + } + + /** + * Identifies the resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public FqdnConnection recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fqdn_connection", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public FqdnConnection active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public FqdnConnection anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public FqdnConnection connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public FqdnConnection transportProtocol(FqdnConnectionTransportProtocol transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * Get transportProtocol + * @return transportProtocol + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRANSPORT_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FqdnConnectionTransportProtocol getTransportProtocol() { + return transportProtocol; + } + + + public void setTransportProtocol(FqdnConnectionTransportProtocol transportProtocol) { + this.transportProtocol = transportProtocol; + } + + + public FqdnConnection defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public FqdnConnection dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public FqdnConnection encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public FqdnConnection encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public FqdnConnection onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public FqdnConnection webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public FqdnConnection webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public FqdnConnection webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public FqdnConnection webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public FqdnConnection rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public FqdnConnection createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public FqdnConnection updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + public FqdnConnection inbound(InboundFqdn inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public InboundFqdn getInbound() { + return inbound; + } + + + public void setInbound(InboundFqdn inbound) { + this.inbound = inbound; + } + + + /** + * Return true if this FqdnConnection object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FqdnConnection fqdnConnection = (FqdnConnection) o; + return Objects.equals(this.id, fqdnConnection.id) && + Objects.equals(this.recordType, fqdnConnection.recordType) && + Objects.equals(this.active, fqdnConnection.active) && + Objects.equals(this.anchorsiteOverride, fqdnConnection.anchorsiteOverride) && + Objects.equals(this.connectionName, fqdnConnection.connectionName) && + Objects.equals(this.transportProtocol, fqdnConnection.transportProtocol) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, fqdnConnection.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, fqdnConnection.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, fqdnConnection.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, fqdnConnection.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, fqdnConnection.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, fqdnConnection.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, fqdnConnection.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, fqdnConnection.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, fqdnConnection.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, fqdnConnection.rtcpSettings) && + Objects.equals(this.createdAt, fqdnConnection.createdAt) && + Objects.equals(this.updatedAt, fqdnConnection.updatedAt) && + Objects.equals(this.inbound, fqdnConnection.inbound); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, active, anchorsiteOverride, connectionName, transportProtocol, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, createdAt, updatedAt, inbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FqdnConnection {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/FqdnConnectionResponse.java b/src/main/java/com/telnyx/sdk/model/FqdnConnectionResponse.java new file mode 100644 index 00000000..9a9e79fc --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/FqdnConnectionResponse.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FqdnConnection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * FqdnConnectionResponse + */ +@JsonPropertyOrder({ + FqdnConnectionResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FqdnConnectionResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private FqdnConnection data; + + + public FqdnConnectionResponse data(FqdnConnection data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FqdnConnection getData() { + return data; + } + + + public void setData(FqdnConnection data) { + this.data = data; + } + + + /** + * Return true if this Fqdn_Connection_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FqdnConnectionResponse fqdnConnectionResponse = (FqdnConnectionResponse) o; + return Objects.equals(this.data, fqdnConnectionResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FqdnConnectionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocol.java b/src/main/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocol.java new file mode 100644 index 00000000..b89f56aa --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocol.java @@ -0,0 +1,65 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + */ +public enum FqdnConnectionTransportProtocol { + + UDP("UDP"), + + TCP("TCP"), + + TLS("TLS"); + + private String value; + + FqdnConnectionTransportProtocol(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FqdnConnectionTransportProtocol fromValue(String value) { + for (FqdnConnectionTransportProtocol b : FqdnConnectionTransportProtocol.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/FqdnResponse.java b/src/main/java/com/telnyx/sdk/model/FqdnResponse.java new file mode 100644 index 00000000..a52b1cc5 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/FqdnResponse.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Fqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * FqdnResponse + */ +@JsonPropertyOrder({ + FqdnResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FqdnResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Fqdn data; + + + public FqdnResponse data(Fqdn data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Fqdn getData() { + return data; + } + + + public void setData(Fqdn data) { + this.data = data; + } + + + /** + * Return true if this Fqdn_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FqdnResponse fqdnResponse = (FqdnResponse) o; + return Objects.equals(this.data, fqdnResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FqdnResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/InboundFqdn.java b/src/main/java/com/telnyx/sdk/model/InboundFqdn.java new file mode 100644 index 00000000..3bd4efe2 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/InboundFqdn.java @@ -0,0 +1,757 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * InboundFqdn + */ +@JsonPropertyOrder({ + InboundFqdn.JSON_PROPERTY_ANI_NUMBER_FORMAT, + InboundFqdn.JSON_PROPERTY_DNIS_NUMBER_FORMAT, + InboundFqdn.JSON_PROPERTY_CODECS, + InboundFqdn.JSON_PROPERTY_DEFAULT_ROUTING_METHOD, + InboundFqdn.JSON_PROPERTY_CHANNEL_LIMIT, + InboundFqdn.JSON_PROPERTY_GENERATE_RINGBACK_TONE, + InboundFqdn.JSON_PROPERTY_ISUP_HEADERS_ENABLED, + InboundFqdn.JSON_PROPERTY_PRACK_ENABLED, + InboundFqdn.JSON_PROPERTY_PRIVACY_ZONE_ENABLED, + InboundFqdn.JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED, + InboundFqdn.JSON_PROPERTY_SIP_REGION, + InboundFqdn.JSON_PROPERTY_SIP_SUBDOMAIN, + InboundFqdn.JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS, + InboundFqdn.JSON_PROPERTY_TIMEOUT1XX_SECS, + InboundFqdn.JSON_PROPERTY_TIMEOUT2XX_SECS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InboundFqdn { + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + */ + public enum AniNumberFormatEnum { + _E_164("+E.164"), + + E_164("E.164"), + + _E_164_NATIONAL("+E.164-national"), + + E_164_NATIONAL("E.164-national"); + + private String value; + + AniNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AniNumberFormatEnum fromValue(String value) { + for (AniNumberFormatEnum b : AniNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ANI_NUMBER_FORMAT = "ani_number_format"; + private AniNumberFormatEnum aniNumberFormat = AniNumberFormatEnum.E_164_NATIONAL; + + /** + * Gets or Sets dnisNumberFormat + */ + public enum DnisNumberFormatEnum { + _E164("+e164"), + + E164("e164"), + + NATIONAL("national"); + + private String value; + + DnisNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DnisNumberFormatEnum fromValue(String value) { + for (DnisNumberFormatEnum b : DnisNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DNIS_NUMBER_FORMAT = "dnis_number_format"; + private DnisNumberFormatEnum dnisNumberFormat = DnisNumberFormatEnum.E164; + + public static final String JSON_PROPERTY_CODECS = "codecs"; + private List codecs = null; + + /** + * Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or null, other values are not allowed. + */ + public enum DefaultRoutingMethodEnum { + SEQUENTIAL("sequential"), + + ROUND_ROBIN("round-robin"); + + private String value; + + DefaultRoutingMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DefaultRoutingMethodEnum fromValue(String value) { + for (DefaultRoutingMethodEnum b : DefaultRoutingMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + } + + public static final String JSON_PROPERTY_DEFAULT_ROUTING_METHOD = "default_routing_method"; + private JsonNullable defaultRoutingMethod = JsonNullable.of(null); + + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private JsonNullable channelLimit = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_GENERATE_RINGBACK_TONE = "generate_ringback_tone"; + private Boolean generateRingbackTone = false; + + public static final String JSON_PROPERTY_ISUP_HEADERS_ENABLED = "isup_headers_enabled"; + private Boolean isupHeadersEnabled = false; + + public static final String JSON_PROPERTY_PRACK_ENABLED = "prack_enabled"; + private Boolean prackEnabled = false; + + public static final String JSON_PROPERTY_PRIVACY_ZONE_ENABLED = "privacy_zone_enabled"; + private Boolean privacyZoneEnabled = false; + + public static final String JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED = "sip_compact_headers_enabled"; + private Boolean sipCompactHeadersEnabled = true; + + /** + * Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + */ + public enum SipRegionEnum { + US("US"), + + EUROPE("Europe"), + + AUSTRALIA("Australia"); + + private String value; + + SipRegionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipRegionEnum fromValue(String value) { + for (SipRegionEnum b : SipRegionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_REGION = "sip_region"; + private SipRegionEnum sipRegion = SipRegionEnum.US; + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN = "sip_subdomain"; + private JsonNullable sipSubdomain = JsonNullable.of("null"); + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + */ + public enum SipSubdomainReceiveSettingsEnum { + ONLY_MY_CONNECTIONS("only_my_connections"), + + FROM_ANYONE("from_anyone"); + + private String value; + + SipSubdomainReceiveSettingsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipSubdomainReceiveSettingsEnum fromValue(String value) { + for (SipSubdomainReceiveSettingsEnum b : SipSubdomainReceiveSettingsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS = "sip_subdomain_receive_settings"; + private SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings = SipSubdomainReceiveSettingsEnum.FROM_ANYONE; + + public static final String JSON_PROPERTY_TIMEOUT1XX_SECS = "timeout_1xx_secs"; + private Integer timeout1xxSecs = 3; + + public static final String JSON_PROPERTY_TIMEOUT2XX_SECS = "timeout_2xx_secs"; + private Integer timeout2xxSecs = 90; + + + public InboundFqdn aniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + return this; + } + + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @return aniNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.") + @JsonProperty(JSON_PROPERTY_ANI_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AniNumberFormatEnum getAniNumberFormat() { + return aniNumberFormat; + } + + + public void setAniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + } + + + public InboundFqdn dnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + return this; + } + + /** + * Get dnisNumberFormat + * @return dnisNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DNIS_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DnisNumberFormatEnum getDnisNumberFormat() { + return dnisNumberFormat; + } + + + public void setDnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + } + + + public InboundFqdn codecs(List codecs) { + this.codecs = codecs; + return this; + } + + public InboundFqdn addCodecsItem(String codecsItem) { + if (this.codecs == null) { + this.codecs = new ArrayList<>(); + } + this.codecs.add(codecsItem); + return this; + } + + /** + * Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @return codecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.") + @JsonProperty(JSON_PROPERTY_CODECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCodecs() { + return codecs; + } + + + public void setCodecs(List codecs) { + this.codecs = codecs; + } + + + public InboundFqdn defaultRoutingMethod(DefaultRoutingMethodEnum defaultRoutingMethod) { + this.defaultRoutingMethod = JsonNullable.of(defaultRoutingMethod); + return this; + } + + /** + * Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or null, other values are not allowed. + * @return defaultRoutingMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or null, other values are not allowed.") + @JsonIgnore + + public DefaultRoutingMethodEnum getDefaultRoutingMethod() { + return defaultRoutingMethod.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DEFAULT_ROUTING_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDefaultRoutingMethod_JsonNullable() { + return defaultRoutingMethod; + } + + @JsonProperty(JSON_PROPERTY_DEFAULT_ROUTING_METHOD) + public void setDefaultRoutingMethod_JsonNullable(JsonNullable defaultRoutingMethod) { + this.defaultRoutingMethod = defaultRoutingMethod; + } + + public void setDefaultRoutingMethod(DefaultRoutingMethodEnum defaultRoutingMethod) { + this.defaultRoutingMethod = JsonNullable.of(defaultRoutingMethod); + } + + + public InboundFqdn channelLimit(Integer channelLimit) { + this.channelLimit = JsonNullable.of(channelLimit); + return this; + } + + /** + * When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.") + @JsonIgnore + + public Integer getChannelLimit() { + return channelLimit.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getChannelLimit_JsonNullable() { + return channelLimit; + } + + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + public void setChannelLimit_JsonNullable(JsonNullable channelLimit) { + this.channelLimit = channelLimit; + } + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = JsonNullable.of(channelLimit); + } + + + public InboundFqdn generateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + return this; + } + + /** + * Generate ringback tone through 183 session progress message with early media. + * @return generateRingbackTone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Generate ringback tone through 183 session progress message with early media.") + @JsonProperty(JSON_PROPERTY_GENERATE_RINGBACK_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getGenerateRingbackTone() { + return generateRingbackTone; + } + + + public void setGenerateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + } + + + public InboundFqdn isupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + return this; + } + + /** + * When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @return isupHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)") + @JsonProperty(JSON_PROPERTY_ISUP_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsupHeadersEnabled() { + return isupHeadersEnabled; + } + + + public void setIsupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + } + + + public InboundFqdn prackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + return this; + } + + /** + * Enable PRACK messages as defined in RFC3262. + * @return prackEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable PRACK messages as defined in RFC3262.") + @JsonProperty(JSON_PROPERTY_PRACK_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrackEnabled() { + return prackEnabled; + } + + + public void setPrackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + } + + + public InboundFqdn privacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + return this; + } + + /** + * By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @return privacyZoneEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.") + @JsonProperty(JSON_PROPERTY_PRIVACY_ZONE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrivacyZoneEnabled() { + return privacyZoneEnabled; + } + + + public void setPrivacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + } + + + public InboundFqdn sipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + return this; + } + + /** + * Defaults to true. + * @return sipCompactHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true.") + @JsonProperty(JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSipCompactHeadersEnabled() { + return sipCompactHeadersEnabled; + } + + + public void setSipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + } + + + public InboundFqdn sipRegion(SipRegionEnum sipRegion) { + this.sipRegion = sipRegion; + return this; + } + + /** + * Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + * @return sipRegion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used.") + @JsonProperty(JSON_PROPERTY_SIP_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipRegionEnum getSipRegion() { + return sipRegion; + } + + + public void setSipRegion(SipRegionEnum sipRegion) { + this.sipRegion = sipRegion; + } + + + public InboundFqdn sipSubdomain(String sipSubdomain) { + this.sipSubdomain = JsonNullable.of(sipSubdomain); + return this; + } + + /** + * Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @return sipSubdomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.") + @JsonIgnore + + public String getSipSubdomain() { + return sipSubdomain.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getSipSubdomain_JsonNullable() { + return sipSubdomain; + } + + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN) + public void setSipSubdomain_JsonNullable(JsonNullable sipSubdomain) { + this.sipSubdomain = sipSubdomain; + } + + public void setSipSubdomain(String sipSubdomain) { + this.sipSubdomain = JsonNullable.of(sipSubdomain); + } + + + public InboundFqdn sipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + return this; + } + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + * @return sipSubdomainReceiveSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipSubdomainReceiveSettingsEnum getSipSubdomainReceiveSettings() { + return sipSubdomainReceiveSettings; + } + + + public void setSipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + } + + + public InboundFqdn timeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + return this; + } + + /** + * Time(sec) before aborting if connection is not made. + * minimum: 1 + * maximum: 120 + * @return timeout1xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if connection is not made.") + @JsonProperty(JSON_PROPERTY_TIMEOUT1XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTimeout1xxSecs() { + return timeout1xxSecs; + } + + + public void setTimeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + } + + + public InboundFqdn timeout2xxSecs(Integer timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + return this; + } + + /** + * Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @return timeout2xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if call is unanswered (min: 1, max: 600).") + @JsonProperty(JSON_PROPERTY_TIMEOUT2XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTimeout2xxSecs() { + return timeout2xxSecs; + } + + + public void setTimeout2xxSecs(Integer timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + } + + + /** + * Return true if this InboundFqdn object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InboundFqdn inboundFqdn = (InboundFqdn) o; + return Objects.equals(this.aniNumberFormat, inboundFqdn.aniNumberFormat) && + Objects.equals(this.dnisNumberFormat, inboundFqdn.dnisNumberFormat) && + Objects.equals(this.codecs, inboundFqdn.codecs) && + Objects.equals(this.defaultRoutingMethod, inboundFqdn.defaultRoutingMethod) && + Objects.equals(this.channelLimit, inboundFqdn.channelLimit) && + Objects.equals(this.generateRingbackTone, inboundFqdn.generateRingbackTone) && + Objects.equals(this.isupHeadersEnabled, inboundFqdn.isupHeadersEnabled) && + Objects.equals(this.prackEnabled, inboundFqdn.prackEnabled) && + Objects.equals(this.privacyZoneEnabled, inboundFqdn.privacyZoneEnabled) && + Objects.equals(this.sipCompactHeadersEnabled, inboundFqdn.sipCompactHeadersEnabled) && + Objects.equals(this.sipRegion, inboundFqdn.sipRegion) && + Objects.equals(this.sipSubdomain, inboundFqdn.sipSubdomain) && + Objects.equals(this.sipSubdomainReceiveSettings, inboundFqdn.sipSubdomainReceiveSettings) && + Objects.equals(this.timeout1xxSecs, inboundFqdn.timeout1xxSecs) && + Objects.equals(this.timeout2xxSecs, inboundFqdn.timeout2xxSecs); + } + + @Override + public int hashCode() { + return Objects.hash(aniNumberFormat, dnisNumberFormat, codecs, defaultRoutingMethod, channelLimit, generateRingbackTone, isupHeadersEnabled, prackEnabled, privacyZoneEnabled, sipCompactHeadersEnabled, sipRegion, sipSubdomain, sipSubdomainReceiveSettings, timeout1xxSecs, timeout2xxSecs); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InboundFqdn {\n"); + sb.append(" aniNumberFormat: ").append(toIndentedString(aniNumberFormat)).append("\n"); + sb.append(" dnisNumberFormat: ").append(toIndentedString(dnisNumberFormat)).append("\n"); + sb.append(" codecs: ").append(toIndentedString(codecs)).append("\n"); + sb.append(" defaultRoutingMethod: ").append(toIndentedString(defaultRoutingMethod)).append("\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" generateRingbackTone: ").append(toIndentedString(generateRingbackTone)).append("\n"); + sb.append(" isupHeadersEnabled: ").append(toIndentedString(isupHeadersEnabled)).append("\n"); + sb.append(" prackEnabled: ").append(toIndentedString(prackEnabled)).append("\n"); + sb.append(" privacyZoneEnabled: ").append(toIndentedString(privacyZoneEnabled)).append("\n"); + sb.append(" sipCompactHeadersEnabled: ").append(toIndentedString(sipCompactHeadersEnabled)).append("\n"); + sb.append(" sipRegion: ").append(toIndentedString(sipRegion)).append("\n"); + sb.append(" sipSubdomain: ").append(toIndentedString(sipSubdomain)).append("\n"); + sb.append(" sipSubdomainReceiveSettings: ").append(toIndentedString(sipSubdomainReceiveSettings)).append("\n"); + sb.append(" timeout1xxSecs: ").append(toIndentedString(timeout1xxSecs)).append("\n"); + sb.append(" timeout2xxSecs: ").append(toIndentedString(timeout2xxSecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/InboundIp.java b/src/main/java/com/telnyx/sdk/model/InboundIp.java new file mode 100644 index 00000000..3c0cdd58 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/InboundIp.java @@ -0,0 +1,814 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * InboundIp + */ +@JsonPropertyOrder({ + InboundIp.JSON_PROPERTY_ANI_NUMBER_FORMAT, + InboundIp.JSON_PROPERTY_DNIS_NUMBER_FORMAT, + InboundIp.JSON_PROPERTY_CODECS, + InboundIp.JSON_PROPERTY_DEFAULT_PRIMARY_IP_ID, + InboundIp.JSON_PROPERTY_DEFAULT_SECONDARY_IP_ID, + InboundIp.JSON_PROPERTY_DEFAULT_TERTIARY_IP_ID, + InboundIp.JSON_PROPERTY_DEFAULT_ROUTING_METHOD, + InboundIp.JSON_PROPERTY_CHANNEL_LIMIT, + InboundIp.JSON_PROPERTY_GENERATE_RINGBACK_TONE, + InboundIp.JSON_PROPERTY_ISUP_HEADERS_ENABLED, + InboundIp.JSON_PROPERTY_PRACK_ENABLED, + InboundIp.JSON_PROPERTY_PRIVACY_ZONE_ENABLED, + InboundIp.JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED, + InboundIp.JSON_PROPERTY_SIP_REGION, + InboundIp.JSON_PROPERTY_SIP_SUBDOMAIN, + InboundIp.JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS, + InboundIp.JSON_PROPERTY_TIMEOUT1XX_SECS, + InboundIp.JSON_PROPERTY_TIMEOUT2XX_SECS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InboundIp { + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + */ + public enum AniNumberFormatEnum { + _E_164("+E.164"), + + E_164("E.164"), + + _E_164_NATIONAL("+E.164-national"), + + E_164_NATIONAL("E.164-national"); + + private String value; + + AniNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AniNumberFormatEnum fromValue(String value) { + for (AniNumberFormatEnum b : AniNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ANI_NUMBER_FORMAT = "ani_number_format"; + private AniNumberFormatEnum aniNumberFormat = AniNumberFormatEnum.E_164_NATIONAL; + + /** + * Gets or Sets dnisNumberFormat + */ + public enum DnisNumberFormatEnum { + _E164("+e164"), + + E164("e164"), + + NATIONAL("national"); + + private String value; + + DnisNumberFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DnisNumberFormatEnum fromValue(String value) { + for (DnisNumberFormatEnum b : DnisNumberFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DNIS_NUMBER_FORMAT = "dnis_number_format"; + private DnisNumberFormatEnum dnisNumberFormat = DnisNumberFormatEnum.E164; + + public static final String JSON_PROPERTY_CODECS = "codecs"; + private List codecs = null; + + public static final String JSON_PROPERTY_DEFAULT_PRIMARY_IP_ID = "default_primary_ip_id"; + private String defaultPrimaryIpId; + + public static final String JSON_PROPERTY_DEFAULT_SECONDARY_IP_ID = "default_secondary_ip_id"; + private String defaultSecondaryIpId; + + public static final String JSON_PROPERTY_DEFAULT_TERTIARY_IP_ID = "default_tertiary_ip_id"; + private String defaultTertiaryIpId; + + /** + * Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. + */ + public enum DefaultRoutingMethodEnum { + SEQUENTIAL("sequential"), + + ROUND_ROBIN("round-robin"); + + private String value; + + DefaultRoutingMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DefaultRoutingMethodEnum fromValue(String value) { + for (DefaultRoutingMethodEnum b : DefaultRoutingMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DEFAULT_ROUTING_METHOD = "default_routing_method"; + private DefaultRoutingMethodEnum defaultRoutingMethod; + + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_GENERATE_RINGBACK_TONE = "generate_ringback_tone"; + private Boolean generateRingbackTone = false; + + public static final String JSON_PROPERTY_ISUP_HEADERS_ENABLED = "isup_headers_enabled"; + private Boolean isupHeadersEnabled = false; + + public static final String JSON_PROPERTY_PRACK_ENABLED = "prack_enabled"; + private Boolean prackEnabled = false; + + public static final String JSON_PROPERTY_PRIVACY_ZONE_ENABLED = "privacy_zone_enabled"; + private Boolean privacyZoneEnabled = false; + + public static final String JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED = "sip_compact_headers_enabled"; + private Boolean sipCompactHeadersEnabled = true; + + /** + * Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + */ + public enum SipRegionEnum { + US("US"), + + EUROPE("Europe"), + + AUSTRALIA("Australia"); + + private String value; + + SipRegionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipRegionEnum fromValue(String value) { + for (SipRegionEnum b : SipRegionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_REGION = "sip_region"; + private SipRegionEnum sipRegion = SipRegionEnum.US; + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN = "sip_subdomain"; + private String sipSubdomain; + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + */ + public enum SipSubdomainReceiveSettingsEnum { + ONLY_MY_CONNECTIONS("only_my_connections"), + + FROM_ANYONE("from_anyone"); + + private String value; + + SipSubdomainReceiveSettingsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipSubdomainReceiveSettingsEnum fromValue(String value) { + for (SipSubdomainReceiveSettingsEnum b : SipSubdomainReceiveSettingsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS = "sip_subdomain_receive_settings"; + private SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings; + + public static final String JSON_PROPERTY_TIMEOUT1XX_SECS = "timeout_1xx_secs"; + private Integer timeout1xxSecs = 3; + + public static final String JSON_PROPERTY_TIMEOUT2XX_SECS = "timeout_2xx_secs"; + private Integer timeout2xxSecs = 90; + + + public InboundIp aniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + return this; + } + + /** + * This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls. + * @return aniNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.") + @JsonProperty(JSON_PROPERTY_ANI_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AniNumberFormatEnum getAniNumberFormat() { + return aniNumberFormat; + } + + + public void setAniNumberFormat(AniNumberFormatEnum aniNumberFormat) { + this.aniNumberFormat = aniNumberFormat; + } + + + public InboundIp dnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + return this; + } + + /** + * Get dnisNumberFormat + * @return dnisNumberFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DNIS_NUMBER_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DnisNumberFormatEnum getDnisNumberFormat() { + return dnisNumberFormat; + } + + + public void setDnisNumberFormat(DnisNumberFormatEnum dnisNumberFormat) { + this.dnisNumberFormat = dnisNumberFormat; + } + + + public InboundIp codecs(List codecs) { + this.codecs = codecs; + return this; + } + + public InboundIp addCodecsItem(String codecsItem) { + if (this.codecs == null) { + this.codecs = new ArrayList<>(); + } + this.codecs.add(codecsItem); + return this; + } + + /** + * Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP. + * @return codecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.") + @JsonProperty(JSON_PROPERTY_CODECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCodecs() { + return codecs; + } + + + public void setCodecs(List codecs) { + this.codecs = codecs; + } + + + public InboundIp defaultPrimaryIpId(String defaultPrimaryIpId) { + this.defaultPrimaryIpId = defaultPrimaryIpId; + return this; + } + + /** + * The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection. + * @return defaultPrimaryIpId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "192.168.0.0", value = "The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.") + @JsonProperty(JSON_PROPERTY_DEFAULT_PRIMARY_IP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefaultPrimaryIpId() { + return defaultPrimaryIpId; + } + + + public void setDefaultPrimaryIpId(String defaultPrimaryIpId) { + this.defaultPrimaryIpId = defaultPrimaryIpId; + } + + + public InboundIp defaultSecondaryIpId(String defaultSecondaryIpId) { + this.defaultSecondaryIpId = defaultSecondaryIpId; + return this; + } + + /** + * The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection. + * @return defaultSecondaryIpId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "192.168.0.0", value = "The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.") + @JsonProperty(JSON_PROPERTY_DEFAULT_SECONDARY_IP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefaultSecondaryIpId() { + return defaultSecondaryIpId; + } + + + public void setDefaultSecondaryIpId(String defaultSecondaryIpId) { + this.defaultSecondaryIpId = defaultSecondaryIpId; + } + + + public InboundIp defaultTertiaryIpId(String defaultTertiaryIpId) { + this.defaultTertiaryIpId = defaultTertiaryIpId; + return this; + } + + /** + * The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection. + * @return defaultTertiaryIpId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "192.168.0.0", value = "The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.") + @JsonProperty(JSON_PROPERTY_DEFAULT_TERTIARY_IP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefaultTertiaryIpId() { + return defaultTertiaryIpId; + } + + + public void setDefaultTertiaryIpId(String defaultTertiaryIpId) { + this.defaultTertiaryIpId = defaultTertiaryIpId; + } + + + public InboundIp defaultRoutingMethod(DefaultRoutingMethodEnum defaultRoutingMethod) { + this.defaultRoutingMethod = defaultRoutingMethod; + return this; + } + + /** + * Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed. + * @return defaultRoutingMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ROUTING_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DefaultRoutingMethodEnum getDefaultRoutingMethod() { + return defaultRoutingMethod; + } + + + public void setDefaultRoutingMethod(DefaultRoutingMethodEnum defaultRoutingMethod) { + this.defaultRoutingMethod = defaultRoutingMethod; + } + + + public InboundIp channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the total number of inbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "When set, this will limit the total number of inbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public InboundIp generateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + return this; + } + + /** + * Generate ringback tone through 183 session progress message with early media. + * @return generateRingbackTone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Generate ringback tone through 183 session progress message with early media.") + @JsonProperty(JSON_PROPERTY_GENERATE_RINGBACK_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getGenerateRingbackTone() { + return generateRingbackTone; + } + + + public void setGenerateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + } + + + public InboundIp isupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + return this; + } + + /** + * When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.) + * @return isupHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)") + @JsonProperty(JSON_PROPERTY_ISUP_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsupHeadersEnabled() { + return isupHeadersEnabled; + } + + + public void setIsupHeadersEnabled(Boolean isupHeadersEnabled) { + this.isupHeadersEnabled = isupHeadersEnabled; + } + + + public InboundIp prackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + return this; + } + + /** + * Enable PRACK messages as defined in RFC3262. + * @return prackEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable PRACK messages as defined in RFC3262.") + @JsonProperty(JSON_PROPERTY_PRACK_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrackEnabled() { + return prackEnabled; + } + + + public void setPrackEnabled(Boolean prackEnabled) { + this.prackEnabled = prackEnabled; + } + + + public InboundIp privacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + return this; + } + + /** + * By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it. + * @return privacyZoneEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.") + @JsonProperty(JSON_PROPERTY_PRIVACY_ZONE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrivacyZoneEnabled() { + return privacyZoneEnabled; + } + + + public void setPrivacyZoneEnabled(Boolean privacyZoneEnabled) { + this.privacyZoneEnabled = privacyZoneEnabled; + } + + + public InboundIp sipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + return this; + } + + /** + * Defaults to true. + * @return sipCompactHeadersEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true.") + @JsonProperty(JSON_PROPERTY_SIP_COMPACT_HEADERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSipCompactHeadersEnabled() { + return sipCompactHeadersEnabled; + } + + + public void setSipCompactHeadersEnabled(Boolean sipCompactHeadersEnabled) { + this.sipCompactHeadersEnabled = sipCompactHeadersEnabled; + } + + + public InboundIp sipRegion(SipRegionEnum sipRegion) { + this.sipRegion = sipRegion; + return this; + } + + /** + * Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used. + * @return sipRegion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Selects which `sip_region` to receive inbound calls from. If null, the default region (US) will be used.") + @JsonProperty(JSON_PROPERTY_SIP_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipRegionEnum getSipRegion() { + return sipRegion; + } + + + public void setSipRegion(SipRegionEnum sipRegion) { + this.sipRegion = sipRegion; + } + + + public InboundIp sipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + return this; + } + + /** + * Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls. + * @return sipSubdomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain \"example.sip.telnyx.com\" can be called from any SIP endpoint by using the SIP URI \"sip:@example.sip.telnyx.com\" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSipSubdomain() { + return sipSubdomain; + } + + + public void setSipSubdomain(String sipSubdomain) { + this.sipSubdomain = sipSubdomain; + } + + + public InboundIp sipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + return this; + } + + /** + * This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user). + * @return sipSubdomainReceiveSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This option can be enabled to receive calls from: \"Anyone\" (any SIP endpoint in the public Internet) or \"Only my connections\" (any connection assigned to the same Telnyx user).") + @JsonProperty(JSON_PROPERTY_SIP_SUBDOMAIN_RECEIVE_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipSubdomainReceiveSettingsEnum getSipSubdomainReceiveSettings() { + return sipSubdomainReceiveSettings; + } + + + public void setSipSubdomainReceiveSettings(SipSubdomainReceiveSettingsEnum sipSubdomainReceiveSettings) { + this.sipSubdomainReceiveSettings = sipSubdomainReceiveSettings; + } + + + public InboundIp timeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + return this; + } + + /** + * Time(sec) before aborting if connection is not made. + * minimum: 1 + * maximum: 120 + * @return timeout1xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if connection is not made.") + @JsonProperty(JSON_PROPERTY_TIMEOUT1XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTimeout1xxSecs() { + return timeout1xxSecs; + } + + + public void setTimeout1xxSecs(Integer timeout1xxSecs) { + this.timeout1xxSecs = timeout1xxSecs; + } + + + public InboundIp timeout2xxSecs(Integer timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + return this; + } + + /** + * Time(sec) before aborting if call is unanswered (min: 1, max: 600). + * @return timeout2xxSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Time(sec) before aborting if call is unanswered (min: 1, max: 600).") + @JsonProperty(JSON_PROPERTY_TIMEOUT2XX_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTimeout2xxSecs() { + return timeout2xxSecs; + } + + + public void setTimeout2xxSecs(Integer timeout2xxSecs) { + this.timeout2xxSecs = timeout2xxSecs; + } + + + /** + * Return true if this InboundIp object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InboundIp inboundIp = (InboundIp) o; + return Objects.equals(this.aniNumberFormat, inboundIp.aniNumberFormat) && + Objects.equals(this.dnisNumberFormat, inboundIp.dnisNumberFormat) && + Objects.equals(this.codecs, inboundIp.codecs) && + Objects.equals(this.defaultPrimaryIpId, inboundIp.defaultPrimaryIpId) && + Objects.equals(this.defaultSecondaryIpId, inboundIp.defaultSecondaryIpId) && + Objects.equals(this.defaultTertiaryIpId, inboundIp.defaultTertiaryIpId) && + Objects.equals(this.defaultRoutingMethod, inboundIp.defaultRoutingMethod) && + Objects.equals(this.channelLimit, inboundIp.channelLimit) && + Objects.equals(this.generateRingbackTone, inboundIp.generateRingbackTone) && + Objects.equals(this.isupHeadersEnabled, inboundIp.isupHeadersEnabled) && + Objects.equals(this.prackEnabled, inboundIp.prackEnabled) && + Objects.equals(this.privacyZoneEnabled, inboundIp.privacyZoneEnabled) && + Objects.equals(this.sipCompactHeadersEnabled, inboundIp.sipCompactHeadersEnabled) && + Objects.equals(this.sipRegion, inboundIp.sipRegion) && + Objects.equals(this.sipSubdomain, inboundIp.sipSubdomain) && + Objects.equals(this.sipSubdomainReceiveSettings, inboundIp.sipSubdomainReceiveSettings) && + Objects.equals(this.timeout1xxSecs, inboundIp.timeout1xxSecs) && + Objects.equals(this.timeout2xxSecs, inboundIp.timeout2xxSecs); + } + + @Override + public int hashCode() { + return Objects.hash(aniNumberFormat, dnisNumberFormat, codecs, defaultPrimaryIpId, defaultSecondaryIpId, defaultTertiaryIpId, defaultRoutingMethod, channelLimit, generateRingbackTone, isupHeadersEnabled, prackEnabled, privacyZoneEnabled, sipCompactHeadersEnabled, sipRegion, sipSubdomain, sipSubdomainReceiveSettings, timeout1xxSecs, timeout2xxSecs); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InboundIp {\n"); + sb.append(" aniNumberFormat: ").append(toIndentedString(aniNumberFormat)).append("\n"); + sb.append(" dnisNumberFormat: ").append(toIndentedString(dnisNumberFormat)).append("\n"); + sb.append(" codecs: ").append(toIndentedString(codecs)).append("\n"); + sb.append(" defaultPrimaryIpId: ").append(toIndentedString(defaultPrimaryIpId)).append("\n"); + sb.append(" defaultSecondaryIpId: ").append(toIndentedString(defaultSecondaryIpId)).append("\n"); + sb.append(" defaultTertiaryIpId: ").append(toIndentedString(defaultTertiaryIpId)).append("\n"); + sb.append(" defaultRoutingMethod: ").append(toIndentedString(defaultRoutingMethod)).append("\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" generateRingbackTone: ").append(toIndentedString(generateRingbackTone)).append("\n"); + sb.append(" isupHeadersEnabled: ").append(toIndentedString(isupHeadersEnabled)).append("\n"); + sb.append(" prackEnabled: ").append(toIndentedString(prackEnabled)).append("\n"); + sb.append(" privacyZoneEnabled: ").append(toIndentedString(privacyZoneEnabled)).append("\n"); + sb.append(" sipCompactHeadersEnabled: ").append(toIndentedString(sipCompactHeadersEnabled)).append("\n"); + sb.append(" sipRegion: ").append(toIndentedString(sipRegion)).append("\n"); + sb.append(" sipSubdomain: ").append(toIndentedString(sipSubdomain)).append("\n"); + sb.append(" sipSubdomainReceiveSettings: ").append(toIndentedString(sipSubdomainReceiveSettings)).append("\n"); + sb.append(" timeout1xxSecs: ").append(toIndentedString(timeout1xxSecs)).append("\n"); + sb.append(" timeout2xxSecs: ").append(toIndentedString(timeout2xxSecs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/InlineResponse200.java b/src/main/java/com/telnyx/sdk/model/InlineResponse200.java new file mode 100644 index 00000000..53623c8c --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/InlineResponse200.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FaxApplication; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * InlineResponse200 + */ +@JsonPropertyOrder({ + InlineResponse200.JSON_PROPERTY_DATA, + InlineResponse200.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineResponse200 { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public InlineResponse200 data(List data) { + this.data = data; + return this; + } + + public InlineResponse200 addDataItem(FaxApplication dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public InlineResponse200 meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this inline_response_200 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponse200 inlineResponse200 = (InlineResponse200) o; + return Objects.equals(this.data, inlineResponse200.data) && + Objects.equals(this.meta, inlineResponse200.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponse200 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/InlineResponse2001.java b/src/main/java/com/telnyx/sdk/model/InlineResponse2001.java new file mode 100644 index 00000000..6bd2576d --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/InlineResponse2001.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PaginationMeta; +import com.telnyx.sdk.model.TexmlApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * InlineResponse2001 + */ +@JsonPropertyOrder({ + InlineResponse2001.JSON_PROPERTY_DATA, + InlineResponse2001.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineResponse2001 { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public InlineResponse2001 data(List data) { + this.data = data; + return this; + } + + public InlineResponse2001 addDataItem(TexmlApplication dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public InlineResponse2001 meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this inline_response_200_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponse2001 inlineResponse2001 = (InlineResponse2001) o; + return Objects.equals(this.data, inlineResponse2001.data) && + Objects.equals(this.meta, inlineResponse2001.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponse2001 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/InlineResponse201.java b/src/main/java/com/telnyx/sdk/model/InlineResponse201.java new file mode 100644 index 00000000..91da9eef --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/InlineResponse201.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FaxApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * InlineResponse201 + */ +@JsonPropertyOrder({ + InlineResponse201.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineResponse201 { + public static final String JSON_PROPERTY_DATA = "data"; + private FaxApplication data; + + + public InlineResponse201 data(FaxApplication data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FaxApplication getData() { + return data; + } + + + public void setData(FaxApplication data) { + this.data = data; + } + + + /** + * Return true if this inline_response_201 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponse201 inlineResponse201 = (InlineResponse201) o; + return Objects.equals(this.data, inlineResponse201.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponse201 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/InlineResponse2011.java b/src/main/java/com/telnyx/sdk/model/InlineResponse2011.java new file mode 100644 index 00000000..d5b98f93 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/InlineResponse2011.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.TexmlApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * InlineResponse2011 + */ +@JsonPropertyOrder({ + InlineResponse2011.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineResponse2011 { + public static final String JSON_PROPERTY_DATA = "data"; + private TexmlApplication data; + + + public InlineResponse2011 data(TexmlApplication data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TexmlApplication getData() { + return data; + } + + + public void setData(TexmlApplication data) { + this.data = data; + } + + + /** + * Return true if this inline_response_201_1 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponse2011 inlineResponse2011 = (InlineResponse2011) o; + return Objects.equals(this.data, inlineResponse2011.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponse2011 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/Ip.java b/src/main/java/com/telnyx/sdk/model/Ip.java new file mode 100644 index 00000000..8e09ac4b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/Ip.java @@ -0,0 +1,289 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * Ip + */ +@JsonPropertyOrder({ + Ip.JSON_PROPERTY_ID, + Ip.JSON_PROPERTY_RECORD_TYPE, + Ip.JSON_PROPERTY_CONNECTION_ID, + Ip.JSON_PROPERTY_IP_ADDRESS, + Ip.JSON_PROPERTY_PORT, + Ip.JSON_PROPERTY_CREATED_AT, + Ip.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Ip { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_IP_ADDRESS = "ip_address"; + private String ipAddress; + + public static final String JSON_PROPERTY_PORT = "port"; + private Integer port = 5060; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + + public Ip id(String id) { + this.id = id; + return this; + } + + /** + * Identifies the type of resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the type of resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public Ip recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ip", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public Ip connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * ID of the IP Connection to which this IP should be attached. + * @return connectionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ID of the IP Connection to which this IP should be attached.") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public Ip ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * IP adddress represented by this resource. + * @return ipAddress + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "192.168.0.0", value = "IP adddress represented by this resource.") + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIpAddress() { + return ipAddress; + } + + + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + + + public Ip port(Integer port) { + this.port = port; + return this; + } + + /** + * Port to use when connecting to this IP. + * @return port + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5060", value = "Port to use when connecting to this IP.") + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPort() { + return port; + } + + + public void setPort(Integer port) { + this.port = port; + } + + + public Ip createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public Ip updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this Ip object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Ip ip = (Ip) o; + return Objects.equals(this.id, ip.id) && + Objects.equals(this.recordType, ip.recordType) && + Objects.equals(this.connectionId, ip.connectionId) && + Objects.equals(this.ipAddress, ip.ipAddress) && + Objects.equals(this.port, ip.port) && + Objects.equals(this.createdAt, ip.createdAt) && + Objects.equals(this.updatedAt, ip.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, connectionId, ipAddress, port, createdAt, updatedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Ip {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/IpConnection.java b/src/main/java/com/telnyx/sdk/model/IpConnection.java new file mode 100644 index 00000000..0d7db6df --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/IpConnection.java @@ -0,0 +1,792 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.InboundIp; +import com.telnyx.sdk.model.OutboundIp; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * IpConnection + */ +@JsonPropertyOrder({ + IpConnection.JSON_PROPERTY_ID, + IpConnection.JSON_PROPERTY_RECORD_TYPE, + IpConnection.JSON_PROPERTY_ACTIVE, + IpConnection.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + IpConnection.JSON_PROPERTY_CONNECTION_NAME, + IpConnection.JSON_PROPERTY_TRANSPORT_PROTOCOL, + IpConnection.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + IpConnection.JSON_PROPERTY_DTMF_TYPE, + IpConnection.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + IpConnection.JSON_PROPERTY_ENCRYPTED_MEDIA, + IpConnection.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + IpConnection.JSON_PROPERTY_WEBHOOK_EVENT_URL, + IpConnection.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + IpConnection.JSON_PROPERTY_WEBHOOK_API_VERSION, + IpConnection.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + IpConnection.JSON_PROPERTY_RTCP_SETTINGS, + IpConnection.JSON_PROPERTY_CREATED_AT, + IpConnection.JSON_PROPERTY_UPDATED_AT, + IpConnection.JSON_PROPERTY_INBOUND, + IpConnection.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IpConnection { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + /** + * One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + */ + public enum TransportProtocolEnum { + UDP("UDP"), + + TCP("TCP"), + + TLS("TLS"); + + private String value; + + TransportProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TransportProtocolEnum fromValue(String value) { + for (TransportProtocolEnum b : TransportProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TRANSPORT_PROTOCOL = "transport_protocol"; + private TransportProtocolEnum transportProtocol = TransportProtocolEnum.UDP; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = true; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private InboundIp inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private OutboundIp outbound; + + + public IpConnection id(String id) { + this.id = id; + return this; + } + + /** + * Identifies the type of resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", value = "Identifies the type of resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public IpConnection recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ip_connection", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public IpConnection active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public IpConnection anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public IpConnection connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "string", value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public IpConnection transportProtocol(TransportProtocolEnum transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + * @return transportProtocol + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "UDP", value = "One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.") + @JsonProperty(JSON_PROPERTY_TRANSPORT_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransportProtocolEnum getTransportProtocol() { + return transportProtocol; + } + + + public void setTransportProtocol(TransportProtocolEnum transportProtocol) { + this.transportProtocol = transportProtocol; + } + + + public IpConnection defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public IpConnection dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public IpConnection encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public IpConnection encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public IpConnection onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public IpConnection webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public IpConnection webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public IpConnection webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public IpConnection webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public IpConnection rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public IpConnection createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public IpConnection updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + public IpConnection inbound(InboundIp inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public InboundIp getInbound() { + return inbound; + } + + + public void setInbound(InboundIp inbound) { + this.inbound = inbound; + } + + + public IpConnection outbound(OutboundIp outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundIp getOutbound() { + return outbound; + } + + + public void setOutbound(OutboundIp outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this IpConnection object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpConnection ipConnection = (IpConnection) o; + return Objects.equals(this.id, ipConnection.id) && + Objects.equals(this.recordType, ipConnection.recordType) && + Objects.equals(this.active, ipConnection.active) && + Objects.equals(this.anchorsiteOverride, ipConnection.anchorsiteOverride) && + Objects.equals(this.connectionName, ipConnection.connectionName) && + Objects.equals(this.transportProtocol, ipConnection.transportProtocol) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, ipConnection.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, ipConnection.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, ipConnection.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, ipConnection.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, ipConnection.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, ipConnection.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, ipConnection.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, ipConnection.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, ipConnection.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, ipConnection.rtcpSettings) && + Objects.equals(this.createdAt, ipConnection.createdAt) && + Objects.equals(this.updatedAt, ipConnection.updatedAt) && + Objects.equals(this.inbound, ipConnection.inbound) && + Objects.equals(this.outbound, ipConnection.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, active, anchorsiteOverride, connectionName, transportProtocol, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, createdAt, updatedAt, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpConnection {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/IpConnectionResponse.java b/src/main/java/com/telnyx/sdk/model/IpConnectionResponse.java new file mode 100644 index 00000000..33ae202b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/IpConnectionResponse.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.IpConnection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * IpConnectionResponse + */ +@JsonPropertyOrder({ + IpConnectionResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IpConnectionResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private IpConnection data; + + + public IpConnectionResponse data(IpConnection data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IpConnection getData() { + return data; + } + + + public void setData(IpConnection data) { + this.data = data; + } + + + /** + * Return true if this Ip_Connection_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpConnectionResponse ipConnectionResponse = (IpConnectionResponse) o; + return Objects.equals(this.data, ipConnectionResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpConnectionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/IpResponse.java b/src/main/java/com/telnyx/sdk/model/IpResponse.java new file mode 100644 index 00000000..2f3bc950 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/IpResponse.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Ip; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * IpResponse + */ +@JsonPropertyOrder({ + IpResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IpResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private Ip data; + + + public IpResponse data(Ip data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Ip getData() { + return data; + } + + + public void setData(Ip data) { + this.data = data; + } + + + /** + * Return true if this Ip_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IpResponse ipResponse = (IpResponse) o; + return Objects.equals(this.data, ipResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IpResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListConnectionsResponse.java b/src/main/java/com/telnyx/sdk/model/ListConnectionsResponse.java new file mode 100644 index 00000000..0d43234c --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListConnectionsResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Connection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListConnectionsResponse + */ +@JsonPropertyOrder({ + ListConnectionsResponse.JSON_PROPERTY_DATA, + ListConnectionsResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListConnectionsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public ListConnectionsResponse data(List data) { + this.data = data; + return this; + } + + public ListConnectionsResponse addDataItem(Connection dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public ListConnectionsResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this List_Connections_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionsResponse listConnectionsResponse = (ListConnectionsResponse) o; + return Objects.equals(this.data, listConnectionsResponse.data) && + Objects.equals(this.meta, listConnectionsResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListCredentialConnectionsResponse.java b/src/main/java/com/telnyx/sdk/model/ListCredentialConnectionsResponse.java new file mode 100644 index 00000000..4edb92a3 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListCredentialConnectionsResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.CredentialConnection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListCredentialConnectionsResponse + */ +@JsonPropertyOrder({ + ListCredentialConnectionsResponse.JSON_PROPERTY_DATA, + ListCredentialConnectionsResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListCredentialConnectionsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public ListCredentialConnectionsResponse data(List data) { + this.data = data; + return this; + } + + public ListCredentialConnectionsResponse addDataItem(CredentialConnection dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public ListCredentialConnectionsResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this List_Credential_Connections_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListCredentialConnectionsResponse listCredentialConnectionsResponse = (ListCredentialConnectionsResponse) o; + return Objects.equals(this.data, listCredentialConnectionsResponse.data) && + Objects.equals(this.meta, listCredentialConnectionsResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListCredentialConnectionsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListFqdnConnectionsResponse.java b/src/main/java/com/telnyx/sdk/model/ListFqdnConnectionsResponse.java new file mode 100644 index 00000000..e4ec0a5b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListFqdnConnectionsResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FqdnConnection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListFqdnConnectionsResponse + */ +@JsonPropertyOrder({ + ListFqdnConnectionsResponse.JSON_PROPERTY_DATA, + ListFqdnConnectionsResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListFqdnConnectionsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public ListFqdnConnectionsResponse data(List data) { + this.data = data; + return this; + } + + public ListFqdnConnectionsResponse addDataItem(FqdnConnection dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public ListFqdnConnectionsResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this List_Fqdn_Connections_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListFqdnConnectionsResponse listFqdnConnectionsResponse = (ListFqdnConnectionsResponse) o; + return Objects.equals(this.data, listFqdnConnectionsResponse.data) && + Objects.equals(this.meta, listFqdnConnectionsResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListFqdnConnectionsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListFqdnsResponse.java b/src/main/java/com/telnyx/sdk/model/ListFqdnsResponse.java new file mode 100644 index 00000000..ee6c8222 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListFqdnsResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Fqdn; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListFqdnsResponse + */ +@JsonPropertyOrder({ + ListFqdnsResponse.JSON_PROPERTY_DATA, + ListFqdnsResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListFqdnsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public ListFqdnsResponse data(List data) { + this.data = data; + return this; + } + + public ListFqdnsResponse addDataItem(Fqdn dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public ListFqdnsResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this List_Fqdns_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListFqdnsResponse listFqdnsResponse = (ListFqdnsResponse) o; + return Objects.equals(this.data, listFqdnsResponse.data) && + Objects.equals(this.meta, listFqdnsResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListFqdnsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListIpConnectionsResponse.java b/src/main/java/com/telnyx/sdk/model/ListIpConnectionsResponse.java new file mode 100644 index 00000000..9432837b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListIpConnectionsResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.IpConnection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListIpConnectionsResponse + */ +@JsonPropertyOrder({ + ListIpConnectionsResponse.JSON_PROPERTY_DATA, + ListIpConnectionsResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListIpConnectionsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public ListIpConnectionsResponse data(List data) { + this.data = data; + return this; + } + + public ListIpConnectionsResponse addDataItem(IpConnection dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public ListIpConnectionsResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this List_Ip_Connections_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListIpConnectionsResponse listIpConnectionsResponse = (ListIpConnectionsResponse) o; + return Objects.equals(this.data, listIpConnectionsResponse.data) && + Objects.equals(this.meta, listIpConnectionsResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListIpConnectionsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListIpsResponse.java b/src/main/java/com/telnyx/sdk/model/ListIpsResponse.java new file mode 100644 index 00000000..d494268f --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListIpsResponse.java @@ -0,0 +1,120 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Ip; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListIpsResponse + */ +@JsonPropertyOrder({ + ListIpsResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListIpsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + + public ListIpsResponse data(List data) { + this.data = data; + return this; + } + + public ListIpsResponse addDataItem(Ip dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this List_Ips_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListIpsResponse listIpsResponse = (ListIpsResponse) o; + return Objects.equals(this.data, listIpsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListIpsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponse.java b/src/main/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponse.java new file mode 100644 index 00000000..9c8f6d27 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundVoiceProfile; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListOutboundVoiceProfilesResponse + */ +@JsonPropertyOrder({ + ListOutboundVoiceProfilesResponse.JSON_PROPERTY_DATA, + ListOutboundVoiceProfilesResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListOutboundVoiceProfilesResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public ListOutboundVoiceProfilesResponse data(List data) { + this.data = data; + return this; + } + + public ListOutboundVoiceProfilesResponse addDataItem(OutboundVoiceProfile dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public ListOutboundVoiceProfilesResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this List_Outbound_Voice_Profiles_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListOutboundVoiceProfilesResponse listOutboundVoiceProfilesResponse = (ListOutboundVoiceProfilesResponse) o; + return Objects.equals(this.data, listOutboundVoiceProfilesResponse.data) && + Objects.equals(this.meta, listOutboundVoiceProfilesResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListOutboundVoiceProfilesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponse.java b/src/main/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponse.java new file mode 100644 index 00000000..f5e9b66e --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponse.java @@ -0,0 +1,151 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PaginationMeta; +import com.telnyx.sdk.model.PhoneNumbersJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * ListPhoneNumbersBackgroundJobsResponse + */ +@JsonPropertyOrder({ + ListPhoneNumbersBackgroundJobsResponse.JSON_PROPERTY_DATA, + ListPhoneNumbersBackgroundJobsResponse.JSON_PROPERTY_META +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListPhoneNumbersBackgroundJobsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_META = "meta"; + private PaginationMeta meta; + + + public ListPhoneNumbersBackgroundJobsResponse data(List data) { + this.data = data; + return this; + } + + public ListPhoneNumbersBackgroundJobsResponse addDataItem(PhoneNumbersJob dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + public ListPhoneNumbersBackgroundJobsResponse meta(PaginationMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaginationMeta getMeta() { + return meta; + } + + + public void setMeta(PaginationMeta meta) { + this.meta = meta; + } + + + /** + * Return true if this List_Phone_Numbers_Background_Jobs_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPhoneNumbersBackgroundJobsResponse listPhoneNumbersBackgroundJobsResponse = (ListPhoneNumbersBackgroundJobsResponse) o; + return Objects.equals(this.data, listPhoneNumbersBackgroundJobsResponse.data) && + Objects.equals(this.meta, listPhoneNumbersBackgroundJobsResponse.meta); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListPhoneNumbersBackgroundJobsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/OutboundCallRecording.java b/src/main/java/com/telnyx/sdk/model/OutboundCallRecording.java new file mode 100644 index 00000000..c2d73e0f --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/OutboundCallRecording.java @@ -0,0 +1,316 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * OutboundCallRecording + */ +@JsonPropertyOrder({ + OutboundCallRecording.JSON_PROPERTY_CALL_RECORDING_TYPE, + OutboundCallRecording.JSON_PROPERTY_CALL_RECORDING_CALLER_PHONE_NUMBERS, + OutboundCallRecording.JSON_PROPERTY_CALL_RECORDING_CHANNELS, + OutboundCallRecording.JSON_PROPERTY_CALL_RECORDING_FORMAT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OutboundCallRecording { + /** + * Specifies which calls are recorded. + */ + public enum CallRecordingTypeEnum { + ALL("all"), + + NONE("none"), + + BY_CALLER_PHONE_NUMBER("by_caller_phone_number"); + + private String value; + + CallRecordingTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CallRecordingTypeEnum fromValue(String value) { + for (CallRecordingTypeEnum b : CallRecordingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CALL_RECORDING_TYPE = "call_recording_type"; + private CallRecordingTypeEnum callRecordingType; + + public static final String JSON_PROPERTY_CALL_RECORDING_CALLER_PHONE_NUMBERS = "call_recording_caller_phone_numbers"; + private List callRecordingCallerPhoneNumbers = null; + + /** + * When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B. + */ + public enum CallRecordingChannelsEnum { + SINGLE("single"), + + DUAL("dual"); + + private String value; + + CallRecordingChannelsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CallRecordingChannelsEnum fromValue(String value) { + for (CallRecordingChannelsEnum b : CallRecordingChannelsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CALL_RECORDING_CHANNELS = "call_recording_channels"; + private CallRecordingChannelsEnum callRecordingChannels = CallRecordingChannelsEnum.SINGLE; + + /** + * The audio file format for calls being recorded. + */ + public enum CallRecordingFormatEnum { + WAV("wav"), + + MP3("mp3"); + + private String value; + + CallRecordingFormatEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CallRecordingFormatEnum fromValue(String value) { + for (CallRecordingFormatEnum b : CallRecordingFormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CALL_RECORDING_FORMAT = "call_recording_format"; + private CallRecordingFormatEnum callRecordingFormat = CallRecordingFormatEnum.WAV; + + + public OutboundCallRecording callRecordingType(CallRecordingTypeEnum callRecordingType) { + this.callRecordingType = callRecordingType; + return this; + } + + /** + * Specifies which calls are recorded. + * @return callRecordingType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies which calls are recorded.") + @JsonProperty(JSON_PROPERTY_CALL_RECORDING_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CallRecordingTypeEnum getCallRecordingType() { + return callRecordingType; + } + + + public void setCallRecordingType(CallRecordingTypeEnum callRecordingType) { + this.callRecordingType = callRecordingType; + } + + + public OutboundCallRecording callRecordingCallerPhoneNumbers(List callRecordingCallerPhoneNumbers) { + this.callRecordingCallerPhoneNumbers = callRecordingCallerPhoneNumbers; + return this; + } + + public OutboundCallRecording addCallRecordingCallerPhoneNumbersItem(String callRecordingCallerPhoneNumbersItem) { + if (this.callRecordingCallerPhoneNumbers == null) { + this.callRecordingCallerPhoneNumbers = new ArrayList<>(); + } + this.callRecordingCallerPhoneNumbers.add(callRecordingCallerPhoneNumbersItem); + return this; + } + + /** + * When call_recording_type is 'by_caller_phone_number', only outbound calls using one of these numbers will be recorded. Numbers must be specified in E164 format. + * @return callRecordingCallerPhoneNumbers + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[\"+19705555098\"]", value = "When call_recording_type is 'by_caller_phone_number', only outbound calls using one of these numbers will be recorded. Numbers must be specified in E164 format.") + @JsonProperty(JSON_PROPERTY_CALL_RECORDING_CALLER_PHONE_NUMBERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCallRecordingCallerPhoneNumbers() { + return callRecordingCallerPhoneNumbers; + } + + + public void setCallRecordingCallerPhoneNumbers(List callRecordingCallerPhoneNumbers) { + this.callRecordingCallerPhoneNumbers = callRecordingCallerPhoneNumbers; + } + + + public OutboundCallRecording callRecordingChannels(CallRecordingChannelsEnum callRecordingChannels) { + this.callRecordingChannels = callRecordingChannels; + return this; + } + + /** + * When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B. + * @return callRecordingChannels + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "dual", value = "When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B.") + @JsonProperty(JSON_PROPERTY_CALL_RECORDING_CHANNELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CallRecordingChannelsEnum getCallRecordingChannels() { + return callRecordingChannels; + } + + + public void setCallRecordingChannels(CallRecordingChannelsEnum callRecordingChannels) { + this.callRecordingChannels = callRecordingChannels; + } + + + public OutboundCallRecording callRecordingFormat(CallRecordingFormatEnum callRecordingFormat) { + this.callRecordingFormat = callRecordingFormat; + return this; + } + + /** + * The audio file format for calls being recorded. + * @return callRecordingFormat + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "mp3", value = "The audio file format for calls being recorded.") + @JsonProperty(JSON_PROPERTY_CALL_RECORDING_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CallRecordingFormatEnum getCallRecordingFormat() { + return callRecordingFormat; + } + + + public void setCallRecordingFormat(CallRecordingFormatEnum callRecordingFormat) { + this.callRecordingFormat = callRecordingFormat; + } + + + /** + * Return true if this OutboundCallRecording object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundCallRecording outboundCallRecording = (OutboundCallRecording) o; + return Objects.equals(this.callRecordingType, outboundCallRecording.callRecordingType) && + Objects.equals(this.callRecordingCallerPhoneNumbers, outboundCallRecording.callRecordingCallerPhoneNumbers) && + Objects.equals(this.callRecordingChannels, outboundCallRecording.callRecordingChannels) && + Objects.equals(this.callRecordingFormat, outboundCallRecording.callRecordingFormat); + } + + @Override + public int hashCode() { + return Objects.hash(callRecordingType, callRecordingCallerPhoneNumbers, callRecordingChannels, callRecordingFormat); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundCallRecording {\n"); + sb.append(" callRecordingType: ").append(toIndentedString(callRecordingType)).append("\n"); + sb.append(" callRecordingCallerPhoneNumbers: ").append(toIndentedString(callRecordingCallerPhoneNumbers)).append("\n"); + sb.append(" callRecordingChannels: ").append(toIndentedString(callRecordingChannels)).append("\n"); + sb.append(" callRecordingFormat: ").append(toIndentedString(callRecordingFormat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/OutboundIp.java b/src/main/java/com/telnyx/sdk/model/OutboundIp.java new file mode 100644 index 00000000..69de19c4 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/OutboundIp.java @@ -0,0 +1,554 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * OutboundIp + */ +@JsonPropertyOrder({ + OutboundIp.JSON_PROPERTY_CALL_PARKING_ENABLED, + OutboundIp.JSON_PROPERTY_ANI_OVERRIDE, + OutboundIp.JSON_PROPERTY_ANI_OVERRIDE_TYPE, + OutboundIp.JSON_PROPERTY_CHANNEL_LIMIT, + OutboundIp.JSON_PROPERTY_INSTANT_RINGBACK_ENABLED, + OutboundIp.JSON_PROPERTY_GENERATE_RINGBACK_TONE, + OutboundIp.JSON_PROPERTY_LOCALIZATION, + OutboundIp.JSON_PROPERTY_T38_REINVITE_SOURCE, + OutboundIp.JSON_PROPERTY_TECH_PREFIX, + OutboundIp.JSON_PROPERTY_IP_AUTHENTICATION_METHOD, + OutboundIp.JSON_PROPERTY_IP_AUTHENTICATION_TOKEN, + OutboundIp.JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OutboundIp { + public static final String JSON_PROPERTY_CALL_PARKING_ENABLED = "call_parking_enabled"; + private Boolean callParkingEnabled = false; + + public static final String JSON_PROPERTY_ANI_OVERRIDE = "ani_override"; + private String aniOverride = ""; + + /** + * Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. + */ + public enum AniOverrideTypeEnum { + ALWAYS("always"), + + NORMAL("normal"), + + EMERGENCY("emergency"); + + private String value; + + AniOverrideTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AniOverrideTypeEnum fromValue(String value) { + for (AniOverrideTypeEnum b : AniOverrideTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ANI_OVERRIDE_TYPE = "ani_override_type"; + private AniOverrideTypeEnum aniOverrideType = AniOverrideTypeEnum.ALWAYS; + + public static final String JSON_PROPERTY_CHANNEL_LIMIT = "channel_limit"; + private Integer channelLimit; + + public static final String JSON_PROPERTY_INSTANT_RINGBACK_ENABLED = "instant_ringback_enabled"; + private Boolean instantRingbackEnabled = true; + + public static final String JSON_PROPERTY_GENERATE_RINGBACK_TONE = "generate_ringback_tone"; + private Boolean generateRingbackTone = false; + + public static final String JSON_PROPERTY_LOCALIZATION = "localization"; + private String localization = "null"; + + /** + * This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. + */ + public enum T38ReinviteSourceEnum { + TELNYX("telnyx"), + + CUSTOMER("customer"), + + DISABLED("disabled"), + + PASSTHRU("passthru"), + + CALLER_PASSTHRU("caller-passthru"), + + CALLEE_PASSTHRU("callee-passthru"); + + private String value; + + T38ReinviteSourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static T38ReinviteSourceEnum fromValue(String value) { + for (T38ReinviteSourceEnum b : T38ReinviteSourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_T38_REINVITE_SOURCE = "t38_reinvite_source"; + private T38ReinviteSourceEnum t38ReinviteSource = T38ReinviteSourceEnum.TELNYX; + + public static final String JSON_PROPERTY_TECH_PREFIX = "tech_prefix"; + private String techPrefix = ""; + + /** + * Gets or Sets ipAuthenticationMethod + */ + public enum IpAuthenticationMethodEnum { + TECH_PREFIXP_CHARGE_INFO("tech-prefixp-charge-info"), + + TOKEN("token"); + + private String value; + + IpAuthenticationMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IpAuthenticationMethodEnum fromValue(String value) { + for (IpAuthenticationMethodEnum b : IpAuthenticationMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IP_AUTHENTICATION_METHOD = "ip_authentication_method"; + private IpAuthenticationMethodEnum ipAuthenticationMethod = IpAuthenticationMethodEnum.TECH_PREFIXP_CHARGE_INFO; + + public static final String JSON_PROPERTY_IP_AUTHENTICATION_TOKEN = "ip_authentication_token"; + private String ipAuthenticationToken = "null"; + + public static final String JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID = "outbound_voice_profile_id"; + private String outboundVoiceProfileId; + + + public OutboundIp callParkingEnabled(Boolean callParkingEnabled) { + this.callParkingEnabled = callParkingEnabled; + return this; + } + + /** + * Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next. + * @return callParkingEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Forces all SIP calls originated on this connection to be \"parked\" instead of \"bridged\" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next.") + @JsonProperty(JSON_PROPERTY_CALL_PARKING_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getCallParkingEnabled() { + return callParkingEnabled; + } + + + public void setCallParkingEnabled(Boolean callParkingEnabled) { + this.callParkingEnabled = callParkingEnabled; + } + + + public OutboundIp aniOverride(String aniOverride) { + this.aniOverride = aniOverride; + return this; + } + + /** + * Set a phone number as the ani_override value to override caller id number on outbound calls. + * @return aniOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Set a phone number as the ani_override value to override caller id number on outbound calls.") + @JsonProperty(JSON_PROPERTY_ANI_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAniOverride() { + return aniOverride; + } + + + public void setAniOverride(String aniOverride) { + this.aniOverride = aniOverride; + } + + + public OutboundIp aniOverrideType(AniOverrideTypeEnum aniOverrideType) { + this.aniOverrideType = aniOverrideType; + return this; + } + + /** + * Specifies when we apply your ani_override setting. Only applies when ani_override is not blank. + * @return aniOverrideType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.") + @JsonProperty(JSON_PROPERTY_ANI_OVERRIDE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AniOverrideTypeEnum getAniOverrideType() { + return aniOverrideType; + } + + + public void setAniOverrideType(AniOverrideTypeEnum aniOverrideType) { + this.aniOverrideType = aniOverrideType; + } + + + public OutboundIp channelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + return this; + } + + /** + * When set, this will limit the total number of outbound calls to phone numbers associated with this connection. + * @return channelLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, this will limit the total number of outbound calls to phone numbers associated with this connection.") + @JsonProperty(JSON_PROPERTY_CHANNEL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getChannelLimit() { + return channelLimit; + } + + + public void setChannelLimit(Integer channelLimit) { + this.channelLimit = channelLimit; + } + + + public OutboundIp instantRingbackEnabled(Boolean instantRingbackEnabled) { + this.instantRingbackEnabled = instantRingbackEnabled; + return this; + } + + /** + * When set, ringback will not wait for indication before sending ringback tone to calling party. + * @return instantRingbackEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When set, ringback will not wait for indication before sending ringback tone to calling party.") + @JsonProperty(JSON_PROPERTY_INSTANT_RINGBACK_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getInstantRingbackEnabled() { + return instantRingbackEnabled; + } + + + public void setInstantRingbackEnabled(Boolean instantRingbackEnabled) { + this.instantRingbackEnabled = instantRingbackEnabled; + } + + + public OutboundIp generateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + return this; + } + + /** + * Generate ringback tone through 183 session progress message with early media. + * @return generateRingbackTone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Generate ringback tone through 183 session progress message with early media.") + @JsonProperty(JSON_PROPERTY_GENERATE_RINGBACK_TONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getGenerateRingbackTone() { + return generateRingbackTone; + } + + + public void setGenerateRingbackTone(Boolean generateRingbackTone) { + this.generateRingbackTone = generateRingbackTone; + } + + + public OutboundIp localization(String localization) { + this.localization = localization; + return this; + } + + /** + * A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default. + * @return localization + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to `US` then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.") + @JsonProperty(JSON_PROPERTY_LOCALIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLocalization() { + return localization; + } + + + public void setLocalization(String localization) { + this.localization = localization; + } + + + public OutboundIp t38ReinviteSource(T38ReinviteSourceEnum t38ReinviteSource) { + this.t38ReinviteSource = t38ReinviteSource; + return this; + } + + /** + * This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite. + * @return t38ReinviteSource + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This setting only affects connections with Fax-type Outbound Voice Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to `customer`, the caller is expected to send the t.38 reinvite.") + @JsonProperty(JSON_PROPERTY_T38_REINVITE_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public T38ReinviteSourceEnum getT38ReinviteSource() { + return t38ReinviteSource; + } + + + public void setT38ReinviteSource(T38ReinviteSourceEnum t38ReinviteSource) { + this.t38ReinviteSource = t38ReinviteSource; + } + + + public OutboundIp techPrefix(String techPrefix) { + this.techPrefix = techPrefix; + return this; + } + + /** + * Numerical chars only, exactly 4 characters. + * @return techPrefix + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Numerical chars only, exactly 4 characters.") + @JsonProperty(JSON_PROPERTY_TECH_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTechPrefix() { + return techPrefix; + } + + + public void setTechPrefix(String techPrefix) { + this.techPrefix = techPrefix; + } + + + public OutboundIp ipAuthenticationMethod(IpAuthenticationMethodEnum ipAuthenticationMethod) { + this.ipAuthenticationMethod = ipAuthenticationMethod; + return this; + } + + /** + * Get ipAuthenticationMethod + * @return ipAuthenticationMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "tech-prefixp-charge-info", value = "") + @JsonProperty(JSON_PROPERTY_IP_AUTHENTICATION_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IpAuthenticationMethodEnum getIpAuthenticationMethod() { + return ipAuthenticationMethod; + } + + + public void setIpAuthenticationMethod(IpAuthenticationMethodEnum ipAuthenticationMethod) { + this.ipAuthenticationMethod = ipAuthenticationMethod; + } + + + public OutboundIp ipAuthenticationToken(String ipAuthenticationToken) { + this.ipAuthenticationToken = ipAuthenticationToken; + return this; + } + + /** + * Get ipAuthenticationToken + * @return ipAuthenticationToken + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_IP_AUTHENTICATION_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIpAuthenticationToken() { + return ipAuthenticationToken; + } + + + public void setIpAuthenticationToken(String ipAuthenticationToken) { + this.ipAuthenticationToken = ipAuthenticationToken; + } + + + public OutboundIp outboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + return this; + } + + /** + * Identifies the associated outbound voice profile. + * @return outboundVoiceProfileId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the associated outbound voice profile.") + @JsonProperty(JSON_PROPERTY_OUTBOUND_VOICE_PROFILE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutboundVoiceProfileId() { + return outboundVoiceProfileId; + } + + + public void setOutboundVoiceProfileId(String outboundVoiceProfileId) { + this.outboundVoiceProfileId = outboundVoiceProfileId; + } + + + /** + * Return true if this OutboundIp object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundIp outboundIp = (OutboundIp) o; + return Objects.equals(this.callParkingEnabled, outboundIp.callParkingEnabled) && + Objects.equals(this.aniOverride, outboundIp.aniOverride) && + Objects.equals(this.aniOverrideType, outboundIp.aniOverrideType) && + Objects.equals(this.channelLimit, outboundIp.channelLimit) && + Objects.equals(this.instantRingbackEnabled, outboundIp.instantRingbackEnabled) && + Objects.equals(this.generateRingbackTone, outboundIp.generateRingbackTone) && + Objects.equals(this.localization, outboundIp.localization) && + Objects.equals(this.t38ReinviteSource, outboundIp.t38ReinviteSource) && + Objects.equals(this.techPrefix, outboundIp.techPrefix) && + Objects.equals(this.ipAuthenticationMethod, outboundIp.ipAuthenticationMethod) && + Objects.equals(this.ipAuthenticationToken, outboundIp.ipAuthenticationToken) && + Objects.equals(this.outboundVoiceProfileId, outboundIp.outboundVoiceProfileId); + } + + @Override + public int hashCode() { + return Objects.hash(callParkingEnabled, aniOverride, aniOverrideType, channelLimit, instantRingbackEnabled, generateRingbackTone, localization, t38ReinviteSource, techPrefix, ipAuthenticationMethod, ipAuthenticationToken, outboundVoiceProfileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundIp {\n"); + sb.append(" callParkingEnabled: ").append(toIndentedString(callParkingEnabled)).append("\n"); + sb.append(" aniOverride: ").append(toIndentedString(aniOverride)).append("\n"); + sb.append(" aniOverrideType: ").append(toIndentedString(aniOverrideType)).append("\n"); + sb.append(" channelLimit: ").append(toIndentedString(channelLimit)).append("\n"); + sb.append(" instantRingbackEnabled: ").append(toIndentedString(instantRingbackEnabled)).append("\n"); + sb.append(" generateRingbackTone: ").append(toIndentedString(generateRingbackTone)).append("\n"); + sb.append(" localization: ").append(toIndentedString(localization)).append("\n"); + sb.append(" t38ReinviteSource: ").append(toIndentedString(t38ReinviteSource)).append("\n"); + sb.append(" techPrefix: ").append(toIndentedString(techPrefix)).append("\n"); + sb.append(" ipAuthenticationMethod: ").append(toIndentedString(ipAuthenticationMethod)).append("\n"); + sb.append(" ipAuthenticationToken: ").append(toIndentedString(ipAuthenticationToken)).append("\n"); + sb.append(" outboundVoiceProfileId: ").append(toIndentedString(outboundVoiceProfileId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/OutboundVoiceProfile.java b/src/main/java/com/telnyx/sdk/model/OutboundVoiceProfile.java new file mode 100644 index 00000000..241d35a0 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/OutboundVoiceProfile.java @@ -0,0 +1,666 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundCallRecording; +import com.telnyx.sdk.model.ServicePlan; +import com.telnyx.sdk.model.TrafficType; +import com.telnyx.sdk.model.UsagePaymentMethod; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * OutboundVoiceProfile + */ +@JsonPropertyOrder({ + OutboundVoiceProfile.JSON_PROPERTY_ID, + OutboundVoiceProfile.JSON_PROPERTY_RECORD_TYPE, + OutboundVoiceProfile.JSON_PROPERTY_NAME, + OutboundVoiceProfile.JSON_PROPERTY_CONNECTIONS_COUNT, + OutboundVoiceProfile.JSON_PROPERTY_TRAFFIC_TYPE, + OutboundVoiceProfile.JSON_PROPERTY_SERVICE_PLAN, + OutboundVoiceProfile.JSON_PROPERTY_CONCURRENT_CALL_LIMIT, + OutboundVoiceProfile.JSON_PROPERTY_ENABLED, + OutboundVoiceProfile.JSON_PROPERTY_TAGS, + OutboundVoiceProfile.JSON_PROPERTY_USAGE_PAYMENT_METHOD, + OutboundVoiceProfile.JSON_PROPERTY_WHITELISTED_DESTINATIONS, + OutboundVoiceProfile.JSON_PROPERTY_MAX_DESTINATION_RATE, + OutboundVoiceProfile.JSON_PROPERTY_DAILY_SPEND_LIMIT, + OutboundVoiceProfile.JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED, + OutboundVoiceProfile.JSON_PROPERTY_CALL_RECORDING, + OutboundVoiceProfile.JSON_PROPERTY_BILLING_GROUP_ID, + OutboundVoiceProfile.JSON_PROPERTY_CREATED_AT, + OutboundVoiceProfile.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OutboundVoiceProfile { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name = ""; + + public static final String JSON_PROPERTY_CONNECTIONS_COUNT = "connections_count"; + private Integer connectionsCount; + + public static final String JSON_PROPERTY_TRAFFIC_TYPE = "traffic_type"; + private TrafficType trafficType = TrafficType.CONVERSATIONAL; + + public static final String JSON_PROPERTY_SERVICE_PLAN = "service_plan"; + private ServicePlan servicePlan = ServicePlan.GLOBAL; + + public static final String JSON_PROPERTY_CONCURRENT_CALL_LIMIT = "concurrent_call_limit"; + private JsonNullable concurrentCallLimit = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled = true; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_USAGE_PAYMENT_METHOD = "usage_payment_method"; + private UsagePaymentMethod usagePaymentMethod = UsagePaymentMethod.RATE_DECK; + + public static final String JSON_PROPERTY_WHITELISTED_DESTINATIONS = "whitelisted_destinations"; + private List whitelistedDestinations = null; + + public static final String JSON_PROPERTY_MAX_DESTINATION_RATE = "max_destination_rate"; + private BigDecimal maxDestinationRate; + + public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT = "daily_spend_limit"; + private String dailySpendLimit; + + public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED = "daily_spend_limit_enabled"; + private Boolean dailySpendLimitEnabled = false; + + public static final String JSON_PROPERTY_CALL_RECORDING = "call_recording"; + private OutboundCallRecording callRecording; + + public static final String JSON_PROPERTY_BILLING_GROUP_ID = "billing_group_id"; + private JsonNullable billingGroupId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + + public OutboundVoiceProfile id(String id) { + this.id = id; + return this; + } + + /** + * Identifies the resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public OutboundVoiceProfile recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "outbound_voice_profile", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public OutboundVoiceProfile name(String name) { + this.name = name; + return this; + } + + /** + * A user-supplied name to help with organization. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "office", value = "A user-supplied name to help with organization.") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public OutboundVoiceProfile connectionsCount(Integer connectionsCount) { + this.connectionsCount = connectionsCount; + return this; + } + + /** + * Amount of connections associated with this outbound voice profile. + * @return connectionsCount + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "12", value = "Amount of connections associated with this outbound voice profile.") + @JsonProperty(JSON_PROPERTY_CONNECTIONS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getConnectionsCount() { + return connectionsCount; + } + + + public void setConnectionsCount(Integer connectionsCount) { + this.connectionsCount = connectionsCount; + } + + + public OutboundVoiceProfile trafficType(TrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Get trafficType + * @return trafficType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRAFFIC_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TrafficType getTrafficType() { + return trafficType; + } + + + public void setTrafficType(TrafficType trafficType) { + this.trafficType = trafficType; + } + + + public OutboundVoiceProfile servicePlan(ServicePlan servicePlan) { + this.servicePlan = servicePlan; + return this; + } + + /** + * Get servicePlan + * @return servicePlan + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SERVICE_PLAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ServicePlan getServicePlan() { + return servicePlan; + } + + + public void setServicePlan(ServicePlan servicePlan) { + this.servicePlan = servicePlan; + } + + + public OutboundVoiceProfile concurrentCallLimit(Integer concurrentCallLimit) { + this.concurrentCallLimit = JsonNullable.of(concurrentCallLimit); + return this; + } + + /** + * Must be no more than your global concurrent call limit. Null means no limit. + * @return concurrentCallLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "Must be no more than your global concurrent call limit. Null means no limit.") + @JsonIgnore + + public Integer getConcurrentCallLimit() { + return concurrentCallLimit.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONCURRENT_CALL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getConcurrentCallLimit_JsonNullable() { + return concurrentCallLimit; + } + + @JsonProperty(JSON_PROPERTY_CONCURRENT_CALL_LIMIT) + public void setConcurrentCallLimit_JsonNullable(JsonNullable concurrentCallLimit) { + this.concurrentCallLimit = concurrentCallLimit; + } + + public void setConcurrentCallLimit(Integer concurrentCallLimit) { + this.concurrentCallLimit = JsonNullable.of(concurrentCallLimit); + } + + + public OutboundVoiceProfile enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. + * @return enabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.") + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEnabled() { + return enabled; + } + + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + + public OutboundVoiceProfile tags(List tags) { + this.tags = tags; + return this; + } + + public OutboundVoiceProfile addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[\"office-profile\"]", value = "") + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + public void setTags(List tags) { + this.tags = tags; + } + + + public OutboundVoiceProfile usagePaymentMethod(UsagePaymentMethod usagePaymentMethod) { + this.usagePaymentMethod = usagePaymentMethod; + return this; + } + + /** + * Get usagePaymentMethod + * @return usagePaymentMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USAGE_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UsagePaymentMethod getUsagePaymentMethod() { + return usagePaymentMethod; + } + + + public void setUsagePaymentMethod(UsagePaymentMethod usagePaymentMethod) { + this.usagePaymentMethod = usagePaymentMethod; + } + + + public OutboundVoiceProfile whitelistedDestinations(List whitelistedDestinations) { + this.whitelistedDestinations = whitelistedDestinations; + return this; + } + + public OutboundVoiceProfile addWhitelistedDestinationsItem(String whitelistedDestinationsItem) { + if (this.whitelistedDestinations == null) { + this.whitelistedDestinations = new ArrayList<>(); + } + this.whitelistedDestinations.add(whitelistedDestinationsItem); + return this; + } + + /** + * The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. + * @return whitelistedDestinations + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[\"US\",\"BR\",\"AU\"]", value = "The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.") + @JsonProperty(JSON_PROPERTY_WHITELISTED_DESTINATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getWhitelistedDestinations() { + return whitelistedDestinations; + } + + + public void setWhitelistedDestinations(List whitelistedDestinations) { + this.whitelistedDestinations = whitelistedDestinations; + } + + + public OutboundVoiceProfile maxDestinationRate(BigDecimal maxDestinationRate) { + this.maxDestinationRate = maxDestinationRate; + return this; + } + + /** + * Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. + * @return maxDestinationRate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Maximum rate (price per minute) for a Destination to be allowed when making outbound calls.") + @JsonProperty(JSON_PROPERTY_MAX_DESTINATION_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getMaxDestinationRate() { + return maxDestinationRate; + } + + + public void setMaxDestinationRate(BigDecimal maxDestinationRate) { + this.maxDestinationRate = maxDestinationRate; + } + + + public OutboundVoiceProfile dailySpendLimit(String dailySpendLimit) { + this.dailySpendLimit = dailySpendLimit; + return this; + } + + /** + * The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. + * @return dailySpendLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "100.00", value = "The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.") + @JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDailySpendLimit() { + return dailySpendLimit; + } + + + public void setDailySpendLimit(String dailySpendLimit) { + this.dailySpendLimit = dailySpendLimit; + } + + + public OutboundVoiceProfile dailySpendLimitEnabled(Boolean dailySpendLimitEnabled) { + this.dailySpendLimitEnabled = dailySpendLimitEnabled; + return this; + } + + /** + * Specifies whether to enforce the daily_spend_limit on this outbound voice profile. + * @return dailySpendLimitEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether to enforce the daily_spend_limit on this outbound voice profile.") + @JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDailySpendLimitEnabled() { + return dailySpendLimitEnabled; + } + + + public void setDailySpendLimitEnabled(Boolean dailySpendLimitEnabled) { + this.dailySpendLimitEnabled = dailySpendLimitEnabled; + } + + + public OutboundVoiceProfile callRecording(OutboundCallRecording callRecording) { + this.callRecording = callRecording; + return this; + } + + /** + * Get callRecording + * @return callRecording + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CALL_RECORDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundCallRecording getCallRecording() { + return callRecording; + } + + + public void setCallRecording(OutboundCallRecording callRecording) { + this.callRecording = callRecording; + } + + + public OutboundVoiceProfile billingGroupId(UUID billingGroupId) { + this.billingGroupId = JsonNullable.of(billingGroupId); + return this; + } + + /** + * The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). + * @return billingGroupId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", value = "The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).") + @JsonIgnore + + public UUID getBillingGroupId() { + return billingGroupId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BILLING_GROUP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBillingGroupId_JsonNullable() { + return billingGroupId; + } + + @JsonProperty(JSON_PROPERTY_BILLING_GROUP_ID) + public void setBillingGroupId_JsonNullable(JsonNullable billingGroupId) { + this.billingGroupId = billingGroupId; + } + + public void setBillingGroupId(UUID billingGroupId) { + this.billingGroupId = JsonNullable.of(billingGroupId); + } + + + public OutboundVoiceProfile createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date-time indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date-time indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public OutboundVoiceProfile updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date-time indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2018-02-02T22:25:27.521Z", value = "ISO 8601 formatted date-time indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this OutboundVoiceProfile object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundVoiceProfile outboundVoiceProfile = (OutboundVoiceProfile) o; + return Objects.equals(this.id, outboundVoiceProfile.id) && + Objects.equals(this.recordType, outboundVoiceProfile.recordType) && + Objects.equals(this.name, outboundVoiceProfile.name) && + Objects.equals(this.connectionsCount, outboundVoiceProfile.connectionsCount) && + Objects.equals(this.trafficType, outboundVoiceProfile.trafficType) && + Objects.equals(this.servicePlan, outboundVoiceProfile.servicePlan) && + Objects.equals(this.concurrentCallLimit, outboundVoiceProfile.concurrentCallLimit) && + Objects.equals(this.enabled, outboundVoiceProfile.enabled) && + Objects.equals(this.tags, outboundVoiceProfile.tags) && + Objects.equals(this.usagePaymentMethod, outboundVoiceProfile.usagePaymentMethod) && + Objects.equals(this.whitelistedDestinations, outboundVoiceProfile.whitelistedDestinations) && + Objects.equals(this.maxDestinationRate, outboundVoiceProfile.maxDestinationRate) && + Objects.equals(this.dailySpendLimit, outboundVoiceProfile.dailySpendLimit) && + Objects.equals(this.dailySpendLimitEnabled, outboundVoiceProfile.dailySpendLimitEnabled) && + Objects.equals(this.callRecording, outboundVoiceProfile.callRecording) && + Objects.equals(this.billingGroupId, outboundVoiceProfile.billingGroupId) && + Objects.equals(this.createdAt, outboundVoiceProfile.createdAt) && + Objects.equals(this.updatedAt, outboundVoiceProfile.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, name, connectionsCount, trafficType, servicePlan, concurrentCallLimit, enabled, tags, usagePaymentMethod, whitelistedDestinations, maxDestinationRate, dailySpendLimit, dailySpendLimitEnabled, callRecording, billingGroupId, createdAt, updatedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundVoiceProfile {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" connectionsCount: ").append(toIndentedString(connectionsCount)).append("\n"); + sb.append(" trafficType: ").append(toIndentedString(trafficType)).append("\n"); + sb.append(" servicePlan: ").append(toIndentedString(servicePlan)).append("\n"); + sb.append(" concurrentCallLimit: ").append(toIndentedString(concurrentCallLimit)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" usagePaymentMethod: ").append(toIndentedString(usagePaymentMethod)).append("\n"); + sb.append(" whitelistedDestinations: ").append(toIndentedString(whitelistedDestinations)).append("\n"); + sb.append(" maxDestinationRate: ").append(toIndentedString(maxDestinationRate)).append("\n"); + sb.append(" dailySpendLimit: ").append(toIndentedString(dailySpendLimit)).append("\n"); + sb.append(" dailySpendLimitEnabled: ").append(toIndentedString(dailySpendLimitEnabled)).append("\n"); + sb.append(" callRecording: ").append(toIndentedString(callRecording)).append("\n"); + sb.append(" billingGroupId: ").append(toIndentedString(billingGroupId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/OutboundVoiceProfileResponse.java b/src/main/java/com/telnyx/sdk/model/OutboundVoiceProfileResponse.java new file mode 100644 index 00000000..cb51e000 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/OutboundVoiceProfileResponse.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundVoiceProfile; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * OutboundVoiceProfileResponse + */ +@JsonPropertyOrder({ + OutboundVoiceProfileResponse.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OutboundVoiceProfileResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private OutboundVoiceProfile data; + + + public OutboundVoiceProfileResponse data(OutboundVoiceProfile data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundVoiceProfile getData() { + return data; + } + + + public void setData(OutboundVoiceProfile data) { + this.data = data; + } + + + /** + * Return true if this Outbound_Voice_Profile_Response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutboundVoiceProfileResponse outboundVoiceProfileResponse = (OutboundVoiceProfileResponse) o; + return Objects.equals(this.data, outboundVoiceProfileResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutboundVoiceProfileResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java b/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java index 4468abd0..a21ee64b 100644 --- a/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumberDetailed.java @@ -41,6 +41,7 @@ PhoneNumberDetailed.JSON_PROPERTY_TAGS, PhoneNumberDetailed.JSON_PROPERTY_EXTERNAL_PIN, PhoneNumberDetailed.JSON_PROPERTY_CONNECTION_NAME, + PhoneNumberDetailed.JSON_PROPERTY_CUSTOMER_REFERENCE, PhoneNumberDetailed.JSON_PROPERTY_CONNECTION_ID, PhoneNumberDetailed.JSON_PROPERTY_MESSAGING_PROFILE_ID, PhoneNumberDetailed.JSON_PROPERTY_MESSAGING_PROFILE_NAME, @@ -128,6 +129,9 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; private String connectionName; + public static final String JSON_PROPERTY_CUSTOMER_REFERENCE = "customer_reference"; + private String customerReference; + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; private String connectionId; @@ -307,6 +311,30 @@ public String getConnectionName() { + public PhoneNumberDetailed customerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A customer reference string for customer look ups. + * @return customerReference + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "MY REF 001", value = "A customer reference string for customer look ups.") + @JsonProperty(JSON_PROPERTY_CUSTOMER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerReference() { + return customerReference; + } + + + public void setCustomerReference(String customerReference) { + this.customerReference = customerReference; + } + + public PhoneNumberDetailed connectionId(String connectionId) { this.connectionId = connectionId; return this; @@ -582,6 +610,7 @@ public boolean equals(Object o) { Objects.equals(this.tags, phoneNumberDetailed.tags) && Objects.equals(this.externalPin, phoneNumberDetailed.externalPin) && Objects.equals(this.connectionName, phoneNumberDetailed.connectionName) && + Objects.equals(this.customerReference, phoneNumberDetailed.customerReference) && Objects.equals(this.connectionId, phoneNumberDetailed.connectionId) && Objects.equals(this.messagingProfileId, phoneNumberDetailed.messagingProfileId) && Objects.equals(this.messagingProfileName, phoneNumberDetailed.messagingProfileName) && @@ -600,7 +629,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, recordType, phoneNumber, status, tags, externalPin, connectionName, connectionId, messagingProfileId, messagingProfileName, billingGroupId, emergencyEnabled, emergencyAddressId, callForwardingEnabled, cnamListingEnabled, callerIdNameEnabled, callRecordingEnabled, t38FaxGatewayEnabled, purchasedAt, createdAt, updatedAt); + return Objects.hash(id, recordType, phoneNumber, status, tags, externalPin, connectionName, customerReference, connectionId, messagingProfileId, messagingProfileName, billingGroupId, emergencyEnabled, emergencyAddressId, callForwardingEnabled, cnamListingEnabled, callerIdNameEnabled, callRecordingEnabled, t38FaxGatewayEnabled, purchasedAt, createdAt, updatedAt); } @@ -615,6 +644,7 @@ public String toString() { sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" externalPin: ").append(toIndentedString(externalPin)).append("\n"); sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" customerReference: ").append(toIndentedString(customerReference)).append("\n"); sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); sb.append(" messagingProfileId: ").append(toIndentedString(messagingProfileId)).append("\n"); sb.append(" messagingProfileName: ").append(toIndentedString(messagingProfileName)).append("\n"); diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumberWithVoiceSettings.java b/src/main/java/com/telnyx/sdk/model/PhoneNumberWithVoiceSettings.java index 7740e481..ae27190d 100644 --- a/src/main/java/com/telnyx/sdk/model/PhoneNumberWithVoiceSettings.java +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumberWithVoiceSettings.java @@ -41,6 +41,7 @@ PhoneNumberWithVoiceSettings.JSON_PROPERTY_RECORD_TYPE, PhoneNumberWithVoiceSettings.JSON_PROPERTY_PHONE_NUMBER, PhoneNumberWithVoiceSettings.JSON_PROPERTY_CONNECTION_ID, + PhoneNumberWithVoiceSettings.JSON_PROPERTY_CUSTOMER_REFERENCE, PhoneNumberWithVoiceSettings.JSON_PROPERTY_TECH_PREFIX_ENABLED, PhoneNumberWithVoiceSettings.JSON_PROPERTY_TRANSLATED_NUMBER, PhoneNumberWithVoiceSettings.JSON_PROPERTY_CALL_FORWARDING, @@ -64,6 +65,9 @@ public class PhoneNumberWithVoiceSettings { public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; private String connectionId; + public static final String JSON_PROPERTY_CUSTOMER_REFERENCE = "customer_reference"; + private String customerReference; + public static final String JSON_PROPERTY_TECH_PREFIX_ENABLED = "tech_prefix_enabled"; private Boolean techPrefixEnabled = false; @@ -196,6 +200,30 @@ public void setConnectionId(String connectionId) { } + public PhoneNumberWithVoiceSettings customerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A customer reference string for customer look ups. + * @return customerReference + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "MY REF 001", value = "A customer reference string for customer look ups.") + @JsonProperty(JSON_PROPERTY_CUSTOMER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerReference() { + return customerReference; + } + + + public void setCustomerReference(String customerReference) { + this.customerReference = customerReference; + } + + public PhoneNumberWithVoiceSettings techPrefixEnabled(Boolean techPrefixEnabled) { this.techPrefixEnabled = techPrefixEnabled; return this; @@ -404,6 +432,7 @@ public boolean equals(Object o) { Objects.equals(this.recordType, phoneNumberWithVoiceSettings.recordType) && Objects.equals(this.phoneNumber, phoneNumberWithVoiceSettings.phoneNumber) && Objects.equals(this.connectionId, phoneNumberWithVoiceSettings.connectionId) && + Objects.equals(this.customerReference, phoneNumberWithVoiceSettings.customerReference) && Objects.equals(this.techPrefixEnabled, phoneNumberWithVoiceSettings.techPrefixEnabled) && Objects.equals(this.translatedNumber, phoneNumberWithVoiceSettings.translatedNumber) && Objects.equals(this.callForwarding, phoneNumberWithVoiceSettings.callForwarding) && @@ -416,7 +445,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, recordType, phoneNumber, connectionId, techPrefixEnabled, translatedNumber, callForwarding, cnamListing, emergency, usagePaymentMethod, mediaFeatures, callRecording); + return Objects.hash(id, recordType, phoneNumber, connectionId, customerReference, techPrefixEnabled, translatedNumber, callForwarding, cnamListing, emergency, usagePaymentMethod, mediaFeatures, callRecording); } @@ -428,6 +457,7 @@ public String toString() { sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" customerReference: ").append(toIndentedString(customerReference)).append("\n"); sb.append(" techPrefixEnabled: ").append(toIndentedString(techPrefixEnabled)).append("\n"); sb.append(" translatedNumber: ").append(toIndentedString(translatedNumber)).append("\n"); sb.append(" callForwarding: ").append(toIndentedString(callForwarding)).append("\n"); diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergency.java b/src/main/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergency.java new file mode 100644 index 00000000..b3a61720 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergency.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PhoneNumbersJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PhoneNumbersEnableEmergency + */ +@JsonPropertyOrder({ + PhoneNumbersEnableEmergency.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PhoneNumbersEnableEmergency { + public static final String JSON_PROPERTY_DATA = "data"; + private PhoneNumbersJob data; + + + public PhoneNumbersEnableEmergency data(PhoneNumbersJob data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PhoneNumbersJob getData() { + return data; + } + + + public void setData(PhoneNumbersJob data) { + this.data = data; + } + + + /** + * Return true if this Phone_Numbers_Enable_Emergency object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PhoneNumbersEnableEmergency phoneNumbersEnableEmergency = (PhoneNumbersEnableEmergency) o; + return Objects.equals(this.data, phoneNumbersEnableEmergency.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PhoneNumbersEnableEmergency {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumbersJob.java b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJob.java new file mode 100644 index 00000000..7958634b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJob.java @@ -0,0 +1,109 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PhoneNumbersJob + */ +@JsonPropertyOrder({ + PhoneNumbersJob.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PhoneNumbersJob { + public static final String JSON_PROPERTY_DATA = "data"; + private PhoneNumbersJob data; + + + public PhoneNumbersJob data(PhoneNumbersJob data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PhoneNumbersJob getData() { + return data; + } + + + public void setData(PhoneNumbersJob data) { + this.data = data; + } + + + /** + * Return true if this Phone_Numbers_Job object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PhoneNumbersJob phoneNumbersJob = (PhoneNumbersJob) o; + return Objects.equals(this.data, phoneNumbersJob.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PhoneNumbersJob {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbers.java b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbers.java new file mode 100644 index 00000000..d4bda9e5 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbers.java @@ -0,0 +1,110 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PhoneNumbersJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PhoneNumbersJobDeletePhoneNumbers + */ +@JsonPropertyOrder({ + PhoneNumbersJobDeletePhoneNumbers.JSON_PROPERTY_DATA +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PhoneNumbersJobDeletePhoneNumbers { + public static final String JSON_PROPERTY_DATA = "data"; + private PhoneNumbersJob data; + + + public PhoneNumbersJobDeletePhoneNumbers data(PhoneNumbersJob data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PhoneNumbersJob getData() { + return data; + } + + + public void setData(PhoneNumbersJob data) { + this.data = data; + } + + + /** + * Return true if this Phone_Numbers_Job_Delete_Phone_Numbers object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PhoneNumbersJobDeletePhoneNumbers phoneNumbersJobDeletePhoneNumbers = (PhoneNumbersJobDeletePhoneNumbers) o; + return Objects.equals(this.data, phoneNumbersJobDeletePhoneNumbers.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PhoneNumbersJobDeletePhoneNumbers {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequest.java b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequest.java new file mode 100644 index 00000000..4be33703 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequest.java @@ -0,0 +1,115 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PhoneNumbersJobDeletePhoneNumbersRequest + */ +@JsonPropertyOrder({ + PhoneNumbersJobDeletePhoneNumbersRequest.JSON_PROPERTY_PHONE_NUMBERS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PhoneNumbersJobDeletePhoneNumbersRequest { + public static final String JSON_PROPERTY_PHONE_NUMBERS = "phone_numbers"; + private List phoneNumbers = new ArrayList<>(); + + + public PhoneNumbersJobDeletePhoneNumbersRequest phoneNumbers(List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + return this; + } + + public PhoneNumbersJobDeletePhoneNumbersRequest addPhoneNumbersItem(String phoneNumbersItem) { + this.phoneNumbers.add(phoneNumbersItem); + return this; + } + + /** + * Get phoneNumbers + * @return phoneNumbers + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhoneNumbers() { + return phoneNumbers; + } + + + public void setPhoneNumbers(List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + } + + + /** + * Return true if this PhoneNumbersJobDeletePhoneNumbersRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PhoneNumbersJobDeletePhoneNumbersRequest phoneNumbersJobDeletePhoneNumbersRequest = (PhoneNumbersJobDeletePhoneNumbersRequest) o; + return Objects.equals(this.phoneNumbers, phoneNumbersJobDeletePhoneNumbersRequest.phoneNumbers); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumbers); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PhoneNumbersJobDeletePhoneNumbersRequest {\n"); + sb.append(" phoneNumbers: ").append(toIndentedString(phoneNumbers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperation.java b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperation.java new file mode 100644 index 00000000..42e035e2 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperation.java @@ -0,0 +1,180 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PhoneNumbersJobFailedOperation + */ +@JsonPropertyOrder({ + PhoneNumbersJobFailedOperation.JSON_PROPERTY_PHONE_NUMBER, + PhoneNumbersJobFailedOperation.JSON_PROPERTY_ID, + PhoneNumbersJobFailedOperation.JSON_PROPERTY_ERRORS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PhoneNumbersJobFailedOperation { + public static final String JSON_PROPERTY_PHONE_NUMBER = "phone_number"; + private String phoneNumber; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors = null; + + + public PhoneNumbersJobFailedOperation phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The phone number in e164 format. + * @return phoneNumber + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The phone number in e164 format.") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPhoneNumber() { + return phoneNumber; + } + + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public PhoneNumbersJobFailedOperation id(String id) { + this.id = id; + return this; + } + + /** + * The phone number's ID + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The phone number's ID") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public PhoneNumbersJobFailedOperation errors(List errors) { + this.errors = errors; + return this; + } + + public PhoneNumbersJobFailedOperation addErrorsItem(Error errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getErrors() { + return errors; + } + + + public void setErrors(List errors) { + this.errors = errors; + } + + + /** + * Return true if this PhoneNumbersJobFailedOperation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PhoneNumbersJobFailedOperation phoneNumbersJobFailedOperation = (PhoneNumbersJobFailedOperation) o; + return Objects.equals(this.phoneNumber, phoneNumbersJobFailedOperation.phoneNumber) && + Objects.equals(this.id, phoneNumbersJobFailedOperation.id) && + Objects.equals(this.errors, phoneNumbersJobFailedOperation.errors); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumber, id, errors); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PhoneNumbersJobFailedOperation {\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperation.java b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperation.java new file mode 100644 index 00000000..c0940e55 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperation.java @@ -0,0 +1,139 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PhoneNumbersJobSuccessfulOperation + */ +@JsonPropertyOrder({ + PhoneNumbersJobSuccessfulOperation.JSON_PROPERTY_PHONE_NUMBER, + PhoneNumbersJobSuccessfulOperation.JSON_PROPERTY_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PhoneNumbersJobSuccessfulOperation { + public static final String JSON_PROPERTY_PHONE_NUMBER = "phone_number"; + private String phoneNumber; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + + public PhoneNumbersJobSuccessfulOperation phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The phone number in e164 format. + * @return phoneNumber + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The phone number in e164 format.") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPhoneNumber() { + return phoneNumber; + } + + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public PhoneNumbersJobSuccessfulOperation id(String id) { + this.id = id; + return this; + } + + /** + * The phone number's ID + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The phone number's ID") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + /** + * Return true if this PhoneNumbersJobSuccessfulOperation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PhoneNumbersJobSuccessfulOperation phoneNumbersJobSuccessfulOperation = (PhoneNumbersJobSuccessfulOperation) o; + return Objects.equals(this.phoneNumber, phoneNumbersJobSuccessfulOperation.phoneNumber) && + Objects.equals(this.id, phoneNumbersJobSuccessfulOperation.id); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumber, id); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PhoneNumbersJobSuccessfulOperation {\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequest.java b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequest.java new file mode 100644 index 00000000..9ff5a13c --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequest.java @@ -0,0 +1,173 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * PhoneNumbersJobUpdateEmergencySettingsRequest + */ +@JsonPropertyOrder({ + PhoneNumbersJobUpdateEmergencySettingsRequest.JSON_PROPERTY_PHONE_NUMBERS, + PhoneNumbersJobUpdateEmergencySettingsRequest.JSON_PROPERTY_EMERGENCY_ENABLED, + PhoneNumbersJobUpdateEmergencySettingsRequest.JSON_PROPERTY_EMERGENCY_ADDRESS_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PhoneNumbersJobUpdateEmergencySettingsRequest { + public static final String JSON_PROPERTY_PHONE_NUMBERS = "phone_numbers"; + private List phoneNumbers = new ArrayList<>(); + + public static final String JSON_PROPERTY_EMERGENCY_ENABLED = "emergency_enabled"; + private Boolean emergencyEnabled; + + public static final String JSON_PROPERTY_EMERGENCY_ADDRESS_ID = "emergency_address_id"; + private String emergencyAddressId; + + + public PhoneNumbersJobUpdateEmergencySettingsRequest phoneNumbers(List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + return this; + } + + public PhoneNumbersJobUpdateEmergencySettingsRequest addPhoneNumbersItem(String phoneNumbersItem) { + this.phoneNumbers.add(phoneNumbersItem); + return this; + } + + /** + * Get phoneNumbers + * @return phoneNumbers + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhoneNumbers() { + return phoneNumbers; + } + + + public void setPhoneNumbers(List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + } + + + public PhoneNumbersJobUpdateEmergencySettingsRequest emergencyEnabled(Boolean emergencyEnabled) { + this.emergencyEnabled = emergencyEnabled; + return this; + } + + /** + * Indicates whether to enable emergency services on this number. + * @return emergencyEnabled + **/ + @ApiModelProperty(required = true, value = "Indicates whether to enable emergency services on this number.") + @JsonProperty(JSON_PROPERTY_EMERGENCY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getEmergencyEnabled() { + return emergencyEnabled; + } + + + public void setEmergencyEnabled(Boolean emergencyEnabled) { + this.emergencyEnabled = emergencyEnabled; + } + + + public PhoneNumbersJobUpdateEmergencySettingsRequest emergencyAddressId(String emergencyAddressId) { + this.emergencyAddressId = emergencyAddressId; + return this; + } + + /** + * Identifies the address to be used with emergency services. + * @return emergencyAddressId + **/ + @ApiModelProperty(required = true, value = "Identifies the address to be used with emergency services.") + @JsonProperty(JSON_PROPERTY_EMERGENCY_ADDRESS_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getEmergencyAddressId() { + return emergencyAddressId; + } + + + public void setEmergencyAddressId(String emergencyAddressId) { + this.emergencyAddressId = emergencyAddressId; + } + + + /** + * Return true if this PhoneNumbersJobUpdateEmergencySettingsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PhoneNumbersJobUpdateEmergencySettingsRequest phoneNumbersJobUpdateEmergencySettingsRequest = (PhoneNumbersJobUpdateEmergencySettingsRequest) o; + return Objects.equals(this.phoneNumbers, phoneNumbersJobUpdateEmergencySettingsRequest.phoneNumbers) && + Objects.equals(this.emergencyEnabled, phoneNumbersJobUpdateEmergencySettingsRequest.emergencyEnabled) && + Objects.equals(this.emergencyAddressId, phoneNumbersJobUpdateEmergencySettingsRequest.emergencyAddressId); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumbers, emergencyEnabled, emergencyAddressId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PhoneNumbersJobUpdateEmergencySettingsRequest {\n"); + sb.append(" phoneNumbers: ").append(toIndentedString(phoneNumbers)).append("\n"); + sb.append(" emergencyEnabled: ").append(toIndentedString(emergencyEnabled)).append("\n"); + sb.append(" emergencyAddressId: ").append(toIndentedString(emergencyAddressId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/ServicePlan.java b/src/main/java/com/telnyx/sdk/model/ServicePlan.java new file mode 100644 index 00000000..4f7bc612 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/ServicePlan.java @@ -0,0 +1,65 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Indicates the coverage of the termination regions. International and Global are the same but International may only be used for high volume/short duration Outbound Voice Profiles. + */ +public enum ServicePlan { + + US("us"), + + INTERNATIONAL("international"), + + GLOBAL("global"); + + private String value; + + ServicePlan(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ServicePlan fromValue(String value) { + for (ServicePlan b : ServicePlan.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/TexmlApplication.java b/src/main/java/com/telnyx/sdk/model/TexmlApplication.java new file mode 100644 index 00000000..b0d2deaa --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/TexmlApplication.java @@ -0,0 +1,655 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestInbound; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestOutbound; +import com.telnyx.sdk.model.DtmfType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * TexmlApplication + */ +@JsonPropertyOrder({ + TexmlApplication.JSON_PROPERTY_ID, + TexmlApplication.JSON_PROPERTY_RECORD_TYPE, + TexmlApplication.JSON_PROPERTY_FRIENDLY_NAME, + TexmlApplication.JSON_PROPERTY_ACTIVE, + TexmlApplication.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + TexmlApplication.JSON_PROPERTY_DTMF_TYPE, + TexmlApplication.JSON_PROPERTY_FIRST_COMMAND_TIMEOUT, + TexmlApplication.JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS, + TexmlApplication.JSON_PROPERTY_VOICE_URL, + TexmlApplication.JSON_PROPERTY_VOICE_FALLBACK_URL, + TexmlApplication.JSON_PROPERTY_VOICE_METHOD, + TexmlApplication.JSON_PROPERTY_STATUS_CALLBACK, + TexmlApplication.JSON_PROPERTY_STATUS_CALLBACK_METHOD, + TexmlApplication.JSON_PROPERTY_INBOUND, + TexmlApplication.JSON_PROPERTY_OUTBOUND, + TexmlApplication.JSON_PROPERTY_CREATED_AT, + TexmlApplication.JSON_PROPERTY_UPDATED_AT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TexmlApplication { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RECORD_TYPE = "record_type"; + private String recordType; + + public static final String JSON_PROPERTY_FRIENDLY_NAME = "friendly_name"; + private String friendlyName; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active = true; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_FIRST_COMMAND_TIMEOUT = "first_command_timeout"; + private Boolean firstCommandTimeout = false; + + public static final String JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS = "first_command_timeout_secs"; + private Integer firstCommandTimeoutSecs = 30; + + public static final String JSON_PROPERTY_VOICE_URL = "voice_url"; + private String voiceUrl; + + public static final String JSON_PROPERTY_VOICE_FALLBACK_URL = "voice_fallback_url"; + private String voiceFallbackUrl = "null"; + + /** + * HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + */ + public enum VoiceMethodEnum { + GET("get"), + + POST("post"); + + private String value; + + VoiceMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VoiceMethodEnum fromValue(String value) { + for (VoiceMethodEnum b : VoiceMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_VOICE_METHOD = "voice_method"; + private VoiceMethodEnum voiceMethod = VoiceMethodEnum.POST; + + public static final String JSON_PROPERTY_STATUS_CALLBACK = "status_callback"; + private String statusCallback = "null"; + + /** + * HTTP request method Telnyx should use when requesting the status_callback URL. + */ + public enum StatusCallbackMethodEnum { + GET("get"), + + POST("post"); + + private String value; + + StatusCallbackMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusCallbackMethodEnum fromValue(String value) { + for (StatusCallbackMethodEnum b : StatusCallbackMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS_CALLBACK_METHOD = "status_callback_method"; + private StatusCallbackMethodEnum statusCallbackMethod = StatusCallbackMethodEnum.POST; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CreateTexmlApplicationRequestInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CreateTexmlApplicationRequestOutbound outbound; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + + /** + * Identifies the resource. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1293384261075731499", value = "Identifies the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + + + public TexmlApplication recordType(String recordType) { + this.recordType = recordType; + return this; + } + + /** + * Identifies the type of the resource. + * @return recordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "texml_application", value = "Identifies the type of the resource.") + @JsonProperty(JSON_PROPERTY_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecordType() { + return recordType; + } + + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + + public TexmlApplication friendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * A user-assigned name to help manage the application. + * @return friendlyName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "call-router", value = "A user-assigned name to help manage the application.") + @JsonProperty(JSON_PROPERTY_FRIENDLY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFriendlyName() { + return friendlyName; + } + + + public void setFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + } + + + public TexmlApplication active(Boolean active) { + this.active = active; + return this; + } + + /** + * Specifies whether the connection can be used. + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Specifies whether the connection can be used.") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public TexmlApplication anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public TexmlApplication dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public TexmlApplication firstCommandTimeout(Boolean firstCommandTimeout) { + this.firstCommandTimeout = firstCommandTimeout; + return this; + } + + /** + * Specifies whether calls to phone numbers associated with this connection should hangup after timing out. + * @return firstCommandTimeout + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.") + @JsonProperty(JSON_PROPERTY_FIRST_COMMAND_TIMEOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getFirstCommandTimeout() { + return firstCommandTimeout; + } + + + public void setFirstCommandTimeout(Boolean firstCommandTimeout) { + this.firstCommandTimeout = firstCommandTimeout; + } + + + public TexmlApplication firstCommandTimeoutSecs(Integer firstCommandTimeoutSecs) { + this.firstCommandTimeoutSecs = firstCommandTimeoutSecs; + return this; + } + + /** + * Specifies how many seconds to wait before timing out a dial command. + * @return firstCommandTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "Specifies how many seconds to wait before timing out a dial command.") + @JsonProperty(JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFirstCommandTimeoutSecs() { + return firstCommandTimeoutSecs; + } + + + public void setFirstCommandTimeoutSecs(Integer firstCommandTimeoutSecs) { + this.firstCommandTimeoutSecs = firstCommandTimeoutSecs; + } + + + public TexmlApplication voiceUrl(String voiceUrl) { + this.voiceUrl = voiceUrl; + return this; + } + + /** + * URL to which Telnyx will deliver your XML Translator webhooks. + * @return voiceUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "URL to which Telnyx will deliver your XML Translator webhooks.") + @JsonProperty(JSON_PROPERTY_VOICE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVoiceUrl() { + return voiceUrl; + } + + + public void setVoiceUrl(String voiceUrl) { + this.voiceUrl = voiceUrl; + } + + + public TexmlApplication voiceFallbackUrl(String voiceFallbackUrl) { + this.voiceFallbackUrl = voiceFallbackUrl; + return this; + } + + /** + * URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. + * @return voiceFallbackUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://fallback.example.com", value = "URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url.") + @JsonProperty(JSON_PROPERTY_VOICE_FALLBACK_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVoiceFallbackUrl() { + return voiceFallbackUrl; + } + + + public void setVoiceFallbackUrl(String voiceFallbackUrl) { + this.voiceFallbackUrl = voiceFallbackUrl; + } + + + public TexmlApplication voiceMethod(VoiceMethodEnum voiceMethod) { + this.voiceMethod = voiceMethod; + return this; + } + + /** + * HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + * @return voiceMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "get", value = "HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'.") + @JsonProperty(JSON_PROPERTY_VOICE_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public VoiceMethodEnum getVoiceMethod() { + return voiceMethod; + } + + + public void setVoiceMethod(VoiceMethodEnum voiceMethod) { + this.voiceMethod = voiceMethod; + } + + + public TexmlApplication statusCallback(String statusCallback) { + this.statusCallback = statusCallback; + return this; + } + + /** + * URL for Telnyx to send requests to containing information about call progress events. + * @return statusCallback + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "URL for Telnyx to send requests to containing information about call progress events.") + @JsonProperty(JSON_PROPERTY_STATUS_CALLBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatusCallback() { + return statusCallback; + } + + + public void setStatusCallback(String statusCallback) { + this.statusCallback = statusCallback; + } + + + public TexmlApplication statusCallbackMethod(StatusCallbackMethodEnum statusCallbackMethod) { + this.statusCallbackMethod = statusCallbackMethod; + return this; + } + + /** + * HTTP request method Telnyx should use when requesting the status_callback URL. + * @return statusCallbackMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "get", value = "HTTP request method Telnyx should use when requesting the status_callback URL.") + @JsonProperty(JSON_PROPERTY_STATUS_CALLBACK_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusCallbackMethodEnum getStatusCallbackMethod() { + return statusCallbackMethod; + } + + + public void setStatusCallbackMethod(StatusCallbackMethodEnum statusCallbackMethod) { + this.statusCallbackMethod = statusCallbackMethod; + } + + + public TexmlApplication inbound(CreateTexmlApplicationRequestInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateTexmlApplicationRequestInbound getInbound() { + return inbound; + } + + + public void setInbound(CreateTexmlApplicationRequestInbound inbound) { + this.inbound = inbound; + } + + + public TexmlApplication outbound(CreateTexmlApplicationRequestOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateTexmlApplicationRequestOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CreateTexmlApplicationRequestOutbound outbound) { + this.outbound = outbound; + } + + + public TexmlApplication createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-02-02T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public TexmlApplication updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO 8601 formatted date indicating when the resource was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2020-02-03T22:25:27.521Z", value = "ISO 8601 formatted date indicating when the resource was updated.") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * Return true if this TexmlApplication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TexmlApplication texmlApplication = (TexmlApplication) o; + return Objects.equals(this.id, texmlApplication.id) && + Objects.equals(this.recordType, texmlApplication.recordType) && + Objects.equals(this.friendlyName, texmlApplication.friendlyName) && + Objects.equals(this.active, texmlApplication.active) && + Objects.equals(this.anchorsiteOverride, texmlApplication.anchorsiteOverride) && + Objects.equals(this.dtmfType, texmlApplication.dtmfType) && + Objects.equals(this.firstCommandTimeout, texmlApplication.firstCommandTimeout) && + Objects.equals(this.firstCommandTimeoutSecs, texmlApplication.firstCommandTimeoutSecs) && + Objects.equals(this.voiceUrl, texmlApplication.voiceUrl) && + Objects.equals(this.voiceFallbackUrl, texmlApplication.voiceFallbackUrl) && + Objects.equals(this.voiceMethod, texmlApplication.voiceMethod) && + Objects.equals(this.statusCallback, texmlApplication.statusCallback) && + Objects.equals(this.statusCallbackMethod, texmlApplication.statusCallbackMethod) && + Objects.equals(this.inbound, texmlApplication.inbound) && + Objects.equals(this.outbound, texmlApplication.outbound) && + Objects.equals(this.createdAt, texmlApplication.createdAt) && + Objects.equals(this.updatedAt, texmlApplication.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, recordType, friendlyName, active, anchorsiteOverride, dtmfType, firstCommandTimeout, firstCommandTimeoutSecs, voiceUrl, voiceFallbackUrl, voiceMethod, statusCallback, statusCallbackMethod, inbound, outbound, createdAt, updatedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TexmlApplication {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" recordType: ").append(toIndentedString(recordType)).append("\n"); + sb.append(" friendlyName: ").append(toIndentedString(friendlyName)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" firstCommandTimeout: ").append(toIndentedString(firstCommandTimeout)).append("\n"); + sb.append(" firstCommandTimeoutSecs: ").append(toIndentedString(firstCommandTimeoutSecs)).append("\n"); + sb.append(" voiceUrl: ").append(toIndentedString(voiceUrl)).append("\n"); + sb.append(" voiceFallbackUrl: ").append(toIndentedString(voiceFallbackUrl)).append("\n"); + sb.append(" voiceMethod: ").append(toIndentedString(voiceMethod)).append("\n"); + sb.append(" statusCallback: ").append(toIndentedString(statusCallback)).append("\n"); + sb.append(" statusCallbackMethod: ").append(toIndentedString(statusCallbackMethod)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/TrafficType.java b/src/main/java/com/telnyx/sdk/model/TrafficType.java new file mode 100644 index 00000000..5c861081 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/TrafficType.java @@ -0,0 +1,63 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Specifies the type of traffic allowed in this profile. + */ +public enum TrafficType { + + CONVERSATIONAL("conversational"), + + SHORT_DURATION("short_duration"); + + private String value; + + TrafficType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TrafficType fromValue(String value) { + for (TrafficType b : TrafficType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequest.java new file mode 100644 index 00000000..3d2a0225 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequest.java @@ -0,0 +1,732 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CredentialInbound; +import com.telnyx.sdk.model.CredentialOutbound; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateCredentialConnectionRequest + */ +@JsonPropertyOrder({ + UpdateCredentialConnectionRequest.JSON_PROPERTY_ACTIVE, + UpdateCredentialConnectionRequest.JSON_PROPERTY_USER_NAME, + UpdateCredentialConnectionRequest.JSON_PROPERTY_PASSWORD, + UpdateCredentialConnectionRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + UpdateCredentialConnectionRequest.JSON_PROPERTY_CONNECTION_NAME, + UpdateCredentialConnectionRequest.JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE, + UpdateCredentialConnectionRequest.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + UpdateCredentialConnectionRequest.JSON_PROPERTY_DTMF_TYPE, + UpdateCredentialConnectionRequest.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + UpdateCredentialConnectionRequest.JSON_PROPERTY_ENCRYPTED_MEDIA, + UpdateCredentialConnectionRequest.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + UpdateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + UpdateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + UpdateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_API_VERSION, + UpdateCredentialConnectionRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + UpdateCredentialConnectionRequest.JSON_PROPERTY_RTCP_SETTINGS, + UpdateCredentialConnectionRequest.JSON_PROPERTY_INBOUND, + UpdateCredentialConnectionRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCredentialConnectionRequest { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_USER_NAME = "user_name"; + private String userName; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + /** + * This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + */ + public enum SipUriCallingPreferenceEnum { + DISABLED("disabled"), + + UNRESTRICTED("unrestricted"), + + INTERNAL("internal"); + + private String value; + + SipUriCallingPreferenceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SipUriCallingPreferenceEnum fromValue(String value) { + for (SipUriCallingPreferenceEnum b : SipUriCallingPreferenceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE = "sip_uri_calling_preference"; + private SipUriCallingPreferenceEnum sipUriCallingPreference = SipUriCallingPreferenceEnum.DISABLED; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = false; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CredentialInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CredentialOutbound outbound; + + + public UpdateCredentialConnectionRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public UpdateCredentialConnectionRequest userName(String userName) { + this.userName = userName; + return this; + } + + /** + * The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters). + * @return userName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "myusername123", value = "The user name to be used as part of the credentials. Must be 4-32 characters long and alphanumeric values only (no spaces or special characters).") + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUserName() { + return userName; + } + + + public void setUserName(String userName) { + this.userName = userName; + } + + + public UpdateCredentialConnectionRequest password(String password) { + this.password = password; + return this; + } + + /** + * The password to be used as part of the credentials. Must be 8 to 128 characters long. + * @return password + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "my123secure456password789", value = "The password to be used as part of the credentials. Must be 8 to 128 characters long.") + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public UpdateCredentialConnectionRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public UpdateCredentialConnectionRequest connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public UpdateCredentialConnectionRequest sipUriCallingPreference(SipUriCallingPreferenceEnum sipUriCallingPreference) { + this.sipUriCallingPreference = sipUriCallingPreference; + return this; + } + + /** + * This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI <your-username>@telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal). + * @return sipUriCallingPreference + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).") + @JsonProperty(JSON_PROPERTY_SIP_URI_CALLING_PREFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SipUriCallingPreferenceEnum getSipUriCallingPreference() { + return sipUriCallingPreference; + } + + + public void setSipUriCallingPreference(SipUriCallingPreferenceEnum sipUriCallingPreference) { + this.sipUriCallingPreference = sipUriCallingPreference; + } + + + public UpdateCredentialConnectionRequest defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public UpdateCredentialConnectionRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public UpdateCredentialConnectionRequest encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public UpdateCredentialConnectionRequest encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public UpdateCredentialConnectionRequest onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public UpdateCredentialConnectionRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public UpdateCredentialConnectionRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public UpdateCredentialConnectionRequest webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public UpdateCredentialConnectionRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public UpdateCredentialConnectionRequest rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public UpdateCredentialConnectionRequest inbound(CredentialInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CredentialInbound getInbound() { + return inbound; + } + + + public void setInbound(CredentialInbound inbound) { + this.inbound = inbound; + } + + + public UpdateCredentialConnectionRequest outbound(CredentialOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CredentialOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CredentialOutbound outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this UpdateCredentialConnectionRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCredentialConnectionRequest updateCredentialConnectionRequest = (UpdateCredentialConnectionRequest) o; + return Objects.equals(this.active, updateCredentialConnectionRequest.active) && + Objects.equals(this.userName, updateCredentialConnectionRequest.userName) && + Objects.equals(this.password, updateCredentialConnectionRequest.password) && + Objects.equals(this.anchorsiteOverride, updateCredentialConnectionRequest.anchorsiteOverride) && + Objects.equals(this.connectionName, updateCredentialConnectionRequest.connectionName) && + Objects.equals(this.sipUriCallingPreference, updateCredentialConnectionRequest.sipUriCallingPreference) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, updateCredentialConnectionRequest.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, updateCredentialConnectionRequest.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, updateCredentialConnectionRequest.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, updateCredentialConnectionRequest.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, updateCredentialConnectionRequest.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, updateCredentialConnectionRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, updateCredentialConnectionRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, updateCredentialConnectionRequest.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, updateCredentialConnectionRequest.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, updateCredentialConnectionRequest.rtcpSettings) && + Objects.equals(this.inbound, updateCredentialConnectionRequest.inbound) && + Objects.equals(this.outbound, updateCredentialConnectionRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(active, userName, password, anchorsiteOverride, connectionName, sipUriCallingPreference, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCredentialConnectionRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" sipUriCallingPreference: ").append(toIndentedString(sipUriCallingPreference)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdateFaxApplicationRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateFaxApplicationRequest.java new file mode 100644 index 00000000..6322124e --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateFaxApplicationRequest.java @@ -0,0 +1,345 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateFaxApplicationRequestInbound; +import com.telnyx.sdk.model.CreateFaxApplicationRequestOutbound; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateFaxApplicationRequest + */ +@JsonPropertyOrder({ + UpdateFaxApplicationRequest.JSON_PROPERTY_APPLICATION_NAME, + UpdateFaxApplicationRequest.JSON_PROPERTY_ACTIVE, + UpdateFaxApplicationRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + UpdateFaxApplicationRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + UpdateFaxApplicationRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + UpdateFaxApplicationRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + UpdateFaxApplicationRequest.JSON_PROPERTY_INBOUND, + UpdateFaxApplicationRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateFaxApplicationRequest { + public static final String JSON_PROPERTY_APPLICATION_NAME = "application_name"; + private String applicationName; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active = true; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CreateFaxApplicationRequestInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CreateFaxApplicationRequestOutbound outbound; + + + public UpdateFaxApplicationRequest applicationName(String applicationName) { + this.applicationName = applicationName; + return this; + } + + /** + * A user-assigned name to help manage the application. + * @return applicationName + **/ + @ApiModelProperty(example = "call-router", required = true, value = "A user-assigned name to help manage the application.") + @JsonProperty(JSON_PROPERTY_APPLICATION_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + + public UpdateFaxApplicationRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Specifies whether the connection can be used. + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Specifies whether the connection can be used.") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public UpdateFaxApplicationRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public UpdateFaxApplicationRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @ApiModelProperty(example = "https://example.com", required = true, value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public UpdateFaxApplicationRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public UpdateFaxApplicationRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public UpdateFaxApplicationRequest inbound(CreateFaxApplicationRequestInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateFaxApplicationRequestInbound getInbound() { + return inbound; + } + + + public void setInbound(CreateFaxApplicationRequestInbound inbound) { + this.inbound = inbound; + } + + + public UpdateFaxApplicationRequest outbound(CreateFaxApplicationRequestOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateFaxApplicationRequestOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CreateFaxApplicationRequestOutbound outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this UpdateFaxApplicationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateFaxApplicationRequest updateFaxApplicationRequest = (UpdateFaxApplicationRequest) o; + return Objects.equals(this.applicationName, updateFaxApplicationRequest.applicationName) && + Objects.equals(this.active, updateFaxApplicationRequest.active) && + Objects.equals(this.anchorsiteOverride, updateFaxApplicationRequest.anchorsiteOverride) && + Objects.equals(this.webhookEventUrl, updateFaxApplicationRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, updateFaxApplicationRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookTimeoutSecs, updateFaxApplicationRequest.webhookTimeoutSecs) && + Objects.equals(this.inbound, updateFaxApplicationRequest.inbound) && + Objects.equals(this.outbound, updateFaxApplicationRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(applicationName, active, anchorsiteOverride, webhookEventUrl, webhookEventFailoverUrl, webhookTimeoutSecs, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateFaxApplicationRequest {\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequest.java new file mode 100644 index 00000000..e7b4279c --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequest.java @@ -0,0 +1,605 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.FqdnConnectionTransportProtocol; +import com.telnyx.sdk.model.InboundFqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateFqdnConnectionRequest + */ +@JsonPropertyOrder({ + UpdateFqdnConnectionRequest.JSON_PROPERTY_ACTIVE, + UpdateFqdnConnectionRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + UpdateFqdnConnectionRequest.JSON_PROPERTY_CONNECTION_NAME, + UpdateFqdnConnectionRequest.JSON_PROPERTY_TRANSPORT_PROTOCOL, + UpdateFqdnConnectionRequest.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + UpdateFqdnConnectionRequest.JSON_PROPERTY_DTMF_TYPE, + UpdateFqdnConnectionRequest.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + UpdateFqdnConnectionRequest.JSON_PROPERTY_ENCRYPTED_MEDIA, + UpdateFqdnConnectionRequest.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + UpdateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + UpdateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + UpdateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_API_VERSION, + UpdateFqdnConnectionRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + UpdateFqdnConnectionRequest.JSON_PROPERTY_RTCP_SETTINGS, + UpdateFqdnConnectionRequest.JSON_PROPERTY_INBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateFqdnConnectionRequest { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + public static final String JSON_PROPERTY_TRANSPORT_PROTOCOL = "transport_protocol"; + private FqdnConnectionTransportProtocol transportProtocol = FqdnConnectionTransportProtocol.UDP; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = true; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private InboundFqdn inbound; + + + public UpdateFqdnConnectionRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public UpdateFqdnConnectionRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public UpdateFqdnConnectionRequest connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public UpdateFqdnConnectionRequest transportProtocol(FqdnConnectionTransportProtocol transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * Get transportProtocol + * @return transportProtocol + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRANSPORT_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FqdnConnectionTransportProtocol getTransportProtocol() { + return transportProtocol; + } + + + public void setTransportProtocol(FqdnConnectionTransportProtocol transportProtocol) { + this.transportProtocol = transportProtocol; + } + + + public UpdateFqdnConnectionRequest defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public UpdateFqdnConnectionRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public UpdateFqdnConnectionRequest encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public UpdateFqdnConnectionRequest encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public UpdateFqdnConnectionRequest onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable on-net T38 if you prefer that the sender and receiver negotiate T38 directly when both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call according to each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public UpdateFqdnConnectionRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public UpdateFqdnConnectionRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public UpdateFqdnConnectionRequest webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public UpdateFqdnConnectionRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public UpdateFqdnConnectionRequest rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public UpdateFqdnConnectionRequest inbound(InboundFqdn inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public InboundFqdn getInbound() { + return inbound; + } + + + public void setInbound(InboundFqdn inbound) { + this.inbound = inbound; + } + + + /** + * Return true if this UpdateFqdnConnectionRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateFqdnConnectionRequest updateFqdnConnectionRequest = (UpdateFqdnConnectionRequest) o; + return Objects.equals(this.active, updateFqdnConnectionRequest.active) && + Objects.equals(this.anchorsiteOverride, updateFqdnConnectionRequest.anchorsiteOverride) && + Objects.equals(this.connectionName, updateFqdnConnectionRequest.connectionName) && + Objects.equals(this.transportProtocol, updateFqdnConnectionRequest.transportProtocol) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, updateFqdnConnectionRequest.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, updateFqdnConnectionRequest.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, updateFqdnConnectionRequest.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, updateFqdnConnectionRequest.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, updateFqdnConnectionRequest.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, updateFqdnConnectionRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, updateFqdnConnectionRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, updateFqdnConnectionRequest.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, updateFqdnConnectionRequest.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, updateFqdnConnectionRequest.rtcpSettings) && + Objects.equals(this.inbound, updateFqdnConnectionRequest.inbound); + } + + @Override + public int hashCode() { + return Objects.hash(active, anchorsiteOverride, connectionName, transportProtocol, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, inbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateFqdnConnectionRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdateFqdnRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateFqdnRequest.java new file mode 100644 index 00000000..e8aaaf2a --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateFqdnRequest.java @@ -0,0 +1,212 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateFqdnRequest + */ +@JsonPropertyOrder({ + UpdateFqdnRequest.JSON_PROPERTY_CONNECTION_ID, + UpdateFqdnRequest.JSON_PROPERTY_FQDN, + UpdateFqdnRequest.JSON_PROPERTY_PORT, + UpdateFqdnRequest.JSON_PROPERTY_DNS_RECORD_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateFqdnRequest { + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_FQDN = "fqdn"; + private String fqdn; + + public static final String JSON_PROPERTY_PORT = "port"; + private JsonNullable port = JsonNullable.of(5060); + + public static final String JSON_PROPERTY_DNS_RECORD_TYPE = "dns_record_type"; + private String dnsRecordType; + + + public UpdateFqdnRequest connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * ID of the FQDN connection to which this IP should be attached. + * @return connectionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ID of the FQDN connection to which this IP should be attached.") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public UpdateFqdnRequest fqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * FQDN represented by this resource. + * @return fqdn + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "example.com", value = "FQDN represented by this resource.") + @JsonProperty(JSON_PROPERTY_FQDN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFqdn() { + return fqdn; + } + + + public void setFqdn(String fqdn) { + this.fqdn = fqdn; + } + + + public UpdateFqdnRequest port(Integer port) { + this.port = JsonNullable.of(port); + return this; + } + + /** + * Port to use when connecting to this FQDN. + * @return port + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5060", value = "Port to use when connecting to this FQDN.") + @JsonIgnore + + public Integer getPort() { + return port.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getPort_JsonNullable() { + return port; + } + + @JsonProperty(JSON_PROPERTY_PORT) + public void setPort_JsonNullable(JsonNullable port) { + this.port = port; + } + + public void setPort(Integer port) { + this.port = JsonNullable.of(port); + } + + + public UpdateFqdnRequest dnsRecordType(String dnsRecordType) { + this.dnsRecordType = dnsRecordType; + return this; + } + + /** + * The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used. + * @return dnsRecordType + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "a", value = "The DNS record type for the FQDN. For cases where a port is not set, the DNS record type must be 'srv'. For cases where a port is set, the DNS record type must be 'a'. If the DNS record type is 'a' and a port is not specified, 5060 will be used.") + @JsonProperty(JSON_PROPERTY_DNS_RECORD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDnsRecordType() { + return dnsRecordType; + } + + + public void setDnsRecordType(String dnsRecordType) { + this.dnsRecordType = dnsRecordType; + } + + + /** + * Return true if this UpdateFqdnRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateFqdnRequest updateFqdnRequest = (UpdateFqdnRequest) o; + return Objects.equals(this.connectionId, updateFqdnRequest.connectionId) && + Objects.equals(this.fqdn, updateFqdnRequest.fqdn) && + Objects.equals(this.port, updateFqdnRequest.port) && + Objects.equals(this.dnsRecordType, updateFqdnRequest.dnsRecordType); + } + + @Override + public int hashCode() { + return Objects.hash(connectionId, fqdn, port, dnsRecordType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateFqdnRequest {\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" fqdn: ").append(toIndentedString(fqdn)).append("\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append(" dnsRecordType: ").append(toIndentedString(dnsRecordType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdateIpConnectionRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateIpConnectionRequest.java new file mode 100644 index 00000000..68ceabdd --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateIpConnectionRequest.java @@ -0,0 +1,672 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.InboundIp; +import com.telnyx.sdk.model.OutboundIp; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateIpConnectionRequest + */ +@JsonPropertyOrder({ + UpdateIpConnectionRequest.JSON_PROPERTY_ACTIVE, + UpdateIpConnectionRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + UpdateIpConnectionRequest.JSON_PROPERTY_CONNECTION_NAME, + UpdateIpConnectionRequest.JSON_PROPERTY_TRANSPORT_PROTOCOL, + UpdateIpConnectionRequest.JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED, + UpdateIpConnectionRequest.JSON_PROPERTY_DTMF_TYPE, + UpdateIpConnectionRequest.JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED, + UpdateIpConnectionRequest.JSON_PROPERTY_ENCRYPTED_MEDIA, + UpdateIpConnectionRequest.JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED, + UpdateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_URL, + UpdateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL, + UpdateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_API_VERSION, + UpdateIpConnectionRequest.JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS, + UpdateIpConnectionRequest.JSON_PROPERTY_RTCP_SETTINGS, + UpdateIpConnectionRequest.JSON_PROPERTY_INBOUND, + UpdateIpConnectionRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateIpConnectionRequest { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_CONNECTION_NAME = "connection_name"; + private String connectionName; + + /** + * One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + */ + public enum TransportProtocolEnum { + UDP("UDP"), + + TCP("TCP"), + + TLS("TLS"); + + private String value; + + TransportProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TransportProtocolEnum fromValue(String value) { + for (TransportProtocolEnum b : TransportProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TRANSPORT_PROTOCOL = "transport_protocol"; + private TransportProtocolEnum transportProtocol = TransportProtocolEnum.UDP; + + public static final String JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED = "default_on_hold_comfort_noise_enabled"; + private Boolean defaultOnHoldComfortNoiseEnabled = true; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED = "encode_contact_header_enabled"; + private Boolean encodeContactHeaderEnabled = false; + + public static final String JSON_PROPERTY_ENCRYPTED_MEDIA = "encrypted_media"; + private JsonNullable encryptedMedia = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED = "onnet_t38_passthrough_enabled"; + private Boolean onnetT38PassthroughEnabled = false; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_URL = "webhook_event_url"; + private String webhookEventUrl; + + public static final String JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL = "webhook_event_failover_url"; + private JsonNullable webhookEventFailoverUrl = JsonNullable.of(""); + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ + public enum WebhookApiVersionEnum { + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersionEnum fromValue(String value) { + for (WebhookApiVersionEnum b : WebhookApiVersionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_WEBHOOK_API_VERSION = "webhook_api_version"; + private WebhookApiVersionEnum webhookApiVersion = WebhookApiVersionEnum._1; + + public static final String JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS = "webhook_timeout_secs"; + private JsonNullable webhookTimeoutSecs = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RTCP_SETTINGS = "rtcp_settings"; + private ConnectionRtcpSettings rtcpSettings; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private InboundIp inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private OutboundIp outbound; + + + public UpdateIpConnectionRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Defaults to true + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to true") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public UpdateIpConnectionRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public UpdateIpConnectionRequest connectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + + /** + * Get connectionName + * @return connectionName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONNECTION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionName() { + return connectionName; + } + + + public void setConnectionName(String connectionName) { + this.connectionName = connectionName; + } + + + public UpdateIpConnectionRequest transportProtocol(TransportProtocolEnum transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication. + * @return transportProtocol + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.") + @JsonProperty(JSON_PROPERTY_TRANSPORT_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransportProtocolEnum getTransportProtocol() { + return transportProtocol; + } + + + public void setTransportProtocol(TransportProtocolEnum transportProtocol) { + this.transportProtocol = transportProtocol; + } + + + public UpdateIpConnectionRequest defaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + return this; + } + + /** + * When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout. + * @return defaultOnHoldComfortNoiseEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.") + @JsonProperty(JSON_PROPERTY_DEFAULT_ON_HOLD_COMFORT_NOISE_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDefaultOnHoldComfortNoiseEnabled() { + return defaultOnHoldComfortNoiseEnabled; + } + + + public void setDefaultOnHoldComfortNoiseEnabled(Boolean defaultOnHoldComfortNoiseEnabled) { + this.defaultOnHoldComfortNoiseEnabled = defaultOnHoldComfortNoiseEnabled; + } + + + public UpdateIpConnectionRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public UpdateIpConnectionRequest encodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + return this; + } + + /** + * Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios. + * @return encodeContactHeaderEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.") + @JsonProperty(JSON_PROPERTY_ENCODE_CONTACT_HEADER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEncodeContactHeaderEnabled() { + return encodeContactHeaderEnabled; + } + + + public void setEncodeContactHeaderEnabled(Boolean encodeContactHeaderEnabled) { + this.encodeContactHeaderEnabled = encodeContactHeaderEnabled; + } + + + public UpdateIpConnectionRequest encryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + return this; + } + + /** + * Get encryptedMedia + * @return encryptedMedia + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonIgnore + + public EncryptedMedia getEncryptedMedia() { + return encryptedMedia.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getEncryptedMedia_JsonNullable() { + return encryptedMedia; + } + + @JsonProperty(JSON_PROPERTY_ENCRYPTED_MEDIA) + public void setEncryptedMedia_JsonNullable(JsonNullable encryptedMedia) { + this.encryptedMedia = encryptedMedia; + } + + public void setEncryptedMedia(EncryptedMedia encryptedMedia) { + this.encryptedMedia = JsonNullable.of(encryptedMedia); + } + + + public UpdateIpConnectionRequest onnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + return this; + } + + /** + * Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings. + * @return onnetT38PassthroughEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.") + @JsonProperty(JSON_PROPERTY_ONNET_T38_PASSTHROUGH_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnnetT38PassthroughEnabled() { + return onnetT38PassthroughEnabled; + } + + + public void setOnnetT38PassthroughEnabled(Boolean onnetT38PassthroughEnabled) { + this.onnetT38PassthroughEnabled = onnetT38PassthroughEnabled; + } + + + public UpdateIpConnectionRequest webhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + return this; + } + + /** + * The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'. + * @return webhookEventUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebhookEventUrl() { + return webhookEventUrl; + } + + + public void setWebhookEventUrl(String webhookEventUrl) { + this.webhookEventUrl = webhookEventUrl; + } + + + public UpdateIpConnectionRequest webhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + return this; + } + + /** + * The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'. + * @return webhookEventFailoverUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://failover.example.com", value = "The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.") + @JsonIgnore + + public String getWebhookEventFailoverUrl() { + return webhookEventFailoverUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookEventFailoverUrl_JsonNullable() { + return webhookEventFailoverUrl; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_EVENT_FAILOVER_URL) + public void setWebhookEventFailoverUrl_JsonNullable(JsonNullable webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = webhookEventFailoverUrl; + } + + public void setWebhookEventFailoverUrl(String webhookEventFailoverUrl) { + this.webhookEventFailoverUrl = JsonNullable.of(webhookEventFailoverUrl); + } + + + public UpdateIpConnectionRequest webhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + return this; + } + + /** + * Determines which webhook format will be used, Telnyx API v1 or v2. + * @return webhookApiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Determines which webhook format will be used, Telnyx API v1 or v2.") + @JsonProperty(JSON_PROPERTY_WEBHOOK_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WebhookApiVersionEnum getWebhookApiVersion() { + return webhookApiVersion; + } + + + public void setWebhookApiVersion(WebhookApiVersionEnum webhookApiVersion) { + this.webhookApiVersion = webhookApiVersion; + } + + + public UpdateIpConnectionRequest webhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + return this; + } + + /** + * Specifies how many seconds to wait before timing out a webhook. + * minimum: 0 + * maximum: 30 + * @return webhookTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "25", value = "Specifies how many seconds to wait before timing out a webhook.") + @JsonIgnore + + public Integer getWebhookTimeoutSecs() { + return webhookTimeoutSecs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getWebhookTimeoutSecs_JsonNullable() { + return webhookTimeoutSecs; + } + + @JsonProperty(JSON_PROPERTY_WEBHOOK_TIMEOUT_SECS) + public void setWebhookTimeoutSecs_JsonNullable(JsonNullable webhookTimeoutSecs) { + this.webhookTimeoutSecs = webhookTimeoutSecs; + } + + public void setWebhookTimeoutSecs(Integer webhookTimeoutSecs) { + this.webhookTimeoutSecs = JsonNullable.of(webhookTimeoutSecs); + } + + + public UpdateIpConnectionRequest rtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + return this; + } + + /** + * Get rtcpSettings + * @return rtcpSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RTCP_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ConnectionRtcpSettings getRtcpSettings() { + return rtcpSettings; + } + + + public void setRtcpSettings(ConnectionRtcpSettings rtcpSettings) { + this.rtcpSettings = rtcpSettings; + } + + + public UpdateIpConnectionRequest inbound(InboundIp inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public InboundIp getInbound() { + return inbound; + } + + + public void setInbound(InboundIp inbound) { + this.inbound = inbound; + } + + + public UpdateIpConnectionRequest outbound(OutboundIp outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundIp getOutbound() { + return outbound; + } + + + public void setOutbound(OutboundIp outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this UpdateIpConnectionRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateIpConnectionRequest updateIpConnectionRequest = (UpdateIpConnectionRequest) o; + return Objects.equals(this.active, updateIpConnectionRequest.active) && + Objects.equals(this.anchorsiteOverride, updateIpConnectionRequest.anchorsiteOverride) && + Objects.equals(this.connectionName, updateIpConnectionRequest.connectionName) && + Objects.equals(this.transportProtocol, updateIpConnectionRequest.transportProtocol) && + Objects.equals(this.defaultOnHoldComfortNoiseEnabled, updateIpConnectionRequest.defaultOnHoldComfortNoiseEnabled) && + Objects.equals(this.dtmfType, updateIpConnectionRequest.dtmfType) && + Objects.equals(this.encodeContactHeaderEnabled, updateIpConnectionRequest.encodeContactHeaderEnabled) && + Objects.equals(this.encryptedMedia, updateIpConnectionRequest.encryptedMedia) && + Objects.equals(this.onnetT38PassthroughEnabled, updateIpConnectionRequest.onnetT38PassthroughEnabled) && + Objects.equals(this.webhookEventUrl, updateIpConnectionRequest.webhookEventUrl) && + Objects.equals(this.webhookEventFailoverUrl, updateIpConnectionRequest.webhookEventFailoverUrl) && + Objects.equals(this.webhookApiVersion, updateIpConnectionRequest.webhookApiVersion) && + Objects.equals(this.webhookTimeoutSecs, updateIpConnectionRequest.webhookTimeoutSecs) && + Objects.equals(this.rtcpSettings, updateIpConnectionRequest.rtcpSettings) && + Objects.equals(this.inbound, updateIpConnectionRequest.inbound) && + Objects.equals(this.outbound, updateIpConnectionRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(active, anchorsiteOverride, connectionName, transportProtocol, defaultOnHoldComfortNoiseEnabled, dtmfType, encodeContactHeaderEnabled, encryptedMedia, onnetT38PassthroughEnabled, webhookEventUrl, webhookEventFailoverUrl, webhookApiVersion, webhookTimeoutSecs, rtcpSettings, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateIpConnectionRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" connectionName: ").append(toIndentedString(connectionName)).append("\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).append("\n"); + sb.append(" defaultOnHoldComfortNoiseEnabled: ").append(toIndentedString(defaultOnHoldComfortNoiseEnabled)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" encodeContactHeaderEnabled: ").append(toIndentedString(encodeContactHeaderEnabled)).append("\n"); + sb.append(" encryptedMedia: ").append(toIndentedString(encryptedMedia)).append("\n"); + sb.append(" onnetT38PassthroughEnabled: ").append(toIndentedString(onnetT38PassthroughEnabled)).append("\n"); + sb.append(" webhookEventUrl: ").append(toIndentedString(webhookEventUrl)).append("\n"); + sb.append(" webhookEventFailoverUrl: ").append(toIndentedString(webhookEventFailoverUrl)).append("\n"); + sb.append(" webhookApiVersion: ").append(toIndentedString(webhookApiVersion)).append("\n"); + sb.append(" webhookTimeoutSecs: ").append(toIndentedString(webhookTimeoutSecs)).append("\n"); + sb.append(" rtcpSettings: ").append(toIndentedString(rtcpSettings)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdateIpRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateIpRequest.java new file mode 100644 index 00000000..aa179ed9 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateIpRequest.java @@ -0,0 +1,168 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateIpRequest + */ +@JsonPropertyOrder({ + UpdateIpRequest.JSON_PROPERTY_CONNECTION_ID, + UpdateIpRequest.JSON_PROPERTY_IP_ADDRESS, + UpdateIpRequest.JSON_PROPERTY_PORT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateIpRequest { + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_IP_ADDRESS = "ip_address"; + private String ipAddress; + + public static final String JSON_PROPERTY_PORT = "port"; + private Integer port = 5060; + + + public UpdateIpRequest connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * ID of the IP Connection to which this IP should be attached. + * @return connectionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ID of the IP Connection to which this IP should be attached.") + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getConnectionId() { + return connectionId; + } + + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + + public UpdateIpRequest ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * IP adddress represented by this resource. + * @return ipAddress + **/ + @ApiModelProperty(example = "192.168.0.0", required = true, value = "IP adddress represented by this resource.") + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getIpAddress() { + return ipAddress; + } + + + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + + + public UpdateIpRequest port(Integer port) { + this.port = port; + return this; + } + + /** + * Port to use when connecting to this IP. + * @return port + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5060", value = "Port to use when connecting to this IP.") + @JsonProperty(JSON_PROPERTY_PORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPort() { + return port; + } + + + public void setPort(Integer port) { + this.port = port; + } + + + /** + * Return true if this UpdateIpRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateIpRequest updateIpRequest = (UpdateIpRequest) o; + return Objects.equals(this.connectionId, updateIpRequest.connectionId) && + Objects.equals(this.ipAddress, updateIpRequest.ipAddress) && + Objects.equals(this.port, updateIpRequest.port); + } + + @Override + public int hashCode() { + return Objects.hash(connectionId, ipAddress, port); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateIpRequest {\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequest.java new file mode 100644 index 00000000..37326f1b --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequest.java @@ -0,0 +1,516 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundCallRecording; +import com.telnyx.sdk.model.ServicePlan; +import com.telnyx.sdk.model.TrafficType; +import com.telnyx.sdk.model.UsagePaymentMethod; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateOutboundVoiceProfileRequest + */ +@JsonPropertyOrder({ + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_NAME, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_TRAFFIC_TYPE, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_SERVICE_PLAN, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_CONCURRENT_CALL_LIMIT, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_ENABLED, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_TAGS, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_USAGE_PAYMENT_METHOD, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_WHITELISTED_DESTINATIONS, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_MAX_DESTINATION_RATE, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_DAILY_SPEND_LIMIT, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_CALL_RECORDING, + UpdateOutboundVoiceProfileRequest.JSON_PROPERTY_BILLING_GROUP_ID +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateOutboundVoiceProfileRequest { + public static final String JSON_PROPERTY_NAME = "name"; + private String name = ""; + + public static final String JSON_PROPERTY_TRAFFIC_TYPE = "traffic_type"; + private TrafficType trafficType = TrafficType.CONVERSATIONAL; + + public static final String JSON_PROPERTY_SERVICE_PLAN = "service_plan"; + private ServicePlan servicePlan = ServicePlan.GLOBAL; + + public static final String JSON_PROPERTY_CONCURRENT_CALL_LIMIT = "concurrent_call_limit"; + private JsonNullable concurrentCallLimit = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled = true; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_USAGE_PAYMENT_METHOD = "usage_payment_method"; + private UsagePaymentMethod usagePaymentMethod = UsagePaymentMethod.RATE_DECK; + + public static final String JSON_PROPERTY_WHITELISTED_DESTINATIONS = "whitelisted_destinations"; + private List whitelistedDestinations = null; + + public static final String JSON_PROPERTY_MAX_DESTINATION_RATE = "max_destination_rate"; + private BigDecimal maxDestinationRate; + + public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT = "daily_spend_limit"; + private String dailySpendLimit; + + public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED = "daily_spend_limit_enabled"; + private Boolean dailySpendLimitEnabled = false; + + public static final String JSON_PROPERTY_CALL_RECORDING = "call_recording"; + private OutboundCallRecording callRecording; + + public static final String JSON_PROPERTY_BILLING_GROUP_ID = "billing_group_id"; + private JsonNullable billingGroupId = JsonNullable.undefined(); + + + public UpdateOutboundVoiceProfileRequest name(String name) { + this.name = name; + return this; + } + + /** + * A user-supplied name to help with organization. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "office", value = "A user-supplied name to help with organization.") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public UpdateOutboundVoiceProfileRequest trafficType(TrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Get trafficType + * @return trafficType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRAFFIC_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TrafficType getTrafficType() { + return trafficType; + } + + + public void setTrafficType(TrafficType trafficType) { + this.trafficType = trafficType; + } + + + public UpdateOutboundVoiceProfileRequest servicePlan(ServicePlan servicePlan) { + this.servicePlan = servicePlan; + return this; + } + + /** + * Get servicePlan + * @return servicePlan + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SERVICE_PLAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ServicePlan getServicePlan() { + return servicePlan; + } + + + public void setServicePlan(ServicePlan servicePlan) { + this.servicePlan = servicePlan; + } + + + public UpdateOutboundVoiceProfileRequest concurrentCallLimit(Integer concurrentCallLimit) { + this.concurrentCallLimit = JsonNullable.of(concurrentCallLimit); + return this; + } + + /** + * Must be no more than your global concurrent call limit. Null means no limit. + * @return concurrentCallLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "Must be no more than your global concurrent call limit. Null means no limit.") + @JsonIgnore + + public Integer getConcurrentCallLimit() { + return concurrentCallLimit.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CONCURRENT_CALL_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getConcurrentCallLimit_JsonNullable() { + return concurrentCallLimit; + } + + @JsonProperty(JSON_PROPERTY_CONCURRENT_CALL_LIMIT) + public void setConcurrentCallLimit_JsonNullable(JsonNullable concurrentCallLimit) { + this.concurrentCallLimit = concurrentCallLimit; + } + + public void setConcurrentCallLimit(Integer concurrentCallLimit) { + this.concurrentCallLimit = JsonNullable.of(concurrentCallLimit); + } + + + public UpdateOutboundVoiceProfileRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections. + * @return enabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.") + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEnabled() { + return enabled; + } + + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + + public UpdateOutboundVoiceProfileRequest tags(List tags) { + this.tags = tags; + return this; + } + + public UpdateOutboundVoiceProfileRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[\"office-profile\"]", value = "") + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + public void setTags(List tags) { + this.tags = tags; + } + + + public UpdateOutboundVoiceProfileRequest usagePaymentMethod(UsagePaymentMethod usagePaymentMethod) { + this.usagePaymentMethod = usagePaymentMethod; + return this; + } + + /** + * Get usagePaymentMethod + * @return usagePaymentMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_USAGE_PAYMENT_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UsagePaymentMethod getUsagePaymentMethod() { + return usagePaymentMethod; + } + + + public void setUsagePaymentMethod(UsagePaymentMethod usagePaymentMethod) { + this.usagePaymentMethod = usagePaymentMethod; + } + + + public UpdateOutboundVoiceProfileRequest whitelistedDestinations(List whitelistedDestinations) { + this.whitelistedDestinations = whitelistedDestinations; + return this; + } + + public UpdateOutboundVoiceProfileRequest addWhitelistedDestinationsItem(String whitelistedDestinationsItem) { + if (this.whitelistedDestinations == null) { + this.whitelistedDestinations = new ArrayList<>(); + } + this.whitelistedDestinations.add(whitelistedDestinationsItem); + return this; + } + + /** + * The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2. + * @return whitelistedDestinations + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[\"US\",\"BR\",\"AU\"]", value = "The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.") + @JsonProperty(JSON_PROPERTY_WHITELISTED_DESTINATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getWhitelistedDestinations() { + return whitelistedDestinations; + } + + + public void setWhitelistedDestinations(List whitelistedDestinations) { + this.whitelistedDestinations = whitelistedDestinations; + } + + + public UpdateOutboundVoiceProfileRequest maxDestinationRate(BigDecimal maxDestinationRate) { + this.maxDestinationRate = maxDestinationRate; + return this; + } + + /** + * Maximum rate (price per minute) for a Destination to be allowed when making outbound calls. + * @return maxDestinationRate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Maximum rate (price per minute) for a Destination to be allowed when making outbound calls.") + @JsonProperty(JSON_PROPERTY_MAX_DESTINATION_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getMaxDestinationRate() { + return maxDestinationRate; + } + + + public void setMaxDestinationRate(BigDecimal maxDestinationRate) { + this.maxDestinationRate = maxDestinationRate; + } + + + public UpdateOutboundVoiceProfileRequest dailySpendLimit(String dailySpendLimit) { + this.dailySpendLimit = dailySpendLimit; + return this; + } + + /** + * The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls. + * @return dailySpendLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "100.00", value = "The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.") + @JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDailySpendLimit() { + return dailySpendLimit; + } + + + public void setDailySpendLimit(String dailySpendLimit) { + this.dailySpendLimit = dailySpendLimit; + } + + + public UpdateOutboundVoiceProfileRequest dailySpendLimitEnabled(Boolean dailySpendLimitEnabled) { + this.dailySpendLimitEnabled = dailySpendLimitEnabled; + return this; + } + + /** + * Specifies whether to enforce the daily_spend_limit on this outbound voice profile. + * @return dailySpendLimitEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether to enforce the daily_spend_limit on this outbound voice profile.") + @JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDailySpendLimitEnabled() { + return dailySpendLimitEnabled; + } + + + public void setDailySpendLimitEnabled(Boolean dailySpendLimitEnabled) { + this.dailySpendLimitEnabled = dailySpendLimitEnabled; + } + + + public UpdateOutboundVoiceProfileRequest callRecording(OutboundCallRecording callRecording) { + this.callRecording = callRecording; + return this; + } + + /** + * Get callRecording + * @return callRecording + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CALL_RECORDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OutboundCallRecording getCallRecording() { + return callRecording; + } + + + public void setCallRecording(OutboundCallRecording callRecording) { + this.callRecording = callRecording; + } + + + public UpdateOutboundVoiceProfileRequest billingGroupId(UUID billingGroupId) { + this.billingGroupId = JsonNullable.of(billingGroupId); + return this; + } + + /** + * The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned). + * @return billingGroupId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", value = "The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).") + @JsonIgnore + + public UUID getBillingGroupId() { + return billingGroupId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BILLING_GROUP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBillingGroupId_JsonNullable() { + return billingGroupId; + } + + @JsonProperty(JSON_PROPERTY_BILLING_GROUP_ID) + public void setBillingGroupId_JsonNullable(JsonNullable billingGroupId) { + this.billingGroupId = billingGroupId; + } + + public void setBillingGroupId(UUID billingGroupId) { + this.billingGroupId = JsonNullable.of(billingGroupId); + } + + + /** + * Return true if this UpdateOutboundVoiceProfileRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateOutboundVoiceProfileRequest updateOutboundVoiceProfileRequest = (UpdateOutboundVoiceProfileRequest) o; + return Objects.equals(this.name, updateOutboundVoiceProfileRequest.name) && + Objects.equals(this.trafficType, updateOutboundVoiceProfileRequest.trafficType) && + Objects.equals(this.servicePlan, updateOutboundVoiceProfileRequest.servicePlan) && + Objects.equals(this.concurrentCallLimit, updateOutboundVoiceProfileRequest.concurrentCallLimit) && + Objects.equals(this.enabled, updateOutboundVoiceProfileRequest.enabled) && + Objects.equals(this.tags, updateOutboundVoiceProfileRequest.tags) && + Objects.equals(this.usagePaymentMethod, updateOutboundVoiceProfileRequest.usagePaymentMethod) && + Objects.equals(this.whitelistedDestinations, updateOutboundVoiceProfileRequest.whitelistedDestinations) && + Objects.equals(this.maxDestinationRate, updateOutboundVoiceProfileRequest.maxDestinationRate) && + Objects.equals(this.dailySpendLimit, updateOutboundVoiceProfileRequest.dailySpendLimit) && + Objects.equals(this.dailySpendLimitEnabled, updateOutboundVoiceProfileRequest.dailySpendLimitEnabled) && + Objects.equals(this.callRecording, updateOutboundVoiceProfileRequest.callRecording) && + Objects.equals(this.billingGroupId, updateOutboundVoiceProfileRequest.billingGroupId); + } + + @Override + public int hashCode() { + return Objects.hash(name, trafficType, servicePlan, concurrentCallLimit, enabled, tags, usagePaymentMethod, whitelistedDestinations, maxDestinationRate, dailySpendLimit, dailySpendLimitEnabled, callRecording, billingGroupId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateOutboundVoiceProfileRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" trafficType: ").append(toIndentedString(trafficType)).append("\n"); + sb.append(" servicePlan: ").append(toIndentedString(servicePlan)).append("\n"); + sb.append(" concurrentCallLimit: ").append(toIndentedString(concurrentCallLimit)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" usagePaymentMethod: ").append(toIndentedString(usagePaymentMethod)).append("\n"); + sb.append(" whitelistedDestinations: ").append(toIndentedString(whitelistedDestinations)).append("\n"); + sb.append(" maxDestinationRate: ").append(toIndentedString(maxDestinationRate)).append("\n"); + sb.append(" dailySpendLimit: ").append(toIndentedString(dailySpendLimit)).append("\n"); + sb.append(" dailySpendLimitEnabled: ").append(toIndentedString(dailySpendLimitEnabled)).append("\n"); + sb.append(" callRecording: ").append(toIndentedString(callRecording)).append("\n"); + sb.append(" billingGroupId: ").append(toIndentedString(billingGroupId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UpdatePhoneNumberRequest.java b/src/main/java/com/telnyx/sdk/model/UpdatePhoneNumberRequest.java index 545e1b16..004f1451 100644 --- a/src/main/java/com/telnyx/sdk/model/UpdatePhoneNumberRequest.java +++ b/src/main/java/com/telnyx/sdk/model/UpdatePhoneNumberRequest.java @@ -37,6 +37,7 @@ UpdatePhoneNumberRequest.JSON_PROPERTY_ID, UpdatePhoneNumberRequest.JSON_PROPERTY_TAGS, UpdatePhoneNumberRequest.JSON_PROPERTY_EXTERNAL_PIN, + UpdatePhoneNumberRequest.JSON_PROPERTY_CUSTOMER_REFERENCE, UpdatePhoneNumberRequest.JSON_PROPERTY_CONNECTION_ID, UpdatePhoneNumberRequest.JSON_PROPERTY_BILLING_GROUP_ID }) @@ -51,6 +52,9 @@ public class UpdatePhoneNumberRequest { public static final String JSON_PROPERTY_EXTERNAL_PIN = "external_pin"; private String externalPin; + public static final String JSON_PROPERTY_CUSTOMER_REFERENCE = "customer_reference"; + private String customerReference; + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; private String connectionId; @@ -130,6 +134,30 @@ public void setExternalPin(String externalPin) { } + public UpdatePhoneNumberRequest customerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A customer reference string for customer look ups. + * @return customerReference + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "MY REF 001", value = "A customer reference string for customer look ups.") + @JsonProperty(JSON_PROPERTY_CUSTOMER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomerReference() { + return customerReference; + } + + + public void setCustomerReference(String customerReference) { + this.customerReference = customerReference; + } + + public UpdatePhoneNumberRequest connectionId(String connectionId) { this.connectionId = connectionId; return this; @@ -193,13 +221,14 @@ public boolean equals(Object o) { return Objects.equals(this.id, updatePhoneNumberRequest.id) && Objects.equals(this.tags, updatePhoneNumberRequest.tags) && Objects.equals(this.externalPin, updatePhoneNumberRequest.externalPin) && + Objects.equals(this.customerReference, updatePhoneNumberRequest.customerReference) && Objects.equals(this.connectionId, updatePhoneNumberRequest.connectionId) && Objects.equals(this.billingGroupId, updatePhoneNumberRequest.billingGroupId); } @Override public int hashCode() { - return Objects.hash(id, tags, externalPin, connectionId, billingGroupId); + return Objects.hash(id, tags, externalPin, customerReference, connectionId, billingGroupId); } @@ -210,6 +239,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" externalPin: ").append(toIndentedString(externalPin)).append("\n"); + sb.append(" customerReference: ").append(toIndentedString(customerReference)).append("\n"); sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); sb.append(" billingGroupId: ").append(toIndentedString(billingGroupId)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequest.java b/src/main/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequest.java new file mode 100644 index 00000000..875336f1 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequest.java @@ -0,0 +1,541 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestInbound; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestOutbound; +import com.telnyx.sdk.model.DtmfType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +/** + * UpdateTexmlApplicationRequest + */ +@JsonPropertyOrder({ + UpdateTexmlApplicationRequest.JSON_PROPERTY_FRIENDLY_NAME, + UpdateTexmlApplicationRequest.JSON_PROPERTY_ACTIVE, + UpdateTexmlApplicationRequest.JSON_PROPERTY_ANCHORSITE_OVERRIDE, + UpdateTexmlApplicationRequest.JSON_PROPERTY_DTMF_TYPE, + UpdateTexmlApplicationRequest.JSON_PROPERTY_FIRST_COMMAND_TIMEOUT, + UpdateTexmlApplicationRequest.JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS, + UpdateTexmlApplicationRequest.JSON_PROPERTY_VOICE_URL, + UpdateTexmlApplicationRequest.JSON_PROPERTY_VOICE_FALLBACK_URL, + UpdateTexmlApplicationRequest.JSON_PROPERTY_VOICE_METHOD, + UpdateTexmlApplicationRequest.JSON_PROPERTY_STATUS_CALLBACK, + UpdateTexmlApplicationRequest.JSON_PROPERTY_STATUS_CALLBACK_METHOD, + UpdateTexmlApplicationRequest.JSON_PROPERTY_INBOUND, + UpdateTexmlApplicationRequest.JSON_PROPERTY_OUTBOUND +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateTexmlApplicationRequest { + public static final String JSON_PROPERTY_FRIENDLY_NAME = "friendly_name"; + private String friendlyName; + + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active = true; + + public static final String JSON_PROPERTY_ANCHORSITE_OVERRIDE = "anchorsite_override"; + private AnchorsiteOverride anchorsiteOverride = AnchorsiteOverride.LATENCY; + + public static final String JSON_PROPERTY_DTMF_TYPE = "dtmf_type"; + private DtmfType dtmfType = DtmfType.RFC_2833; + + public static final String JSON_PROPERTY_FIRST_COMMAND_TIMEOUT = "first_command_timeout"; + private Boolean firstCommandTimeout = false; + + public static final String JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS = "first_command_timeout_secs"; + private Integer firstCommandTimeoutSecs = 30; + + public static final String JSON_PROPERTY_VOICE_URL = "voice_url"; + private String voiceUrl; + + public static final String JSON_PROPERTY_VOICE_FALLBACK_URL = "voice_fallback_url"; + private String voiceFallbackUrl = "null"; + + /** + * HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + */ + public enum VoiceMethodEnum { + GET("get"), + + POST("post"); + + private String value; + + VoiceMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VoiceMethodEnum fromValue(String value) { + for (VoiceMethodEnum b : VoiceMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_VOICE_METHOD = "voice_method"; + private VoiceMethodEnum voiceMethod = VoiceMethodEnum.POST; + + public static final String JSON_PROPERTY_STATUS_CALLBACK = "status_callback"; + private String statusCallback = "null"; + + /** + * HTTP request method Telnyx should use when requesting the status_callback URL. + */ + public enum StatusCallbackMethodEnum { + GET("get"), + + POST("post"); + + private String value; + + StatusCallbackMethodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusCallbackMethodEnum fromValue(String value) { + for (StatusCallbackMethodEnum b : StatusCallbackMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS_CALLBACK_METHOD = "status_callback_method"; + private StatusCallbackMethodEnum statusCallbackMethod = StatusCallbackMethodEnum.POST; + + public static final String JSON_PROPERTY_INBOUND = "inbound"; + private CreateTexmlApplicationRequestInbound inbound; + + public static final String JSON_PROPERTY_OUTBOUND = "outbound"; + private CreateTexmlApplicationRequestOutbound outbound; + + + public UpdateTexmlApplicationRequest friendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * A user-assigned name to help manage the application. + * @return friendlyName + **/ + @ApiModelProperty(example = "call-router", required = true, value = "A user-assigned name to help manage the application.") + @JsonProperty(JSON_PROPERTY_FRIENDLY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFriendlyName() { + return friendlyName; + } + + + public void setFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + } + + + public UpdateTexmlApplicationRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Specifies whether the connection can be used. + * @return active + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Specifies whether the connection can be used.") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + public void setActive(Boolean active) { + this.active = active; + } + + + public UpdateTexmlApplicationRequest anchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + return this; + } + + /** + * Get anchorsiteOverride + * @return anchorsiteOverride + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ANCHORSITE_OVERRIDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AnchorsiteOverride getAnchorsiteOverride() { + return anchorsiteOverride; + } + + + public void setAnchorsiteOverride(AnchorsiteOverride anchorsiteOverride) { + this.anchorsiteOverride = anchorsiteOverride; + } + + + public UpdateTexmlApplicationRequest dtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + return this; + } + + /** + * Get dtmfType + * @return dtmfType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DTMF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DtmfType getDtmfType() { + return dtmfType; + } + + + public void setDtmfType(DtmfType dtmfType) { + this.dtmfType = dtmfType; + } + + + public UpdateTexmlApplicationRequest firstCommandTimeout(Boolean firstCommandTimeout) { + this.firstCommandTimeout = firstCommandTimeout; + return this; + } + + /** + * Specifies whether calls to phone numbers associated with this connection should hangup after timing out. + * @return firstCommandTimeout + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Specifies whether calls to phone numbers associated with this connection should hangup after timing out.") + @JsonProperty(JSON_PROPERTY_FIRST_COMMAND_TIMEOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getFirstCommandTimeout() { + return firstCommandTimeout; + } + + + public void setFirstCommandTimeout(Boolean firstCommandTimeout) { + this.firstCommandTimeout = firstCommandTimeout; + } + + + public UpdateTexmlApplicationRequest firstCommandTimeoutSecs(Integer firstCommandTimeoutSecs) { + this.firstCommandTimeoutSecs = firstCommandTimeoutSecs; + return this; + } + + /** + * Specifies how many seconds to wait before timing out a dial command. + * @return firstCommandTimeoutSecs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "10", value = "Specifies how many seconds to wait before timing out a dial command.") + @JsonProperty(JSON_PROPERTY_FIRST_COMMAND_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getFirstCommandTimeoutSecs() { + return firstCommandTimeoutSecs; + } + + + public void setFirstCommandTimeoutSecs(Integer firstCommandTimeoutSecs) { + this.firstCommandTimeoutSecs = firstCommandTimeoutSecs; + } + + + public UpdateTexmlApplicationRequest voiceUrl(String voiceUrl) { + this.voiceUrl = voiceUrl; + return this; + } + + /** + * URL to which Telnyx will deliver your XML Translator webhooks. + * @return voiceUrl + **/ + @ApiModelProperty(example = "https://example.com", required = true, value = "URL to which Telnyx will deliver your XML Translator webhooks.") + @JsonProperty(JSON_PROPERTY_VOICE_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getVoiceUrl() { + return voiceUrl; + } + + + public void setVoiceUrl(String voiceUrl) { + this.voiceUrl = voiceUrl; + } + + + public UpdateTexmlApplicationRequest voiceFallbackUrl(String voiceFallbackUrl) { + this.voiceFallbackUrl = voiceFallbackUrl; + return this; + } + + /** + * URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url. + * @return voiceFallbackUrl + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://fallback.example.com", value = "URL to which Telnyx will deliver your XML Translator webhooks if we get an error response from your voice_url.") + @JsonProperty(JSON_PROPERTY_VOICE_FALLBACK_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVoiceFallbackUrl() { + return voiceFallbackUrl; + } + + + public void setVoiceFallbackUrl(String voiceFallbackUrl) { + this.voiceFallbackUrl = voiceFallbackUrl; + } + + + public UpdateTexmlApplicationRequest voiceMethod(VoiceMethodEnum voiceMethod) { + this.voiceMethod = voiceMethod; + return this; + } + + /** + * HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'. + * @return voiceMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "get", value = "HTTP request method Telnyx will use to interact with your XML Translator webhooks. Either 'get' or 'post'.") + @JsonProperty(JSON_PROPERTY_VOICE_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public VoiceMethodEnum getVoiceMethod() { + return voiceMethod; + } + + + public void setVoiceMethod(VoiceMethodEnum voiceMethod) { + this.voiceMethod = voiceMethod; + } + + + public UpdateTexmlApplicationRequest statusCallback(String statusCallback) { + this.statusCallback = statusCallback; + return this; + } + + /** + * URL for Telnyx to send requests to containing information about call progress events. + * @return statusCallback + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "https://example.com", value = "URL for Telnyx to send requests to containing information about call progress events.") + @JsonProperty(JSON_PROPERTY_STATUS_CALLBACK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatusCallback() { + return statusCallback; + } + + + public void setStatusCallback(String statusCallback) { + this.statusCallback = statusCallback; + } + + + public UpdateTexmlApplicationRequest statusCallbackMethod(StatusCallbackMethodEnum statusCallbackMethod) { + this.statusCallbackMethod = statusCallbackMethod; + return this; + } + + /** + * HTTP request method Telnyx should use when requesting the status_callback URL. + * @return statusCallbackMethod + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "get", value = "HTTP request method Telnyx should use when requesting the status_callback URL.") + @JsonProperty(JSON_PROPERTY_STATUS_CALLBACK_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusCallbackMethodEnum getStatusCallbackMethod() { + return statusCallbackMethod; + } + + + public void setStatusCallbackMethod(StatusCallbackMethodEnum statusCallbackMethod) { + this.statusCallbackMethod = statusCallbackMethod; + } + + + public UpdateTexmlApplicationRequest inbound(CreateTexmlApplicationRequestInbound inbound) { + this.inbound = inbound; + return this; + } + + /** + * Get inbound + * @return inbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateTexmlApplicationRequestInbound getInbound() { + return inbound; + } + + + public void setInbound(CreateTexmlApplicationRequestInbound inbound) { + this.inbound = inbound; + } + + + public UpdateTexmlApplicationRequest outbound(CreateTexmlApplicationRequestOutbound outbound) { + this.outbound = outbound; + return this; + } + + /** + * Get outbound + * @return outbound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OUTBOUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateTexmlApplicationRequestOutbound getOutbound() { + return outbound; + } + + + public void setOutbound(CreateTexmlApplicationRequestOutbound outbound) { + this.outbound = outbound; + } + + + /** + * Return true if this UpdateTexmlApplicationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTexmlApplicationRequest updateTexmlApplicationRequest = (UpdateTexmlApplicationRequest) o; + return Objects.equals(this.friendlyName, updateTexmlApplicationRequest.friendlyName) && + Objects.equals(this.active, updateTexmlApplicationRequest.active) && + Objects.equals(this.anchorsiteOverride, updateTexmlApplicationRequest.anchorsiteOverride) && + Objects.equals(this.dtmfType, updateTexmlApplicationRequest.dtmfType) && + Objects.equals(this.firstCommandTimeout, updateTexmlApplicationRequest.firstCommandTimeout) && + Objects.equals(this.firstCommandTimeoutSecs, updateTexmlApplicationRequest.firstCommandTimeoutSecs) && + Objects.equals(this.voiceUrl, updateTexmlApplicationRequest.voiceUrl) && + Objects.equals(this.voiceFallbackUrl, updateTexmlApplicationRequest.voiceFallbackUrl) && + Objects.equals(this.voiceMethod, updateTexmlApplicationRequest.voiceMethod) && + Objects.equals(this.statusCallback, updateTexmlApplicationRequest.statusCallback) && + Objects.equals(this.statusCallbackMethod, updateTexmlApplicationRequest.statusCallbackMethod) && + Objects.equals(this.inbound, updateTexmlApplicationRequest.inbound) && + Objects.equals(this.outbound, updateTexmlApplicationRequest.outbound); + } + + @Override + public int hashCode() { + return Objects.hash(friendlyName, active, anchorsiteOverride, dtmfType, firstCommandTimeout, firstCommandTimeoutSecs, voiceUrl, voiceFallbackUrl, voiceMethod, statusCallback, statusCallbackMethod, inbound, outbound); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTexmlApplicationRequest {\n"); + sb.append(" friendlyName: ").append(toIndentedString(friendlyName)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anchorsiteOverride: ").append(toIndentedString(anchorsiteOverride)).append("\n"); + sb.append(" dtmfType: ").append(toIndentedString(dtmfType)).append("\n"); + sb.append(" firstCommandTimeout: ").append(toIndentedString(firstCommandTimeout)).append("\n"); + sb.append(" firstCommandTimeoutSecs: ").append(toIndentedString(firstCommandTimeoutSecs)).append("\n"); + sb.append(" voiceUrl: ").append(toIndentedString(voiceUrl)).append("\n"); + sb.append(" voiceFallbackUrl: ").append(toIndentedString(voiceFallbackUrl)).append("\n"); + sb.append(" voiceMethod: ").append(toIndentedString(voiceMethod)).append("\n"); + sb.append(" statusCallback: ").append(toIndentedString(statusCallback)).append("\n"); + sb.append(" statusCallbackMethod: ").append(toIndentedString(statusCallbackMethod)).append("\n"); + sb.append(" inbound: ").append(toIndentedString(inbound)).append("\n"); + sb.append(" outbound: ").append(toIndentedString(outbound)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/telnyx/sdk/model/UsagePaymentMethod.java b/src/main/java/com/telnyx/sdk/model/UsagePaymentMethod.java new file mode 100644 index 00000000..28b7c899 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/UsagePaymentMethod.java @@ -0,0 +1,63 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Setting for how costs for outbound profile are calculated. + */ +public enum UsagePaymentMethod { + + TARIFF("tariff"), + + RATE_DECK("rate-deck"); + + private String value; + + UsagePaymentMethod(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UsagePaymentMethod fromValue(String value) { + for (UsagePaymentMethod b : UsagePaymentMethod.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/com/telnyx/sdk/model/WebhookApiVersion.java b/src/main/java/com/telnyx/sdk/model/WebhookApiVersion.java new file mode 100644 index 00000000..854c33b0 --- /dev/null +++ b/src/main/java/com/telnyx/sdk/model/WebhookApiVersion.java @@ -0,0 +1,63 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.telnyx.sdk.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Determines which webhook format will be used, Telnyx API v1 or v2. + */ +public enum WebhookApiVersion { + + _1("1"), + + _2("2"); + + private String value; + + WebhookApiVersion(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookApiVersion fromValue(String value) { + for (WebhookApiVersion b : WebhookApiVersion.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java b/src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java new file mode 100644 index 00000000..088b970d --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/ConnectionsApiTest.java @@ -0,0 +1,77 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.ConnectionResponse; +import com.telnyx.sdk.model.ListConnectionsResponse; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ConnectionsApi + */ +public class ConnectionsApiTest { + + private final ConnectionsApi api = new ConnectionsApi(); + + /** + * List connections + * + * Returns a list of your connections irrespective of type. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listConnectionsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterConnectionNameContains = null; + //String filterOutboundVoiceProfileId = null; + //String sort = null; + //ListConnectionsResponse response = api.listConnections() + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .filterConnectionNameContains(filterConnectionNameContains) + // .filterOutboundVoiceProfileId(filterOutboundVoiceProfileId) + // .sort(sort) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve a connection + * + * Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrieveConnectionTest() throws ApiException { + //String id = null; + //ConnectionResponse response = api.retrieveConnection(id); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java b/src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java new file mode 100644 index 00000000..70f11869 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/CredentialConnectionsApiTest.java @@ -0,0 +1,125 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateCredentialConnectionRequest; +import com.telnyx.sdk.model.CredentialConnectionResponse; +import com.telnyx.sdk.model.ListCredentialConnectionsResponse; +import com.telnyx.sdk.model.UpdateCredentialConnectionRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for CredentialConnectionsApi + */ +public class CredentialConnectionsApiTest { + + private final CredentialConnectionsApi api = new CredentialConnectionsApi(); + + /** + * Create a credential connection + * + * Creates a credential connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createCredentialConnectionTest() throws ApiException { + //CreateCredentialConnectionRequest createCredentialConnectionRequest = null; + //CredentialConnectionResponse response = api.createCredentialConnection(createCredentialConnectionRequest); + // TODO: test validations + } + + /** + * Delete a credential connection + * + * Deletes an existing credential connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteCredentialConnectionTest() throws ApiException { + //String id = null; + //CredentialConnectionResponse response = api.deleteCredentialConnection(id); + // TODO: test validations + } + + /** + * List credential connections + * + * Returns a list of your credential connections. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listCredentialConnectionsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterConnectionNameContains = null; + //String filterOutboundOutboundVoiceProfileId = null; + //String sort = null; + //ListCredentialConnectionsResponse response = api.listCredentialConnections() + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .filterConnectionNameContains(filterConnectionNameContains) + // .filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId) + // .sort(sort) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve a credential connection + * + * Retrieves the details of an existing credential connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrieveCredentialConnectionTest() throws ApiException { + //String id = null; + //CredentialConnectionResponse response = api.retrieveCredentialConnection(id); + // TODO: test validations + } + + /** + * Update a credential connection + * + * Updates settings of an existing credential connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateCredentialConnectionTest() throws ApiException { + //String id = null; + //UpdateCredentialConnectionRequest updateCredentialConnectionRequest = null; + //CredentialConnectionResponse response = api.updateCredentialConnection(id, updateCredentialConnectionRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java b/src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java new file mode 100644 index 00000000..15c3353a --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/FqdNsApiTest.java @@ -0,0 +1,127 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateFqdnRequest; +import com.telnyx.sdk.model.FqdnResponse; +import com.telnyx.sdk.model.ListFqdnsResponse; +import com.telnyx.sdk.model.UpdateFqdnRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FqdNsApi + */ +public class FqdNsApiTest { + + private final FqdNsApi api = new FqdNsApi(); + + /** + * Create an Fqdn + * + * Create a new FQDN object. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createFqdnTest() throws ApiException { + //CreateFqdnRequest createFqdnRequest = null; + //FqdnResponse response = api.createFqdn(createFqdnRequest); + // TODO: test validations + } + + /** + * Delete an Fqdn + * + * Delete an FQDN. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteFqdnTest() throws ApiException { + //String id = null; + //FqdnResponse response = api.deleteFqdn(id); + // TODO: test validations + } + + /** + * List Fqdns + * + * Get all FQDNs belonging to the user that match the given filters. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listFqdnsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterConnectionId = null; + //String filterFqdn = null; + //Integer filterPort = null; + //String filterDnsRecordType = null; + //ListFqdnsResponse response = api.listFqdns() + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .filterConnectionId(filterConnectionId) + // .filterFqdn(filterFqdn) + // .filterPort(filterPort) + // .filterDnsRecordType(filterDnsRecordType) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve an Fqdn + * + * Return the details regarding a specific FQDN. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrieveFqdnTest() throws ApiException { + //String id = null; + //FqdnResponse response = api.retrieveFqdn(id); + // TODO: test validations + } + + /** + * Update an Fqdn + * + * Update the details of a specific FQDN. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateFqdnTest() throws ApiException { + //String id = null; + //UpdateFqdnRequest updateFqdnRequest = null; + //FqdnResponse response = api.updateFqdn(id, updateFqdnRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java b/src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java new file mode 100644 index 00000000..cef3841c --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/FqdnConnectionsApiTest.java @@ -0,0 +1,123 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateFqdnConnectionRequest; +import com.telnyx.sdk.model.FqdnConnectionResponse; +import com.telnyx.sdk.model.ListFqdnConnectionsResponse; +import com.telnyx.sdk.model.UpdateFqdnConnectionRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FqdnConnectionsApi + */ +public class FqdnConnectionsApiTest { + + private final FqdnConnectionsApi api = new FqdnConnectionsApi(); + + /** + * Create an Fqdn connection + * + * Creates a FQDN connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createFqdnConnectionTest() throws ApiException { + //CreateFqdnConnectionRequest createFqdnConnectionRequest = null; + //FqdnConnectionResponse response = api.createFqdnConnection(createFqdnConnectionRequest); + // TODO: test validations + } + + /** + * Delete an Fqdn connection + * + * Deletes an FQDN connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteFqdnConnectionTest() throws ApiException { + //String id = null; + //FqdnConnectionResponse response = api.deleteFqdnConnection(id); + // TODO: test validations + } + + /** + * List Fqdn connections + * + * Returns a list of your FQDN connections. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listFqdnConnectionsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterConnectionNameContains = null; + //String sort = null; + //ListFqdnConnectionsResponse response = api.listFqdnConnections() + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .filterConnectionNameContains(filterConnectionNameContains) + // .sort(sort) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve an Fqdn connection + * + * Retrieves the details of an existing FQDN connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrieveFqdnConnectionTest() throws ApiException { + //String id = null; + //FqdnConnectionResponse response = api.retrieveFqdnConnection(id); + // TODO: test validations + } + + /** + * Update an Fqdn connection + * + * Updates settings of an existing FQDN connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateFqdnConnectionTest() throws ApiException { + //String id = null; + //UpdateFqdnConnectionRequest updateFqdnConnectionRequest = null; + //FqdnConnectionResponse response = api.updateFqdnConnection(id, updateFqdnConnectionRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/IPsApiTest.java b/src/test/java/com/telnyx/sdk/api/IPsApiTest.java new file mode 100644 index 00000000..0d9552fd --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/IPsApiTest.java @@ -0,0 +1,126 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateIpRequest; +import com.telnyx.sdk.model.IpResponse; +import com.telnyx.sdk.model.ListIpsResponse; +import java.util.UUID; +import com.telnyx.sdk.model.UpdateIpRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for IPsApi + */ +public class IPsApiTest { + + private final IPsApi api = new IPsApi(); + + /** + * Create an Ip + * + * Create a new IP object. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createIpTest() throws ApiException { + //CreateIpRequest createIpRequest = null; + //IpResponse response = api.createIp(createIpRequest); + // TODO: test validations + } + + /** + * Delete an Ip + * + * Delete an IP. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteIpTest() throws ApiException { + //UUID id = null; + //IpResponse response = api.deleteIp(id); + // TODO: test validations + } + + /** + * List Ips + * + * Get all IPs belonging to the user that match the given filters. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listIpsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterConnectionId = null; + //String filterIpAddress = null; + //Integer filterPort = null; + //ListIpsResponse response = api.listIps() + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .filterConnectionId(filterConnectionId) + // .filterIpAddress(filterIpAddress) + // .filterPort(filterPort) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve an Ip + * + * Return the details regarding a specific IP. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrieveIpTest() throws ApiException { + //UUID id = null; + //IpResponse response = api.retrieveIp(id); + // TODO: test validations + } + + /** + * Update an Ip + * + * Update the details of a specific IP. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateIpTest() throws ApiException { + //UUID id = null; + //UpdateIpRequest updateIpRequest = null; + //IpResponse response = api.updateIp(id, updateIpRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/IpConnectionsApiTest.java b/src/test/java/com/telnyx/sdk/api/IpConnectionsApiTest.java new file mode 100644 index 00000000..38760be3 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/IpConnectionsApiTest.java @@ -0,0 +1,125 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateIpConnectionRequest; +import com.telnyx.sdk.model.IpConnectionResponse; +import com.telnyx.sdk.model.ListIpConnectionsResponse; +import com.telnyx.sdk.model.UpdateIpConnectionRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for IpConnectionsApi + */ +public class IpConnectionsApiTest { + + private final IpConnectionsApi api = new IpConnectionsApi(); + + /** + * Create an Ip connection + * + * Creates an IP connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createIpConnectionTest() throws ApiException { + //CreateIpConnectionRequest createIpConnectionRequest = null; + //IpConnectionResponse response = api.createIpConnection(createIpConnectionRequest); + // TODO: test validations + } + + /** + * Delete an Ip connection + * + * Deletes an existing IP connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteIpConnectionTest() throws ApiException { + //String id = null; + //IpConnectionResponse response = api.deleteIpConnection(id); + // TODO: test validations + } + + /** + * List Ip connections + * + * Returns a list of your IP connections. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listIpConnectionsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterConnectionNameContains = null; + //String filterOutboundOutboundVoiceProfileId = null; + //String sort = null; + //ListIpConnectionsResponse response = api.listIpConnections() + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .filterConnectionNameContains(filterConnectionNameContains) + // .filterOutboundOutboundVoiceProfileId(filterOutboundOutboundVoiceProfileId) + // .sort(sort) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve an Ip connection + * + * Retrieves the details of an existing ip connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrieveIpConnectionTest() throws ApiException { + //String id = null; + //IpConnectionResponse response = api.retrieveIpConnection(id); + // TODO: test validations + } + + /** + * Update an Ip connection + * + * Updates settings of an existing IP connection. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateIpConnectionTest() throws ApiException { + //String id = null; + //UpdateIpConnectionRequest updateIpConnectionRequest = null; + //IpConnectionResponse response = api.updateIpConnection(id, updateIpConnectionRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/NumberBackgroundJobsApiTest.java b/src/test/java/com/telnyx/sdk/api/NumberBackgroundJobsApiTest.java new file mode 100644 index 00000000..83a4985c --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/NumberBackgroundJobsApiTest.java @@ -0,0 +1,113 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.Errors; +import com.telnyx.sdk.model.ListPhoneNumbersBackgroundJobsResponse; +import com.telnyx.sdk.model.PhoneNumbersEnableEmergency; +import com.telnyx.sdk.model.PhoneNumbersJob; +import com.telnyx.sdk.model.PhoneNumbersJobDeletePhoneNumbers; +import com.telnyx.sdk.model.PhoneNumbersJobDeletePhoneNumbersRequest; +import com.telnyx.sdk.model.PhoneNumbersJobUpdateEmergencySettingsRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for NumberBackgroundJobsApi + */ +public class NumberBackgroundJobsApiTest { + + private final NumberBackgroundJobsApi api = new NumberBackgroundJobsApi(); + + /** + * Delete a batch of numbers + * + * Creates a new background job to delete a batch of numbers. At most one thousand numbers can be updated per API call. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createPhoneNumbersJobDeletePhoneNumbersTest() throws ApiException { + //PhoneNumbersJobDeletePhoneNumbersRequest phoneNumbersJobDeletePhoneNumbersRequest = null; + //PhoneNumbersJobDeletePhoneNumbers response = api.createPhoneNumbersJobDeletePhoneNumbers() + // .phoneNumbersJobDeletePhoneNumbersRequest(phoneNumbersJobDeletePhoneNumbersRequest) + // .execute(); + // TODO: test validations + } + + /** + * Update the emergency settings from a batch of numbers + * + * Creates a background job to update the emergency settings of a collection of phone numbers. At most one thousand numbers can be updated per API call. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createPhoneNumbersJobUpdateEmergencySettingsTest() throws ApiException { + //PhoneNumbersJobUpdateEmergencySettingsRequest phoneNumbersJobUpdateEmergencySettingsRequest = null; + //PhoneNumbersEnableEmergency response = api.createPhoneNumbersJobUpdateEmergencySettings(phoneNumbersJobUpdateEmergencySettingsRequest); + // TODO: test validations + } + + /** + * Lists the phone numbers jobs + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listPhoneNumbersJobsTest() throws ApiException { + //String filterType = null; + //Integer pageNumber = null; + //Integer pageSize = null; + //String sort = null; + //ListPhoneNumbersBackgroundJobsResponse response = api.listPhoneNumbersJobs() + // .filterType(filterType) + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .sort(sort) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve a phone numbers job + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrievePhoneNumbersJobTest() throws ApiException { + //String id = null; + //PhoneNumbersJob response = api.retrievePhoneNumbersJob(id) + // .execute(); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/OutboundVoiceProfilesApiTest.java b/src/test/java/com/telnyx/sdk/api/OutboundVoiceProfilesApiTest.java new file mode 100644 index 00000000..dfcf2052 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/OutboundVoiceProfilesApiTest.java @@ -0,0 +1,123 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateOutboundVoiceProfileRequest; +import com.telnyx.sdk.model.ListOutboundVoiceProfilesResponse; +import com.telnyx.sdk.model.OutboundVoiceProfileResponse; +import com.telnyx.sdk.model.UpdateOutboundVoiceProfileRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OutboundVoiceProfilesApi + */ +public class OutboundVoiceProfilesApiTest { + + private final OutboundVoiceProfilesApi api = new OutboundVoiceProfilesApi(); + + /** + * Create an outbound voice profile + * + * Create an outbound voice profile. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createOutboundVoiceProfileTest() throws ApiException { + //CreateOutboundVoiceProfileRequest createOutboundVoiceProfileRequest = null; + //OutboundVoiceProfileResponse response = api.createOutboundVoiceProfile(createOutboundVoiceProfileRequest); + // TODO: test validations + } + + /** + * Delete an outbound voice profile + * + * Deletes an existing outbound voice profile. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteOutboundVoiceProfileTest() throws ApiException { + //String id = null; + //OutboundVoiceProfileResponse response = api.deleteOutboundVoiceProfile(id); + // TODO: test validations + } + + /** + * Get all outbound voice profiles + * + * Get all outbound voice profiles belonging to the user that match the given filters. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listOutboundVoiceProfilesTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterNameContains = null; + //String sort = null; + //ListOutboundVoiceProfilesResponse response = api.listOutboundVoiceProfiles() + // .pageNumber(pageNumber) + // .pageSize(pageSize) + // .filterNameContains(filterNameContains) + // .sort(sort) + // .execute(); + // TODO: test validations + } + + /** + * Retrieve an outbound voice profile + * + * Retrieves the details of an existing outbound voice profile. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void retrieveOutboundVoiceProfileTest() throws ApiException { + //String id = null; + //OutboundVoiceProfileResponse response = api.retrieveOutboundVoiceProfile(id); + // TODO: test validations + } + + /** + * Updates an existing outbound voice profile. + * + * Updates an existing outbound voice profile. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateOutboundVoiceProfileTest() throws ApiException { + //String id = null; + //UpdateOutboundVoiceProfileRequest updateOutboundVoiceProfileRequest = null; + //OutboundVoiceProfileResponse response = api.updateOutboundVoiceProfile(id, updateOutboundVoiceProfileRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApiTest.java b/src/test/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApiTest.java new file mode 100644 index 00000000..7886bee2 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/ProgrammableFaxApplicationsApiTest.java @@ -0,0 +1,119 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateFaxApplicationRequest; +import com.telnyx.sdk.model.InlineResponse200; +import com.telnyx.sdk.model.InlineResponse201; +import com.telnyx.sdk.model.UpdateFaxApplicationRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ProgrammableFaxApplicationsApi + */ +public class ProgrammableFaxApplicationsApiTest { + + private final ProgrammableFaxApplicationsApi api = new ProgrammableFaxApplicationsApi(); + + /** + * Creates a Fax Application + * + * Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the `/phone_numbers` endpoint. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createFaxApplicationTest() throws ApiException { + //CreateFaxApplicationRequest createFaxApplicationRequest = null; + //InlineResponse201 response = api.createFaxApplication(createFaxApplicationRequest); + // TODO: test validations + } + + /** + * Deletes a Fax Application + * + * Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteFaxApplicationTest() throws ApiException { + //String id = null; + //InlineResponse201 response = api.deleteFaxApplication(id); + // TODO: test validations + } + + /** + * Retrieve a Fax Application + * + * Return the details of an existing Fax Application inside the 'data' attribute of the response. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFaxApplicationTest() throws ApiException { + //String id = null; + //InlineResponse201 response = api.getFaxApplication(id); + // TODO: test validations + } + + /** + * List all Fax Applications + * + * This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listFaxApplicationsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterApplicationNameContains = null; + //String filterOutboundVoiceProfileId = null; + //String sort = null; + //InlineResponse200 response = api.listFaxApplications(pageNumber, pageSize, filterApplicationNameContains, filterOutboundVoiceProfileId, sort); + // TODO: test validations + } + + /** + * Update a Fax Application + * + * Updates settings of an existing Fax Application based on the parameters of the request. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateFaxApplicationTest() throws ApiException { + //String id = null; + //UpdateFaxApplicationRequest updateFaxApplicationRequest = null; + //InlineResponse201 response = api.updateFaxApplication(id, updateFaxApplicationRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/api/TeXmlApplicationsApiTest.java b/src/test/java/com/telnyx/sdk/api/TeXmlApplicationsApiTest.java new file mode 100644 index 00000000..2a012bbe --- /dev/null +++ b/src/test/java/com/telnyx/sdk/api/TeXmlApplicationsApiTest.java @@ -0,0 +1,119 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.api; + +import com.telnyx.sdk.*; +import com.telnyx.sdk.auth.*; +import com.telnyx.sdk.model.CreateTexmlApplicationRequest; +import com.telnyx.sdk.model.InlineResponse2001; +import com.telnyx.sdk.model.InlineResponse2011; +import com.telnyx.sdk.model.UpdateTexmlApplicationRequest; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for TeXmlApplicationsApi + */ +public class TeXmlApplicationsApiTest { + + private final TeXmlApplicationsApi api = new TeXmlApplicationsApi(); + + /** + * Creates a TeXML Application + * + * Creates a TeXML Application. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createTexmlApplicationTest() throws ApiException { + //CreateTexmlApplicationRequest createTexmlApplicationRequest = null; + //InlineResponse2011 response = api.createTexmlApplication(createTexmlApplicationRequest); + // TODO: test validations + } + + /** + * Deletes a TeXML Application + * + * Deletes a TeXML Application. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteTexmlApplicationTest() throws ApiException { + //String id = null; + //InlineResponse2011 response = api.deleteTexmlApplication(id); + // TODO: test validations + } + + /** + * List all TeXML Applications + * + * Returns a list of your TeXML Applications. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void findTexmlApplicationsTest() throws ApiException { + //Integer pageNumber = null; + //Integer pageSize = null; + //String filterFriendlyNameContains = null; + //String filterOutboundVoiceProfileId = null; + //String sort = null; + //InlineResponse2001 response = api.findTexmlApplications(pageNumber, pageSize, filterFriendlyNameContains, filterOutboundVoiceProfileId, sort); + // TODO: test validations + } + + /** + * Retrieve a TeXML Application + * + * Retrieves the details of an existing TeXML Application. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getTexmlApplicationTest() throws ApiException { + //String id = null; + //InlineResponse2011 response = api.getTexmlApplication(id); + // TODO: test validations + } + + /** + * Update a TeXML Application + * + * Updates settings of an existing TeXML Application. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateTexmlApplicationTest() throws ApiException { + //String id = null; + //UpdateTexmlApplicationRequest updateTexmlApplicationRequest = null; + //InlineResponse2011 response = api.updateTexmlApplication(id, updateTexmlApplicationRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/AnchorsiteOverrideTest.java b/src/test/java/com/telnyx/sdk/model/AnchorsiteOverrideTest.java new file mode 100644 index 00000000..5831a7ce --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/AnchorsiteOverrideTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AnchorsiteOverride + */ +public class AnchorsiteOverrideTest { + /** + * Model tests for AnchorsiteOverride + */ + @Test + public void testAnchorsiteOverride() { + // TODO: test AnchorsiteOverride + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ConnectionResponseTest.java b/src/test/java/com/telnyx/sdk/model/ConnectionResponseTest.java new file mode 100644 index 00000000..15a69e68 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ConnectionResponseTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Connection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ConnectionResponse + */ +public class ConnectionResponseTest { + private final ConnectionResponse model = new ConnectionResponse(); + + /** + * Model tests for ConnectionResponse + */ + @Test + public void testConnectionResponse() { + // TODO: test ConnectionResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ConnectionRtcpSettingsTest.java b/src/test/java/com/telnyx/sdk/model/ConnectionRtcpSettingsTest.java new file mode 100644 index 00000000..457fda78 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ConnectionRtcpSettingsTest.java @@ -0,0 +1,66 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ConnectionRtcpSettings + */ +public class ConnectionRtcpSettingsTest { + private final ConnectionRtcpSettings model = new ConnectionRtcpSettings(); + + /** + * Model tests for ConnectionRtcpSettings + */ + @Test + public void testConnectionRtcpSettings() { + // TODO: test ConnectionRtcpSettings + } + + /** + * Test the property 'port' + */ + @Test + public void portTest() { + // TODO: test port + } + + /** + * Test the property 'captureEnabled' + */ + @Test + public void captureEnabledTest() { + // TODO: test captureEnabled + } + + /** + * Test the property 'reportFrequencySecs' + */ + @Test + public void reportFrequencySecsTest() { + // TODO: test reportFrequencySecs + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ConnectionTest.java b/src/test/java/com/telnyx/sdk/model/ConnectionTest.java new file mode 100644 index 00000000..c601b881 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ConnectionTest.java @@ -0,0 +1,134 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Connection + */ +public class ConnectionTest { + private final Connection model = new Connection(); + + /** + * Model tests for Connection + */ + @Test + public void testConnection() { + // TODO: test Connection + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'outboundVoiceProfileId' + */ + @Test + public void outboundVoiceProfileIdTest() { + // TODO: test outboundVoiceProfileId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateCredentialConnectionRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateCredentialConnectionRequestTest.java new file mode 100644 index 00000000..30c9ef68 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateCredentialConnectionRequestTest.java @@ -0,0 +1,195 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CredentialInbound; +import com.telnyx.sdk.model.CredentialOutbound; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateCredentialConnectionRequest + */ +public class CreateCredentialConnectionRequestTest { + private final CreateCredentialConnectionRequest model = new CreateCredentialConnectionRequest(); + + /** + * Model tests for CreateCredentialConnectionRequest + */ + @Test + public void testCreateCredentialConnectionRequest() { + // TODO: test CreateCredentialConnectionRequest + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'userName' + */ + @Test + public void userNameTest() { + // TODO: test userName + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'sipUriCallingPreference' + */ + @Test + public void sipUriCallingPreferenceTest() { + // TODO: test sipUriCallingPreference + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInboundTest.java b/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInboundTest.java new file mode 100644 index 00000000..d73241b5 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestInboundTest.java @@ -0,0 +1,66 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateFaxApplicationRequestInbound + */ +public class CreateFaxApplicationRequestInboundTest { + private final CreateFaxApplicationRequestInbound model = new CreateFaxApplicationRequestInbound(); + + /** + * Model tests for CreateFaxApplicationRequestInbound + */ + @Test + public void testCreateFaxApplicationRequestInbound() { + // TODO: test CreateFaxApplicationRequestInbound + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'sipSubdomain' + */ + @Test + public void sipSubdomainTest() { + // TODO: test sipSubdomain + } + + /** + * Test the property 'sipSubdomainReceiveSettings' + */ + @Test + public void sipSubdomainReceiveSettingsTest() { + // TODO: test sipSubdomainReceiveSettings + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutboundTest.java b/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutboundTest.java new file mode 100644 index 00000000..55cab196 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestOutboundTest.java @@ -0,0 +1,58 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateFaxApplicationRequestOutbound + */ +public class CreateFaxApplicationRequestOutboundTest { + private final CreateFaxApplicationRequestOutbound model = new CreateFaxApplicationRequestOutbound(); + + /** + * Model tests for CreateFaxApplicationRequestOutbound + */ + @Test + public void testCreateFaxApplicationRequestOutbound() { + // TODO: test CreateFaxApplicationRequestOutbound + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'outboundVoiceProfileId' + */ + @Test + public void outboundVoiceProfileIdTest() { + // TODO: test outboundVoiceProfileId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestTest.java new file mode 100644 index 00000000..dac0bf61 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateFaxApplicationRequestTest.java @@ -0,0 +1,112 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateFaxApplicationRequestInbound; +import com.telnyx.sdk.model.CreateFaxApplicationRequestOutbound; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateFaxApplicationRequest + */ +public class CreateFaxApplicationRequestTest { + private final CreateFaxApplicationRequest model = new CreateFaxApplicationRequest(); + + /** + * Model tests for CreateFaxApplicationRequest + */ + @Test + public void testCreateFaxApplicationRequest() { + // TODO: test CreateFaxApplicationRequest + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateFqdnConnectionRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateFqdnConnectionRequestTest.java new file mode 100644 index 00000000..c1337a8d --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateFqdnConnectionRequestTest.java @@ -0,0 +1,171 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.FqdnConnectionTransportProtocol; +import com.telnyx.sdk.model.InboundFqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateFqdnConnectionRequest + */ +public class CreateFqdnConnectionRequestTest { + private final CreateFqdnConnectionRequest model = new CreateFqdnConnectionRequest(); + + /** + * Model tests for CreateFqdnConnectionRequest + */ + @Test + public void testCreateFqdnConnectionRequest() { + // TODO: test CreateFqdnConnectionRequest + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'transportProtocol' + */ + @Test + public void transportProtocolTest() { + // TODO: test transportProtocol + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateFqdnRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateFqdnRequestTest.java new file mode 100644 index 00000000..512b17db --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateFqdnRequestTest.java @@ -0,0 +1,77 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateFqdnRequest + */ +public class CreateFqdnRequestTest { + private final CreateFqdnRequest model = new CreateFqdnRequest(); + + /** + * Model tests for CreateFqdnRequest + */ + @Test + public void testCreateFqdnRequest() { + // TODO: test CreateFqdnRequest + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'fqdn' + */ + @Test + public void fqdnTest() { + // TODO: test fqdn + } + + /** + * Test the property 'port' + */ + @Test + public void portTest() { + // TODO: test port + } + + /** + * Test the property 'dnsRecordType' + */ + @Test + public void dnsRecordTypeTest() { + // TODO: test dnsRecordType + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateInboundIpRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateInboundIpRequestTest.java new file mode 100644 index 00000000..d3fd0165 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateInboundIpRequestTest.java @@ -0,0 +1,164 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateInboundIpRequest + */ +public class CreateInboundIpRequestTest { + private final CreateInboundIpRequest model = new CreateInboundIpRequest(); + + /** + * Model tests for CreateInboundIpRequest + */ + @Test + public void testCreateInboundIpRequest() { + // TODO: test CreateInboundIpRequest + } + + /** + * Test the property 'aniNumberFormat' + */ + @Test + public void aniNumberFormatTest() { + // TODO: test aniNumberFormat + } + + /** + * Test the property 'dnisNumberFormat' + */ + @Test + public void dnisNumberFormatTest() { + // TODO: test dnisNumberFormat + } + + /** + * Test the property 'codecs' + */ + @Test + public void codecsTest() { + // TODO: test codecs + } + + /** + * Test the property 'defaultRoutingMethod' + */ + @Test + public void defaultRoutingMethodTest() { + // TODO: test defaultRoutingMethod + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'generateRingbackTone' + */ + @Test + public void generateRingbackToneTest() { + // TODO: test generateRingbackTone + } + + /** + * Test the property 'isupHeadersEnabled' + */ + @Test + public void isupHeadersEnabledTest() { + // TODO: test isupHeadersEnabled + } + + /** + * Test the property 'prackEnabled' + */ + @Test + public void prackEnabledTest() { + // TODO: test prackEnabled + } + + /** + * Test the property 'privacyZoneEnabled' + */ + @Test + public void privacyZoneEnabledTest() { + // TODO: test privacyZoneEnabled + } + + /** + * Test the property 'sipCompactHeadersEnabled' + */ + @Test + public void sipCompactHeadersEnabledTest() { + // TODO: test sipCompactHeadersEnabled + } + + /** + * Test the property 'sipRegion' + */ + @Test + public void sipRegionTest() { + // TODO: test sipRegion + } + + /** + * Test the property 'sipSubdomain' + */ + @Test + public void sipSubdomainTest() { + // TODO: test sipSubdomain + } + + /** + * Test the property 'sipSubdomainReceiveSettings' + */ + @Test + public void sipSubdomainReceiveSettingsTest() { + // TODO: test sipSubdomainReceiveSettings + } + + /** + * Test the property 'timeout1xxSecs' + */ + @Test + public void timeout1xxSecsTest() { + // TODO: test timeout1xxSecs + } + + /** + * Test the property 'timeout2xxSecs' + */ + @Test + public void timeout2xxSecsTest() { + // TODO: test timeout2xxSecs + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateIpConnectionRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateIpConnectionRequestTest.java new file mode 100644 index 00000000..0212fe9c --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateIpConnectionRequestTest.java @@ -0,0 +1,179 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CreateInboundIpRequest; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.OutboundIp; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateIpConnectionRequest + */ +public class CreateIpConnectionRequestTest { + private final CreateIpConnectionRequest model = new CreateIpConnectionRequest(); + + /** + * Model tests for CreateIpConnectionRequest + */ + @Test + public void testCreateIpConnectionRequest() { + // TODO: test CreateIpConnectionRequest + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'transportProtocol' + */ + @Test + public void transportProtocolTest() { + // TODO: test transportProtocol + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateIpRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateIpRequestTest.java new file mode 100644 index 00000000..0a5618dc --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateIpRequestTest.java @@ -0,0 +1,66 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateIpRequest + */ +public class CreateIpRequestTest { + private final CreateIpRequest model = new CreateIpRequest(); + + /** + * Model tests for CreateIpRequest + */ + @Test + public void testCreateIpRequest() { + // TODO: test CreateIpRequest + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'ipAddress' + */ + @Test + public void ipAddressTest() { + // TODO: test ipAddress + } + + /** + * Test the property 'port' + */ + @Test + public void portTest() { + // TODO: test port + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequestTest.java new file mode 100644 index 00000000..9cce1c00 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateOutboundVoiceProfileRequestTest.java @@ -0,0 +1,157 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundCallRecording; +import com.telnyx.sdk.model.ServicePlan; +import com.telnyx.sdk.model.TrafficType; +import com.telnyx.sdk.model.UsagePaymentMethod; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateOutboundVoiceProfileRequest + */ +public class CreateOutboundVoiceProfileRequestTest { + private final CreateOutboundVoiceProfileRequest model = new CreateOutboundVoiceProfileRequest(); + + /** + * Model tests for CreateOutboundVoiceProfileRequest + */ + @Test + public void testCreateOutboundVoiceProfileRequest() { + // TODO: test CreateOutboundVoiceProfileRequest + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'trafficType' + */ + @Test + public void trafficTypeTest() { + // TODO: test trafficType + } + + /** + * Test the property 'servicePlan' + */ + @Test + public void servicePlanTest() { + // TODO: test servicePlan + } + + /** + * Test the property 'concurrentCallLimit' + */ + @Test + public void concurrentCallLimitTest() { + // TODO: test concurrentCallLimit + } + + /** + * Test the property 'enabled' + */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'usagePaymentMethod' + */ + @Test + public void usagePaymentMethodTest() { + // TODO: test usagePaymentMethod + } + + /** + * Test the property 'whitelistedDestinations' + */ + @Test + public void whitelistedDestinationsTest() { + // TODO: test whitelistedDestinations + } + + /** + * Test the property 'maxDestinationRate' + */ + @Test + public void maxDestinationRateTest() { + // TODO: test maxDestinationRate + } + + /** + * Test the property 'dailySpendLimit' + */ + @Test + public void dailySpendLimitTest() { + // TODO: test dailySpendLimit + } + + /** + * Test the property 'dailySpendLimitEnabled' + */ + @Test + public void dailySpendLimitEnabledTest() { + // TODO: test dailySpendLimitEnabled + } + + /** + * Test the property 'callRecording' + */ + @Test + public void callRecordingTest() { + // TODO: test callRecording + } + + /** + * Test the property 'billingGroupId' + */ + @Test + public void billingGroupIdTest() { + // TODO: test billingGroupId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInboundTest.java b/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInboundTest.java new file mode 100644 index 00000000..b7578f47 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestInboundTest.java @@ -0,0 +1,66 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateTexmlApplicationRequestInbound + */ +public class CreateTexmlApplicationRequestInboundTest { + private final CreateTexmlApplicationRequestInbound model = new CreateTexmlApplicationRequestInbound(); + + /** + * Model tests for CreateTexmlApplicationRequestInbound + */ + @Test + public void testCreateTexmlApplicationRequestInbound() { + // TODO: test CreateTexmlApplicationRequestInbound + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'sipSubdomain' + */ + @Test + public void sipSubdomainTest() { + // TODO: test sipSubdomain + } + + /** + * Test the property 'sipSubdomainReceiveSettings' + */ + @Test + public void sipSubdomainReceiveSettingsTest() { + // TODO: test sipSubdomainReceiveSettings + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutboundTest.java b/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutboundTest.java new file mode 100644 index 00000000..c63b78ed --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestOutboundTest.java @@ -0,0 +1,58 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateTexmlApplicationRequestOutbound + */ +public class CreateTexmlApplicationRequestOutboundTest { + private final CreateTexmlApplicationRequestOutbound model = new CreateTexmlApplicationRequestOutbound(); + + /** + * Model tests for CreateTexmlApplicationRequestOutbound + */ + @Test + public void testCreateTexmlApplicationRequestOutbound() { + // TODO: test CreateTexmlApplicationRequestOutbound + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'outboundVoiceProfileId' + */ + @Test + public void outboundVoiceProfileIdTest() { + // TODO: test outboundVoiceProfileId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestTest.java b/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestTest.java new file mode 100644 index 00000000..f04183e9 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CreateTexmlApplicationRequestTest.java @@ -0,0 +1,150 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestInbound; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestOutbound; +import com.telnyx.sdk.model.DtmfType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateTexmlApplicationRequest + */ +public class CreateTexmlApplicationRequestTest { + private final CreateTexmlApplicationRequest model = new CreateTexmlApplicationRequest(); + + /** + * Model tests for CreateTexmlApplicationRequest + */ + @Test + public void testCreateTexmlApplicationRequest() { + // TODO: test CreateTexmlApplicationRequest + } + + /** + * Test the property 'friendlyName' + */ + @Test + public void friendlyNameTest() { + // TODO: test friendlyName + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'firstCommandTimeout' + */ + @Test + public void firstCommandTimeoutTest() { + // TODO: test firstCommandTimeout + } + + /** + * Test the property 'firstCommandTimeoutSecs' + */ + @Test + public void firstCommandTimeoutSecsTest() { + // TODO: test firstCommandTimeoutSecs + } + + /** + * Test the property 'voiceUrl' + */ + @Test + public void voiceUrlTest() { + // TODO: test voiceUrl + } + + /** + * Test the property 'voiceFallbackUrl' + */ + @Test + public void voiceFallbackUrlTest() { + // TODO: test voiceFallbackUrl + } + + /** + * Test the property 'voiceMethod' + */ + @Test + public void voiceMethodTest() { + // TODO: test voiceMethod + } + + /** + * Test the property 'statusCallback' + */ + @Test + public void statusCallbackTest() { + // TODO: test statusCallback + } + + /** + * Test the property 'statusCallbackMethod' + */ + @Test + public void statusCallbackMethodTest() { + // TODO: test statusCallbackMethod + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CredentialConnectionResponseTest.java b/src/test/java/com/telnyx/sdk/model/CredentialConnectionResponseTest.java new file mode 100644 index 00000000..c7d6f83c --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CredentialConnectionResponseTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.CredentialConnection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CredentialConnectionResponse + */ +public class CredentialConnectionResponseTest { + private final CredentialConnectionResponse model = new CredentialConnectionResponse(); + + /** + * Model tests for CredentialConnectionResponse + */ + @Test + public void testCredentialConnectionResponse() { + // TODO: test CredentialConnectionResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CredentialConnectionTest.java b/src/test/java/com/telnyx/sdk/model/CredentialConnectionTest.java new file mode 100644 index 00000000..4455e4f7 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CredentialConnectionTest.java @@ -0,0 +1,227 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CredentialInbound; +import com.telnyx.sdk.model.CredentialOutbound; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CredentialConnection + */ +public class CredentialConnectionTest { + private final CredentialConnection model = new CredentialConnection(); + + /** + * Model tests for CredentialConnection + */ + @Test + public void testCredentialConnection() { + // TODO: test CredentialConnection + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'userName' + */ + @Test + public void userNameTest() { + // TODO: test userName + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'sipUriCallingPreference' + */ + @Test + public void sipUriCallingPreferenceTest() { + // TODO: test sipUriCallingPreference + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CredentialInboundTest.java b/src/test/java/com/telnyx/sdk/model/CredentialInboundTest.java new file mode 100644 index 00000000..e98e1b8f --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CredentialInboundTest.java @@ -0,0 +1,132 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CredentialInbound + */ +public class CredentialInboundTest { + private final CredentialInbound model = new CredentialInbound(); + + /** + * Model tests for CredentialInbound + */ + @Test + public void testCredentialInbound() { + // TODO: test CredentialInbound + } + + /** + * Test the property 'aniNumberFormat' + */ + @Test + public void aniNumberFormatTest() { + // TODO: test aniNumberFormat + } + + /** + * Test the property 'dnisNumberFormat' + */ + @Test + public void dnisNumberFormatTest() { + // TODO: test dnisNumberFormat + } + + /** + * Test the property 'codecs' + */ + @Test + public void codecsTest() { + // TODO: test codecs + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'generateRingbackTone' + */ + @Test + public void generateRingbackToneTest() { + // TODO: test generateRingbackTone + } + + /** + * Test the property 'isupHeadersEnabled' + */ + @Test + public void isupHeadersEnabledTest() { + // TODO: test isupHeadersEnabled + } + + /** + * Test the property 'prackEnabled' + */ + @Test + public void prackEnabledTest() { + // TODO: test prackEnabled + } + + /** + * Test the property 'privacyZoneEnabled' + */ + @Test + public void privacyZoneEnabledTest() { + // TODO: test privacyZoneEnabled + } + + /** + * Test the property 'sipCompactHeadersEnabled' + */ + @Test + public void sipCompactHeadersEnabledTest() { + // TODO: test sipCompactHeadersEnabled + } + + /** + * Test the property 'timeout1xxSecs' + */ + @Test + public void timeout1xxSecsTest() { + // TODO: test timeout1xxSecs + } + + /** + * Test the property 'timeout2xxSecs' + */ + @Test + public void timeout2xxSecsTest() { + // TODO: test timeout2xxSecs + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/CredentialOutboundTest.java b/src/test/java/com/telnyx/sdk/model/CredentialOutboundTest.java new file mode 100644 index 00000000..52535fb5 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/CredentialOutboundTest.java @@ -0,0 +1,114 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CredentialOutbound + */ +public class CredentialOutboundTest { + private final CredentialOutbound model = new CredentialOutbound(); + + /** + * Model tests for CredentialOutbound + */ + @Test + public void testCredentialOutbound() { + // TODO: test CredentialOutbound + } + + /** + * Test the property 'callParkingEnabled' + */ + @Test + public void callParkingEnabledTest() { + // TODO: test callParkingEnabled + } + + /** + * Test the property 'aniOverride' + */ + @Test + public void aniOverrideTest() { + // TODO: test aniOverride + } + + /** + * Test the property 'aniOverrideType' + */ + @Test + public void aniOverrideTypeTest() { + // TODO: test aniOverrideType + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'instantRingbackEnabled' + */ + @Test + public void instantRingbackEnabledTest() { + // TODO: test instantRingbackEnabled + } + + /** + * Test the property 'generateRingbackTone' + */ + @Test + public void generateRingbackToneTest() { + // TODO: test generateRingbackTone + } + + /** + * Test the property 'localization' + */ + @Test + public void localizationTest() { + // TODO: test localization + } + + /** + * Test the property 't38ReinviteSource' + */ + @Test + public void t38ReinviteSourceTest() { + // TODO: test t38ReinviteSource + } + + /** + * Test the property 'outboundVoiceProfileId' + */ + @Test + public void outboundVoiceProfileIdTest() { + // TODO: test outboundVoiceProfileId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/DtmfTypeTest.java b/src/test/java/com/telnyx/sdk/model/DtmfTypeTest.java new file mode 100644 index 00000000..b0b4d30e --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/DtmfTypeTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for DtmfType + */ +public class DtmfTypeTest { + /** + * Model tests for DtmfType + */ + @Test + public void testDtmfType() { + // TODO: test DtmfType + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/EncryptedMediaTest.java b/src/test/java/com/telnyx/sdk/model/EncryptedMediaTest.java new file mode 100644 index 00000000..b76c5f9b --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/EncryptedMediaTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for EncryptedMedia + */ +public class EncryptedMediaTest { + /** + * Model tests for EncryptedMedia + */ + @Test + public void testEncryptedMedia() { + // TODO: test EncryptedMedia + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/FaxApplicationTest.java b/src/test/java/com/telnyx/sdk/model/FaxApplicationTest.java new file mode 100644 index 00000000..ccc05df0 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/FaxApplicationTest.java @@ -0,0 +1,144 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateFaxApplicationRequestInbound; +import com.telnyx.sdk.model.CreateFaxApplicationRequestOutbound; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FaxApplication + */ +public class FaxApplicationTest { + private final FaxApplication model = new FaxApplication(); + + /** + * Model tests for FaxApplication + */ + @Test + public void testFaxApplication() { + // TODO: test FaxApplication + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/FqdnConnectionResponseTest.java b/src/test/java/com/telnyx/sdk/model/FqdnConnectionResponseTest.java new file mode 100644 index 00000000..510190b3 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/FqdnConnectionResponseTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FqdnConnection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FqdnConnectionResponse + */ +public class FqdnConnectionResponseTest { + private final FqdnConnectionResponse model = new FqdnConnectionResponse(); + + /** + * Model tests for FqdnConnectionResponse + */ + @Test + public void testFqdnConnectionResponse() { + // TODO: test FqdnConnectionResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/FqdnConnectionTest.java b/src/test/java/com/telnyx/sdk/model/FqdnConnectionTest.java new file mode 100644 index 00000000..cc1fd4be --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/FqdnConnectionTest.java @@ -0,0 +1,203 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.FqdnConnectionTransportProtocol; +import com.telnyx.sdk.model.InboundFqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FqdnConnection + */ +public class FqdnConnectionTest { + private final FqdnConnection model = new FqdnConnection(); + + /** + * Model tests for FqdnConnection + */ + @Test + public void testFqdnConnection() { + // TODO: test FqdnConnection + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'transportProtocol' + */ + @Test + public void transportProtocolTest() { + // TODO: test transportProtocol + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocolTest.java b/src/test/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocolTest.java new file mode 100644 index 00000000..d8ec9f7a --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/FqdnConnectionTransportProtocolTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FqdnConnectionTransportProtocol + */ +public class FqdnConnectionTransportProtocolTest { + /** + * Model tests for FqdnConnectionTransportProtocol + */ + @Test + public void testFqdnConnectionTransportProtocol() { + // TODO: test FqdnConnectionTransportProtocol + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/FqdnResponseTest.java b/src/test/java/com/telnyx/sdk/model/FqdnResponseTest.java new file mode 100644 index 00000000..9ee17ec5 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/FqdnResponseTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Fqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FqdnResponse + */ +public class FqdnResponseTest { + private final FqdnResponse model = new FqdnResponse(); + + /** + * Model tests for FqdnResponse + */ + @Test + public void testFqdnResponse() { + // TODO: test FqdnResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/FqdnTest.java b/src/test/java/com/telnyx/sdk/model/FqdnTest.java new file mode 100644 index 00000000..b1c03c35 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/FqdnTest.java @@ -0,0 +1,106 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Fqdn + */ +public class FqdnTest { + private final Fqdn model = new Fqdn(); + + /** + * Model tests for Fqdn + */ + @Test + public void testFqdn() { + // TODO: test Fqdn + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'fqdn' + */ + @Test + public void fqdnTest() { + // TODO: test fqdn + } + + /** + * Test the property 'port' + */ + @Test + public void portTest() { + // TODO: test port + } + + /** + * Test the property 'dnsRecordType' + */ + @Test + public void dnsRecordTypeTest() { + // TODO: test dnsRecordType + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/InboundFqdnTest.java b/src/test/java/com/telnyx/sdk/model/InboundFqdnTest.java new file mode 100644 index 00000000..43547cef --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/InboundFqdnTest.java @@ -0,0 +1,167 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for InboundFqdn + */ +public class InboundFqdnTest { + private final InboundFqdn model = new InboundFqdn(); + + /** + * Model tests for InboundFqdn + */ + @Test + public void testInboundFqdn() { + // TODO: test InboundFqdn + } + + /** + * Test the property 'aniNumberFormat' + */ + @Test + public void aniNumberFormatTest() { + // TODO: test aniNumberFormat + } + + /** + * Test the property 'dnisNumberFormat' + */ + @Test + public void dnisNumberFormatTest() { + // TODO: test dnisNumberFormat + } + + /** + * Test the property 'codecs' + */ + @Test + public void codecsTest() { + // TODO: test codecs + } + + /** + * Test the property 'defaultRoutingMethod' + */ + @Test + public void defaultRoutingMethodTest() { + // TODO: test defaultRoutingMethod + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'generateRingbackTone' + */ + @Test + public void generateRingbackToneTest() { + // TODO: test generateRingbackTone + } + + /** + * Test the property 'isupHeadersEnabled' + */ + @Test + public void isupHeadersEnabledTest() { + // TODO: test isupHeadersEnabled + } + + /** + * Test the property 'prackEnabled' + */ + @Test + public void prackEnabledTest() { + // TODO: test prackEnabled + } + + /** + * Test the property 'privacyZoneEnabled' + */ + @Test + public void privacyZoneEnabledTest() { + // TODO: test privacyZoneEnabled + } + + /** + * Test the property 'sipCompactHeadersEnabled' + */ + @Test + public void sipCompactHeadersEnabledTest() { + // TODO: test sipCompactHeadersEnabled + } + + /** + * Test the property 'sipRegion' + */ + @Test + public void sipRegionTest() { + // TODO: test sipRegion + } + + /** + * Test the property 'sipSubdomain' + */ + @Test + public void sipSubdomainTest() { + // TODO: test sipSubdomain + } + + /** + * Test the property 'sipSubdomainReceiveSettings' + */ + @Test + public void sipSubdomainReceiveSettingsTest() { + // TODO: test sipSubdomainReceiveSettings + } + + /** + * Test the property 'timeout1xxSecs' + */ + @Test + public void timeout1xxSecsTest() { + // TODO: test timeout1xxSecs + } + + /** + * Test the property 'timeout2xxSecs' + */ + @Test + public void timeout2xxSecsTest() { + // TODO: test timeout2xxSecs + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/InboundIpTest.java b/src/test/java/com/telnyx/sdk/model/InboundIpTest.java new file mode 100644 index 00000000..469efe0d --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/InboundIpTest.java @@ -0,0 +1,188 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for InboundIp + */ +public class InboundIpTest { + private final InboundIp model = new InboundIp(); + + /** + * Model tests for InboundIp + */ + @Test + public void testInboundIp() { + // TODO: test InboundIp + } + + /** + * Test the property 'aniNumberFormat' + */ + @Test + public void aniNumberFormatTest() { + // TODO: test aniNumberFormat + } + + /** + * Test the property 'dnisNumberFormat' + */ + @Test + public void dnisNumberFormatTest() { + // TODO: test dnisNumberFormat + } + + /** + * Test the property 'codecs' + */ + @Test + public void codecsTest() { + // TODO: test codecs + } + + /** + * Test the property 'defaultPrimaryIpId' + */ + @Test + public void defaultPrimaryIpIdTest() { + // TODO: test defaultPrimaryIpId + } + + /** + * Test the property 'defaultSecondaryIpId' + */ + @Test + public void defaultSecondaryIpIdTest() { + // TODO: test defaultSecondaryIpId + } + + /** + * Test the property 'defaultTertiaryIpId' + */ + @Test + public void defaultTertiaryIpIdTest() { + // TODO: test defaultTertiaryIpId + } + + /** + * Test the property 'defaultRoutingMethod' + */ + @Test + public void defaultRoutingMethodTest() { + // TODO: test defaultRoutingMethod + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'generateRingbackTone' + */ + @Test + public void generateRingbackToneTest() { + // TODO: test generateRingbackTone + } + + /** + * Test the property 'isupHeadersEnabled' + */ + @Test + public void isupHeadersEnabledTest() { + // TODO: test isupHeadersEnabled + } + + /** + * Test the property 'prackEnabled' + */ + @Test + public void prackEnabledTest() { + // TODO: test prackEnabled + } + + /** + * Test the property 'privacyZoneEnabled' + */ + @Test + public void privacyZoneEnabledTest() { + // TODO: test privacyZoneEnabled + } + + /** + * Test the property 'sipCompactHeadersEnabled' + */ + @Test + public void sipCompactHeadersEnabledTest() { + // TODO: test sipCompactHeadersEnabled + } + + /** + * Test the property 'sipRegion' + */ + @Test + public void sipRegionTest() { + // TODO: test sipRegion + } + + /** + * Test the property 'sipSubdomain' + */ + @Test + public void sipSubdomainTest() { + // TODO: test sipSubdomain + } + + /** + * Test the property 'sipSubdomainReceiveSettings' + */ + @Test + public void sipSubdomainReceiveSettingsTest() { + // TODO: test sipSubdomainReceiveSettings + } + + /** + * Test the property 'timeout1xxSecs' + */ + @Test + public void timeout1xxSecsTest() { + // TODO: test timeout1xxSecs + } + + /** + * Test the property 'timeout2xxSecs' + */ + @Test + public void timeout2xxSecsTest() { + // TODO: test timeout2xxSecs + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/InlineResponse2001Test.java b/src/test/java/com/telnyx/sdk/model/InlineResponse2001Test.java new file mode 100644 index 00000000..0876ebdb --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/InlineResponse2001Test.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PaginationMeta; +import com.telnyx.sdk.model.TexmlApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for InlineResponse2001 + */ +public class InlineResponse2001Test { + private final InlineResponse2001 model = new InlineResponse2001(); + + /** + * Model tests for InlineResponse2001 + */ + @Test + public void testInlineResponse2001() { + // TODO: test InlineResponse2001 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/InlineResponse200Test.java b/src/test/java/com/telnyx/sdk/model/InlineResponse200Test.java new file mode 100644 index 00000000..459c0522 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/InlineResponse200Test.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FaxApplication; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for InlineResponse200 + */ +public class InlineResponse200Test { + private final InlineResponse200 model = new InlineResponse200(); + + /** + * Model tests for InlineResponse200 + */ + @Test + public void testInlineResponse200() { + // TODO: test InlineResponse200 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/InlineResponse2011Test.java b/src/test/java/com/telnyx/sdk/model/InlineResponse2011Test.java new file mode 100644 index 00000000..f05275ac --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/InlineResponse2011Test.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.TexmlApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for InlineResponse2011 + */ +public class InlineResponse2011Test { + private final InlineResponse2011 model = new InlineResponse2011(); + + /** + * Model tests for InlineResponse2011 + */ + @Test + public void testInlineResponse2011() { + // TODO: test InlineResponse2011 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/InlineResponse201Test.java b/src/test/java/com/telnyx/sdk/model/InlineResponse201Test.java new file mode 100644 index 00000000..bc43cd7e --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/InlineResponse201Test.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FaxApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for InlineResponse201 + */ +public class InlineResponse201Test { + private final InlineResponse201 model = new InlineResponse201(); + + /** + * Model tests for InlineResponse201 + */ + @Test + public void testInlineResponse201() { + // TODO: test InlineResponse201 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/IpConnectionResponseTest.java b/src/test/java/com/telnyx/sdk/model/IpConnectionResponseTest.java new file mode 100644 index 00000000..b19a2156 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/IpConnectionResponseTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.IpConnection; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for IpConnectionResponse + */ +public class IpConnectionResponseTest { + private final IpConnectionResponse model = new IpConnectionResponse(); + + /** + * Model tests for IpConnectionResponse + */ + @Test + public void testIpConnectionResponse() { + // TODO: test IpConnectionResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/IpConnectionTest.java b/src/test/java/com/telnyx/sdk/model/IpConnectionTest.java new file mode 100644 index 00000000..338110b6 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/IpConnectionTest.java @@ -0,0 +1,211 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.InboundIp; +import com.telnyx.sdk.model.OutboundIp; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for IpConnection + */ +public class IpConnectionTest { + private final IpConnection model = new IpConnection(); + + /** + * Model tests for IpConnection + */ + @Test + public void testIpConnection() { + // TODO: test IpConnection + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'transportProtocol' + */ + @Test + public void transportProtocolTest() { + // TODO: test transportProtocol + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/IpResponseTest.java b/src/test/java/com/telnyx/sdk/model/IpResponseTest.java new file mode 100644 index 00000000..96974973 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/IpResponseTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Ip; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for IpResponse + */ +public class IpResponseTest { + private final IpResponse model = new IpResponse(); + + /** + * Model tests for IpResponse + */ + @Test + public void testIpResponse() { + // TODO: test IpResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/IpTest.java b/src/test/java/com/telnyx/sdk/model/IpTest.java new file mode 100644 index 00000000..d9cb16ab --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/IpTest.java @@ -0,0 +1,98 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Ip + */ +public class IpTest { + private final Ip model = new Ip(); + + /** + * Model tests for Ip + */ + @Test + public void testIp() { + // TODO: test Ip + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'ipAddress' + */ + @Test + public void ipAddressTest() { + // TODO: test ipAddress + } + + /** + * Test the property 'port' + */ + @Test + public void portTest() { + // TODO: test port + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListConnectionsResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListConnectionsResponseTest.java new file mode 100644 index 00000000..abf40c44 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListConnectionsResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Connection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListConnectionsResponse + */ +public class ListConnectionsResponseTest { + private final ListConnectionsResponse model = new ListConnectionsResponse(); + + /** + * Model tests for ListConnectionsResponse + */ + @Test + public void testListConnectionsResponse() { + // TODO: test ListConnectionsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListCredentialConnectionsResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListCredentialConnectionsResponseTest.java new file mode 100644 index 00000000..78643b3d --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListCredentialConnectionsResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.CredentialConnection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListCredentialConnectionsResponse + */ +public class ListCredentialConnectionsResponseTest { + private final ListCredentialConnectionsResponse model = new ListCredentialConnectionsResponse(); + + /** + * Model tests for ListCredentialConnectionsResponse + */ + @Test + public void testListCredentialConnectionsResponse() { + // TODO: test ListCredentialConnectionsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListFqdnConnectionsResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListFqdnConnectionsResponseTest.java new file mode 100644 index 00000000..34eb3f2c --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListFqdnConnectionsResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.FqdnConnection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListFqdnConnectionsResponse + */ +public class ListFqdnConnectionsResponseTest { + private final ListFqdnConnectionsResponse model = new ListFqdnConnectionsResponse(); + + /** + * Model tests for ListFqdnConnectionsResponse + */ + @Test + public void testListFqdnConnectionsResponse() { + // TODO: test ListFqdnConnectionsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListFqdnsResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListFqdnsResponseTest.java new file mode 100644 index 00000000..c83d7d2e --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListFqdnsResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Fqdn; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListFqdnsResponse + */ +public class ListFqdnsResponseTest { + private final ListFqdnsResponse model = new ListFqdnsResponse(); + + /** + * Model tests for ListFqdnsResponse + */ + @Test + public void testListFqdnsResponse() { + // TODO: test ListFqdnsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListIpConnectionsResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListIpConnectionsResponseTest.java new file mode 100644 index 00000000..7db1f5a4 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListIpConnectionsResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.IpConnection; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListIpConnectionsResponse + */ +public class ListIpConnectionsResponseTest { + private final ListIpConnectionsResponse model = new ListIpConnectionsResponse(); + + /** + * Model tests for ListIpConnectionsResponse + */ + @Test + public void testListIpConnectionsResponse() { + // TODO: test ListIpConnectionsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListIpsResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListIpsResponseTest.java new file mode 100644 index 00000000..052fc87c --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListIpsResponseTest.java @@ -0,0 +1,53 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Ip; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListIpsResponse + */ +public class ListIpsResponseTest { + private final ListIpsResponse model = new ListIpsResponse(); + + /** + * Model tests for ListIpsResponse + */ + @Test + public void testListIpsResponse() { + // TODO: test ListIpsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponseTest.java new file mode 100644 index 00000000..7081044a --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListOutboundVoiceProfilesResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundVoiceProfile; +import com.telnyx.sdk.model.PaginationMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListOutboundVoiceProfilesResponse + */ +public class ListOutboundVoiceProfilesResponseTest { + private final ListOutboundVoiceProfilesResponse model = new ListOutboundVoiceProfilesResponse(); + + /** + * Model tests for ListOutboundVoiceProfilesResponse + */ + @Test + public void testListOutboundVoiceProfilesResponse() { + // TODO: test ListOutboundVoiceProfilesResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponseTest.java b/src/test/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponseTest.java new file mode 100644 index 00000000..345b7594 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ListPhoneNumbersBackgroundJobsResponseTest.java @@ -0,0 +1,62 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PaginationMeta; +import com.telnyx.sdk.model.PhoneNumbersJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListPhoneNumbersBackgroundJobsResponse + */ +public class ListPhoneNumbersBackgroundJobsResponseTest { + private final ListPhoneNumbersBackgroundJobsResponse model = new ListPhoneNumbersBackgroundJobsResponse(); + + /** + * Model tests for ListPhoneNumbersBackgroundJobsResponse + */ + @Test + public void testListPhoneNumbersBackgroundJobsResponse() { + // TODO: test ListPhoneNumbersBackgroundJobsResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/OutboundCallRecordingTest.java b/src/test/java/com/telnyx/sdk/model/OutboundCallRecordingTest.java new file mode 100644 index 00000000..a54e25b2 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/OutboundCallRecordingTest.java @@ -0,0 +1,76 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OutboundCallRecording + */ +public class OutboundCallRecordingTest { + private final OutboundCallRecording model = new OutboundCallRecording(); + + /** + * Model tests for OutboundCallRecording + */ + @Test + public void testOutboundCallRecording() { + // TODO: test OutboundCallRecording + } + + /** + * Test the property 'callRecordingType' + */ + @Test + public void callRecordingTypeTest() { + // TODO: test callRecordingType + } + + /** + * Test the property 'callRecordingCallerPhoneNumbers' + */ + @Test + public void callRecordingCallerPhoneNumbersTest() { + // TODO: test callRecordingCallerPhoneNumbers + } + + /** + * Test the property 'callRecordingChannels' + */ + @Test + public void callRecordingChannelsTest() { + // TODO: test callRecordingChannels + } + + /** + * Test the property 'callRecordingFormat' + */ + @Test + public void callRecordingFormatTest() { + // TODO: test callRecordingFormat + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/OutboundIpTest.java b/src/test/java/com/telnyx/sdk/model/OutboundIpTest.java new file mode 100644 index 00000000..ebffcbba --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/OutboundIpTest.java @@ -0,0 +1,138 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OutboundIp + */ +public class OutboundIpTest { + private final OutboundIp model = new OutboundIp(); + + /** + * Model tests for OutboundIp + */ + @Test + public void testOutboundIp() { + // TODO: test OutboundIp + } + + /** + * Test the property 'callParkingEnabled' + */ + @Test + public void callParkingEnabledTest() { + // TODO: test callParkingEnabled + } + + /** + * Test the property 'aniOverride' + */ + @Test + public void aniOverrideTest() { + // TODO: test aniOverride + } + + /** + * Test the property 'aniOverrideType' + */ + @Test + public void aniOverrideTypeTest() { + // TODO: test aniOverrideType + } + + /** + * Test the property 'channelLimit' + */ + @Test + public void channelLimitTest() { + // TODO: test channelLimit + } + + /** + * Test the property 'instantRingbackEnabled' + */ + @Test + public void instantRingbackEnabledTest() { + // TODO: test instantRingbackEnabled + } + + /** + * Test the property 'generateRingbackTone' + */ + @Test + public void generateRingbackToneTest() { + // TODO: test generateRingbackTone + } + + /** + * Test the property 'localization' + */ + @Test + public void localizationTest() { + // TODO: test localization + } + + /** + * Test the property 't38ReinviteSource' + */ + @Test + public void t38ReinviteSourceTest() { + // TODO: test t38ReinviteSource + } + + /** + * Test the property 'techPrefix' + */ + @Test + public void techPrefixTest() { + // TODO: test techPrefix + } + + /** + * Test the property 'ipAuthenticationMethod' + */ + @Test + public void ipAuthenticationMethodTest() { + // TODO: test ipAuthenticationMethod + } + + /** + * Test the property 'ipAuthenticationToken' + */ + @Test + public void ipAuthenticationTokenTest() { + // TODO: test ipAuthenticationToken + } + + /** + * Test the property 'outboundVoiceProfileId' + */ + @Test + public void outboundVoiceProfileIdTest() { + // TODO: test outboundVoiceProfileId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileResponseTest.java b/src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileResponseTest.java new file mode 100644 index 00000000..a6cc9c6e --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileResponseTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundVoiceProfile; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OutboundVoiceProfileResponse + */ +public class OutboundVoiceProfileResponseTest { + private final OutboundVoiceProfileResponse model = new OutboundVoiceProfileResponse(); + + /** + * Model tests for OutboundVoiceProfileResponse + */ + @Test + public void testOutboundVoiceProfileResponse() { + // TODO: test OutboundVoiceProfileResponse + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileTest.java b/src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileTest.java new file mode 100644 index 00000000..52345d33 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/OutboundVoiceProfileTest.java @@ -0,0 +1,197 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundCallRecording; +import com.telnyx.sdk.model.ServicePlan; +import com.telnyx.sdk.model.TrafficType; +import com.telnyx.sdk.model.UsagePaymentMethod; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OutboundVoiceProfile + */ +public class OutboundVoiceProfileTest { + private final OutboundVoiceProfile model = new OutboundVoiceProfile(); + + /** + * Model tests for OutboundVoiceProfile + */ + @Test + public void testOutboundVoiceProfile() { + // TODO: test OutboundVoiceProfile + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'connectionsCount' + */ + @Test + public void connectionsCountTest() { + // TODO: test connectionsCount + } + + /** + * Test the property 'trafficType' + */ + @Test + public void trafficTypeTest() { + // TODO: test trafficType + } + + /** + * Test the property 'servicePlan' + */ + @Test + public void servicePlanTest() { + // TODO: test servicePlan + } + + /** + * Test the property 'concurrentCallLimit' + */ + @Test + public void concurrentCallLimitTest() { + // TODO: test concurrentCallLimit + } + + /** + * Test the property 'enabled' + */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'usagePaymentMethod' + */ + @Test + public void usagePaymentMethodTest() { + // TODO: test usagePaymentMethod + } + + /** + * Test the property 'whitelistedDestinations' + */ + @Test + public void whitelistedDestinationsTest() { + // TODO: test whitelistedDestinations + } + + /** + * Test the property 'maxDestinationRate' + */ + @Test + public void maxDestinationRateTest() { + // TODO: test maxDestinationRate + } + + /** + * Test the property 'dailySpendLimit' + */ + @Test + public void dailySpendLimitTest() { + // TODO: test dailySpendLimit + } + + /** + * Test the property 'dailySpendLimitEnabled' + */ + @Test + public void dailySpendLimitEnabledTest() { + // TODO: test dailySpendLimitEnabled + } + + /** + * Test the property 'callRecording' + */ + @Test + public void callRecordingTest() { + // TODO: test callRecording + } + + /** + * Test the property 'billingGroupId' + */ + @Test + public void billingGroupIdTest() { + // TODO: test billingGroupId + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergencyTest.java b/src/test/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergencyTest.java new file mode 100644 index 00000000..ff221bc2 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PhoneNumbersEnableEmergencyTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PhoneNumbersJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PhoneNumbersEnableEmergency + */ +public class PhoneNumbersEnableEmergencyTest { + private final PhoneNumbersEnableEmergency model = new PhoneNumbersEnableEmergency(); + + /** + * Model tests for PhoneNumbersEnableEmergency + */ + @Test + public void testPhoneNumbersEnableEmergency() { + // TODO: test PhoneNumbersEnableEmergency + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequestTest.java b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequestTest.java new file mode 100644 index 00000000..610281bf --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersRequestTest.java @@ -0,0 +1,52 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PhoneNumbersJobDeletePhoneNumbersRequest + */ +public class PhoneNumbersJobDeletePhoneNumbersRequestTest { + private final PhoneNumbersJobDeletePhoneNumbersRequest model = new PhoneNumbersJobDeletePhoneNumbersRequest(); + + /** + * Model tests for PhoneNumbersJobDeletePhoneNumbersRequest + */ + @Test + public void testPhoneNumbersJobDeletePhoneNumbersRequest() { + // TODO: test PhoneNumbersJobDeletePhoneNumbersRequest + } + + /** + * Test the property 'phoneNumbers' + */ + @Test + public void phoneNumbersTest() { + // TODO: test phoneNumbers + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersTest.java b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersTest.java new file mode 100644 index 00000000..c0e06388 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobDeletePhoneNumbersTest.java @@ -0,0 +1,51 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.PhoneNumbersJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PhoneNumbersJobDeletePhoneNumbers + */ +public class PhoneNumbersJobDeletePhoneNumbersTest { + private final PhoneNumbersJobDeletePhoneNumbers model = new PhoneNumbersJobDeletePhoneNumbers(); + + /** + * Model tests for PhoneNumbersJobDeletePhoneNumbers + */ + @Test + public void testPhoneNumbersJobDeletePhoneNumbers() { + // TODO: test PhoneNumbersJobDeletePhoneNumbers + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperationTest.java b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperationTest.java new file mode 100644 index 00000000..b58233a1 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobFailedOperationTest.java @@ -0,0 +1,69 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PhoneNumbersJobFailedOperation + */ +public class PhoneNumbersJobFailedOperationTest { + private final PhoneNumbersJobFailedOperation model = new PhoneNumbersJobFailedOperation(); + + /** + * Model tests for PhoneNumbersJobFailedOperation + */ + @Test + public void testPhoneNumbersJobFailedOperation() { + // TODO: test PhoneNumbersJobFailedOperation + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperationTest.java b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperationTest.java new file mode 100644 index 00000000..2a7706e9 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobSuccessfulOperationTest.java @@ -0,0 +1,58 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PhoneNumbersJobSuccessfulOperation + */ +public class PhoneNumbersJobSuccessfulOperationTest { + private final PhoneNumbersJobSuccessfulOperation model = new PhoneNumbersJobSuccessfulOperation(); + + /** + * Model tests for PhoneNumbersJobSuccessfulOperation + */ + @Test + public void testPhoneNumbersJobSuccessfulOperation() { + // TODO: test PhoneNumbersJobSuccessfulOperation + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + // TODO: test phoneNumber + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobTest.java b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobTest.java new file mode 100644 index 00000000..98c0af88 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobTest.java @@ -0,0 +1,50 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PhoneNumbersJob + */ +public class PhoneNumbersJobTest { + private final PhoneNumbersJob model = new PhoneNumbersJob(); + + /** + * Model tests for PhoneNumbersJob + */ + @Test + public void testPhoneNumbersJob() { + // TODO: test PhoneNumbersJob + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequestTest.java b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequestTest.java new file mode 100644 index 00000000..41ac2fbd --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/PhoneNumbersJobUpdateEmergencySettingsRequestTest.java @@ -0,0 +1,68 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PhoneNumbersJobUpdateEmergencySettingsRequest + */ +public class PhoneNumbersJobUpdateEmergencySettingsRequestTest { + private final PhoneNumbersJobUpdateEmergencySettingsRequest model = new PhoneNumbersJobUpdateEmergencySettingsRequest(); + + /** + * Model tests for PhoneNumbersJobUpdateEmergencySettingsRequest + */ + @Test + public void testPhoneNumbersJobUpdateEmergencySettingsRequest() { + // TODO: test PhoneNumbersJobUpdateEmergencySettingsRequest + } + + /** + * Test the property 'phoneNumbers' + */ + @Test + public void phoneNumbersTest() { + // TODO: test phoneNumbers + } + + /** + * Test the property 'emergencyEnabled' + */ + @Test + public void emergencyEnabledTest() { + // TODO: test emergencyEnabled + } + + /** + * Test the property 'emergencyAddressId' + */ + @Test + public void emergencyAddressIdTest() { + // TODO: test emergencyAddressId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/ServicePlanTest.java b/src/test/java/com/telnyx/sdk/model/ServicePlanTest.java new file mode 100644 index 00000000..69a86cc8 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/ServicePlanTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ServicePlan + */ +public class ServicePlanTest { + /** + * Model tests for ServicePlan + */ + @Test + public void testServicePlan() { + // TODO: test ServicePlan + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/TexmlApplicationTest.java b/src/test/java/com/telnyx/sdk/model/TexmlApplicationTest.java new file mode 100644 index 00000000..1be86a0c --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/TexmlApplicationTest.java @@ -0,0 +1,182 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestInbound; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestOutbound; +import com.telnyx.sdk.model.DtmfType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for TexmlApplication + */ +public class TexmlApplicationTest { + private final TexmlApplication model = new TexmlApplication(); + + /** + * Model tests for TexmlApplication + */ + @Test + public void testTexmlApplication() { + // TODO: test TexmlApplication + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'recordType' + */ + @Test + public void recordTypeTest() { + // TODO: test recordType + } + + /** + * Test the property 'friendlyName' + */ + @Test + public void friendlyNameTest() { + // TODO: test friendlyName + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'firstCommandTimeout' + */ + @Test + public void firstCommandTimeoutTest() { + // TODO: test firstCommandTimeout + } + + /** + * Test the property 'firstCommandTimeoutSecs' + */ + @Test + public void firstCommandTimeoutSecsTest() { + // TODO: test firstCommandTimeoutSecs + } + + /** + * Test the property 'voiceUrl' + */ + @Test + public void voiceUrlTest() { + // TODO: test voiceUrl + } + + /** + * Test the property 'voiceFallbackUrl' + */ + @Test + public void voiceFallbackUrlTest() { + // TODO: test voiceFallbackUrl + } + + /** + * Test the property 'voiceMethod' + */ + @Test + public void voiceMethodTest() { + // TODO: test voiceMethod + } + + /** + * Test the property 'statusCallback' + */ + @Test + public void statusCallbackTest() { + // TODO: test statusCallback + } + + /** + * Test the property 'statusCallbackMethod' + */ + @Test + public void statusCallbackMethodTest() { + // TODO: test statusCallbackMethod + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/TrafficTypeTest.java b/src/test/java/com/telnyx/sdk/model/TrafficTypeTest.java new file mode 100644 index 00000000..bec75a62 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/TrafficTypeTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for TrafficType + */ +public class TrafficTypeTest { + /** + * Model tests for TrafficType + */ + @Test + public void testTrafficType() { + // TODO: test TrafficType + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequestTest.java new file mode 100644 index 00000000..e7336e38 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateCredentialConnectionRequestTest.java @@ -0,0 +1,195 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.CredentialInbound; +import com.telnyx.sdk.model.CredentialOutbound; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateCredentialConnectionRequest + */ +public class UpdateCredentialConnectionRequestTest { + private final UpdateCredentialConnectionRequest model = new UpdateCredentialConnectionRequest(); + + /** + * Model tests for UpdateCredentialConnectionRequest + */ + @Test + public void testUpdateCredentialConnectionRequest() { + // TODO: test UpdateCredentialConnectionRequest + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'userName' + */ + @Test + public void userNameTest() { + // TODO: test userName + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'sipUriCallingPreference' + */ + @Test + public void sipUriCallingPreferenceTest() { + // TODO: test sipUriCallingPreference + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateFaxApplicationRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateFaxApplicationRequestTest.java new file mode 100644 index 00000000..f6689d91 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateFaxApplicationRequestTest.java @@ -0,0 +1,112 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateFaxApplicationRequestInbound; +import com.telnyx.sdk.model.CreateFaxApplicationRequestOutbound; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateFaxApplicationRequest + */ +public class UpdateFaxApplicationRequestTest { + private final UpdateFaxApplicationRequest model = new UpdateFaxApplicationRequest(); + + /** + * Model tests for UpdateFaxApplicationRequest + */ + @Test + public void testUpdateFaxApplicationRequest() { + // TODO: test UpdateFaxApplicationRequest + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequestTest.java new file mode 100644 index 00000000..0a1dfc0d --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateFqdnConnectionRequestTest.java @@ -0,0 +1,171 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.FqdnConnectionTransportProtocol; +import com.telnyx.sdk.model.InboundFqdn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateFqdnConnectionRequest + */ +public class UpdateFqdnConnectionRequestTest { + private final UpdateFqdnConnectionRequest model = new UpdateFqdnConnectionRequest(); + + /** + * Model tests for UpdateFqdnConnectionRequest + */ + @Test + public void testUpdateFqdnConnectionRequest() { + // TODO: test UpdateFqdnConnectionRequest + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'transportProtocol' + */ + @Test + public void transportProtocolTest() { + // TODO: test transportProtocol + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateFqdnRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateFqdnRequestTest.java new file mode 100644 index 00000000..766d62c4 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateFqdnRequestTest.java @@ -0,0 +1,77 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateFqdnRequest + */ +public class UpdateFqdnRequestTest { + private final UpdateFqdnRequest model = new UpdateFqdnRequest(); + + /** + * Model tests for UpdateFqdnRequest + */ + @Test + public void testUpdateFqdnRequest() { + // TODO: test UpdateFqdnRequest + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'fqdn' + */ + @Test + public void fqdnTest() { + // TODO: test fqdn + } + + /** + * Test the property 'port' + */ + @Test + public void portTest() { + // TODO: test port + } + + /** + * Test the property 'dnsRecordType' + */ + @Test + public void dnsRecordTypeTest() { + // TODO: test dnsRecordType + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateIpConnectionRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateIpConnectionRequestTest.java new file mode 100644 index 00000000..f24c5cdf --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateIpConnectionRequestTest.java @@ -0,0 +1,179 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.ConnectionRtcpSettings; +import com.telnyx.sdk.model.DtmfType; +import com.telnyx.sdk.model.EncryptedMedia; +import com.telnyx.sdk.model.InboundIp; +import com.telnyx.sdk.model.OutboundIp; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateIpConnectionRequest + */ +public class UpdateIpConnectionRequestTest { + private final UpdateIpConnectionRequest model = new UpdateIpConnectionRequest(); + + /** + * Model tests for UpdateIpConnectionRequest + */ + @Test + public void testUpdateIpConnectionRequest() { + // TODO: test UpdateIpConnectionRequest + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'connectionName' + */ + @Test + public void connectionNameTest() { + // TODO: test connectionName + } + + /** + * Test the property 'transportProtocol' + */ + @Test + public void transportProtocolTest() { + // TODO: test transportProtocol + } + + /** + * Test the property 'defaultOnHoldComfortNoiseEnabled' + */ + @Test + public void defaultOnHoldComfortNoiseEnabledTest() { + // TODO: test defaultOnHoldComfortNoiseEnabled + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'encodeContactHeaderEnabled' + */ + @Test + public void encodeContactHeaderEnabledTest() { + // TODO: test encodeContactHeaderEnabled + } + + /** + * Test the property 'encryptedMedia' + */ + @Test + public void encryptedMediaTest() { + // TODO: test encryptedMedia + } + + /** + * Test the property 'onnetT38PassthroughEnabled' + */ + @Test + public void onnetT38PassthroughEnabledTest() { + // TODO: test onnetT38PassthroughEnabled + } + + /** + * Test the property 'webhookEventUrl' + */ + @Test + public void webhookEventUrlTest() { + // TODO: test webhookEventUrl + } + + /** + * Test the property 'webhookEventFailoverUrl' + */ + @Test + public void webhookEventFailoverUrlTest() { + // TODO: test webhookEventFailoverUrl + } + + /** + * Test the property 'webhookApiVersion' + */ + @Test + public void webhookApiVersionTest() { + // TODO: test webhookApiVersion + } + + /** + * Test the property 'webhookTimeoutSecs' + */ + @Test + public void webhookTimeoutSecsTest() { + // TODO: test webhookTimeoutSecs + } + + /** + * Test the property 'rtcpSettings' + */ + @Test + public void rtcpSettingsTest() { + // TODO: test rtcpSettings + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateIpRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateIpRequestTest.java new file mode 100644 index 00000000..e8bdd390 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateIpRequestTest.java @@ -0,0 +1,66 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateIpRequest + */ +public class UpdateIpRequestTest { + private final UpdateIpRequest model = new UpdateIpRequest(); + + /** + * Model tests for UpdateIpRequest + */ + @Test + public void testUpdateIpRequest() { + // TODO: test UpdateIpRequest + } + + /** + * Test the property 'connectionId' + */ + @Test + public void connectionIdTest() { + // TODO: test connectionId + } + + /** + * Test the property 'ipAddress' + */ + @Test + public void ipAddressTest() { + // TODO: test ipAddress + } + + /** + * Test the property 'port' + */ + @Test + public void portTest() { + // TODO: test port + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequestTest.java new file mode 100644 index 00000000..71376ed9 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateOutboundVoiceProfileRequestTest.java @@ -0,0 +1,157 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.OutboundCallRecording; +import com.telnyx.sdk.model.ServicePlan; +import com.telnyx.sdk.model.TrafficType; +import com.telnyx.sdk.model.UsagePaymentMethod; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateOutboundVoiceProfileRequest + */ +public class UpdateOutboundVoiceProfileRequestTest { + private final UpdateOutboundVoiceProfileRequest model = new UpdateOutboundVoiceProfileRequest(); + + /** + * Model tests for UpdateOutboundVoiceProfileRequest + */ + @Test + public void testUpdateOutboundVoiceProfileRequest() { + // TODO: test UpdateOutboundVoiceProfileRequest + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'trafficType' + */ + @Test + public void trafficTypeTest() { + // TODO: test trafficType + } + + /** + * Test the property 'servicePlan' + */ + @Test + public void servicePlanTest() { + // TODO: test servicePlan + } + + /** + * Test the property 'concurrentCallLimit' + */ + @Test + public void concurrentCallLimitTest() { + // TODO: test concurrentCallLimit + } + + /** + * Test the property 'enabled' + */ + @Test + public void enabledTest() { + // TODO: test enabled + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'usagePaymentMethod' + */ + @Test + public void usagePaymentMethodTest() { + // TODO: test usagePaymentMethod + } + + /** + * Test the property 'whitelistedDestinations' + */ + @Test + public void whitelistedDestinationsTest() { + // TODO: test whitelistedDestinations + } + + /** + * Test the property 'maxDestinationRate' + */ + @Test + public void maxDestinationRateTest() { + // TODO: test maxDestinationRate + } + + /** + * Test the property 'dailySpendLimit' + */ + @Test + public void dailySpendLimitTest() { + // TODO: test dailySpendLimit + } + + /** + * Test the property 'dailySpendLimitEnabled' + */ + @Test + public void dailySpendLimitEnabledTest() { + // TODO: test dailySpendLimitEnabled + } + + /** + * Test the property 'callRecording' + */ + @Test + public void callRecordingTest() { + // TODO: test callRecording + } + + /** + * Test the property 'billingGroupId' + */ + @Test + public void billingGroupIdTest() { + // TODO: test billingGroupId + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequestTest.java b/src/test/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequestTest.java new file mode 100644 index 00000000..94e96138 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UpdateTexmlApplicationRequestTest.java @@ -0,0 +1,150 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.telnyx.sdk.model.AnchorsiteOverride; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestInbound; +import com.telnyx.sdk.model.CreateTexmlApplicationRequestOutbound; +import com.telnyx.sdk.model.DtmfType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateTexmlApplicationRequest + */ +public class UpdateTexmlApplicationRequestTest { + private final UpdateTexmlApplicationRequest model = new UpdateTexmlApplicationRequest(); + + /** + * Model tests for UpdateTexmlApplicationRequest + */ + @Test + public void testUpdateTexmlApplicationRequest() { + // TODO: test UpdateTexmlApplicationRequest + } + + /** + * Test the property 'friendlyName' + */ + @Test + public void friendlyNameTest() { + // TODO: test friendlyName + } + + /** + * Test the property 'active' + */ + @Test + public void activeTest() { + // TODO: test active + } + + /** + * Test the property 'anchorsiteOverride' + */ + @Test + public void anchorsiteOverrideTest() { + // TODO: test anchorsiteOverride + } + + /** + * Test the property 'dtmfType' + */ + @Test + public void dtmfTypeTest() { + // TODO: test dtmfType + } + + /** + * Test the property 'firstCommandTimeout' + */ + @Test + public void firstCommandTimeoutTest() { + // TODO: test firstCommandTimeout + } + + /** + * Test the property 'firstCommandTimeoutSecs' + */ + @Test + public void firstCommandTimeoutSecsTest() { + // TODO: test firstCommandTimeoutSecs + } + + /** + * Test the property 'voiceUrl' + */ + @Test + public void voiceUrlTest() { + // TODO: test voiceUrl + } + + /** + * Test the property 'voiceFallbackUrl' + */ + @Test + public void voiceFallbackUrlTest() { + // TODO: test voiceFallbackUrl + } + + /** + * Test the property 'voiceMethod' + */ + @Test + public void voiceMethodTest() { + // TODO: test voiceMethod + } + + /** + * Test the property 'statusCallback' + */ + @Test + public void statusCallbackTest() { + // TODO: test statusCallback + } + + /** + * Test the property 'statusCallbackMethod' + */ + @Test + public void statusCallbackMethodTest() { + // TODO: test statusCallbackMethod + } + + /** + * Test the property 'inbound' + */ + @Test + public void inboundTest() { + // TODO: test inbound + } + + /** + * Test the property 'outbound' + */ + @Test + public void outboundTest() { + // TODO: test outbound + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/UsagePaymentMethodTest.java b/src/test/java/com/telnyx/sdk/model/UsagePaymentMethodTest.java new file mode 100644 index 00000000..4b5ad106 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/UsagePaymentMethodTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UsagePaymentMethod + */ +public class UsagePaymentMethodTest { + /** + * Model tests for UsagePaymentMethod + */ + @Test + public void testUsagePaymentMethod() { + // TODO: test UsagePaymentMethod + } + +} diff --git a/src/test/java/com/telnyx/sdk/model/WebhookApiVersionTest.java b/src/test/java/com/telnyx/sdk/model/WebhookApiVersionTest.java new file mode 100644 index 00000000..ee16bc91 --- /dev/null +++ b/src/test/java/com/telnyx/sdk/model/WebhookApiVersionTest.java @@ -0,0 +1,34 @@ +/* + * Telnyx API + * SIP trunking, SMS, MMS, Call Control and Telephony Data Services. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: support@telnyx.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.telnyx.sdk.model; + +import io.swagger.annotations.ApiModel; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for WebhookApiVersion + */ +public class WebhookApiVersionTest { + /** + * Model tests for WebhookApiVersion + */ + @Test + public void testWebhookApiVersion() { + // TODO: test WebhookApiVersion + } + +}