From d6fc736e3649ec6b9118a22cd3c02c5e4291eb49 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 11 Mar 2025 18:37:06 +0000 Subject: [PATCH 1/3] Generate SDK with OpenAPI Generator Version --- bandwidth.yml | 11 +++++++++++ bandwidth/models/initiate_callback.py | 7 +++++-- docs/InitiateCallback.md | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 70ca20d3..801e18f9 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -3801,6 +3801,8 @@ components: $ref: '#/components/schemas/diversion' stirShaken: $ref: '#/components/schemas/stirShaken' + uui: + $ref: '#/components/schemas/uui' machineDetectionCompleteCallback: type: object description: >- @@ -4435,6 +4437,15 @@ components: type: string description: (optional) A unique origination identifier. example: 99759086-1335-11ed-9bcf-5f7d464e91af + uui: + type: string + description: >- + The value of the `User-To-User` header to send within the initial + `INVITE`. Must include the encoding parameter as specified in RFC 7433. + Only `base64`, `jwt` and `hex` encoding are currently allowed. This + value, including the encoding specifier, may not exceed 256 characters. + example: bXktdXVp + maxLength: 256 codeRequest: type: object properties: diff --git a/bandwidth/models/initiate_callback.py b/bandwidth/models/initiate_callback.py index 78e46977..1feae7b5 100644 --- a/bandwidth/models/initiate_callback.py +++ b/bandwidth/models/initiate_callback.py @@ -21,6 +21,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from bandwidth.models.call_direction_enum import CallDirectionEnum from bandwidth.models.diversion import Diversion from bandwidth.models.stir_shaken import StirShaken @@ -43,8 +44,9 @@ class InitiateCallback(BaseModel): start_time: Optional[datetime] = Field(default=None, description="Time the call was started, in ISO 8601 format.", alias="startTime") diversion: Optional[Diversion] = None stir_shaken: Optional[StirShaken] = Field(default=None, alias="stirShaken") + uui: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken"] + __properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken", "uui"] model_config = ConfigDict( populate_by_name=True, @@ -121,7 +123,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "callUrl": obj.get("callUrl"), "startTime": obj.get("startTime"), "diversion": Diversion.from_dict(obj["diversion"]) if obj.get("diversion") is not None else None, - "stirShaken": StirShaken.from_dict(obj["stirShaken"]) if obj.get("stirShaken") is not None else None + "stirShaken": StirShaken.from_dict(obj["stirShaken"]) if obj.get("stirShaken") is not None else None, + "uui": obj.get("uui") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/docs/InitiateCallback.md b/docs/InitiateCallback.md index 8005f9e0..89e65331 100644 --- a/docs/InitiateCallback.md +++ b/docs/InitiateCallback.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **start_time** | **datetime** | Time the call was started, in ISO 8601 format. | [optional] **diversion** | [**Diversion**](Diversion.md) | | [optional] **stir_shaken** | [**StirShaken**](StirShaken.md) | | [optional] +**uui** | **str** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] ## Example From a9bac3292fd800072ef5ed3b8bf320b345dfde10 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 17 Mar 2025 14:52:02 -0400 Subject: [PATCH 2/3] update unit test --- test/unit/models/test_initiate_callback.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/models/test_initiate_callback.py b/test/unit/models/test_initiate_callback.py index 187b77bb..002f6a3d 100644 --- a/test/unit/models/test_initiate_callback.py +++ b/test/unit/models/test_initiate_callback.py @@ -58,6 +58,7 @@ def make_instance(self, include_optional) -> InitiateCallback: verstat = 'Tn-Verification-Passed', attestation_indicator = 'A', originating_id = '99759086-1335-11ed-9bcf-5f7d464e91af', ) + uui='bXktdXVp' ) else: return InitiateCallback( @@ -90,6 +91,7 @@ def testInitiateCallback(self): assert instance.stir_shaken.verstat == 'Tn-Verification-Passed' assert instance.stir_shaken.attestation_indicator == 'A' assert instance.stir_shaken.originating_id == '99759086-1335-11ed-9bcf-5f7d464e91af' + assert instance.uui == 'bXktdXVp' if __name__ == '__main__': unittest.main() From 63be09a7a426519617f4bb120474944bc0ba2f89 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 17 Mar 2025 14:55:05 -0400 Subject: [PATCH 3/3] comma --- test/unit/models/test_initiate_callback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/models/test_initiate_callback.py b/test/unit/models/test_initiate_callback.py index 002f6a3d..fef2b93d 100644 --- a/test/unit/models/test_initiate_callback.py +++ b/test/unit/models/test_initiate_callback.py @@ -57,7 +57,7 @@ def make_instance(self, include_optional) -> InitiateCallback: stir_shaken = StirShaken( verstat = 'Tn-Verification-Passed', attestation_indicator = 'A', - originating_id = '99759086-1335-11ed-9bcf-5f7d464e91af', ) + originating_id = '99759086-1335-11ed-9bcf-5f7d464e91af', ), uui='bXktdXVp' ) else: