diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 28dee59a..ac015267 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -126,7 +126,7 @@ jobs:
- name: Test
run: |-
npm install -g @stoplight/prism-cli
- prism mock ./bandwidth.yml & pytest -v ./test/unit/models
+ prism mock ./bandwidth.yml & pytest -v ./test/unit
- name: Deploy to PYPI
run: |
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index ac3585b4..a641d920 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -26,8 +26,10 @@ bandwidth/models/call_recording_metadata.py
bandwidth/models/call_state.py
bandwidth/models/call_state_enum.py
bandwidth/models/call_transcription.py
+bandwidth/models/call_transcription_detected_language_enum.py
bandwidth/models/call_transcription_metadata.py
bandwidth/models/call_transcription_response.py
+bandwidth/models/call_transcription_track_enum.py
bandwidth/models/callback_method_enum.py
bandwidth/models/code_request.py
bandwidth/models/conference.py
@@ -119,8 +121,10 @@ docs/CallRecordingMetadata.md
docs/CallState.md
docs/CallStateEnum.md
docs/CallTranscription.md
+docs/CallTranscriptionDetectedLanguageEnum.md
docs/CallTranscriptionMetadata.md
docs/CallTranscriptionResponse.md
+docs/CallTranscriptionTrackEnum.md
docs/CallbackMethodEnum.md
docs/CallsApi.md
docs/CodeRequest.md
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
index 93c8ddab..1985849f 100644
--- a/.openapi-generator/VERSION
+++ b/.openapi-generator/VERSION
@@ -1 +1 @@
-7.6.0
+7.7.0
diff --git a/README.md b/README.md
index e18a6e29..1de2f714 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
- API version: 1.0.0
- Package version: 15.0.0
-- Generator version: 7.6.0
+- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://dev.bandwidth.com](https://dev.bandwidth.com)
@@ -149,8 +149,10 @@ Class | Method | HTTP request | Description
- [CallState](docs/CallState.md)
- [CallStateEnum](docs/CallStateEnum.md)
- [CallTranscription](docs/CallTranscription.md)
+ - [CallTranscriptionDetectedLanguageEnum](docs/CallTranscriptionDetectedLanguageEnum.md)
- [CallTranscriptionMetadata](docs/CallTranscriptionMetadata.md)
- [CallTranscriptionResponse](docs/CallTranscriptionResponse.md)
+ - [CallTranscriptionTrackEnum](docs/CallTranscriptionTrackEnum.md)
- [CallbackMethodEnum](docs/CallbackMethodEnum.md)
- [CodeRequest](docs/CodeRequest.md)
- [Conference](docs/Conference.md)
diff --git a/bandwidth.yml b/bandwidth.yml
index 61ddd17d..f3e5be8e 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -2131,6 +2131,21 @@ components:
and will include its result.
example: async
+ callTranscriptionDetectedLanguageEnum:
+ type: string
+ enum:
+ - en-US
+ - es-US
+ - fr-FR
+ description: The detected language for this transcription.
+ example: en-US
+ callTranscriptionTrackEnum:
+ type: string
+ enum:
+ - inbound
+ - outbound
+ description: Which `track` this transcription is derived from.
+ example: inbound
createCall:
type: object
required:
@@ -3281,27 +3296,16 @@ components:
example:
- detectedLanguage: en-US
track: inbound
- text: Hello World! This is an example.
+ transcript: Hello World! This is an example.
confidence: 0.9
callTranscription:
type: object
properties:
detectedLanguage:
- type: string
- enum:
- - en-US
- - es-US
- - fr-FR
- description: The detected language for this transcription.
- example: en-US
+ $ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum'
track:
- type: string
- enum:
- - inbound
- - outbound
- description: Which `track` this transcription is derived from.
- example: inbound
- text:
+ $ref: '#/components/schemas/callTranscriptionTrackEnum'
+ transcript:
type: string
description: The transcription itself.
example: Hello World! This is an example.
@@ -4241,7 +4245,7 @@ components:
description: >-
The phone number used as the to field of the B-leg call, in E.164 format
(e.g. +15555555555).
- example: "+15555555555"
+ example: '+15555555555'
mediaUrl:
nullable: true
type: string
@@ -5788,7 +5792,7 @@ components:
answerMethod: POST
answerUrl: https://myServer.example/bandwidth/webhooks/answer
answerFallbackMethod: POST
- answerFallbackUrl: "https://myServer.example/bandwidth/webhooks/answerFallback"
+ answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback
disconnectMethod: POST
disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect
username: mySecretUsername
diff --git a/bandwidth/__init__.py b/bandwidth/__init__.py
index 583a0fc6..835b28b0 100644
--- a/bandwidth/__init__.py
+++ b/bandwidth/__init__.py
@@ -49,8 +49,10 @@
from bandwidth.models.call_state import CallState
from bandwidth.models.call_state_enum import CallStateEnum
from bandwidth.models.call_transcription import CallTranscription
+from bandwidth.models.call_transcription_detected_language_enum import CallTranscriptionDetectedLanguageEnum
from bandwidth.models.call_transcription_metadata import CallTranscriptionMetadata
from bandwidth.models.call_transcription_response import CallTranscriptionResponse
+from bandwidth.models.call_transcription_track_enum import CallTranscriptionTrackEnum
from bandwidth.models.callback_method_enum import CallbackMethodEnum
from bandwidth.models.code_request import CodeRequest
from bandwidth.models.conference import Conference
diff --git a/bandwidth/api/calls_api.py b/bandwidth/api/calls_api.py
index 612587f8..1d1a13c4 100644
--- a/bandwidth/api/calls_api.py
+++ b/bandwidth/api/calls_api.py
@@ -313,11 +313,12 @@ def _create_call_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -626,11 +627,12 @@ def _get_call_state_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1030,11 +1032,12 @@ def _list_calls_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1348,11 +1351,12 @@ def _update_call_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -1679,11 +1683,12 @@ def _update_call_bxml_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
diff --git a/bandwidth/api/conferences_api.py b/bandwidth/api/conferences_api.py
index bead27d3..1e8177f1 100644
--- a/bandwidth/api/conferences_api.py
+++ b/bandwidth/api/conferences_api.py
@@ -329,13 +329,14 @@ def _download_conference_recording_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'audio/vnd.wave',
- 'audio/mpeg',
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'audio/vnd.wave',
+ 'audio/mpeg',
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -631,11 +632,12 @@ def _get_conference_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -946,11 +948,12 @@ def _get_conference_member_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1261,11 +1264,12 @@ def _get_conference_recording_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1561,11 +1565,12 @@ def _list_conference_recordings_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1931,11 +1936,12 @@ def _list_conferences_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -2246,11 +2252,12 @@ def _update_conference_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -2574,11 +2581,12 @@ def _update_conference_bxml_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -2917,11 +2925,12 @@ def _update_conference_member_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
diff --git a/bandwidth/api/media_api.py b/bandwidth/api/media_api.py
index c7f0c7d1..8258fce9 100644
--- a/bandwidth/api/media_api.py
+++ b/bandwidth/api/media_api.py
@@ -310,11 +310,12 @@ def _delete_media_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -610,12 +611,13 @@ def _get_media_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/octet-stream',
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/octet-stream',
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -911,11 +913,12 @@ def _list_media_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1261,11 +1264,12 @@ def _upload_media_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
diff --git a/bandwidth/api/messages_api.py b/bandwidth/api/messages_api.py
index 20984f9d..93af0c06 100644
--- a/bandwidth/api/messages_api.py
+++ b/bandwidth/api/messages_api.py
@@ -315,11 +315,12 @@ def _create_message_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -865,11 +866,12 @@ def _list_messages_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
diff --git a/bandwidth/api/mfa_api.py b/bandwidth/api/mfa_api.py
index a444ab40..562fc14f 100644
--- a/bandwidth/api/mfa_api.py
+++ b/bandwidth/api/mfa_api.py
@@ -301,11 +301,12 @@ def _generate_messaging_code_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -602,11 +603,12 @@ def _generate_voice_code_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -906,11 +908,12 @@ def _verify_code_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
diff --git a/bandwidth/api/phone_number_lookup_api.py b/bandwidth/api/phone_number_lookup_api.py
index 5867ce58..d380a255 100644
--- a/bandwidth/api/phone_number_lookup_api.py
+++ b/bandwidth/api/phone_number_lookup_api.py
@@ -305,11 +305,12 @@ def _create_lookup_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -612,11 +613,12 @@ def _get_lookup_status_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
diff --git a/bandwidth/api/recordings_api.py b/bandwidth/api/recordings_api.py
index 7276e434..8ec8dfc8 100644
--- a/bandwidth/api/recordings_api.py
+++ b/bandwidth/api/recordings_api.py
@@ -328,11 +328,12 @@ def _delete_recording_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -643,11 +644,12 @@ def _delete_recording_media_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -958,11 +960,12 @@ def _delete_recording_transcription_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1273,13 +1276,14 @@ def _download_call_recording_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'audio/vnd.wave',
- 'audio/mpeg',
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'audio/vnd.wave',
+ 'audio/mpeg',
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1590,11 +1594,12 @@ def _get_call_recording_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -1905,11 +1910,12 @@ def _get_recording_transcription_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -2258,11 +2264,12 @@ def _list_account_call_recordings_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -2558,11 +2565,12 @@ def _list_call_recordings_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -2888,11 +2896,12 @@ def _transcribe_call_recording_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
@@ -3216,11 +3225,12 @@ def _update_call_recording_state_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# set the HTTP header `Content-Type`
if _content_type:
diff --git a/bandwidth/api/statistics_api.py b/bandwidth/api/statistics_api.py
index 56b4455e..6fe3af8f 100644
--- a/bandwidth/api/statistics_api.py
+++ b/bandwidth/api/statistics_api.py
@@ -294,11 +294,12 @@ def _get_statistics_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
diff --git a/bandwidth/api/transcriptions_api.py b/bandwidth/api/transcriptions_api.py
index 4b0dbea3..c1f0bf5e 100644
--- a/bandwidth/api/transcriptions_api.py
+++ b/bandwidth/api/transcriptions_api.py
@@ -326,11 +326,12 @@ def _delete_real_time_transcription_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -641,11 +642,12 @@ def _get_real_time_transcription_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
@@ -941,11 +943,12 @@ def _list_real_time_transcriptions_serialize(
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
# authentication setting
diff --git a/bandwidth/api_client.py b/bandwidth/api_client.py
index 2a810bed..e2054dad 100644
--- a/bandwidth/api_client.py
+++ b/bandwidth/api_client.py
@@ -228,7 +228,7 @@ def param_serialize(
body = self.sanitize_for_serialization(body)
# request url
- if _host is None:
+ if _host is None or self.configuration.ignore_operation_servers:
url = self.configuration.host + resource_path
else:
# use server/host defined in path or operation instead
@@ -315,10 +315,7 @@ def response_deserialize(
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
encoding = match.group(1) if match else "utf-8"
response_text = response_data.data.decode(encoding)
- if response_type in ["bytearray", "str"]:
- return_data = self.__deserialize_primitive(response_text, response_type)
- else:
- return_data = self.deserialize(response_text, response_type)
+ return_data = self.deserialize(response_text, response_type, content_type)
finally:
if not 200 <= response_data.status <= 299:
raise ApiException.from_response(
@@ -386,21 +383,35 @@ def sanitize_for_serialization(self, obj):
for key, val in obj_dict.items()
}
- def deserialize(self, response_text, response_type):
+ def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
"""Deserializes response into an object.
:param response: RESTResponse object to be deserialized.
:param response_type: class literal for
deserialized object, or string of class name.
+ :param content_type: content type of response.
:return: deserialized object.
"""
# fetch data from response object
- try:
- data = json.loads(response_text)
- except ValueError:
+ if content_type is None:
+ try:
+ data = json.loads(response_text)
+ except ValueError:
+ data = response_text
+ elif content_type.startswith("application/json"):
+ if response_text == "":
+ data = ""
+ else:
+ data = json.loads(response_text)
+ elif content_type.startswith("text/plain"):
data = response_text
+ else:
+ raise ApiException(
+ status=0,
+ reason="Unsupported content type: {0}".format(content_type)
+ )
return self.__deserialize(data, response_type)
diff --git a/bandwidth/configuration.py b/bandwidth/configuration.py
index 51b5f408..fd84071e 100644
--- a/bandwidth/configuration.py
+++ b/bandwidth/configuration.py
@@ -33,6 +33,9 @@ class Configuration:
"""This class contains various settings of the API client.
:param host: Base url.
+ :param ignore_operation_servers
+ Boolean to ignore operation servers for the API client.
+ Config will use `host` as the base url regardless of the operation servers.
:param api_key: Dict to store API key(s).
Each entry in the dict specifies an API key.
The dict key is the name of the security scheme in the OAS specification.
@@ -55,6 +58,7 @@ class Configuration:
values before.
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
in PEM format.
+ :param retries: Number of retries for API requests.
:Example:
@@ -83,7 +87,11 @@ def __init__(self, host=None,
access_token=None,
server_index=None, server_variables=None,
server_operation_index=None, server_operation_variables=None,
+ ignore_operation_servers=False,
ssl_ca_cert=None,
+ retries=None,
+ *,
+ debug: Optional[bool] = None
) -> None:
"""Constructor
"""
@@ -98,6 +106,9 @@ def __init__(self, host=None,
self.server_operation_variables = server_operation_variables or {}
"""Default server variables
"""
+ self.ignore_operation_servers = ignore_operation_servers
+ """Ignore operation servers
+ """
self.temp_folder_path = None
"""Temp file folder for downloading files
"""
@@ -141,7 +152,10 @@ def __init__(self, host=None,
self.logger_file = None
"""Debug file location
"""
- self.debug = False
+ if debug is not None:
+ self.debug = debug
+ else:
+ self.__debug = False
"""Debug switch
"""
@@ -184,7 +198,7 @@ def __init__(self, host=None,
self.safe_chars_for_path_param = ''
"""Safe chars for path_param
"""
- self.retries = None
+ self.retries = retries
"""Adding retries to override urllib3 default value 3
"""
# Enable client side validation
diff --git a/bandwidth/models/__init__.py b/bandwidth/models/__init__.py
index 0d62f2fb..da557bc1 100644
--- a/bandwidth/models/__init__.py
+++ b/bandwidth/models/__init__.py
@@ -24,8 +24,10 @@
from bandwidth.models.call_state import CallState
from bandwidth.models.call_state_enum import CallStateEnum
from bandwidth.models.call_transcription import CallTranscription
+from bandwidth.models.call_transcription_detected_language_enum import CallTranscriptionDetectedLanguageEnum
from bandwidth.models.call_transcription_metadata import CallTranscriptionMetadata
from bandwidth.models.call_transcription_response import CallTranscriptionResponse
+from bandwidth.models.call_transcription_track_enum import CallTranscriptionTrackEnum
from bandwidth.models.callback_method_enum import CallbackMethodEnum
from bandwidth.models.code_request import CodeRequest
from bandwidth.models.conference import Conference
diff --git a/bandwidth/models/call_transcription.py b/bandwidth/models/call_transcription.py
index 3c8a956c..9fc843bc 100644
--- a/bandwidth/models/call_transcription.py
+++ b/bandwidth/models/call_transcription.py
@@ -18,9 +18,11 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
+from bandwidth.models.call_transcription_detected_language_enum import CallTranscriptionDetectedLanguageEnum
+from bandwidth.models.call_transcription_track_enum import CallTranscriptionTrackEnum
from typing import Optional, Set
from typing_extensions import Self
@@ -28,32 +30,12 @@ class CallTranscription(BaseModel):
"""
CallTranscription
""" # noqa: E501
- detected_language: Optional[StrictStr] = Field(default=None, description="The detected language for this transcription.", alias="detectedLanguage")
- track: Optional[StrictStr] = Field(default=None, description="Which `track` this transcription is derived from.")
- text: Optional[StrictStr] = Field(default=None, description="The transcription itself.")
+ detected_language: Optional[CallTranscriptionDetectedLanguageEnum] = Field(default=None, alias="detectedLanguage")
+ track: Optional[CallTranscriptionTrackEnum] = None
+ transcript: Optional[StrictStr] = Field(default=None, description="The transcription itself.")
confidence: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="How confident the transcription engine was in transcribing the associated audio (from `0` to `1`).")
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["detectedLanguage", "track", "text", "confidence"]
-
- @field_validator('detected_language')
- def detected_language_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(['en-US', 'es-US', 'fr-FR']):
- raise ValueError("must be one of enum values ('en-US', 'es-US', 'fr-FR')")
- return value
-
- @field_validator('track')
- def track_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(['inbound', 'outbound']):
- raise ValueError("must be one of enum values ('inbound', 'outbound')")
- return value
+ __properties: ClassVar[List[str]] = ["detectedLanguage", "track", "transcript", "confidence"]
model_config = ConfigDict(
populate_by_name=True,
@@ -115,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"detectedLanguage": obj.get("detectedLanguage"),
"track": obj.get("track"),
- "text": obj.get("text"),
+ "transcript": obj.get("transcript"),
"confidence": obj.get("confidence")
})
# store additional fields in additional_properties
diff --git a/bandwidth/models/call_transcription_detected_language_enum.py b/bandwidth/models/call_transcription_detected_language_enum.py
new file mode 100644
index 00000000..2d26f56b
--- /dev/null
+++ b/bandwidth/models/call_transcription_detected_language_enum.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ Bandwidth
+
+ Bandwidth's Communication APIs
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: letstalk@bandwidth.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallTranscriptionDetectedLanguageEnum(str, Enum):
+ """
+ The detected language for this transcription.
+ """
+
+ """
+ allowed enum values
+ """
+ EN_MINUS_US = 'en-US'
+ ES_MINUS_US = 'es-US'
+ FR_MINUS_FR = 'fr-FR'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallTranscriptionDetectedLanguageEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/bandwidth/models/call_transcription_track_enum.py b/bandwidth/models/call_transcription_track_enum.py
new file mode 100644
index 00000000..412c2214
--- /dev/null
+++ b/bandwidth/models/call_transcription_track_enum.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ Bandwidth
+
+ Bandwidth's Communication APIs
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: letstalk@bandwidth.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class CallTranscriptionTrackEnum(str, Enum):
+ """
+ Which `track` this transcription is derived from.
+ """
+
+ """
+ allowed enum values
+ """
+ INBOUND = 'inbound'
+ OUTBOUND = 'outbound'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CallTranscriptionTrackEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/bandwidth/models/conference.py b/bandwidth/models/conference.py
index 39e18753..b361ec6e 100644
--- a/bandwidth/models/conference.py
+++ b/bandwidth/models/conference.py
@@ -35,7 +35,7 @@ class Conference(BaseModel):
created_time: Optional[datetime] = Field(default=None, description="The time the conference was initiated, in ISO 8601 format.", alias="createdTime")
completed_time: Optional[datetime] = Field(default=None, description="The time the conference was terminated, in ISO 8601 format.", alias="completedTime")
conference_event_url: Optional[StrictStr] = Field(default=None, description="The URL to send the conference-related events.", alias="conferenceEventUrl")
- conference_event_method: Optional[CallbackMethodEnum] = Field(default=None, alias="conferenceEventMethod")
+ conference_event_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="conferenceEventMethod")
tag: Optional[StrictStr] = Field(default=None, description="The custom string attached to the conference that will be sent with callbacks.")
active_members: Optional[List[ConferenceMember]] = Field(default=None, description="A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences).", alias="activeMembers")
additional_properties: Dict[str, Any] = {}
@@ -136,7 +136,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"createdTime": obj.get("createdTime"),
"completedTime": obj.get("completedTime"),
"conferenceEventUrl": obj.get("conferenceEventUrl"),
- "conferenceEventMethod": obj.get("conferenceEventMethod"),
+ "conferenceEventMethod": obj.get("conferenceEventMethod") if obj.get("conferenceEventMethod") is not None else CallbackMethodEnum.POST,
"tag": obj.get("tag"),
"activeMembers": [ConferenceMember.from_dict(_item) for _item in obj["activeMembers"]] if obj.get("activeMembers") is not None else None
})
diff --git a/bandwidth/models/create_call.py b/bandwidth/models/create_call.py
index 6135b95f..e1fedd09 100644
--- a/bandwidth/models/create_call.py
+++ b/bandwidth/models/create_call.py
@@ -37,15 +37,15 @@ class CreateCall(BaseModel):
uui: Optional[StrictStr] = Field(default=None, description="A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in RFC 7433. Only 'jwt' and 'base64' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.")
application_id: StrictStr = Field(description="The id of the application associated with the `from` number.", alias="applicationId")
answer_url: Annotated[str, Field(strict=True, max_length=2048)] = Field(description="The full URL to send the Answer event to when the called party answers. This endpoint should return the first BXML document to be executed in the call. Must use `https` if specifying `username` and `password`.", alias="answerUrl")
- answer_method: Optional[CallbackMethodEnum] = Field(default=None, alias="answerMethod")
+ answer_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="answerMethod")
username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.")
password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.")
answer_fallback_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`.", alias="answerFallbackUrl")
- answer_fallback_method: Optional[CallbackMethodEnum] = Field(default=None, alias="answerFallbackMethod")
+ answer_fallback_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="answerFallbackMethod")
fallback_username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.", alias="fallbackUsername")
fallback_password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.", alias="fallbackPassword")
disconnect_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="The URL to send the Disconnect event to when the call ends. This event does not expect a BXML response.", alias="disconnectUrl")
- disconnect_method: Optional[CallbackMethodEnum] = Field(default=None, alias="disconnectMethod")
+ disconnect_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="disconnectMethod")
call_timeout: Optional[Union[Annotated[float, Field(le=300, strict=True, ge=1)], Annotated[int, Field(le=300, strict=True, ge=1)]]] = Field(default=30, description="The timeout (in seconds) for the callee to answer the call after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Can be any numeric value (including decimals) between 1 and 300.", alias="callTimeout")
callback_timeout: Optional[Union[Annotated[float, Field(le=25, strict=True, ge=1)], Annotated[int, Field(le=25, strict=True, ge=1)]]] = Field(default=15, description="This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25.", alias="callbackTimeout")
machine_detection: Optional[MachineDetectionConfiguration] = Field(default=None, alias="machineDetection")
@@ -202,15 +202,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"uui": obj.get("uui"),
"applicationId": obj.get("applicationId"),
"answerUrl": obj.get("answerUrl"),
- "answerMethod": obj.get("answerMethod"),
+ "answerMethod": obj.get("answerMethod") if obj.get("answerMethod") is not None else CallbackMethodEnum.POST,
"username": obj.get("username"),
"password": obj.get("password"),
"answerFallbackUrl": obj.get("answerFallbackUrl"),
- "answerFallbackMethod": obj.get("answerFallbackMethod"),
+ "answerFallbackMethod": obj.get("answerFallbackMethod") if obj.get("answerFallbackMethod") is not None else CallbackMethodEnum.POST,
"fallbackUsername": obj.get("fallbackUsername"),
"fallbackPassword": obj.get("fallbackPassword"),
"disconnectUrl": obj.get("disconnectUrl"),
- "disconnectMethod": obj.get("disconnectMethod"),
+ "disconnectMethod": obj.get("disconnectMethod") if obj.get("disconnectMethod") is not None else CallbackMethodEnum.POST,
"callTimeout": obj.get("callTimeout") if obj.get("callTimeout") is not None else 30,
"callbackTimeout": obj.get("callbackTimeout") if obj.get("callbackTimeout") is not None else 15,
"machineDetection": MachineDetectionConfiguration.from_dict(obj["machineDetection"]) if obj.get("machineDetection") is not None else None,
diff --git a/bandwidth/models/create_call_response.py b/bandwidth/models/create_call_response.py
index 5af22d43..82b56b1c 100644
--- a/bandwidth/models/create_call_response.py
+++ b/bandwidth/models/create_call_response.py
@@ -42,7 +42,7 @@ class CreateCallResponse(BaseModel):
tag: Optional[StrictStr] = Field(default=None, description="Custom tag value.")
answer_method: Optional[CallbackMethodEnum] = Field(alias="answerMethod")
answer_url: StrictStr = Field(description="URL to deliver the `answer` event webhook.", alias="answerUrl")
- answer_fallback_method: Optional[CallbackMethodEnum] = Field(default=None, alias="answerFallbackMethod")
+ answer_fallback_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="answerFallbackMethod")
answer_fallback_url: Optional[StrictStr] = Field(default=None, description="Fallback URL to deliver the `answer` event webhook.", alias="answerFallbackUrl")
disconnect_method: Optional[CallbackMethodEnum] = Field(alias="disconnectMethod")
disconnect_url: Optional[StrictStr] = Field(default=None, description="URL to deliver the `disconnect` event webhook.", alias="disconnectUrl")
@@ -182,11 +182,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"callTimeout": obj.get("callTimeout"),
"callbackTimeout": obj.get("callbackTimeout"),
"tag": obj.get("tag"),
- "answerMethod": obj.get("answerMethod"),
+ "answerMethod": obj.get("answerMethod") if obj.get("answerMethod") is not None else CallbackMethodEnum.POST,
"answerUrl": obj.get("answerUrl"),
- "answerFallbackMethod": obj.get("answerFallbackMethod"),
+ "answerFallbackMethod": obj.get("answerFallbackMethod") if obj.get("answerFallbackMethod") is not None else CallbackMethodEnum.POST,
"answerFallbackUrl": obj.get("answerFallbackUrl"),
- "disconnectMethod": obj.get("disconnectMethod"),
+ "disconnectMethod": obj.get("disconnectMethod") if obj.get("disconnectMethod") is not None else CallbackMethodEnum.POST,
"disconnectUrl": obj.get("disconnectUrl"),
"username": obj.get("username"),
"password": obj.get("password"),
diff --git a/bandwidth/models/machine_detection_configuration.py b/bandwidth/models/machine_detection_configuration.py
index df2c01f8..befeedd4 100644
--- a/bandwidth/models/machine_detection_configuration.py
+++ b/bandwidth/models/machine_detection_configuration.py
@@ -30,7 +30,7 @@ class MachineDetectionConfiguration(BaseModel):
"""
The machine detection request used to perform machine detection on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information.
""" # noqa: E501
- mode: Optional[MachineDetectionModeEnum] = None
+ mode: Optional[MachineDetectionModeEnum] = MachineDetectionModeEnum.ASYNC
detection_timeout: Optional[Union[StrictFloat, StrictInt]] = Field(default=15, description="The timeout used for the whole operation, in seconds. If no result is determined in this period, a callback with a `timeout` result is sent.", alias="detectionTimeout")
silence_timeout: Optional[Union[StrictFloat, StrictInt]] = Field(default=10, description="If no speech is detected in this period, a callback with a 'silence' result is sent.", alias="silenceTimeout")
speech_threshold: Optional[Union[StrictFloat, StrictInt]] = Field(default=10, description="When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be 'answering-machine'. If the length of speech detected is below this threshold, the result will be 'human'.", alias="speechThreshold")
@@ -38,11 +38,11 @@ class MachineDetectionConfiguration(BaseModel):
machine_speech_end_threshold: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value.", alias="machineSpeechEndThreshold")
delay_result: Optional[StrictBool] = Field(default=False, description="If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded. If false, the 'answering-machine' result is sent immediately.", alias="delayResult")
callback_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="The URL to send the 'machineDetectionComplete' webhook when the detection is completed. Only for 'async' mode.", alias="callbackUrl")
- callback_method: Optional[CallbackMethodEnum] = Field(default=None, alias="callbackMethod")
+ callback_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="callbackMethod")
username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.")
password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.")
fallback_url: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respond", alias="fallbackUrl")
- fallback_method: Optional[CallbackMethodEnum] = Field(default=None, alias="fallbackMethod")
+ fallback_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="fallbackMethod")
fallback_username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.", alias="fallbackUsername")
fallback_password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.", alias="fallbackPassword")
additional_properties: Dict[str, Any] = {}
@@ -176,7 +176,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "mode": obj.get("mode"),
+ "mode": obj.get("mode") if obj.get("mode") is not None else MachineDetectionModeEnum.ASYNC,
"detectionTimeout": obj.get("detectionTimeout") if obj.get("detectionTimeout") is not None else 15,
"silenceTimeout": obj.get("silenceTimeout") if obj.get("silenceTimeout") is not None else 10,
"speechThreshold": obj.get("speechThreshold") if obj.get("speechThreshold") is not None else 10,
@@ -184,11 +184,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"machineSpeechEndThreshold": obj.get("machineSpeechEndThreshold"),
"delayResult": obj.get("delayResult") if obj.get("delayResult") is not None else False,
"callbackUrl": obj.get("callbackUrl"),
- "callbackMethod": obj.get("callbackMethod"),
+ "callbackMethod": obj.get("callbackMethod") if obj.get("callbackMethod") is not None else CallbackMethodEnum.POST,
"username": obj.get("username"),
"password": obj.get("password"),
"fallbackUrl": obj.get("fallbackUrl"),
- "fallbackMethod": obj.get("fallbackMethod"),
+ "fallbackMethod": obj.get("fallbackMethod") if obj.get("fallbackMethod") is not None else CallbackMethodEnum.POST,
"fallbackUsername": obj.get("fallbackUsername"),
"fallbackPassword": obj.get("fallbackPassword")
})
diff --git a/bandwidth/models/transcribe_recording.py b/bandwidth/models/transcribe_recording.py
index 93abf2a7..14908994 100644
--- a/bandwidth/models/transcribe_recording.py
+++ b/bandwidth/models/transcribe_recording.py
@@ -30,7 +30,7 @@ class TranscribeRecording(BaseModel):
TranscribeRecording
""" # noqa: E501
callback_url: Optional[StrictStr] = Field(default=None, description="The URL to send the [TranscriptionAvailable](/docs/voice/webhooks/transcriptionAvailable) event to. You should not include sensitive or personally-identifiable information in the callbackUrl field! Always use the proper username and password fields for authorization.", alias="callbackUrl")
- callback_method: Optional[CallbackMethodEnum] = Field(default=None, alias="callbackMethod")
+ callback_method: Optional[CallbackMethodEnum] = Field(default=CallbackMethodEnum.POST, alias="callbackMethod")
username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.")
password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.")
tag: Optional[StrictStr] = Field(default=None, description="(optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present.")
@@ -128,7 +128,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"callbackUrl": obj.get("callbackUrl"),
- "callbackMethod": obj.get("callbackMethod"),
+ "callbackMethod": obj.get("callbackMethod") if obj.get("callbackMethod") is not None else CallbackMethodEnum.POST,
"username": obj.get("username"),
"password": obj.get("password"),
"tag": obj.get("tag"),
diff --git a/bandwidth/models/transcription_metadata.py b/bandwidth/models/transcription_metadata.py
deleted file mode 100644
index 07e67d01..00000000
--- a/bandwidth/models/transcription_metadata.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# coding: utf-8
-
-"""
- Bandwidth
-
- Bandwidth's Communication APIs
-
- The version of the OpenAPI document: 1.0.0
- Contact: letstalk@bandwidth.com
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-from __future__ import annotations
-import pprint
-import re # noqa: F401
-import json
-
-from pydantic import BaseModel, ConfigDict, Field, StrictStr
-from typing import Any, ClassVar, Dict, List, Optional
-from typing import Optional, Set
-from typing_extensions import Self
-
-class TranscriptionMetadata(BaseModel):
- """
- If the recording was transcribed, metadata about the transcription
- """ # noqa: E501
- id: Optional[StrictStr] = Field(default=None, description="The unique transcription ID")
- status: Optional[StrictStr] = Field(default=None, description="The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values.")
- completed_time: Optional[StrictStr] = Field(default=None, description="The time that the transcription was completed", alias="completedTime")
- url: Optional[StrictStr] = Field(default=None, description="The URL of the [transcription](#operation/getCallTranscription)")
- additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["id", "status", "completedTime", "url"]
-
- model_config = ConfigDict(
- populate_by_name=True,
- validate_assignment=True,
- protected_namespaces=(),
- )
-
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of TranscriptionMetadata from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self) -> Dict[str, Any]:
- """Return the dictionary representation of the model using alias.
-
- This has the following differences from calling pydantic's
- `self.model_dump(by_alias=True)`:
-
- * `None` is only added to the output dict for nullable fields that
- were set at model initialization. Other fields with value `None`
- are ignored.
- * Fields in `self.additional_properties` are added to the output dict.
- """
- excluded_fields: Set[str] = set([
- "additional_properties",
- ])
-
- _dict = self.model_dump(
- by_alias=True,
- exclude=excluded_fields,
- exclude_none=True,
- )
- # puts key-value pairs in additional_properties in the top level
- if self.additional_properties is not None:
- for _key, _value in self.additional_properties.items():
- _dict[_key] = _value
-
- return _dict
-
- @classmethod
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of TranscriptionMetadata from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return cls.model_validate(obj)
-
- _obj = cls.model_validate({
- "id": obj.get("id"),
- "status": obj.get("status"),
- "completedTime": obj.get("completedTime"),
- "url": obj.get("url")
- })
- # store additional fields in additional_properties
- for _key in obj.keys():
- if _key not in cls.__properties:
- _obj.additional_properties[_key] = obj.get(_key)
-
- return _obj
-
-
diff --git a/bandwidth/models/update_call.py b/bandwidth/models/update_call.py
index 3840c925..2f17bfef 100644
--- a/bandwidth/models/update_call.py
+++ b/bandwidth/models/update_call.py
@@ -30,13 +30,13 @@ class UpdateCall(BaseModel):
"""
UpdateCall
""" # noqa: E501
- state: Optional[CallStateEnum] = None
+ state: Optional[CallStateEnum] = CallStateEnum.ACTIVE
redirect_url: Optional[StrictStr] = Field(default=None, description="The URL to send the [Redirect](/docs/voice/bxml/redirect) event to which will provide new BXML. Required if `state` is `active`. Not allowed if `state` is `completed`.", alias="redirectUrl")
- redirect_method: Optional[RedirectMethodEnum] = Field(default=None, alias="redirectMethod")
+ redirect_method: Optional[RedirectMethodEnum] = Field(default=RedirectMethodEnum.POST, alias="redirectMethod")
username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.")
password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.")
redirect_fallback_url: Optional[StrictStr] = Field(default=None, description="A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond.", alias="redirectFallbackUrl")
- redirect_fallback_method: Optional[RedirectMethodEnum] = Field(default=None, alias="redirectFallbackMethod")
+ redirect_fallback_method: Optional[RedirectMethodEnum] = Field(default=RedirectMethodEnum.POST, alias="redirectFallbackMethod")
fallback_username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.", alias="fallbackUsername")
fallback_password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.", alias="fallbackPassword")
tag: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [``](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`.")
@@ -151,13 +151,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "state": obj.get("state"),
+ "state": obj.get("state") if obj.get("state") is not None else CallStateEnum.ACTIVE,
"redirectUrl": obj.get("redirectUrl"),
- "redirectMethod": obj.get("redirectMethod"),
+ "redirectMethod": obj.get("redirectMethod") if obj.get("redirectMethod") is not None else RedirectMethodEnum.POST,
"username": obj.get("username"),
"password": obj.get("password"),
"redirectFallbackUrl": obj.get("redirectFallbackUrl"),
- "redirectFallbackMethod": obj.get("redirectFallbackMethod"),
+ "redirectFallbackMethod": obj.get("redirectFallbackMethod") if obj.get("redirectFallbackMethod") is not None else RedirectMethodEnum.POST,
"fallbackUsername": obj.get("fallbackUsername"),
"fallbackPassword": obj.get("fallbackPassword"),
"tag": obj.get("tag")
diff --git a/bandwidth/models/update_conference.py b/bandwidth/models/update_conference.py
index 997b1651..c87e5de2 100644
--- a/bandwidth/models/update_conference.py
+++ b/bandwidth/models/update_conference.py
@@ -30,13 +30,13 @@ class UpdateConference(BaseModel):
"""
UpdateConference
""" # noqa: E501
- status: Optional[ConferenceStateEnum] = None
+ status: Optional[ConferenceStateEnum] = ConferenceStateEnum.ACTIVE
redirect_url: Optional[StrictStr] = Field(default=None, description="The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active`.", alias="redirectUrl")
- redirect_method: Optional[RedirectMethodEnum] = Field(default=None, alias="redirectMethod")
+ redirect_method: Optional[RedirectMethodEnum] = Field(default=RedirectMethodEnum.POST, alias="redirectMethod")
username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.")
password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.")
redirect_fallback_url: Optional[StrictStr] = Field(default=None, description="A fallback url which, if provided, will be used to retry the `conferenceRedirect` webhook delivery in case `redirectUrl` fails to respond. Not allowed if `state` is `completed`.", alias="redirectFallbackUrl")
- redirect_fallback_method: Optional[RedirectMethodEnum] = Field(default=None, alias="redirectFallbackMethod")
+ redirect_fallback_method: Optional[RedirectMethodEnum] = Field(default=RedirectMethodEnum.POST, alias="redirectFallbackMethod")
fallback_username: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth username.", alias="fallbackUsername")
fallback_password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Basic auth password.", alias="fallbackPassword")
additional_properties: Dict[str, Any] = {}
@@ -145,13 +145,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "status": obj.get("status"),
+ "status": obj.get("status") if obj.get("status") is not None else ConferenceStateEnum.ACTIVE,
"redirectUrl": obj.get("redirectUrl"),
- "redirectMethod": obj.get("redirectMethod"),
+ "redirectMethod": obj.get("redirectMethod") if obj.get("redirectMethod") is not None else RedirectMethodEnum.POST,
"username": obj.get("username"),
"password": obj.get("password"),
"redirectFallbackUrl": obj.get("redirectFallbackUrl"),
- "redirectFallbackMethod": obj.get("redirectFallbackMethod"),
+ "redirectFallbackMethod": obj.get("redirectFallbackMethod") if obj.get("redirectFallbackMethod") is not None else RedirectMethodEnum.POST,
"fallbackUsername": obj.get("fallbackUsername"),
"fallbackPassword": obj.get("fallbackPassword")
})
diff --git a/docs/CallDirectionEnum.md b/docs/CallDirectionEnum.md
index a750b7c4..63dd13a2 100644
--- a/docs/CallDirectionEnum.md
+++ b/docs/CallDirectionEnum.md
@@ -2,10 +2,11 @@
The direction of the call.
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `INBOUND` (value: `'inbound'`)
+
+* `OUTBOUND` (value: `'outbound'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CallStateEnum.md b/docs/CallStateEnum.md
index 9c3cf4d9..689330a4 100644
--- a/docs/CallStateEnum.md
+++ b/docs/CallStateEnum.md
@@ -2,10 +2,11 @@
The call state. Possible values:
`active` to redirect the call (default)
`completed` to hang up the call if it is answered, cancel it if it is an unanswered outbound call, or reject it if it an unanswered inbound call
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `ACTIVE` (value: `'active'`)
+
+* `COMPLETED` (value: `'completed'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CallTranscription.md b/docs/CallTranscription.md
index 4317cf0f..422ae790 100644
--- a/docs/CallTranscription.md
+++ b/docs/CallTranscription.md
@@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**detected_language** | **str** | The detected language for this transcription. | [optional]
-**track** | **str** | Which `track` this transcription is derived from. | [optional]
-**text** | **str** | The transcription itself. | [optional]
+**detected_language** | [**CallTranscriptionDetectedLanguageEnum**](CallTranscriptionDetectedLanguageEnum.md) | | [optional]
+**track** | [**CallTranscriptionTrackEnum**](CallTranscriptionTrackEnum.md) | | [optional]
+**transcript** | **str** | The transcription itself. | [optional]
**confidence** | **float** | How confident the transcription engine was in transcribing the associated audio (from `0` to `1`). | [optional]
## Example
diff --git a/docs/CallTranscriptionDetectedLanguageEnum.md b/docs/CallTranscriptionDetectedLanguageEnum.md
new file mode 100644
index 00000000..aaf60e68
--- /dev/null
+++ b/docs/CallTranscriptionDetectedLanguageEnum.md
@@ -0,0 +1,15 @@
+# CallTranscriptionDetectedLanguageEnum
+
+The detected language for this transcription.
+
+## Enum
+
+* `EN_MINUS_US` (value: `'en-US'`)
+
+* `ES_MINUS_US` (value: `'es-US'`)
+
+* `FR_MINUS_FR` (value: `'fr-FR'`)
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CallTranscriptionTrackEnum.md b/docs/CallTranscriptionTrackEnum.md
new file mode 100644
index 00000000..9ff3f95b
--- /dev/null
+++ b/docs/CallTranscriptionTrackEnum.md
@@ -0,0 +1,13 @@
+# CallTranscriptionTrackEnum
+
+Which `track` this transcription is derived from.
+
+## Enum
+
+* `INBOUND` (value: `'inbound'`)
+
+* `OUTBOUND` (value: `'outbound'`)
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/CallbackMethodEnum.md b/docs/CallbackMethodEnum.md
index 36c9cb03..b58dc9be 100644
--- a/docs/CallbackMethodEnum.md
+++ b/docs/CallbackMethodEnum.md
@@ -2,10 +2,11 @@
The HTTP method to use to deliver the callback. GET or POST. Default value is POST.
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `GET` (value: `'GET'`)
+
+* `POST` (value: `'POST'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/Conference.md b/docs/Conference.md
index 6fd758d0..da6626a1 100644
--- a/docs/Conference.md
+++ b/docs/Conference.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**created_time** | **datetime** | The time the conference was initiated, in ISO 8601 format. | [optional]
**completed_time** | **datetime** | The time the conference was terminated, in ISO 8601 format. | [optional]
**conference_event_url** | **str** | The URL to send the conference-related events. | [optional]
-**conference_event_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional]
+**conference_event_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to CallbackMethodEnum.POST]
**tag** | **str** | The custom string attached to the conference that will be sent with callbacks. | [optional]
**active_members** | [**List[ConferenceMember]**](ConferenceMember.md) | A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). | [optional]
diff --git a/docs/ConferenceStateEnum.md b/docs/ConferenceStateEnum.md
index d336fd4f..5cab80fa 100644
--- a/docs/ConferenceStateEnum.md
+++ b/docs/ConferenceStateEnum.md
@@ -2,10 +2,11 @@
Setting the conference state to `completed` ends the conference and ejects all members.
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `ACTIVE` (value: `'active'`)
+
+* `COMPLETED` (value: `'completed'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/CreateCall.md b/docs/CreateCall.md
index bdc525da..ec496aca 100644
--- a/docs/CreateCall.md
+++ b/docs/CreateCall.md
@@ -12,15 +12,15 @@ Name | Type | Description | Notes
**uui** | **str** | A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in <a href='https://tools.ietf.org/html/rfc7433'>RFC 7433</a>. Only 'jwt' and 'base64' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional]
**application_id** | **str** | The id of the application associated with the `from` number. |
**answer_url** | **str** | The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. |
-**answer_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional]
+**answer_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to CallbackMethodEnum.POST]
**username** | **str** | Basic auth username. | [optional]
**password** | **str** | Basic auth password. | [optional]
**answer_fallback_url** | **str** | A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`. | [optional]
-**answer_fallback_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional]
+**answer_fallback_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to CallbackMethodEnum.POST]
**fallback_username** | **str** | Basic auth username. | [optional]
**fallback_password** | **str** | Basic auth password. | [optional]
**disconnect_url** | **str** | The URL to send the <a href='/docs/voice/webhooks/disconnect'>Disconnect</a> event to when the call ends. This event does not expect a BXML response. | [optional]
-**disconnect_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional]
+**disconnect_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to CallbackMethodEnum.POST]
**call_timeout** | **float** | The timeout (in seconds) for the callee to answer the call after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Can be any numeric value (including decimals) between 1 and 300. | [optional] [default to 30]
**callback_timeout** | **float** | This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. | [optional] [default to 15]
**machine_detection** | [**MachineDetectionConfiguration**](MachineDetectionConfiguration.md) | | [optional]
diff --git a/docs/CreateCallResponse.md b/docs/CreateCallResponse.md
index 02eff7bf..691df493 100644
--- a/docs/CreateCallResponse.md
+++ b/docs/CreateCallResponse.md
@@ -15,11 +15,11 @@ Name | Type | Description | Notes
**call_timeout** | **float** | The timeout (in seconds) for the callee to answer the call after it starts ringing. | [optional]
**callback_timeout** | **float** | This is the timeout (in seconds) to use when delivering webhooks for the call. | [optional]
**tag** | **str** | Custom tag value. | [optional]
-**answer_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | |
+**answer_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [default to CallbackMethodEnum.POST]
**answer_url** | **str** | URL to deliver the `answer` event webhook. |
-**answer_fallback_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional]
+**answer_fallback_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to CallbackMethodEnum.POST]
**answer_fallback_url** | **str** | Fallback URL to deliver the `answer` event webhook. | [optional]
-**disconnect_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | |
+**disconnect_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [default to CallbackMethodEnum.POST]
**disconnect_url** | **str** | URL to deliver the `disconnect` event webhook. | [optional]
**username** | **str** | Basic auth username. | [optional]
**password** | **str** | Basic auth password. | [optional]
diff --git a/docs/FileFormatEnum.md b/docs/FileFormatEnum.md
index 416da5cc..e8a7d7f8 100644
--- a/docs/FileFormatEnum.md
+++ b/docs/FileFormatEnum.md
@@ -2,10 +2,11 @@
The format that the recording is stored in.
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `MP3` (value: `'mp3'`)
+
+* `WAV` (value: `'wav'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ListMessageDirectionEnum.md b/docs/ListMessageDirectionEnum.md
index 4b5ee217..48deeb76 100644
--- a/docs/ListMessageDirectionEnum.md
+++ b/docs/ListMessageDirectionEnum.md
@@ -2,10 +2,11 @@
The direction of the message. One of INBOUND OUTBOUND.
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `INBOUND` (value: `'INBOUND'`)
+
+* `OUTBOUND` (value: `'OUTBOUND'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/LookupStatusEnum.md b/docs/LookupStatusEnum.md
index db300ad3..5269ba85 100644
--- a/docs/LookupStatusEnum.md
+++ b/docs/LookupStatusEnum.md
@@ -2,10 +2,15 @@
The status of the request (IN_PROGRESS, COMPLETE, PARTIAL_COMPLETE, or FAILED).
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `IN_PROGRESS` (value: `'IN_PROGRESS'`)
+
+* `COMPLETE` (value: `'COMPLETE'`)
+
+* `PARTIAL_COMPLETE` (value: `'PARTIAL_COMPLETE'`)
+
+* `FAILED` (value: `'FAILED'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/MachineDetectionConfiguration.md b/docs/MachineDetectionConfiguration.md
index f1327b55..e3f7a7a7 100644
--- a/docs/MachineDetectionConfiguration.md
+++ b/docs/MachineDetectionConfiguration.md
@@ -6,7 +6,7 @@ The machine detection request used to perform
Not allowed if `state` is `completed`.
-## Properties
+## Enum
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+* `GET` (value: `'GET'`)
+
+* `POST` (value: `'POST'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/TranscribeRecording.md b/docs/TranscribeRecording.md
index 6d6b1541..2ff5165b 100644
--- a/docs/TranscribeRecording.md
+++ b/docs/TranscribeRecording.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**callback_url** | **str** | The URL to send the [TranscriptionAvailable](/docs/voice/webhooks/transcriptionAvailable) event to. You should not include sensitive or personally-identifiable information in the callbackUrl field! Always use the proper username and password fields for authorization. | [optional]
-**callback_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional]
+**callback_method** | [**CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] [default to CallbackMethodEnum.POST]
**username** | **str** | Basic auth username. | [optional]
**password** | **str** | Basic auth password. | [optional]
**tag** | **str** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional]
diff --git a/docs/UpdateCall.md b/docs/UpdateCall.md
index 582fac6c..be0a78a5 100644
--- a/docs/UpdateCall.md
+++ b/docs/UpdateCall.md
@@ -5,13 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**state** | [**CallStateEnum**](CallStateEnum.md) | | [optional]
+**state** | [**CallStateEnum**](CallStateEnum.md) | | [optional] [default to CallStateEnum.ACTIVE]
**redirect_url** | **str** | The URL to send the [Redirect](/docs/voice/bxml/redirect) event to which will provide new BXML. Required if `state` is `active`. Not allowed if `state` is `completed`. | [optional]
-**redirect_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional]
+**redirect_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] [default to RedirectMethodEnum.POST]
**username** | **str** | Basic auth username. | [optional]
**password** | **str** | Basic auth password. | [optional]
**redirect_fallback_url** | **str** | A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond. | [optional]
-**redirect_fallback_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional]
+**redirect_fallback_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] [default to RedirectMethodEnum.POST]
**fallback_username** | **str** | Basic auth username. | [optional]
**fallback_password** | **str** | Basic auth password. | [optional]
**tag** | **str** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`. | [optional]
diff --git a/docs/UpdateConference.md b/docs/UpdateConference.md
index b1ddc5ac..a5045294 100644
--- a/docs/UpdateConference.md
+++ b/docs/UpdateConference.md
@@ -5,13 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**status** | [**ConferenceStateEnum**](ConferenceStateEnum.md) | | [optional]
+**status** | [**ConferenceStateEnum**](ConferenceStateEnum.md) | | [optional] [default to ConferenceStateEnum.ACTIVE]
**redirect_url** | **str** | The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active`. | [optional]
-**redirect_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional]
+**redirect_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] [default to RedirectMethodEnum.POST]
**username** | **str** | Basic auth username. | [optional]
**password** | **str** | Basic auth password. | [optional]
**redirect_fallback_url** | **str** | A fallback url which, if provided, will be used to retry the `conferenceRedirect` webhook delivery in case `redirectUrl` fails to respond. Not allowed if `state` is `completed`. | [optional]
-**redirect_fallback_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional]
+**redirect_fallback_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] [default to RedirectMethodEnum.POST]
**fallback_username** | **str** | Basic auth username. | [optional]
**fallback_password** | **str** | Basic auth password. | [optional]
diff --git a/openapitools.json b/openapitools.json
index 5c50d6a2..f227cf2d 100644
--- a/openapitools.json
+++ b/openapitools.json
@@ -2,6 +2,6 @@
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
- "version": "7.6.0"
+ "version": "7.7.0"
}
}
diff --git a/test/unit/api/test_conferences_api.py b/test/unit/api/test_conferences_api.py
index 6e573fcd..d44a901f 100644
--- a/test/unit/api/test_conferences_api.py
+++ b/test/unit/api/test_conferences_api.py
@@ -176,14 +176,13 @@ def test_get_conference_recording(self) -> None:
assert_that(response.data.status, instance_of(str))
assert_that(response.data.media_url, starts_with('http'))
- @unittest.skip("Stoplight doesn't like the Accept Header")
def test_download_conference_recording(self) -> None:
"""Test case for download_conference_recording
Download Conference Recording
"""
response = self.conferences_api_instance.download_conference_recording_with_http_info(
- BW_ACCOUNT_ID, 'conferenceId', 'recordingId', _headers={'Accept': 'audio/wav'})
+ BW_ACCOUNT_ID, 'conferenceId', 'recordingId', _headers={'Accept': 'audio/vnd.wave'})
# might be an issue with the client, cause I think the accept header gets written to
# application/json no matter what
diff --git a/test/unit/api/test_media_api.py b/test/unit/api/test_media_api.py
index 97733043..53632a7a 100644
--- a/test/unit/api/test_media_api.py
+++ b/test/unit/api/test_media_api.py
@@ -65,13 +65,13 @@ def test_list_media(self) -> None:
assert_that(response.data[0].content_length, instance_of(int))
assert_that(response.data[0].media_name, instance_of(str))
- @unittest.skip("Stoplight doesn't like the Accept Header") # Potentially same issue as download_conference_recording
def test_get_media(self) -> None:
"""Test case for get_media
Get Media
"""
- response = self.media_api_instance.get_media_with_http_info(BW_ACCOUNT_ID, 'media_name.jpeg')
+ response = self.media_api_instance.get_media_with_http_info(
+ BW_ACCOUNT_ID, 'media_name.jpeg', _headers={'Accept': 'application/octet-stream'})
assert_that(response.status_code, equal_to(200))
assert_that(response.data, instance_of(bytes))
diff --git a/test/unit/api/test_recordings_api.py b/test/unit/api/test_recordings_api.py
index 8472dd49..5a9ce298 100644
--- a/test/unit/api/test_recordings_api.py
+++ b/test/unit/api/test_recordings_api.py
@@ -160,14 +160,13 @@ def test_get_call_recording(self) -> None:
assert_that(response.data.transcription.completed_time, instance_of(datetime))
assert_that(response.data.transcription.url, starts_with('http'))
- @unittest.skip("Stoplight doesn't like the Accept Header") # Accept Header
def test_download_call_recording(self) -> None:
"""Test case for download_call_recording
Download Recording
"""
response = self.recordings_api_instance.download_call_recording_with_http_info(
- BW_ACCOUNT_ID, self.call_id, self.recording_id)
+ BW_ACCOUNT_ID, self.call_id, self.recording_id, _headers={'Accept': 'audio/vnd.wave'})
assert_that(response.status_code, equal_to(200))
assert_that(response.data, instance_of(bytes))
diff --git a/test/unit/api/test_transcriptions_api.py b/test/unit/api/test_transcriptions_api.py
index 13c52e02..e0ad2db0 100644
--- a/test/unit/api/test_transcriptions_api.py
+++ b/test/unit/api/test_transcriptions_api.py
@@ -21,8 +21,8 @@
from bandwidth.api.transcriptions_api import TranscriptionsApi
from bandwidth.models.call_transcription_metadata import CallTranscriptionMetadata
from bandwidth.models.call_transcription_response import CallTranscriptionResponse
-# from bandwidth.models.call_transcription_detected_language_enum import CallTranscriptionDetectedLanguageEnum
-# from bandwidth.models.call_transcription_track_enum import CallTranscriptionTrackEnum
+from bandwidth.models.call_transcription_detected_language_enum import CallTranscriptionDetectedLanguageEnum
+from bandwidth.models.call_transcription_track_enum import CallTranscriptionTrackEnum
from bandwidth.models.call_transcription import CallTranscription
@@ -71,9 +71,9 @@ def test_get_real_time_transcription(self) -> None: # TODO: Add back asserts whe
assert_that(response.data.transcription_id, instance_of(str))
assert_that(response.data.tracks, instance_of(list))
assert_that(response.data.tracks[0], instance_of(CallTranscription))
- # assert_that(response.data.tracks[0].detected_language, is_in(CallTranscriptionDetectedLanguageEnum))
- # assert_that(response.data.tracks[0].track, is_in(CallTranscriptionTrackEnum))
- assert_that(response.data.tracks[0].text, instance_of(str))
+ assert_that(response.data.tracks[0].detected_language, is_in(CallTranscriptionDetectedLanguageEnum))
+ assert_that(response.data.tracks[0].track, is_in(CallTranscriptionTrackEnum))
+ assert_that(response.data.tracks[0].transcript, instance_of(str))
assert_that(response.data.tracks[0].confidence, instance_of(float))
def test_delete_real_time_transcription(self) -> None:
diff --git a/test/unit/models/test_call_transcription.py b/test/unit/models/test_call_transcription.py
index d9437885..322df88e 100644
--- a/test/unit/models/test_call_transcription.py
+++ b/test/unit/models/test_call_transcription.py
@@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> CallTranscription:
return CallTranscription(
detected_language = 'en-US',
track = 'inbound',
- text = 'Hello World! This is an example.',
+ transcript = 'Hello World! This is an example.',
confidence = 0.9
)
else:
@@ -50,7 +50,7 @@ def testCallTranscription(self):
assert isinstance(instance, CallTranscription)
assert instance.detected_language == 'en-US'
assert instance.track == 'inbound'
- assert instance.text == 'Hello World! This is an example.'
+ assert instance.transcript == 'Hello World! This is an example.'
assert instance.confidence == 0.9
if __name__ == '__main__':
diff --git a/test/unit/models/test_call_transcription_detected_language_enum.py b/test/unit/models/test_call_transcription_detected_language_enum.py
new file mode 100644
index 00000000..68c6d56b
--- /dev/null
+++ b/test/unit/models/test_call_transcription_detected_language_enum.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ Bandwidth
+
+ Bandwidth's Communication APIs
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: letstalk@bandwidth.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from bandwidth.models.call_transcription_detected_language_enum import CallTranscriptionDetectedLanguageEnum
+
+class TestCallTranscriptionDetectedLanguageEnum(unittest.TestCase):
+ """CallTranscriptionDetectedLanguageEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCallTranscriptionDetectedLanguageEnum(self):
+ """Test CallTranscriptionDetectedLanguageEnum"""
+ enus = CallTranscriptionDetectedLanguageEnum('en-US')
+ esus = CallTranscriptionDetectedLanguageEnum('es-US')
+ frfr = CallTranscriptionDetectedLanguageEnum('fr-FR')
+ assert enus == 'en-US'
+ assert esus == 'es-US'
+ assert frfr == 'fr-FR'
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/unit/models/test_call_transcription_response.py b/test/unit/models/test_call_transcription_response.py
index fe636e6f..acd2e64f 100644
--- a/test/unit/models/test_call_transcription_response.py
+++ b/test/unit/models/test_call_transcription_response.py
@@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> CallTranscriptionResponse:
account_id = '9900000',
call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85',
transcription_id = 't-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b',
- tracks = [{"detectedLanguage":"en-US","track":"inbound","text":"Hello World! This is an example.","confidence":0.9}]
+ tracks = [{"detectedLanguage":"en-US","track":"inbound","transcript":"Hello World! This is an example.","confidence":0.9}]
)
else:
return CallTranscriptionResponse(
@@ -52,7 +52,7 @@ def testCallTranscriptionResponse(self):
assert instance.transcription_id == 't-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b'
assert instance.tracks[0].detected_language == 'en-US'
assert instance.tracks[0].track == 'inbound'
- assert instance.tracks[0].text == 'Hello World! This is an example.'
+ assert instance.tracks[0].transcript == 'Hello World! This is an example.'
assert instance.tracks[0].confidence == 0.9
if __name__ == '__main__':
diff --git a/test/unit/models/test_call_transcription_track_enum.py b/test/unit/models/test_call_transcription_track_enum.py
new file mode 100644
index 00000000..e76e5535
--- /dev/null
+++ b/test/unit/models/test_call_transcription_track_enum.py
@@ -0,0 +1,37 @@
+# coding: utf-8
+
+"""
+ Bandwidth
+
+ Bandwidth's Communication APIs
+
+ The version of the OpenAPI document: 1.0.0
+ Contact: letstalk@bandwidth.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from bandwidth.models.call_transcription_track_enum import CallTranscriptionTrackEnum
+
+class TestCallTranscriptionTrackEnum(unittest.TestCase):
+ """CallTranscriptionTrackEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCallTranscriptionTrackEnum(self):
+ """Test CallTranscriptionTrackEnum"""
+ inbound = CallTranscriptionTrackEnum('inbound')
+ outbound = CallTranscriptionTrackEnum('outbound')
+ assert inbound == 'inbound'
+ assert outbound == 'outbound'
+
+if __name__ == '__main__':
+ unittest.main()