diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 2dbc23df..5dea6ae6 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -47,7 +47,7 @@ jobs:
fi
- name: Checkout
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
- name: Set OpenAPI Generator Version
run: |
diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml
index ee6c5ab9..af0bd2f6 100644
--- a/.github/workflows/test-pr.yml
+++ b/.github/workflows/test-pr.yml
@@ -37,7 +37,7 @@ jobs:
strategy:
matrix:
os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04]
- python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
fail-fast: false
env:
PYTHON_VERSION: ${{ matrix.python-version }}
@@ -45,10 +45,10 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
- name: Set up Python
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
diff --git a/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml
index 53673f93..5b2b3cb2 100644
--- a/.github/workflows/test-smoke.yml
+++ b/.github/workflows/test-smoke.yml
@@ -52,12 +52,12 @@ jobs:
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
steps:
- name: Checkout
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
- name: Set up Python
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
- python-version: '3.12'
+ python-version: '3.14'
- name: Install Packages
run: |
@@ -91,12 +91,12 @@ jobs:
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_UP_APPLICATION_ID }}
steps:
- name: Checkout
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
- name: Set up Python
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
- python-version: '3.12'
+ python-version: '3.14'
- name: Install Packages
run: |
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 0cf037e9..50e7d8f3 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -28,6 +28,10 @@ bandwidth/models/async_lookup_request.py
bandwidth/models/blocked_webhook.py
bandwidth/models/bridge_complete_callback.py
bandwidth/models/bridge_target_complete_callback.py
+bandwidth/models/brtc_error.py
+bandwidth/models/brtc_error_response.py
+bandwidth/models/brtc_error_source.py
+bandwidth/models/brtc_link.py
bandwidth/models/business_entity_type_enum.py
bandwidth/models/business_registration_type_enum.py
bandwidth/models/call_direction_enum.py
@@ -81,9 +85,7 @@ bandwidth/models/endpoint_response.py
bandwidth/models/endpoint_status_enum.py
bandwidth/models/endpoint_type_enum.py
bandwidth/models/endpoints.py
-bandwidth/models/error.py
bandwidth/models/error_object.py
-bandwidth/models/error_response.py
bandwidth/models/error_source.py
bandwidth/models/failure_webhook.py
bandwidth/models/field_error.py
@@ -212,6 +214,7 @@ bandwidth/models/voice_api_error.py
bandwidth/models/voice_code_response.py
bandwidth/models/webhook_subscription.py
bandwidth/models/webhook_subscription_basic_authentication.py
+bandwidth/models/webhook_subscription_error.py
bandwidth/models/webhook_subscription_request_schema.py
bandwidth/models/webhook_subscription_type_enum.py
bandwidth/models/webhook_subscriptions_list_body.py
@@ -225,6 +228,10 @@ docs/AsyncLookupRequest.md
docs/BlockedWebhook.md
docs/BridgeCompleteCallback.md
docs/BridgeTargetCompleteCallback.md
+docs/BrtcError.md
+docs/BrtcErrorResponse.md
+docs/BrtcErrorSource.md
+docs/BrtcLink.md
docs/BusinessEntityTypeEnum.md
docs/BusinessRegistrationTypeEnum.md
docs/CallDirectionEnum.md
@@ -281,9 +288,7 @@ docs/EndpointStatusEnum.md
docs/EndpointTypeEnum.md
docs/Endpoints.md
docs/EndpointsApi.md
-docs/Error.md
docs/ErrorObject.md
-docs/ErrorResponse.md
docs/ErrorSource.md
docs/FailureWebhook.md
docs/FieldError.md
@@ -421,6 +426,7 @@ docs/VoiceApiError.md
docs/VoiceCodeResponse.md
docs/WebhookSubscription.md
docs/WebhookSubscriptionBasicAuthentication.md
+docs/WebhookSubscriptionError.md
docs/WebhookSubscriptionRequestSchema.md
docs/WebhookSubscriptionTypeEnum.md
docs/WebhookSubscriptionsListBody.md
diff --git a/README.md b/README.md
index 107d8960..b965734b 100644
--- a/README.md
+++ b/README.md
@@ -170,6 +170,10 @@ Class | Method | HTTP request | Description
- [BlockedWebhook](docs/BlockedWebhook.md)
- [BridgeCompleteCallback](docs/BridgeCompleteCallback.md)
- [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md)
+ - [BrtcError](docs/BrtcError.md)
+ - [BrtcErrorResponse](docs/BrtcErrorResponse.md)
+ - [BrtcErrorSource](docs/BrtcErrorSource.md)
+ - [BrtcLink](docs/BrtcLink.md)
- [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md)
- [BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md)
- [CallDirectionEnum](docs/CallDirectionEnum.md)
@@ -223,9 +227,7 @@ Class | Method | HTTP request | Description
- [EndpointStatusEnum](docs/EndpointStatusEnum.md)
- [EndpointTypeEnum](docs/EndpointTypeEnum.md)
- [Endpoints](docs/Endpoints.md)
- - [Error](docs/Error.md)
- [ErrorObject](docs/ErrorObject.md)
- - [ErrorResponse](docs/ErrorResponse.md)
- [ErrorSource](docs/ErrorSource.md)
- [FailureWebhook](docs/FailureWebhook.md)
- [FieldError](docs/FieldError.md)
@@ -354,6 +356,7 @@ Class | Method | HTTP request | Description
- [VoiceCodeResponse](docs/VoiceCodeResponse.md)
- [WebhookSubscription](docs/WebhookSubscription.md)
- [WebhookSubscriptionBasicAuthentication](docs/WebhookSubscriptionBasicAuthentication.md)
+ - [WebhookSubscriptionError](docs/WebhookSubscriptionError.md)
- [WebhookSubscriptionRequestSchema](docs/WebhookSubscriptionRequestSchema.md)
- [WebhookSubscriptionTypeEnum](docs/WebhookSubscriptionTypeEnum.md)
- [WebhookSubscriptionsListBody](docs/WebhookSubscriptionsListBody.md)
diff --git a/bandwidth.yml b/bandwidth.yml
index 4378c202..6ad54bc1 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -2571,7 +2571,7 @@ components:
Specifies how the URL should be opened on a mobile device.
- `BROWSER` Opens the URL in the device's default browser. If
- application is not set or the device doesn’t support WebView, this
+ application is not set or the device doesn't support WebView, this
option is used by default.
- `WEBVIEW` Opens the URL in an in-app WebView.
@@ -3455,8 +3455,8 @@ components:
May be cleared by setting `tag=""`
- Max length 256 characters.
- maxLength: 256
+ Max length 4096 characters.
+ maxLength: 4096
example: arbitrary text here
createCallResponse:
type: object
@@ -3833,11 +3833,11 @@ components:
May be cleared by setting `tag=""`.
- Max length 256 characters.
+ Max length 4096 characters.
Not allowed if `state` is `completed`.
- maxLength: 256
+ maxLength: 4096
example: My Custom Tag
updateCallRecording:
type: object
@@ -6635,7 +6635,7 @@ components:
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/webhookSubscriptionError'
data:
items:
$ref: '#/components/schemas/webhookSubscription'
@@ -6661,7 +6661,7 @@ components:
If more results exist than specified by 'size', this link return the
last page of result.
type: string
- error:
+ webhookSubscriptionError:
type: object
properties:
code:
@@ -7060,6 +7060,22 @@ components:
required:
- eventType
- eventTime
+ brtcLink:
+ type: object
+ properties:
+ href:
+ type: string
+ description: The full URL of the link.
+ example: >-
+ https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ rel:
+ type: string
+ description: The relationship of the link to the current resource.
+ example: self
+ method:
+ type: string
+ description: The HTTP method to use when making the request.
+ example: GET
page:
type: object
properties:
@@ -7085,13 +7101,59 @@ components:
example: 0
required:
- pageSize
+ brtcError:
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: A unique identifier for the error.
+ example: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type:
+ type: string
+ description: The type of error.
+ example: resource.not_found
+ description:
+ type: string
+ description: A description of the error.
+ example: The requested resource was not found.
+ code:
+ type: string
+ description: A code that uniquely identifies the error.
+ example: '404'
+ source:
+ $ref: '#/components/schemas/brtcErrorSource'
+ required:
+ - type
+ - description
+ brtcErrorSource:
+ type: object
+ properties:
+ parameter:
+ type: string
+ description: The URI parameter that caused the error.
+ example: accountId
+ field:
+ type: string
+ description: The request body field that caused the error.
+ example: accountId
+ header:
+ type: string
+ description: The header that caused the error.
+ example: Authorization
+ reference:
+ type: string
+ description: >-
+ The resource ID or path to the resource (or non-existent resource)
+ causing the error.
+ example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
listEndpointsResponse:
type: object
properties:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
page:
$ref: '#/components/schemas/page'
data:
@@ -7101,7 +7163,7 @@ components:
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
@@ -7112,13 +7174,13 @@ components:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
data:
$ref: '#/components/schemas/endpoint'
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
@@ -7129,24 +7191,24 @@ components:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
data:
$ref: '#/components/schemas/createEndpointResponseData'
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
- errors
- errorResponse:
+ brtcErrorResponse:
type: object
properties:
links:
type: array
items:
- $ref: '#/components/schemas/link'
+ $ref: '#/components/schemas/brtcLink'
data:
type: object
nullable: true
@@ -7154,7 +7216,7 @@ components:
errors:
type: array
items:
- $ref: '#/components/schemas/error'
+ $ref: '#/components/schemas/brtcError'
required:
- links
- data
@@ -7865,7 +7927,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
badRequestErrorExample:
$ref: '#/components/examples/badRequestErrorExample'
@@ -7874,7 +7936,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
unauthorizedErrorExample:
$ref: '#/components/examples/unauthorizedErrorExample'
@@ -7883,7 +7945,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
forbiddenErrorExample:
$ref: '#/components/examples/forbiddenErrorExample'
@@ -7892,7 +7954,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
notFoundErrorExample:
$ref: '#/components/examples/notFoundErrorExample'
@@ -7901,7 +7963,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
methodNotAllowedErrorExample:
$ref: '#/components/examples/methodNotAllowedErrorExample'
@@ -7910,16 +7972,25 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
unsuppotedMediaTypeErrorExample:
$ref: '#/components/examples/unsupportedMediaTypeErrorExample'
tooManyRequestsErrorResponse:
description: Too Many Requests
+ headers:
+ Retry-After:
+ description: >-
+ The number of seconds the client should wait before making another
+ request.
+ required: true
+ schema:
+ type: integer
+ example: 900
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
tooManyRequestsErrorExample:
$ref: '#/components/examples/tooManyRequestsErrorExample'
@@ -7928,7 +7999,7 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/errorResponse'
+ $ref: '#/components/schemas/brtcErrorResponse'
examples:
serviceUnavailableErrorExample:
$ref: '#/components/examples/serviceUnavailableErrorExample'
@@ -9137,10 +9208,10 @@ components:
links: []
data: null
errors:
- - id: 59512d87-7a92-4040-8e4a-78fb772019b9
- type: too_many_requests
- description: The client has sent too many requests in a given amount of time.
- code: '429'
+ - type: too_many_endpoints
+ description: >-
+ Too many endpoints. Please delete an existing endpoint or wait 24
+ hours for an endpoint to be removed.
serviceUnavailableErrorExample:
summary: Service Unavailable Error Example
value:
diff --git a/bandwidth/__init__.py b/bandwidth/__init__.py
index 66e36a23..13602e40 100644
--- a/bandwidth/__init__.py
+++ b/bandwidth/__init__.py
@@ -48,6 +48,10 @@
"BlockedWebhook",
"BridgeCompleteCallback",
"BridgeTargetCompleteCallback",
+ "BrtcError",
+ "BrtcErrorResponse",
+ "BrtcErrorSource",
+ "BrtcLink",
"BusinessEntityTypeEnum",
"BusinessRegistrationTypeEnum",
"CallDirectionEnum",
@@ -101,9 +105,7 @@
"EndpointStatusEnum",
"EndpointTypeEnum",
"Endpoints",
- "Error",
"ErrorObject",
- "ErrorResponse",
"ErrorSource",
"FailureWebhook",
"FieldError",
@@ -232,6 +234,7 @@
"VoiceCodeResponse",
"WebhookSubscription",
"WebhookSubscriptionBasicAuthentication",
+ "WebhookSubscriptionError",
"WebhookSubscriptionRequestSchema",
"WebhookSubscriptionTypeEnum",
"WebhookSubscriptionsListBody",
@@ -271,6 +274,10 @@
from bandwidth.models.blocked_webhook import BlockedWebhook as BlockedWebhook
from bandwidth.models.bridge_complete_callback import BridgeCompleteCallback as BridgeCompleteCallback
from bandwidth.models.bridge_target_complete_callback import BridgeTargetCompleteCallback as BridgeTargetCompleteCallback
+from bandwidth.models.brtc_error import BrtcError as BrtcError
+from bandwidth.models.brtc_error_response import BrtcErrorResponse as BrtcErrorResponse
+from bandwidth.models.brtc_error_source import BrtcErrorSource as BrtcErrorSource
+from bandwidth.models.brtc_link import BrtcLink as BrtcLink
from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum as BusinessEntityTypeEnum
from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum as BusinessRegistrationTypeEnum
from bandwidth.models.call_direction_enum import CallDirectionEnum as CallDirectionEnum
@@ -324,9 +331,7 @@
from bandwidth.models.endpoint_status_enum import EndpointStatusEnum as EndpointStatusEnum
from bandwidth.models.endpoint_type_enum import EndpointTypeEnum as EndpointTypeEnum
from bandwidth.models.endpoints import Endpoints as Endpoints
-from bandwidth.models.error import Error as Error
from bandwidth.models.error_object import ErrorObject as ErrorObject
-from bandwidth.models.error_response import ErrorResponse as ErrorResponse
from bandwidth.models.error_source import ErrorSource as ErrorSource
from bandwidth.models.failure_webhook import FailureWebhook as FailureWebhook
from bandwidth.models.field_error import FieldError as FieldError
@@ -455,6 +460,7 @@
from bandwidth.models.voice_code_response import VoiceCodeResponse as VoiceCodeResponse
from bandwidth.models.webhook_subscription import WebhookSubscription as WebhookSubscription
from bandwidth.models.webhook_subscription_basic_authentication import WebhookSubscriptionBasicAuthentication as WebhookSubscriptionBasicAuthentication
+from bandwidth.models.webhook_subscription_error import WebhookSubscriptionError as WebhookSubscriptionError
from bandwidth.models.webhook_subscription_request_schema import WebhookSubscriptionRequestSchema as WebhookSubscriptionRequestSchema
from bandwidth.models.webhook_subscription_type_enum import WebhookSubscriptionTypeEnum as WebhookSubscriptionTypeEnum
from bandwidth.models.webhook_subscriptions_list_body import WebhookSubscriptionsListBody as WebhookSubscriptionsListBody
diff --git a/bandwidth/api/endpoints_api.py b/bandwidth/api/endpoints_api.py
index e8b26ba3..506a77fa 100644
--- a/bandwidth/api/endpoints_api.py
+++ b/bandwidth/api/endpoints_api.py
@@ -104,14 +104,14 @@ def create_endpoint(
_response_types_map: Dict[str, Optional[str]] = {
'201': "CreateEndpointResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -183,14 +183,14 @@ def create_endpoint_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'201': "CreateEndpointResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -262,14 +262,14 @@ def create_endpoint_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'201': "CreateEndpointResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -421,14 +421,14 @@ def delete_endpoint(
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -500,14 +500,14 @@ def delete_endpoint_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -579,14 +579,14 @@ def delete_endpoint_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -725,14 +725,14 @@ def get_endpoint(
_response_types_map: Dict[str, Optional[str]] = {
'200': "EndpointResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -804,14 +804,14 @@ def get_endpoint_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "EndpointResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -883,14 +883,14 @@ def get_endpoint_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'200': "EndpointResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -1041,14 +1041,14 @@ def list_endpoints(
_response_types_map: Dict[str, Optional[str]] = {
'200': "ListEndpointsResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -1132,14 +1132,14 @@ def list_endpoints_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "ListEndpointsResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -1223,14 +1223,14 @@ def list_endpoints_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'200': "ListEndpointsResponse",
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -1390,14 +1390,14 @@ def update_endpoint_bxml(
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -1473,14 +1473,14 @@ def update_endpoint_bxml_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
@@ -1556,14 +1556,14 @@ def update_endpoint_bxml_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
- '400': "ErrorResponse",
- '401': "ErrorResponse",
- '403': "ErrorResponse",
- '404': "ErrorResponse",
- '405': "ErrorResponse",
- '415': "ErrorResponse",
- '429': "ErrorResponse",
- '500': "ErrorResponse",
+ '400': "BrtcErrorResponse",
+ '401': "BrtcErrorResponse",
+ '403': "BrtcErrorResponse",
+ '404': "BrtcErrorResponse",
+ '405': "BrtcErrorResponse",
+ '415': "BrtcErrorResponse",
+ '429': "BrtcErrorResponse",
+ '500': "BrtcErrorResponse",
}
response_data = self.api_client.call_api(
*_param,
diff --git a/bandwidth/models/__init__.py b/bandwidth/models/__init__.py
index ec247b0c..9e15825d 100644
--- a/bandwidth/models/__init__.py
+++ b/bandwidth/models/__init__.py
@@ -22,6 +22,10 @@
from bandwidth.models.blocked_webhook import BlockedWebhook
from bandwidth.models.bridge_complete_callback import BridgeCompleteCallback
from bandwidth.models.bridge_target_complete_callback import BridgeTargetCompleteCallback
+from bandwidth.models.brtc_error import BrtcError
+from bandwidth.models.brtc_error_response import BrtcErrorResponse
+from bandwidth.models.brtc_error_source import BrtcErrorSource
+from bandwidth.models.brtc_link import BrtcLink
from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum
from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum
from bandwidth.models.call_direction_enum import CallDirectionEnum
@@ -75,9 +79,7 @@
from bandwidth.models.endpoint_status_enum import EndpointStatusEnum
from bandwidth.models.endpoint_type_enum import EndpointTypeEnum
from bandwidth.models.endpoints import Endpoints
-from bandwidth.models.error import Error
from bandwidth.models.error_object import ErrorObject
-from bandwidth.models.error_response import ErrorResponse
from bandwidth.models.error_source import ErrorSource
from bandwidth.models.failure_webhook import FailureWebhook
from bandwidth.models.field_error import FieldError
@@ -206,6 +208,7 @@
from bandwidth.models.voice_code_response import VoiceCodeResponse
from bandwidth.models.webhook_subscription import WebhookSubscription
from bandwidth.models.webhook_subscription_basic_authentication import WebhookSubscriptionBasicAuthentication
+from bandwidth.models.webhook_subscription_error import WebhookSubscriptionError
from bandwidth.models.webhook_subscription_request_schema import WebhookSubscriptionRequestSchema
from bandwidth.models.webhook_subscription_type_enum import WebhookSubscriptionTypeEnum
from bandwidth.models.webhook_subscriptions_list_body import WebhookSubscriptionsListBody
diff --git a/bandwidth/models/brtc_error.py b/bandwidth/models/brtc_error.py
new file mode 100644
index 00000000..30c7c8ce
--- /dev/null
+++ b/bandwidth/models/brtc_error.py
@@ -0,0 +1,114 @@
+# 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 uuid import UUID
+from bandwidth.models.brtc_error_source import BrtcErrorSource
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BrtcError(BaseModel):
+ """
+ BrtcError
+ """ # noqa: E501
+ id: Optional[UUID] = Field(default=None, description="A unique identifier for the error.")
+ type: StrictStr = Field(description="The type of error.")
+ description: StrictStr = Field(description="A description of the error.")
+ code: Optional[StrictStr] = Field(default=None, description="A code that uniquely identifies the error.")
+ source: Optional[BrtcErrorSource] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "type", "description", "code", "source"]
+
+ 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 BrtcError 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,
+ )
+ # override the default output from pydantic by calling `to_dict()` of source
+ if self.source:
+ _dict['source'] = self.source.to_dict()
+ # 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 BrtcError 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"),
+ "type": obj.get("type"),
+ "description": obj.get("description"),
+ "code": obj.get("code"),
+ "source": BrtcErrorSource.from_dict(obj["source"]) if obj.get("source") is not None else None
+ })
+ # 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/error_response.py b/bandwidth/models/brtc_error_response.py
similarity index 86%
rename from bandwidth/models/error_response.py
rename to bandwidth/models/brtc_error_response.py
index 9058ff78..b7492185 100644
--- a/bandwidth/models/error_response.py
+++ b/bandwidth/models/brtc_error_response.py
@@ -20,18 +20,18 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
-from bandwidth.models.error import Error
-from bandwidth.models.link import Link
+from bandwidth.models.brtc_error import BrtcError
+from bandwidth.models.brtc_link import BrtcLink
from typing import Optional, Set
from typing_extensions import Self
-class ErrorResponse(BaseModel):
+class BrtcErrorResponse(BaseModel):
"""
- ErrorResponse
+ BrtcErrorResponse
""" # noqa: E501
- links: List[Link]
+ links: List[BrtcLink]
data: Optional[Dict[str, Any]]
- errors: List[Error]
+ errors: List[BrtcError]
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["links", "data", "errors"]
@@ -53,7 +53,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of ErrorResponse from a JSON string"""
+ """Create an instance of BrtcErrorResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -104,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of ErrorResponse from a dict"""
+ """Create an instance of BrtcErrorResponse from a dict"""
if obj is None:
return None
@@ -112,9 +112,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
+ "links": [BrtcLink.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
"data": obj.get("data"),
- "errors": [Error.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
+ "errors": [BrtcError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/bandwidth/models/brtc_error_source.py b/bandwidth/models/brtc_error_source.py
new file mode 100644
index 00000000..41bfe9a8
--- /dev/null
+++ b/bandwidth/models/brtc_error_source.py
@@ -0,0 +1,107 @@
+# 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 BrtcErrorSource(BaseModel):
+ """
+ BrtcErrorSource
+ """ # noqa: E501
+ parameter: Optional[StrictStr] = Field(default=None, description="The URI parameter that caused the error.")
+ var_field: Optional[StrictStr] = Field(default=None, description="The request body field that caused the error.", alias="field")
+ header: Optional[StrictStr] = Field(default=None, description="The header that caused the error.")
+ reference: Optional[StrictStr] = Field(default=None, description="The resource ID or path to the resource (or non-existent resource) causing the error.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["parameter", "field", "header", "reference"]
+
+ 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 BrtcErrorSource 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 BrtcErrorSource from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "parameter": obj.get("parameter"),
+ "field": obj.get("field"),
+ "header": obj.get("header"),
+ "reference": obj.get("reference")
+ })
+ # 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/brtc_link.py b/bandwidth/models/brtc_link.py
new file mode 100644
index 00000000..65f43ac3
--- /dev/null
+++ b/bandwidth/models/brtc_link.py
@@ -0,0 +1,105 @@
+# 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 BrtcLink(BaseModel):
+ """
+ BrtcLink
+ """ # noqa: E501
+ href: Optional[StrictStr] = Field(default=None, description="The full URL of the link.")
+ rel: Optional[StrictStr] = Field(default=None, description="The relationship of the link to the current resource.")
+ method: Optional[StrictStr] = Field(default=None, description="The HTTP method to use when making the request.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["href", "rel", "method"]
+
+ 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 BrtcLink 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 BrtcLink from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "href": obj.get("href"),
+ "rel": obj.get("rel"),
+ "method": obj.get("method")
+ })
+ # 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/create_call.py b/bandwidth/models/create_call.py
index a019e736..f47876e0 100644
--- a/bandwidth/models/create_call.py
+++ b/bandwidth/models/create_call.py
@@ -50,7 +50,7 @@ class CreateCall(BaseModel):
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")
priority: Optional[Annotated[int, Field(le=5, strict=True, ge=1)]] = Field(default=5, description="The priority of this call over other calls from your account. For example, if during a call your application needs to place a new call and bridge it with the current call, you might want to create the call with priority 1 so that it will be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call.")
- tag: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="A custom string that will be sent with all webhooks for this call unless overwritten by a future `` verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters.")
+ tag: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = Field(default=None, description="A custom string that will be sent with all webhooks for this call unless overwritten by a future `` verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["to", "from", "privacy", "displayName", "uui", "applicationId", "answerUrl", "answerMethod", "username", "password", "answerFallbackUrl", "answerFallbackMethod", "fallbackUsername", "fallbackPassword", "disconnectUrl", "disconnectMethod", "callTimeout", "callbackTimeout", "machineDetection", "priority", "tag"]
diff --git a/bandwidth/models/create_endpoint_response.py b/bandwidth/models/create_endpoint_response.py
index a230f1ba..c87761d7 100644
--- a/bandwidth/models/create_endpoint_response.py
+++ b/bandwidth/models/create_endpoint_response.py
@@ -20,9 +20,9 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
+from bandwidth.models.brtc_error import BrtcError
+from bandwidth.models.brtc_link import BrtcLink
from bandwidth.models.create_endpoint_response_data import CreateEndpointResponseData
-from bandwidth.models.error import Error
-from bandwidth.models.link import Link
from typing import Optional, Set
from typing_extensions import Self
@@ -30,9 +30,9 @@ class CreateEndpointResponse(BaseModel):
"""
CreateEndpointResponse
""" # noqa: E501
- links: List[Link]
+ links: List[BrtcLink]
data: CreateEndpointResponseData
- errors: List[Error]
+ errors: List[BrtcError]
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["links", "data", "errors"]
@@ -111,9 +111,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
+ "links": [BrtcLink.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
"data": CreateEndpointResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
- "errors": [Error.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
+ "errors": [BrtcError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/bandwidth/models/endpoint_response.py b/bandwidth/models/endpoint_response.py
index f2d89d88..67e9bd4c 100644
--- a/bandwidth/models/endpoint_response.py
+++ b/bandwidth/models/endpoint_response.py
@@ -20,9 +20,9 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
+from bandwidth.models.brtc_error import BrtcError
+from bandwidth.models.brtc_link import BrtcLink
from bandwidth.models.endpoint import Endpoint
-from bandwidth.models.error import Error
-from bandwidth.models.link import Link
from typing import Optional, Set
from typing_extensions import Self
@@ -30,9 +30,9 @@ class EndpointResponse(BaseModel):
"""
EndpointResponse
""" # noqa: E501
- links: List[Link]
+ links: List[BrtcLink]
data: Endpoint
- errors: List[Error]
+ errors: List[BrtcError]
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["links", "data", "errors"]
@@ -111,9 +111,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
+ "links": [BrtcLink.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
"data": Endpoint.from_dict(obj["data"]) if obj.get("data") is not None else None,
- "errors": [Error.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
+ "errors": [BrtcError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/bandwidth/models/list_endpoints_response.py b/bandwidth/models/list_endpoints_response.py
index ece66219..e83f0134 100644
--- a/bandwidth/models/list_endpoints_response.py
+++ b/bandwidth/models/list_endpoints_response.py
@@ -20,9 +20,9 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
+from bandwidth.models.brtc_error import BrtcError
+from bandwidth.models.brtc_link import BrtcLink
from bandwidth.models.endpoints import Endpoints
-from bandwidth.models.error import Error
-from bandwidth.models.link import Link
from bandwidth.models.page import Page
from typing import Optional, Set
from typing_extensions import Self
@@ -31,10 +31,10 @@ class ListEndpointsResponse(BaseModel):
"""
ListEndpointsResponse
""" # noqa: E501
- links: List[Link]
+ links: List[BrtcLink]
page: Optional[Page] = None
data: List[Endpoints]
- errors: List[Error]
+ errors: List[BrtcError]
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["links", "page", "data", "errors"]
@@ -120,10 +120,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "links": [Link.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
+ "links": [BrtcLink.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
"page": Page.from_dict(obj["page"]) if obj.get("page") is not None else None,
"data": [Endpoints.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
- "errors": [Error.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
+ "errors": [BrtcError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/bandwidth/models/lookup_result.py b/bandwidth/models/lookup_result.py
index 34f348e5..521759b3 100644
--- a/bandwidth/models/lookup_result.py
+++ b/bandwidth/models/lookup_result.py
@@ -40,7 +40,7 @@ class LookupResult(BaseModel):
deactivation_date: Optional[StrictStr] = Field(default=None, description="[DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event.", alias="deactivationDate")
deactivation_event: Optional[DeactivationEventEnum] = Field(default=None, alias="deactivationEvent")
latest_message_delivery_status: Optional[LatestMessageDeliveryStatusEnum] = Field(default=None, alias="latestMessageDeliveryStatus")
- initial_message_delivery_status_date: Optional[date] = Field(default=None, description="[DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes.", alias="initialMessageDeliveryStatusDate")
+ initial_message_delivery_status_date: Optional[date] = Field(default=None, description="[DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes.", alias="initialMessageDeliveryStatusDate")
latest_message_delivery_status_date: Optional[date] = Field(default=None, description="[DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes.", alias="latestMessageDeliveryStatusDate")
rcs_enabled: Optional[StrictBool] = Field(default=None, description="[RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS. ", alias="rcsEnabled")
additional_properties: Dict[str, Any] = {}
diff --git a/bandwidth/models/rbm_open_url_enum.py b/bandwidth/models/rbm_open_url_enum.py
index e195781c..3121edfc 100644
--- a/bandwidth/models/rbm_open_url_enum.py
+++ b/bandwidth/models/rbm_open_url_enum.py
@@ -21,7 +21,7 @@
class RbmOpenUrlEnum(str, Enum):
"""
- Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView.
+ Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn't support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView.
"""
"""
diff --git a/bandwidth/models/update_call.py b/bandwidth/models/update_call.py
index 2f17bfef..cac9d7b0 100644
--- a/bandwidth/models/update_call.py
+++ b/bandwidth/models/update_call.py
@@ -39,7 +39,7 @@ class UpdateCall(BaseModel):
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`.")
+ tag: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = 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 4096 characters. Not allowed if `state` is `completed`.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["state", "redirectUrl", "redirectMethod", "username", "password", "redirectFallbackUrl", "redirectFallbackMethod", "fallbackUsername", "fallbackPassword", "tag"]
diff --git a/bandwidth/models/error.py b/bandwidth/models/webhook_subscription_error.py
similarity index 94%
rename from bandwidth/models/error.py
rename to bandwidth/models/webhook_subscription_error.py
index 33ac3e86..67be76da 100644
--- a/bandwidth/models/error.py
+++ b/bandwidth/models/webhook_subscription_error.py
@@ -24,9 +24,9 @@
from typing import Optional, Set
from typing_extensions import Self
-class Error(BaseModel):
+class WebhookSubscriptionError(BaseModel):
"""
- Error
+ WebhookSubscriptionError
""" # noqa: E501
code: Optional[StrictInt] = None
description: Optional[StrictStr] = None
@@ -52,7 +52,7 @@ def to_json(self) -> str:
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of Error from a JSON string"""
+ """Create an instance of WebhookSubscriptionError from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]:
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of Error from a dict"""
+ """Create an instance of WebhookSubscriptionError from a dict"""
if obj is None:
return None
diff --git a/bandwidth/models/webhook_subscriptions_list_body.py b/bandwidth/models/webhook_subscriptions_list_body.py
index 21cbeaec..68817c6e 100644
--- a/bandwidth/models/webhook_subscriptions_list_body.py
+++ b/bandwidth/models/webhook_subscriptions_list_body.py
@@ -20,9 +20,9 @@
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
-from bandwidth.models.error import Error
from bandwidth.models.links_object import LinksObject
from bandwidth.models.webhook_subscription import WebhookSubscription
+from bandwidth.models.webhook_subscription_error import WebhookSubscriptionError
from typing import Optional, Set
from typing_extensions import Self
@@ -31,7 +31,7 @@ class WebhookSubscriptionsListBody(BaseModel):
A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated).
""" # noqa: E501
links: Optional[LinksObject] = None
- errors: Optional[List[Error]] = None
+ errors: Optional[List[WebhookSubscriptionError]] = None
data: List[WebhookSubscription]
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["links", "errors", "data"]
@@ -112,7 +112,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"links": LinksObject.from_dict(obj["links"]) if obj.get("links") is not None else None,
- "errors": [Error.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None,
+ "errors": [WebhookSubscriptionError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None,
"data": [WebhookSubscription.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
# store additional fields in additional_properties
diff --git a/docs/BrtcError.md b/docs/BrtcError.md
new file mode 100644
index 00000000..69c132d1
--- /dev/null
+++ b/docs/BrtcError.md
@@ -0,0 +1,33 @@
+# BrtcError
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | A unique identifier for the error. | [optional]
+**type** | **str** | The type of error. |
+**description** | **str** | A description of the error. |
+**code** | **str** | A code that uniquely identifies the error. | [optional]
+**source** | [**BrtcErrorSource**](BrtcErrorSource.md) | | [optional]
+
+## Example
+
+```python
+from bandwidth.models.brtc_error import BrtcError
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of BrtcError from a JSON string
+brtc_error_instance = BrtcError.from_json(json)
+# print the JSON string representation of the object
+print(BrtcError.to_json())
+
+# convert the object into a dict
+brtc_error_dict = brtc_error_instance.to_dict()
+# create an instance of BrtcError from a dict
+brtc_error_from_dict = BrtcError.from_dict(brtc_error_dict)
+```
+[[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/BrtcErrorResponse.md b/docs/BrtcErrorResponse.md
new file mode 100644
index 00000000..9298def5
--- /dev/null
+++ b/docs/BrtcErrorResponse.md
@@ -0,0 +1,31 @@
+# BrtcErrorResponse
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**links** | [**List[BrtcLink]**](BrtcLink.md) | |
+**data** | **object** | |
+**errors** | [**List[BrtcError]**](BrtcError.md) | |
+
+## Example
+
+```python
+from bandwidth.models.brtc_error_response import BrtcErrorResponse
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of BrtcErrorResponse from a JSON string
+brtc_error_response_instance = BrtcErrorResponse.from_json(json)
+# print the JSON string representation of the object
+print(BrtcErrorResponse.to_json())
+
+# convert the object into a dict
+brtc_error_response_dict = brtc_error_response_instance.to_dict()
+# create an instance of BrtcErrorResponse from a dict
+brtc_error_response_from_dict = BrtcErrorResponse.from_dict(brtc_error_response_dict)
+```
+[[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/BrtcErrorSource.md b/docs/BrtcErrorSource.md
new file mode 100644
index 00000000..feef4cb0
--- /dev/null
+++ b/docs/BrtcErrorSource.md
@@ -0,0 +1,32 @@
+# BrtcErrorSource
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**parameter** | **str** | The URI parameter that caused the error. | [optional]
+**var_field** | **str** | The request body field that caused the error. | [optional]
+**header** | **str** | The header that caused the error. | [optional]
+**reference** | **str** | The resource ID or path to the resource (or non-existent resource) causing the error. | [optional]
+
+## Example
+
+```python
+from bandwidth.models.brtc_error_source import BrtcErrorSource
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of BrtcErrorSource from a JSON string
+brtc_error_source_instance = BrtcErrorSource.from_json(json)
+# print the JSON string representation of the object
+print(BrtcErrorSource.to_json())
+
+# convert the object into a dict
+brtc_error_source_dict = brtc_error_source_instance.to_dict()
+# create an instance of BrtcErrorSource from a dict
+brtc_error_source_from_dict = BrtcErrorSource.from_dict(brtc_error_source_dict)
+```
+[[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/BrtcLink.md b/docs/BrtcLink.md
new file mode 100644
index 00000000..1ec0dddc
--- /dev/null
+++ b/docs/BrtcLink.md
@@ -0,0 +1,31 @@
+# BrtcLink
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**href** | **str** | The full URL of the link. | [optional]
+**rel** | **str** | The relationship of the link to the current resource. | [optional]
+**method** | **str** | The HTTP method to use when making the request. | [optional]
+
+## Example
+
+```python
+from bandwidth.models.brtc_link import BrtcLink
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of BrtcLink from a JSON string
+brtc_link_instance = BrtcLink.from_json(json)
+# print the JSON string representation of the object
+print(BrtcLink.to_json())
+
+# convert the object into a dict
+brtc_link_dict = brtc_link_instance.to_dict()
+# create an instance of BrtcLink from a dict
+brtc_link_from_dict = BrtcLink.from_dict(brtc_link_dict)
+```
+[[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 d9c18a34..5b7bb813 100644
--- a/docs/CreateCall.md
+++ b/docs/CreateCall.md
@@ -25,7 +25,7 @@ Name | Type | Description | Notes
**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]
**priority** | **int** | The priority of this call over other calls from your account. For example, if during a call your application needs to place a new call and bridge it with the current call, you might want to create the call with priority 1 so that it will be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call. | [optional] [default to 5]
-**tag** | **str** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters. | [optional]
+**tag** | **str** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters. | [optional]
## Example
diff --git a/docs/CreateEndpointResponse.md b/docs/CreateEndpointResponse.md
index feeb16d2..a22e49c1 100644
--- a/docs/CreateEndpointResponse.md
+++ b/docs/CreateEndpointResponse.md
@@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**links** | [**List[Link]**](Link.md) | |
+**links** | [**List[BrtcLink]**](BrtcLink.md) | |
**data** | [**CreateEndpointResponseData**](CreateEndpointResponseData.md) | |
-**errors** | [**List[Error]**](Error.md) | |
+**errors** | [**List[BrtcError]**](BrtcError.md) | |
## Example
diff --git a/docs/EndpointResponse.md b/docs/EndpointResponse.md
index 530b77f4..e70c702b 100644
--- a/docs/EndpointResponse.md
+++ b/docs/EndpointResponse.md
@@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**links** | [**List[Link]**](Link.md) | |
+**links** | [**List[BrtcLink]**](BrtcLink.md) | |
**data** | [**Endpoint**](Endpoint.md) | |
-**errors** | [**List[Error]**](Error.md) | |
+**errors** | [**List[BrtcError]**](BrtcError.md) | |
## Example
diff --git a/docs/EndpointsApi.md b/docs/EndpointsApi.md
index c515469d..a2433c39 100644
--- a/docs/EndpointsApi.md
+++ b/docs/EndpointsApi.md
@@ -103,7 +103,7 @@ Name | Type | Description | Notes
**404** | Not Found | - |
**405** | Method Not Allowed | - |
**415** | Unsupported Media Type | - |
-**429** | Too Many Requests | - |
+**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
**500** | Service Unavailable | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -196,7 +196,7 @@ void (empty response body)
**404** | Not Found | - |
**405** | Method Not Allowed | - |
**415** | Unsupported Media Type | - |
-**429** | Too Many Requests | - |
+**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
**500** | Service Unavailable | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -292,7 +292,7 @@ Name | Type | Description | Notes
**404** | Not Found | - |
**405** | Method Not Allowed | - |
**415** | Unsupported Media Type | - |
-**429** | Too Many Requests | - |
+**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
**500** | Service Unavailable | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -396,7 +396,7 @@ Name | Type | Description | Notes
**404** | Not Found | - |
**405** | Method Not Allowed | - |
**415** | Unsupported Media Type | - |
-**429** | Too Many Requests | - |
+**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
**500** | Service Unavailable | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -491,7 +491,7 @@ void (empty response body)
**404** | Not Found | - |
**405** | Method Not Allowed | - |
**415** | Unsupported Media Type | - |
-**429** | Too Many Requests | - |
+**429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
|
**500** | Service Unavailable | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md
deleted file mode 100644
index 60910a8b..00000000
--- a/docs/ErrorResponse.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# ErrorResponse
-
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**links** | [**List[Link]**](Link.md) | |
-**data** | **object** | |
-**errors** | [**List[Error]**](Error.md) | |
-
-## Example
-
-```python
-from bandwidth.models.error_response import ErrorResponse
-
-# TODO update the JSON string below
-json = "{}"
-# create an instance of ErrorResponse from a JSON string
-error_response_instance = ErrorResponse.from_json(json)
-# print the JSON string representation of the object
-print(ErrorResponse.to_json())
-
-# convert the object into a dict
-error_response_dict = error_response_instance.to_dict()
-# create an instance of ErrorResponse from a dict
-error_response_from_dict = ErrorResponse.from_dict(error_response_dict)
-```
-[[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/ListEndpointsResponse.md b/docs/ListEndpointsResponse.md
index 5fe2c0ec..a64b7904 100644
--- a/docs/ListEndpointsResponse.md
+++ b/docs/ListEndpointsResponse.md
@@ -5,10 +5,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**links** | [**List[Link]**](Link.md) | |
+**links** | [**List[BrtcLink]**](BrtcLink.md) | |
**page** | [**Page**](Page.md) | | [optional]
**data** | [**List[Endpoints]**](Endpoints.md) | |
-**errors** | [**List[Error]**](Error.md) | |
+**errors** | [**List[BrtcError]**](BrtcError.md) | |
## Example
diff --git a/docs/LookupResult.md b/docs/LookupResult.md
index 649e6896..4e9e79e7 100644
--- a/docs/LookupResult.md
+++ b/docs/LookupResult.md
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
**deactivation_date** | **str** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional]
**deactivation_event** | [**DeactivationEventEnum**](DeactivationEventEnum.md) | | [optional]
**latest_message_delivery_status** | [**LatestMessageDeliveryStatusEnum**](LatestMessageDeliveryStatusEnum.md) | | [optional]
-**initial_message_delivery_status_date** | **date** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional]
+**initial_message_delivery_status_date** | **date** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional]
**latest_message_delivery_status_date** | **date** | [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional]
**rcs_enabled** | **bool** | [RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS. | [optional]
diff --git a/docs/RbmOpenUrlEnum.md b/docs/RbmOpenUrlEnum.md
index db35154f..5069384a 100644
--- a/docs/RbmOpenUrlEnum.md
+++ b/docs/RbmOpenUrlEnum.md
@@ -1,6 +1,6 @@
# RbmOpenUrlEnum
-Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView.
+Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn't support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView.
## Enum
diff --git a/docs/UpdateCall.md b/docs/UpdateCall.md
index be0a78a5..200c60df 100644
--- a/docs/UpdateCall.md
+++ b/docs/UpdateCall.md
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
**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]
+**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 4096 characters. Not allowed if `state` is `completed`. | [optional]
## Example
diff --git a/docs/Error.md b/docs/WebhookSubscriptionError.md
similarity index 52%
rename from docs/Error.md
rename to docs/WebhookSubscriptionError.md
index 2eab7688..3ee409d4 100644
--- a/docs/Error.md
+++ b/docs/WebhookSubscriptionError.md
@@ -1,4 +1,4 @@
-# Error
+# WebhookSubscriptionError
## Properties
@@ -12,19 +12,19 @@ Name | Type | Description | Notes
## Example
```python
-from bandwidth.models.error import Error
+from bandwidth.models.webhook_subscription_error import WebhookSubscriptionError
# TODO update the JSON string below
json = "{}"
-# create an instance of Error from a JSON string
-error_instance = Error.from_json(json)
+# create an instance of WebhookSubscriptionError from a JSON string
+webhook_subscription_error_instance = WebhookSubscriptionError.from_json(json)
# print the JSON string representation of the object
-print(Error.to_json())
+print(WebhookSubscriptionError.to_json())
# convert the object into a dict
-error_dict = error_instance.to_dict()
-# create an instance of Error from a dict
-error_from_dict = Error.from_dict(error_dict)
+webhook_subscription_error_dict = webhook_subscription_error_instance.to_dict()
+# create an instance of WebhookSubscriptionError from a dict
+webhook_subscription_error_from_dict = WebhookSubscriptionError.from_dict(webhook_subscription_error_dict)
```
[[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/WebhookSubscriptionsListBody.md b/docs/WebhookSubscriptionsListBody.md
index 1c5d5ac4..d53d1549 100644
--- a/docs/WebhookSubscriptionsListBody.md
+++ b/docs/WebhookSubscriptionsListBody.md
@@ -7,7 +7,7 @@ A list of all webhook subscriptions registered for this account ID for this part
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**links** | [**LinksObject**](LinksObject.md) | | [optional]
-**errors** | [**List[Error]**](Error.md) | | [optional]
+**errors** | [**List[WebhookSubscriptionError]**](WebhookSubscriptionError.md) | | [optional]
**data** | [**List[WebhookSubscription]**](WebhookSubscription.md) | |
## Example
diff --git a/generate-model-tests.sh b/generate-model-tests.sh
new file mode 100644
index 00000000..9084d544
--- /dev/null
+++ b/generate-model-tests.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Generates new test files for models. Run from the root.
+
+# allow generator to write test files
+sed -i.bak 's/^test\/\*/# test\/*/' .openapi-generator-ignore && rm .openapi-generator-ignore.bak
+# remove current test files for models
+rm -f ./test/unit/models/test_*.py
+# generate new test files for models
+openapi-generator-cli generate -i bandwidth.yml -o ./ -c openapi-config.yml -g python > /dev/null
+# move generated model test files to the correct location (exclude api tests)
+for f in ./test/test_*.py; do
+ [[ "$f" != *"_api.py" ]] && mv "$f" ./test/unit/models/
+done
+# remove remaining generated test files (api tests, etc.)
+rm -f ./test/test_*.py
+# discard changes to modified files only (leaves deletions and new test files intact)
+modified=$(git diff --name-only --diff-filter=M) && [ -n "$modified" ] && echo "$modified" | xargs git checkout --
diff --git a/test/unit/api/test_endpoints_api.py b/test/unit/api/test_endpoints_api.py
index c31b1151..957edb9f 100644
--- a/test/unit/api/test_endpoints_api.py
+++ b/test/unit/api/test_endpoints_api.py
@@ -27,7 +27,7 @@
from bandwidth.models.endpoint import Endpoint
from bandwidth.models.endpoints import Endpoints
from bandwidth.models.list_endpoints_response import ListEndpointsResponse
-from bandwidth.models.link import Link
+from bandwidth.models.brtc_link import BrtcLink
from bandwidth.models.page import Page
from bandwidth.models.endpoint_type_enum import EndpointTypeEnum
from bandwidth.models.endpoint_direction_enum import EndpointDirectionEnum
@@ -73,7 +73,7 @@ def test_create_endpoint(self) -> None:
assert_that(response.data, instance_of(CreateEndpointResponse))
assert_that(response.data.links, instance_of(list))
- assert_that(response.data.links[0], instance_of(Link))
+ assert_that(response.data.links[0], instance_of(BrtcLink))
assert_that(response.data.links[0].href, starts_with('http'))
assert_that(response.data.links[0].rel, equal_to('endpoint'))
@@ -115,7 +115,7 @@ def test_get_endpoint(self) -> None:
assert_that(response.data, instance_of(EndpointResponse))
assert_that(response.data.links, instance_of(list))
- assert_that(response.data.links[0], instance_of(Link))
+ assert_that(response.data.links[0], instance_of(BrtcLink))
assert_that(response.data.links[0].href, starts_with('http'))
assert_that(response.data.links[0].rel, equal_to('self'))
@@ -143,7 +143,7 @@ def test_list_endpoints(self) -> None:
assert_that(response.data, instance_of(ListEndpointsResponse))
assert_that(response.data.links, instance_of(list))
- assert_that(response.data.links[0], instance_of(Link))
+ assert_that(response.data.links[0], instance_of(BrtcLink))
assert_that(response.data.links[0].href, starts_with('http'))
assert_that(response.data.links[0].rel, equal_to('self'))
diff --git a/test/unit/models/test_brtc_error.py b/test/unit/models/test_brtc_error.py
new file mode 100644
index 00000000..58413546
--- /dev/null
+++ b/test/unit/models/test_brtc_error.py
@@ -0,0 +1,71 @@
+# 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 uuid import UUID
+
+from bandwidth.models.brtc_error import BrtcError
+from bandwidth.models.brtc_error_source import BrtcErrorSource
+
+class TestBrtcError(unittest.TestCase):
+ """BrtcError unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> BrtcError:
+ """Test BrtcError
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ if include_optional:
+ return BrtcError(
+ id='59512d87-7a92-4040-8e4a-78fb772019b9',
+ type='resource.not_found',
+ description='The requested resource was not found.',
+ code='404',
+ source=BrtcErrorSource(
+ parameter='accountId',
+ var_field='accountId',
+ header='Authorization',
+ reference='e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85'
+ )
+ )
+ else:
+ return BrtcError(
+ type='resource.not_found',
+ description='The requested resource was not found.'
+ )
+
+ def testBrtcError(self):
+ """Test BrtcError"""
+ instance = self.make_instance(True)
+ assert instance is not None
+ assert isinstance(instance, BrtcError)
+ assert isinstance(instance.id, UUID)
+ assert instance.type == 'resource.not_found'
+ assert instance.description == 'The requested resource was not found.'
+ assert instance.code == '404'
+ assert isinstance(instance.source, BrtcErrorSource)
+ assert instance.source.parameter == 'accountId'
+ assert instance.source.var_field == 'accountId'
+ assert instance.source.header == 'Authorization'
+ assert instance.source.reference == 'e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85'
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/unit/models/test_brtc_error_response.py b/test/unit/models/test_brtc_error_response.py
new file mode 100644
index 00000000..f9e70b35
--- /dev/null
+++ b/test/unit/models/test_brtc_error_response.py
@@ -0,0 +1,80 @@
+# 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.brtc_error_response import BrtcErrorResponse
+from bandwidth.models.brtc_error import BrtcError
+from bandwidth.models.brtc_link import BrtcLink
+
+class TestBrtcErrorResponse(unittest.TestCase):
+ """BrtcErrorResponse unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> BrtcErrorResponse:
+ """Test BrtcErrorResponse
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ if include_optional:
+ return BrtcErrorResponse(
+ links=[
+ BrtcLink(
+ href='https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85',
+ rel='self',
+ method='GET'
+ )
+ ],
+ data=None,
+ errors=[
+ BrtcError(
+ id='59512d87-7a92-4040-8e4a-78fb772019b9',
+ type='resource.not_found',
+ description='The requested resource was not found.',
+ code='404'
+ )
+ ]
+ )
+ else:
+ return BrtcErrorResponse(
+ links=[],
+ data=None,
+ errors=[]
+ )
+
+ def testBrtcErrorResponse(self):
+ """Test BrtcErrorResponse"""
+ instance = self.make_instance(True)
+ assert instance is not None
+ assert isinstance(instance, BrtcErrorResponse)
+ assert isinstance(instance.links, list)
+ assert len(instance.links) == 1
+ assert isinstance(instance.links[0], BrtcLink)
+ assert instance.links[0].href == 'https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85'
+ assert instance.links[0].rel == 'self'
+ assert instance.data is None
+ assert isinstance(instance.errors, list)
+ assert len(instance.errors) == 1
+ assert isinstance(instance.errors[0], BrtcError)
+ assert instance.errors[0].type == 'resource.not_found'
+ assert instance.errors[0].description == 'The requested resource was not found.'
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/unit/models/test_brtc_error_source.py b/test/unit/models/test_brtc_error_source.py
new file mode 100644
index 00000000..924a1cc0
--- /dev/null
+++ b/test/unit/models/test_brtc_error_source.py
@@ -0,0 +1,56 @@
+# 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.brtc_error_source import BrtcErrorSource
+
+
+class TestBrtcErrorSource(unittest.TestCase):
+ """BrtcErrorSource unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> BrtcErrorSource:
+ """Test BrtcErrorSource
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ if include_optional:
+ return BrtcErrorSource(
+ parameter='accountId',
+ var_field='accountId',
+ header='Authorization',
+ reference='e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85'
+ )
+ else:
+ return BrtcErrorSource()
+
+ def testBrtcErrorSource(self):
+ """Test BrtcErrorSource"""
+ instance = self.make_instance(True)
+ assert instance is not None
+ assert isinstance(instance, BrtcErrorSource)
+ assert instance.parameter == 'accountId'
+ assert instance.var_field == 'accountId'
+ assert instance.header == 'Authorization'
+ assert instance.reference == 'e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85'
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/unit/models/test_brtc_link.py b/test/unit/models/test_brtc_link.py
new file mode 100644
index 00000000..6231d325
--- /dev/null
+++ b/test/unit/models/test_brtc_link.py
@@ -0,0 +1,53 @@
+# 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.brtc_link import BrtcLink
+
+class TestBrtcLink(unittest.TestCase):
+ """BrtcLink unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> BrtcLink:
+ """Test BrtcLink
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ if include_optional:
+ return BrtcLink(
+ href='https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85',
+ rel='self',
+ method='GET'
+ )
+ else:
+ return BrtcLink()
+
+ def testBrtcLink(self):
+ """Test BrtcLink"""
+ instance = self.make_instance(True)
+ assert instance is not None
+ assert isinstance(instance, BrtcLink)
+ assert instance.href == 'https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85'
+ assert instance.rel == 'self'
+ assert instance.method == 'GET'
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/unit/models/test_create_endpoint_response.py b/test/unit/models/test_create_endpoint_response.py
index ad245e89..6d5e2e6c 100644
--- a/test/unit/models/test_create_endpoint_response.py
+++ b/test/unit/models/test_create_endpoint_response.py
@@ -18,8 +18,8 @@
from bandwidth.models.create_endpoint_response import CreateEndpointResponse
from bandwidth.models.create_endpoint_response_data import CreateEndpointResponseData
-from bandwidth.models.link import Link
-from bandwidth.models.error import Error
+from bandwidth.models.brtc_link import BrtcLink
+from bandwidth.models.brtc_error import BrtcError
from bandwidth.models.endpoint_status_enum import EndpointStatusEnum
from bandwidth.models.endpoint_type_enum import EndpointTypeEnum
@@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> CreateEndpointResponse:
if include_optional:
return CreateEndpointResponse(
links=[
- Link(href='https://api.bandwidth.com/endpoint-123', rel='self')
+ BrtcLink(href='https://api.bandwidth.com/endpoint-123', rel='self')
],
data=CreateEndpointResponseData(
endpoint_id='endpoint-123',
@@ -63,7 +63,7 @@ def testCreateEndpointResponse(self):
assert isinstance(instance, CreateEndpointResponse)
assert isinstance(instance.links, list)
assert len(instance.links) == 1
- assert isinstance(instance.links[0], Link)
+ assert isinstance(instance.links[0], BrtcLink)
assert isinstance(instance.data, CreateEndpointResponseData)
assert instance.data.endpoint_id == 'endpoint-123'
assert instance.data.token == 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.test.token'
diff --git a/test/unit/models/test_endpoint_response.py b/test/unit/models/test_endpoint_response.py
index 5d00ca9e..86137153 100644
--- a/test/unit/models/test_endpoint_response.py
+++ b/test/unit/models/test_endpoint_response.py
@@ -18,8 +18,8 @@
from bandwidth.models.endpoint_response import EndpointResponse
from bandwidth.models.endpoint import Endpoint
-from bandwidth.models.link import Link
-from bandwidth.models.error import Error
+from bandwidth.models.brtc_link import BrtcLink
+from bandwidth.models.brtc_error import BrtcError
from bandwidth.models.endpoint_status_enum import EndpointStatusEnum
from bandwidth.models.endpoint_type_enum import EndpointTypeEnum
@@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> EndpointResponse:
if include_optional:
return EndpointResponse(
links=[
- Link(href='https://api.bandwidth.com/endpoint-999', rel='self')
+ BrtcLink(href='https://api.bandwidth.com/endpoint-999', rel='self')
],
data=Endpoint(
endpoint_id='endpoint-999',
@@ -62,7 +62,7 @@ def testEndpointResponse(self):
assert isinstance(instance, EndpointResponse)
assert isinstance(instance.links, list)
assert len(instance.links) == 1
- assert isinstance(instance.links[0], Link)
+ assert isinstance(instance.links[0], BrtcLink)
assert isinstance(instance.data, Endpoint)
assert instance.data.endpoint_id == 'endpoint-999'
assert instance.data.type == EndpointTypeEnum.WEBRTC
diff --git a/test/unit/models/test_error_response.py b/test/unit/models/test_error_response.py
deleted file mode 100644
index 82d66d32..00000000
--- a/test/unit/models/test_error_response.py
+++ /dev/null
@@ -1,72 +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
-
-
-import unittest
-
-from bandwidth.models.error_response import ErrorResponse
-from bandwidth.models.error import Error
-from bandwidth.models.link import Link
-
-class TestErrorResponse(unittest.TestCase):
- """ErrorResponse unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def make_instance(self, include_optional) -> ErrorResponse:
- """Test ErrorResponse
- include_optional is a boolean, when False only required
- params are included, when True both required and
- optional params are included """
- if include_optional:
- return ErrorResponse(
- links=[
- Link(href='https://api.bandwidth.com/errors', rel='self')
- ],
- data={'key': 'value'},
- errors=[
- Error(
- code=400,
- description='Bad Request'
- )
- ]
- )
- else:
- return ErrorResponse(
- )
-
- def testErrorResponse(self):
- """Test ErrorResponse"""
- instance = self.make_instance(True)
- assert instance is not None
- assert isinstance(instance, ErrorResponse)
- assert isinstance(instance.links, list)
- assert len(instance.links) == 1
- assert isinstance(instance.links[0], Link)
- assert instance.links[0].href == 'https://api.bandwidth.com/errors'
- assert instance.links[0].rel == 'self'
- assert isinstance(instance.data, dict)
- assert instance.data['key'] == 'value'
- assert isinstance(instance.errors, list)
- assert len(instance.errors) == 1
- assert isinstance(instance.errors[0], Error)
- assert instance.errors[0].code == 400
- assert instance.errors[0].description == 'Bad Request'
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/unit/models/test_list_endpoints_response.py b/test/unit/models/test_list_endpoints_response.py
index ad832e46..555e1c86 100644
--- a/test/unit/models/test_list_endpoints_response.py
+++ b/test/unit/models/test_list_endpoints_response.py
@@ -18,8 +18,8 @@
from bandwidth.models.list_endpoints_response import ListEndpointsResponse
from bandwidth.models.endpoints import Endpoints
-from bandwidth.models.link import Link
-from bandwidth.models.error import Error
+from bandwidth.models.brtc_link import BrtcLink
+from bandwidth.models.brtc_error import BrtcError
from bandwidth.models.page import Page
from bandwidth.models.endpoint_status_enum import EndpointStatusEnum
from bandwidth.models.endpoint_type_enum import EndpointTypeEnum
@@ -41,8 +41,8 @@ def make_instance(self, include_optional) -> ListEndpointsResponse:
if include_optional:
return ListEndpointsResponse(
links=[
- Link(href='https://api.bandwidth.com/endpoints', rel='self'),
- Link(href='https://api.bandwidth.com/endpoints?page=2', rel='next')
+ BrtcLink(href='https://api.bandwidth.com/endpoints', rel='self'),
+ BrtcLink(href='https://api.bandwidth.com/endpoints?page=2', rel='next')
],
page=Page(
page_size=10,
diff --git a/test/unit/models/test_error.py b/test/unit/models/test_webhook_subscription_error.py
similarity index 57%
rename from test/unit/models/test_error.py
rename to test/unit/models/test_webhook_subscription_error.py
index 59da3064..2db14ebb 100644
--- a/test/unit/models/test_error.py
+++ b/test/unit/models/test_webhook_subscription_error.py
@@ -15,11 +15,11 @@
import unittest
-from bandwidth.models.error import Error
+from bandwidth.models.webhook_subscription_error import WebhookSubscriptionError
from bandwidth.models.telephone_number import TelephoneNumber
-class TestError(unittest.TestCase):
- """Error unit test stubs"""
+class TestWebhookSubscriptionError(unittest.TestCase):
+ """WebhookSubscriptionError unit test stubs"""
def setUp(self):
pass
@@ -27,35 +27,33 @@ def setUp(self):
def tearDown(self):
pass
- def make_instance(self, include_optional) -> Error:
- """Test Error
+ def make_instance(self, include_optional) -> WebhookSubscriptionError:
+ """Test WebhookSubscriptionError
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
if include_optional:
- return Error(
- code = 56,
- description = '',
- telephone_numbers = [
- TelephoneNumber(
- telephone_number = '', )
- ]
+ return WebhookSubscriptionError(
+ code=56,
+ description='description',
+ telephone_numbers=[
+ TelephoneNumber(telephone_number='+19195551234')
+ ]
)
else:
- return Error(
- )
+ return WebhookSubscriptionError()
- def testError(self):
- """Test Error"""
+ def testWebhookSubscriptionError(self):
+ """Test WebhookSubscriptionError"""
instance = self.make_instance(True)
assert instance is not None
- assert isinstance(instance, Error)
+ assert isinstance(instance, WebhookSubscriptionError)
assert instance.code == 56
- assert instance.description == ''
+ assert instance.description == 'description'
assert isinstance(instance.telephone_numbers, list)
assert len(instance.telephone_numbers) == 1
assert isinstance(instance.telephone_numbers[0], TelephoneNumber)
- assert instance.telephone_numbers[0].telephone_number == ''
+ assert instance.telephone_numbers[0].telephone_number == '+19195551234'
if __name__ == '__main__':
unittest.main()
diff --git a/test/unit/models/test_webhook_subscriptions_list_body.py b/test/unit/models/test_webhook_subscriptions_list_body.py
index 82e245d9..205121b3 100644
--- a/test/unit/models/test_webhook_subscriptions_list_body.py
+++ b/test/unit/models/test_webhook_subscriptions_list_body.py
@@ -18,7 +18,7 @@
from bandwidth.models.webhook_subscriptions_list_body import WebhookSubscriptionsListBody
from bandwidth.models.links_object import LinksObject
-from bandwidth.models.error import Error
+from bandwidth.models.webhook_subscription_error import WebhookSubscriptionError
from bandwidth.models.telephone_number import TelephoneNumber
from bandwidth.models.webhook_subscription import WebhookSubscription
from bandwidth.models.webhook_subscription_basic_authentication import WebhookSubscriptionBasicAuthentication
@@ -45,9 +45,9 @@ def make_instance(self, include_optional) -> WebhookSubscriptionsListBody:
previous = 'https://api.com/abc/previous',
last = 'https://api.com/abc/last', ),
errors = [
- Error(
- code = 56,
- description = 'description',
+ WebhookSubscriptionError(
+ code = 56,
+ description = 'description',
telephone_numbers = [
TelephoneNumber(
telephone_number = '+19195551234', )
@@ -94,7 +94,7 @@ def testWebhookSubscriptionsListBody(self):
assert instance.links.last == 'https://api.com/abc/last'
assert isinstance(instance.errors, list)
assert len(instance.errors) == 1
- assert isinstance(instance.errors[0], Error)
+ assert isinstance(instance.errors[0], WebhookSubscriptionError)
assert instance.errors[0].code == 56
assert instance.errors[0].description == 'description'
assert isinstance(instance.errors[0].telephone_numbers, list)