Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWI-7374 Update SDK Based on Recent Spec Changes #241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3801,6 +3801,8 @@ components:
$ref: '#/components/schemas/diversion'
stirShaken:
$ref: '#/components/schemas/stirShaken'
uui:
$ref: '#/components/schemas/uui'
machineDetectionCompleteCallback:
type: object
description: >-
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions bandwidth/models/initiate_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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():
Expand Down
1 change: 1 addition & 0 deletions docs/InitiateCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down