Skip to content

Commit 27c6a57

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-10431 Update SDK Based on Recent Spec Changes (#292)
* Generate SDK with OpenAPI Generator Version * remove models * update test --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent f7060ab commit 27c6a57

23 files changed

Lines changed: 76 additions & 224 deletions

.openapi-generator/FILES

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ bandwidth/models/blocked_webhook.py
2828
bandwidth/models/bridge_complete_callback.py
2929
bandwidth/models/bridge_target_complete_callback.py
3030
bandwidth/models/business_entity_type_enum.py
31-
bandwidth/models/business_registration_issuing_country_enum.py
3231
bandwidth/models/business_registration_type_enum.py
3332
bandwidth/models/call_direction_enum.py
3433
bandwidth/models/call_recording_metadata.py
@@ -207,7 +206,6 @@ docs/BlockedWebhook.md
207206
docs/BridgeCompleteCallback.md
208207
docs/BridgeTargetCompleteCallback.md
209208
docs/BusinessEntityTypeEnum.md
210-
docs/BusinessRegistrationIssuingCountryEnum.md
211209
docs/BusinessRegistrationTypeEnum.md
212210
docs/CallDirectionEnum.md
213211
docs/CallRecordingMetadata.md

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ Class | Method | HTTP request | Description
166166
- [BridgeCompleteCallback](docs/BridgeCompleteCallback.md)
167167
- [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md)
168168
- [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md)
169-
- [BusinessRegistrationIssuingCountryEnum](docs/BusinessRegistrationIssuingCountryEnum.md)
170169
- [BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md)
171170
- [CallDirectionEnum](docs/CallDirectionEnum.md)
172171
- [CallRecordingMetadata](docs/CallRecordingMetadata.md)

bandwidth.yml

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ paths:
9595
under this account, the previous file will be overwritten.
9696
9797
98-
A list of supported media types can be found
99-
[here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
98+
A list of supported media types can be found at [Bandwidth
99+
Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
100100
operationId: uploadMedia
101101
tags:
102102
- Media
@@ -2255,8 +2255,8 @@ components:
22552255
22562256
For MMS, the API limits file size to 3.5MB. Specific carriers and
22572257
channels may have a smaller limit that could cause a large file to
2258-
fail, see
2259-
[here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits)
2258+
fail, see more at [Bandwidth
2259+
Support](https://www.bandwidth.com/support/en/articles/12823216-what-are-the-mms-file-size-limits)
22602260
for more details.
22612261
example: https://dev.bandwidth.com/images/bandwidth-logo.png
22622262
maxLength: 1000
@@ -5887,17 +5887,21 @@ components:
58875887
Government-issued business identifying number.
58885888
58895889
5890-
**Note:** If this field is provided, it is strongly recommended to also
5891-
provide `businessRegistrationType` and
5892-
`businessRegistrationIssuingCountry`. Submissions missing these fields
5893-
have a high likelihood of rejection.
5890+
**Note: As of October 19th, 2026 this field will be required when
5891+
`businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is
5892+
provided, `businessRegistrationType` and
5893+
`businessRegistrationIssuingCountry` are also required.**
58945894
nullable: true
58955895
maxLength: 500
58965896
example: 12-3456789
58975897
businessRegistrationTypeEnum:
58985898
type: string
5899-
description: |
5899+
description: >
59005900
The type of business registration number.
5901+
5902+
5903+
**Note: As of October 19th, 2026 this field will be required when
5904+
`businessRegistrationNumber` is provided.**
59015905
enum:
59025906
- EIN
59035907
- CBN
@@ -5919,20 +5923,16 @@ components:
59195923
- OTHER
59205924
example: EIN
59215925
nullable: true
5922-
businessRegistrationIssuingCountryEnum:
5926+
businessRegistrationIssuingCountry:
59235927
type: string
59245928
description: >-
59255929
The country issuing the business registration in ISO-3166-1 alpha-3
5926-
format. Alpha-2 country codes are acceptable, but the application will
5927-
convert them to alpha-3 when received, so alpha-3 is encouraged.
5930+
format. Alpha-2 format is accepted by the API, but alpha-3 is highly
5931+
encouraged.
59285932
59295933
5930-
**Note:** If this field is omitted but `businessRegistrationType` is
5931-
provided, the application will attempt to infer the country based on the
5932-
registration type. However, if the application cannot confidently infer
5933-
the country, the submission may be rejected. To ensure the highest
5934-
likelihood of acceptance, it is recommended to provide both
5935-
`businessRegistrationType` and `businessRegistrationIssuingCountry`.
5934+
**Note: As of October 19th, 2026 this field will be required when
5935+
`businessRegistrationNumber` is provided.**
59365936
59375937
59385938
| Registration Type | Supported Countries |
@@ -5974,30 +5974,22 @@ components:
59745974
| UID | CHE |
59755975
59765976
| OTHER | Must Provide Country Code |
5977-
enum:
5978-
- USA
5979-
- CAN
5980-
- HKG
5981-
- GBR
5982-
- IRL
5983-
- BRA
5984-
- NLD
5985-
- AUS
5986-
- FRA
5987-
- NZL
5988-
- DEU
5989-
- ESP
5990-
- CHE
5991-
- CYP
5992-
- IND
5993-
- CHN
5994-
- BGR
59955977
example: USA
5996-
nullable: false
5978+
nullable: true
59975979
businessEntityTypeEnum:
59985980
type: string
5999-
description: |
5981+
description: >
60005982
The type of registered business.
5983+
5984+
5985+
**Note: As of October 19th, 2026 submissions using a value other than
5986+
`SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`,
5987+
`businessRegistrationType`, and `businessRegistrationIssuingCountry`.
5988+
5989+
Submissions using `SOLE_PROPRIETOR` must _omit_
5990+
`businessRegistrationNumber`, `businessRegistrationType`, and
5991+
`businessRegistrationIssuingCountry`. Failure to adhere to these
5992+
constraints will result in a 400 Bad Request rejection.**
60015993
enum:
60025994
- SOLE_PROPRIETOR
60035995
- PRIVATE_PROFIT
@@ -6106,7 +6098,7 @@ components:
61066098
businessRegistrationType:
61076099
$ref: '#/components/schemas/businessRegistrationTypeEnum'
61086100
businessRegistrationIssuingCountry:
6109-
$ref: '#/components/schemas/businessRegistrationIssuingCountryEnum'
6101+
$ref: '#/components/schemas/businessRegistrationIssuingCountry'
61106102
businessEntityType:
61116103
$ref: '#/components/schemas/businessEntityTypeEnum'
61126104
helpMessageResponse:
@@ -6161,7 +6153,7 @@ components:
61616153
businessEntityType:
61626154
$ref: '#/components/schemas/businessEntityTypeEnum'
61636155
businessRegistrationIssuingCountry:
6164-
$ref: '#/components/schemas/businessRegistrationIssuingCountryEnum'
6156+
$ref: '#/components/schemas/businessRegistrationIssuingCountry'
61656157
helpMessageResponse:
61666158
$ref: '#/components/schemas/helpMessageResponse'
61676159
ageGatedContent:
@@ -6657,13 +6649,15 @@ components:
66576649
description: Government-issued business identifying number.
66586650
businessRegistrationType:
66596651
$ref: '#/components/schemas/businessRegistrationTypeEnum'
6652+
description: The type of business registration number.
66606653
businessRegistrationIssuingCountry:
6661-
$ref: '#/components/schemas/businessRegistrationIssuingCountryEnum'
6654+
$ref: '#/components/schemas/businessRegistrationIssuingCountry'
66626655
description: >-
66636656
The country issuing the business registration in ISO-3166-1 alpha-3
66646657
format.
66656658
businessEntityType:
66666659
$ref: '#/components/schemas/businessEntityTypeEnum'
6660+
description: The type of registered business.
66676661
tfvStatusEnum:
66686662
type: string
66696663
enum:

bandwidth/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"BridgeCompleteCallback",
4949
"BridgeTargetCompleteCallback",
5050
"BusinessEntityTypeEnum",
51-
"BusinessRegistrationIssuingCountryEnum",
5251
"BusinessRegistrationTypeEnum",
5352
"CallDirectionEnum",
5453
"CallRecordingMetadata",
@@ -252,7 +251,6 @@
252251
from bandwidth.models.bridge_complete_callback import BridgeCompleteCallback as BridgeCompleteCallback
253252
from bandwidth.models.bridge_target_complete_callback import BridgeTargetCompleteCallback as BridgeTargetCompleteCallback
254253
from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum as BusinessEntityTypeEnum
255-
from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum as BusinessRegistrationIssuingCountryEnum
256254
from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum as BusinessRegistrationTypeEnum
257255
from bandwidth.models.call_direction_enum import CallDirectionEnum as CallDirectionEnum
258256
from bandwidth.models.call_recording_metadata import CallRecordingMetadata as CallRecordingMetadata

bandwidth/api/media_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ def upload_media(
976976
) -> None:
977977
"""Upload Media
978978
979-
Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
979+
Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
980980
981981
:param account_id: Your Bandwidth Account ID. (required)
982982
:type account_id: str
@@ -1067,7 +1067,7 @@ def upload_media_with_http_info(
10671067
) -> ApiResponse[None]:
10681068
"""Upload Media
10691069
1070-
Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
1070+
Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
10711071
10721072
:param account_id: Your Bandwidth Account ID. (required)
10731073
:type account_id: str
@@ -1158,7 +1158,7 @@ def upload_media_without_preload_content(
11581158
) -> RESTResponseType:
11591159
"""Upload Media
11601160
1161-
Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
1161+
Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
11621162
11631163
:param account_id: Your Bandwidth Account ID. (required)
11641164
:type account_id: str

bandwidth/models/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from bandwidth.models.bridge_complete_callback import BridgeCompleteCallback
2424
from bandwidth.models.bridge_target_complete_callback import BridgeTargetCompleteCallback
2525
from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum
26-
from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum
2726
from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum
2827
from bandwidth.models.call_direction_enum import CallDirectionEnum
2928
from bandwidth.models.call_recording_metadata import CallRecordingMetadata

bandwidth/models/business_entity_type_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class BusinessEntityTypeEnum(str, Enum):
2323
"""
24-
The type of registered business.
24+
The type of registered business. **Note: As of October 19th, 2026 submissions using a value other than `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Failure to adhere to these constraints will result in a 400 Bad Request rejection.**
2525
"""
2626

2727
"""

bandwidth/models/business_registration_issuing_country_enum.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

bandwidth/models/business_registration_type_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class BusinessRegistrationTypeEnum(str, Enum):
2323
"""
24-
The type of business registration number.
24+
The type of business registration number. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.**
2525
"""
2626

2727
"""

bandwidth/models/mms_message_content_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MmsMessageContentFile(BaseModel):
2828
"""
2929
MmsMessageContentFile
3030
""" # noqa: E501
31-
file_url: Annotated[str, Field(strict=True, max_length=1000)] = Field(description="The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see [here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits) for more details.", alias="fileUrl")
31+
file_url: Annotated[str, Field(strict=True, max_length=1000)] = Field(description="The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see more at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823216-what-are-the-mms-file-size-limits) for more details.", alias="fileUrl")
3232
additional_properties: Dict[str, Any] = {}
3333
__properties: ClassVar[List[str]] = ["fileUrl"]
3434

0 commit comments

Comments
 (0)