Skip to content

Commit 0e37077

Browse files
committed
Generate SDK with OpenAPI Generator Version
1 parent 9118276 commit 0e37077

3 files changed

Lines changed: 38 additions & 3 deletions

File tree

bandwidth.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5759,6 +5759,19 @@ components:
57595759
items:
57605760
type: string
57615761
pattern: ^\+[1-9]\d{1,14}$
5762+
rcsAgent:
5763+
type: string
5764+
description: >-
5765+
Override the default RCS sender/agent ID used when checking RCS
5766+
capabilities.
5767+
5768+
When provided, this value is used as the `sender` in the RCS
5769+
capability-check request instead of the account default.
5770+
5771+
Must be 1–40 characters and contain only letters, digits,
5772+
underscores, or hyphens.
5773+
pattern: ^[A-Za-z0-9_-]{1,40}$
5774+
example: MyCustomRcsAgent
57625775
required:
57635776
- phoneNumbers
57645777
asyncLookupRequest:
@@ -8758,6 +8771,13 @@ components:
87588771
phoneNumbers:
87598772
- '+19196104423'
87608773
- '+19196104424'
8774+
rcsAgentRequestExample:
8775+
summary: Number Lookup Request with Custom RCS Agent
8776+
value:
8777+
phoneNumbers:
8778+
- '+19196104423'
8779+
- '+19196104424'
8780+
rcsAgent: MyCustomRcsAgent
87618781
lookupAcceptedExample:
87628782
summary: Numbers Lookup Accepted
87638783
value:
@@ -9518,6 +9538,8 @@ components:
95189538
$ref: '#/components/examples/singleNumberRequestExample'
95199539
multipleNumberRequestExample:
95209540
$ref: '#/components/examples/multipleNumberRequestExample'
9541+
rcsAgentRequestExample:
9542+
$ref: '#/components/examples/rcsAgentRequestExample'
95219543
createAsyncBulkLookupRequest:
95229544
description: Asynchronous bulk phone number lookup request.
95239545
required: true

bandwidth/models/sync_lookup_request.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import json
2020

2121
from pydantic import BaseModel, ConfigDict, Field, field_validator
22-
from typing import Any, ClassVar, Dict, List
22+
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from typing import Optional, Set
2525
from typing_extensions import Self
@@ -29,8 +29,19 @@ class SyncLookupRequest(BaseModel):
2929
SyncLookupRequest
3030
""" # noqa: E501
3131
phone_numbers: List[Annotated[str, Field(strict=True)]] = Field(description="Telephone numbers in E.164 format.", alias="phoneNumbers")
32+
rcs_agent: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens.", alias="rcsAgent")
3233
additional_properties: Dict[str, Any] = {}
33-
__properties: ClassVar[List[str]] = ["phoneNumbers"]
34+
__properties: ClassVar[List[str]] = ["phoneNumbers", "rcsAgent"]
35+
36+
@field_validator('rcs_agent')
37+
def rcs_agent_validate_regular_expression(cls, value):
38+
"""Validates the regular expression"""
39+
if value is None:
40+
return value
41+
42+
if not re.match(r"^[A-Za-z0-9_-]{1,40}$", value):
43+
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9_-]{1,40}$/")
44+
return value
3445

3546
model_config = ConfigDict(
3647
populate_by_name=True,
@@ -90,7 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90101
return cls.model_validate(obj)
91102

92103
_obj = cls.model_validate({
93-
"phoneNumbers": obj.get("phoneNumbers")
104+
"phoneNumbers": obj.get("phoneNumbers"),
105+
"rcsAgent": obj.get("rcsAgent")
94106
})
95107
# store additional fields in additional_properties
96108
for _key in obj.keys():

docs/SyncLookupRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**phone_numbers** | **List[str]** | Telephone numbers in E.164 format. |
9+
**rcs_agent** | **str** | Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. | [optional]
910

1011
## Example
1112

0 commit comments

Comments
 (0)