Skip to content

Commit 1ed3484

Browse files
band-swi[bot]DX-Bandwidthckoegel
authored
SWI-7374 Update SDK Based on Recent Spec Changes (#241)
* Generate SDK with OpenAPI Generator Version * update unit test * comma --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent 8ead725 commit 1ed3484

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

bandwidth.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3801,6 +3801,8 @@ components:
38013801
$ref: '#/components/schemas/diversion'
38023802
stirShaken:
38033803
$ref: '#/components/schemas/stirShaken'
3804+
uui:
3805+
$ref: '#/components/schemas/uui'
38043806
machineDetectionCompleteCallback:
38053807
type: object
38063808
description: >-
@@ -4435,6 +4437,15 @@ components:
44354437
type: string
44364438
description: (optional) A unique origination identifier.
44374439
example: 99759086-1335-11ed-9bcf-5f7d464e91af
4440+
uui:
4441+
type: string
4442+
description: >-
4443+
The value of the `User-To-User` header to send within the initial
4444+
`INVITE`. Must include the encoding parameter as specified in RFC 7433.
4445+
Only `base64`, `jwt` and `hex` encoding are currently allowed. This
4446+
value, including the encoding specifier, may not exceed 256 characters.
4447+
example: bXktdXVp
4448+
maxLength: 256
44384449
codeRequest:
44394450
type: object
44404451
properties:

bandwidth/models/initiate_callback.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from datetime import datetime
2222
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2323
from typing import Any, ClassVar, Dict, List, Optional
24+
from typing_extensions import Annotated
2425
from bandwidth.models.call_direction_enum import CallDirectionEnum
2526
from bandwidth.models.diversion import Diversion
2627
from bandwidth.models.stir_shaken import StirShaken
@@ -43,8 +44,9 @@ class InitiateCallback(BaseModel):
4344
start_time: Optional[datetime] = Field(default=None, description="Time the call was started, in ISO 8601 format.", alias="startTime")
4445
diversion: Optional[Diversion] = None
4546
stir_shaken: Optional[StirShaken] = Field(default=None, alias="stirShaken")
47+
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.")
4648
additional_properties: Dict[str, Any] = {}
47-
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken"]
49+
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken", "uui"]
4850

4951
model_config = ConfigDict(
5052
populate_by_name=True,
@@ -121,7 +123,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
121123
"callUrl": obj.get("callUrl"),
122124
"startTime": obj.get("startTime"),
123125
"diversion": Diversion.from_dict(obj["diversion"]) if obj.get("diversion") is not None else None,
124-
"stirShaken": StirShaken.from_dict(obj["stirShaken"]) if obj.get("stirShaken") is not None else None
126+
"stirShaken": StirShaken.from_dict(obj["stirShaken"]) if obj.get("stirShaken") is not None else None,
127+
"uui": obj.get("uui")
125128
})
126129
# store additional fields in additional_properties
127130
for _key in obj.keys():

docs/InitiateCallback.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
1818
**start_time** | **datetime** | Time the call was started, in ISO 8601 format. | [optional]
1919
**diversion** | [**Diversion**](Diversion.md) | | [optional]
2020
**stir_shaken** | [**StirShaken**](StirShaken.md) | | [optional]
21+
**uui** | **str** | The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional]
2122

2223
## Example
2324

test/unit/models/test_initiate_callback.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def make_instance(self, include_optional) -> InitiateCallback:
5757
stir_shaken = StirShaken(
5858
verstat = 'Tn-Verification-Passed',
5959
attestation_indicator = 'A',
60-
originating_id = '99759086-1335-11ed-9bcf-5f7d464e91af', )
60+
originating_id = '99759086-1335-11ed-9bcf-5f7d464e91af', ),
61+
uui='bXktdXVp'
6162
)
6263
else:
6364
return InitiateCallback(
@@ -90,6 +91,7 @@ def testInitiateCallback(self):
9091
assert instance.stir_shaken.verstat == 'Tn-Verification-Passed'
9192
assert instance.stir_shaken.attestation_indicator == 'A'
9293
assert instance.stir_shaken.originating_id == '99759086-1335-11ed-9bcf-5f7d464e91af'
94+
assert instance.uui == 'bXktdXVp'
9395

9496
if __name__ == '__main__':
9597
unittest.main()

0 commit comments

Comments
 (0)