From b110a5a041e4b0e32238ffa6bd37a90b66c5fafd Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 7 Apr 2026 18:16:48 +0000 Subject: [PATCH 1/3] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 2 - README.md | 1 - bandwidth.yml | 76 +++++++++---------- bandwidth/__init__.py | 2 - bandwidth/api/media_api.py | 6 +- bandwidth/models/__init__.py | 1 - bandwidth/models/business_entity_type_enum.py | 2 +- .../models/business_registration_type_enum.py | 2 +- bandwidth/models/mms_message_content_file.py | 2 +- bandwidth/models/tfv_submission_info.py | 12 ++- bandwidth/models/verification_request.py | 12 ++- .../models/verification_update_request.py | 12 ++- docs/BusinessEntityTypeEnum.md | 2 +- docs/BusinessRegistrationTypeEnum.md | 2 +- docs/MediaApi.md | 2 +- docs/MmsMessageContentFile.md | 2 +- docs/TfvSubmissionInfo.md | 4 +- docs/VerificationRequest.md | 4 +- docs/VerificationUpdateRequest.md | 4 +- 19 files changed, 75 insertions(+), 75 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index bcfdec9d..1380f48c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -28,7 +28,6 @@ bandwidth/models/blocked_webhook.py bandwidth/models/bridge_complete_callback.py bandwidth/models/bridge_target_complete_callback.py bandwidth/models/business_entity_type_enum.py -bandwidth/models/business_registration_issuing_country_enum.py bandwidth/models/business_registration_type_enum.py bandwidth/models/call_direction_enum.py bandwidth/models/call_recording_metadata.py @@ -207,7 +206,6 @@ docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md docs/BusinessEntityTypeEnum.md -docs/BusinessRegistrationIssuingCountryEnum.md docs/BusinessRegistrationTypeEnum.md docs/CallDirectionEnum.md docs/CallRecordingMetadata.md diff --git a/README.md b/README.md index 2d261f30..1a9d687d 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,6 @@ Class | Method | HTTP request | Description - [BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) - [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md) - - [BusinessRegistrationIssuingCountryEnum](docs/BusinessRegistrationIssuingCountryEnum.md) - [BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md) - [CallDirectionEnum](docs/CallDirectionEnum.md) - [CallRecordingMetadata](docs/CallRecordingMetadata.md) diff --git a/bandwidth.yml b/bandwidth.yml index d3f8539c..835ec5a9 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -95,8 +95,8 @@ paths: 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-). + 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). operationId: uploadMedia tags: - Media @@ -2255,8 +2255,8 @@ components: 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) + fail, see more at [Bandwidth + Support](https://www.bandwidth.com/support/en/articles/12823216-what-are-the-mms-file-size-limits) for more details. example: https://dev.bandwidth.com/images/bandwidth-logo.png maxLength: 1000 @@ -5887,17 +5887,21 @@ components: Government-issued business identifying number. - **Note:** If this field is provided, it is strongly recommended to also - provide `businessRegistrationType` and - `businessRegistrationIssuingCountry`. Submissions missing these fields - have a high likelihood of rejection. + **Note: As of October 19th, 2026 this field will be required when + `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is + provided, `businessRegistrationType` and + `businessRegistrationIssuingCountry` are also required.** nullable: true maxLength: 500 example: 12-3456789 businessRegistrationTypeEnum: type: string - description: | + description: > The type of business registration number. + + + **Note: As of October 19th, 2026 this field will be required when + `businessRegistrationNumber` is provided.** enum: - EIN - CBN @@ -5919,20 +5923,16 @@ components: - OTHER example: EIN nullable: true - businessRegistrationIssuingCountryEnum: + businessRegistrationIssuingCountry: type: string description: >- The country issuing the business registration in ISO-3166-1 alpha-3 - format. Alpha-2 country codes are acceptable, but the application will - convert them to alpha-3 when received, so alpha-3 is encouraged. + format. Alpha-2 format is accepted by the API, but alpha-3 is highly + encouraged. - **Note:** If this field is omitted but `businessRegistrationType` is - provided, the application will attempt to infer the country based on the - registration type. However, if the application cannot confidently infer - the country, the submission may be rejected. To ensure the highest - likelihood of acceptance, it is recommended to provide both - `businessRegistrationType` and `businessRegistrationIssuingCountry`. + **Note: As of October 19th, 2026 this field will be required when + `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | @@ -5974,30 +5974,22 @@ components: | UID | CHE | | OTHER | Must Provide Country Code | - enum: - - USA - - CAN - - HKG - - GBR - - IRL - - BRA - - NLD - - AUS - - FRA - - NZL - - DEU - - ESP - - CHE - - CYP - - IND - - CHN - - BGR example: USA - nullable: false + nullable: true businessEntityTypeEnum: type: string - description: | + description: > 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.** enum: - SOLE_PROPRIETOR - PRIVATE_PROFIT @@ -6106,7 +6098,7 @@ components: businessRegistrationType: $ref: '#/components/schemas/businessRegistrationTypeEnum' businessRegistrationIssuingCountry: - $ref: '#/components/schemas/businessRegistrationIssuingCountryEnum' + $ref: '#/components/schemas/businessRegistrationIssuingCountry' businessEntityType: $ref: '#/components/schemas/businessEntityTypeEnum' helpMessageResponse: @@ -6161,7 +6153,7 @@ components: businessEntityType: $ref: '#/components/schemas/businessEntityTypeEnum' businessRegistrationIssuingCountry: - $ref: '#/components/schemas/businessRegistrationIssuingCountryEnum' + $ref: '#/components/schemas/businessRegistrationIssuingCountry' helpMessageResponse: $ref: '#/components/schemas/helpMessageResponse' ageGatedContent: @@ -6657,13 +6649,15 @@ components: description: Government-issued business identifying number. businessRegistrationType: $ref: '#/components/schemas/businessRegistrationTypeEnum' + description: The type of business registration number. businessRegistrationIssuingCountry: - $ref: '#/components/schemas/businessRegistrationIssuingCountryEnum' + $ref: '#/components/schemas/businessRegistrationIssuingCountry' description: >- The country issuing the business registration in ISO-3166-1 alpha-3 format. businessEntityType: $ref: '#/components/schemas/businessEntityTypeEnum' + description: The type of registered business. tfvStatusEnum: type: string enum: diff --git a/bandwidth/__init__.py b/bandwidth/__init__.py index 13b8760a..5d5b6304 100644 --- a/bandwidth/__init__.py +++ b/bandwidth/__init__.py @@ -48,7 +48,6 @@ "BridgeCompleteCallback", "BridgeTargetCompleteCallback", "BusinessEntityTypeEnum", - "BusinessRegistrationIssuingCountryEnum", "BusinessRegistrationTypeEnum", "CallDirectionEnum", "CallRecordingMetadata", @@ -252,7 +251,6 @@ from bandwidth.models.bridge_complete_callback import BridgeCompleteCallback as BridgeCompleteCallback from bandwidth.models.bridge_target_complete_callback import BridgeTargetCompleteCallback as BridgeTargetCompleteCallback from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum as BusinessEntityTypeEnum -from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum as BusinessRegistrationIssuingCountryEnum from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum as BusinessRegistrationTypeEnum from bandwidth.models.call_direction_enum import CallDirectionEnum as CallDirectionEnum from bandwidth.models.call_recording_metadata import CallRecordingMetadata as CallRecordingMetadata diff --git a/bandwidth/api/media_api.py b/bandwidth/api/media_api.py index 525e51fa..741e6b0e 100644 --- a/bandwidth/api/media_api.py +++ b/bandwidth/api/media_api.py @@ -976,7 +976,7 @@ def upload_media( ) -> None: """Upload Media - 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-). + 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). :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -1067,7 +1067,7 @@ def upload_media_with_http_info( ) -> ApiResponse[None]: """Upload Media - 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-). + 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). :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -1158,7 +1158,7 @@ def upload_media_without_preload_content( ) -> RESTResponseType: """Upload Media - 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-). + 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). :param account_id: Your Bandwidth Account ID. (required) :type account_id: str diff --git a/bandwidth/models/__init__.py b/bandwidth/models/__init__.py index abab5129..58a7cc68 100644 --- a/bandwidth/models/__init__.py +++ b/bandwidth/models/__init__.py @@ -23,7 +23,6 @@ from bandwidth.models.bridge_complete_callback import BridgeCompleteCallback from bandwidth.models.bridge_target_complete_callback import BridgeTargetCompleteCallback from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum -from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.call_direction_enum import CallDirectionEnum from bandwidth.models.call_recording_metadata import CallRecordingMetadata diff --git a/bandwidth/models/business_entity_type_enum.py b/bandwidth/models/business_entity_type_enum.py index 30b0fc38..bda2ea2e 100644 --- a/bandwidth/models/business_entity_type_enum.py +++ b/bandwidth/models/business_entity_type_enum.py @@ -21,7 +21,7 @@ class BusinessEntityTypeEnum(str, Enum): """ - The type of registered business. + 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.** """ """ diff --git a/bandwidth/models/business_registration_type_enum.py b/bandwidth/models/business_registration_type_enum.py index 79e4c26f..9025bd25 100644 --- a/bandwidth/models/business_registration_type_enum.py +++ b/bandwidth/models/business_registration_type_enum.py @@ -21,7 +21,7 @@ class BusinessRegistrationTypeEnum(str, Enum): """ - The type of business registration number. + The type of business registration number. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** """ """ diff --git a/bandwidth/models/mms_message_content_file.py b/bandwidth/models/mms_message_content_file.py index fe43088b..775710de 100644 --- a/bandwidth/models/mms_message_content_file.py +++ b/bandwidth/models/mms_message_content_file.py @@ -28,7 +28,7 @@ class MmsMessageContentFile(BaseModel): """ MmsMessageContentFile """ # noqa: E501 - 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") + 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") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["fileUrl"] diff --git a/bandwidth/models/tfv_submission_info.py b/bandwidth/models/tfv_submission_info.py index 59bee9b7..cbed7c01 100644 --- a/bandwidth/models/tfv_submission_info.py +++ b/bandwidth/models/tfv_submission_info.py @@ -18,12 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from bandwidth.models.address import Address from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum -from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.contact import Contact from bandwidth.models.opt_in_workflow import OptInWorkflow @@ -46,9 +45,9 @@ class TfvSubmissionInfo(BaseModel): privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba") - business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. ", alias="businessRegistrationNumber") + business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") - business_registration_issuing_country: Optional[BusinessRegistrationIssuingCountryEnum] = Field(default=None, alias="businessRegistrationIssuingCountry") + business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessRegistrationIssuingCountry", "businessEntityType"] @@ -128,6 +127,11 @@ def to_dict(self) -> Dict[str, Any]: if self.business_registration_type is None and "business_registration_type" in self.model_fields_set: _dict['businessRegistrationType'] = None + # set to None if business_registration_issuing_country (nullable) is None + # and model_fields_set contains the field + if self.business_registration_issuing_country is None and "business_registration_issuing_country" in self.model_fields_set: + _dict['businessRegistrationIssuingCountry'] = None + return _dict @classmethod diff --git a/bandwidth/models/verification_request.py b/bandwidth/models/verification_request.py index 53f3e17f..117e0363 100644 --- a/bandwidth/models/verification_request.py +++ b/bandwidth/models/verification_request.py @@ -18,12 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from bandwidth.models.address import Address from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum -from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.contact import Contact from bandwidth.models.opt_in_workflow import OptInWorkflow @@ -47,9 +46,9 @@ class VerificationRequest(BaseModel): privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba") - business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. ", alias="businessRegistrationNumber") + business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") - business_registration_issuing_country: Optional[BusinessRegistrationIssuingCountryEnum] = Field(default=None, alias="businessRegistrationIssuingCountry") + business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") business_entity_type: BusinessEntityTypeEnum = Field(alias="businessEntityType") help_message_response: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="A message that gets sent to users requesting help.", alias="helpMessageResponse") age_gated_content: Optional[StrictBool] = Field(default=None, description="Indicates whether the content is age-gated.", alias="ageGatedContent") @@ -132,6 +131,11 @@ def to_dict(self) -> Dict[str, Any]: if self.business_registration_type is None and "business_registration_type" in self.model_fields_set: _dict['businessRegistrationType'] = None + # set to None if business_registration_issuing_country (nullable) is None + # and model_fields_set contains the field + if self.business_registration_issuing_country is None and "business_registration_issuing_country" in self.model_fields_set: + _dict['businessRegistrationIssuingCountry'] = None + # set to None if help_message_response (nullable) is None # and model_fields_set contains the field if self.help_message_response is None and "help_message_response" in self.model_fields_set: diff --git a/bandwidth/models/verification_update_request.py b/bandwidth/models/verification_update_request.py index 18f2bd7a..f1b553b8 100644 --- a/bandwidth/models/verification_update_request.py +++ b/bandwidth/models/verification_update_request.py @@ -18,12 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from bandwidth.models.address import Address from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum -from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.contact import Contact from bandwidth.models.opt_in_workflow import OptInWorkflow @@ -46,10 +45,10 @@ class VerificationUpdateRequest(BaseModel): privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba") - business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. ", alias="businessRegistrationNumber") + business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType") - business_registration_issuing_country: Optional[BusinessRegistrationIssuingCountryEnum] = Field(default=None, alias="businessRegistrationIssuingCountry") + business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") help_message_response: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="A message that gets sent to users requesting help.", alias="helpMessageResponse") age_gated_content: Optional[StrictBool] = Field(default=None, description="Indicates whether the content is age-gated.", alias="ageGatedContent") cv_token: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection.", alias="cvToken") @@ -131,6 +130,11 @@ def to_dict(self) -> Dict[str, Any]: if self.business_registration_type is None and "business_registration_type" in self.model_fields_set: _dict['businessRegistrationType'] = None + # set to None if business_registration_issuing_country (nullable) is None + # and model_fields_set contains the field + if self.business_registration_issuing_country is None and "business_registration_issuing_country" in self.model_fields_set: + _dict['businessRegistrationIssuingCountry'] = None + # set to None if help_message_response (nullable) is None # and model_fields_set contains the field if self.help_message_response is None and "help_message_response" in self.model_fields_set: diff --git a/docs/BusinessEntityTypeEnum.md b/docs/BusinessEntityTypeEnum.md index 97dcd6ae..5915474f 100644 --- a/docs/BusinessEntityTypeEnum.md +++ b/docs/BusinessEntityTypeEnum.md @@ -1,6 +1,6 @@ # BusinessEntityTypeEnum -The type of registered business. +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.** ## Enum diff --git a/docs/BusinessRegistrationTypeEnum.md b/docs/BusinessRegistrationTypeEnum.md index f9db0d4e..b7a9c923 100644 --- a/docs/BusinessRegistrationTypeEnum.md +++ b/docs/BusinessRegistrationTypeEnum.md @@ -1,6 +1,6 @@ # BusinessRegistrationTypeEnum -The type of business registration number. +The type of business registration number. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** ## Enum diff --git a/docs/MediaApi.md b/docs/MediaApi.md index 1cfe39c2..dc081323 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -307,7 +307,7 @@ Upload a file. You may add headers to the request in order to provide some contr 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-). +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). ### Example diff --git a/docs/MmsMessageContentFile.md b/docs/MmsMessageContentFile.md index 184372d2..9a5e36fb 100644 --- a/docs/MmsMessageContentFile.md +++ b/docs/MmsMessageContentFile.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**file_url** | **str** | 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. | +**file_url** | **str** | 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. | ## Example diff --git a/docs/TfvSubmissionInfo.md b/docs/TfvSubmissionInfo.md index 8baede8b..7f1a0107 100644 --- a/docs/TfvSubmissionInfo.md +++ b/docs/TfvSubmissionInfo.md @@ -17,9 +17,9 @@ Name | Type | Description | Notes **privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **str** | The company 'Doing Business As'. | [optional] -**business_registration_number** | **str** | Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. | [optional] +**business_registration_number** | **str** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] -**business_registration_issuing_country** | [**BusinessRegistrationIssuingCountryEnum**](BusinessRegistrationIssuingCountryEnum.md) | | [optional] +**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] ## Example diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index 53df8f85..3674b18a 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -18,9 +18,9 @@ Name | Type | Description | Notes **privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **str** | The company 'Doing Business As'. | [optional] -**business_registration_number** | **str** | Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. | [optional] +**business_registration_number** | **str** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] -**business_registration_issuing_country** | [**BusinessRegistrationIssuingCountryEnum**](BusinessRegistrationIssuingCountryEnum.md) | | [optional] +**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | **help_message_response** | **str** | A message that gets sent to users requesting help. | [optional] **age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index ae9e472f..6148e472 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -17,10 +17,10 @@ Name | Type | Description | Notes **privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **str** | The company 'Doing Business As'. | [optional] -**business_registration_number** | **str** | Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. | [optional] +**business_registration_number** | **str** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] -**business_registration_issuing_country** | [**BusinessRegistrationIssuingCountryEnum**](BusinessRegistrationIssuingCountryEnum.md) | | [optional] +**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] **help_message_response** | **str** | A message that gets sent to users requesting help. | [optional] **age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] **cv_token** | **str** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] From 7f51e448788afe14c6f79ce4b0a093caef6d0f8a Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 7 Apr 2026 15:33:02 -0400 Subject: [PATCH 2/3] remove models --- ...iness_registration_issuing_country_enum.py | 53 ------------------- .../BusinessRegistrationIssuingCountryEnum.md | 43 --------------- ...iness_registration_issuing_country_enum.py | 51 ------------------ 3 files changed, 147 deletions(-) delete mode 100644 bandwidth/models/business_registration_issuing_country_enum.py delete mode 100644 docs/BusinessRegistrationIssuingCountryEnum.md delete mode 100644 test/unit/models/test_business_registration_issuing_country_enum.py diff --git a/bandwidth/models/business_registration_issuing_country_enum.py b/bandwidth/models/business_registration_issuing_country_enum.py deleted file mode 100644 index d1a2338f..00000000 --- a/bandwidth/models/business_registration_issuing_country_enum.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Bandwidth - - Bandwidth's Communication APIs - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class BusinessRegistrationIssuingCountryEnum(str, Enum): - """ - The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 country codes are acceptable, but the application will convert them to alpha-3 when received, so alpha-3 is encouraged. **Note:** If this field is omitted but `businessRegistrationType` is provided, the application will attempt to infer the country based on the registration type. However, if the application cannot confidently infer the country, the submission may be rejected. To ensure the highest likelihood of acceptance, it is recommended to provide both `businessRegistrationType` and `businessRegistrationIssuingCountry`. | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | - """ - - """ - allowed enum values - """ - USA = 'USA' - CAN = 'CAN' - HKG = 'HKG' - GBR = 'GBR' - IRL = 'IRL' - BRA = 'BRA' - NLD = 'NLD' - AUS = 'AUS' - FRA = 'FRA' - NZL = 'NZL' - DEU = 'DEU' - ESP = 'ESP' - CHE = 'CHE' - CYP = 'CYP' - IND = 'IND' - CHN = 'CHN' - BGR = 'BGR' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BusinessRegistrationIssuingCountryEnum from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/docs/BusinessRegistrationIssuingCountryEnum.md b/docs/BusinessRegistrationIssuingCountryEnum.md deleted file mode 100644 index edb53fb2..00000000 --- a/docs/BusinessRegistrationIssuingCountryEnum.md +++ /dev/null @@ -1,43 +0,0 @@ -# BusinessRegistrationIssuingCountryEnum - -The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 country codes are acceptable, but the application will convert them to alpha-3 when received, so alpha-3 is encouraged. **Note:** If this field is omitted but `businessRegistrationType` is provided, the application will attempt to infer the country based on the registration type. However, if the application cannot confidently infer the country, the submission may be rejected. To ensure the highest likelihood of acceptance, it is recommended to provide both `businessRegistrationType` and `businessRegistrationIssuingCountry`. | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | - -## Enum - -* `USA` (value: `'USA'`) - -* `CAN` (value: `'CAN'`) - -* `HKG` (value: `'HKG'`) - -* `GBR` (value: `'GBR'`) - -* `IRL` (value: `'IRL'`) - -* `BRA` (value: `'BRA'`) - -* `NLD` (value: `'NLD'`) - -* `AUS` (value: `'AUS'`) - -* `FRA` (value: `'FRA'`) - -* `NZL` (value: `'NZL'`) - -* `DEU` (value: `'DEU'`) - -* `ESP` (value: `'ESP'`) - -* `CHE` (value: `'CHE'`) - -* `CYP` (value: `'CYP'`) - -* `IND` (value: `'IND'`) - -* `CHN` (value: `'CHN'`) - -* `BGR` (value: `'BGR'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test/unit/models/test_business_registration_issuing_country_enum.py b/test/unit/models/test_business_registration_issuing_country_enum.py deleted file mode 100644 index 70ce3f93..00000000 --- a/test/unit/models/test_business_registration_issuing_country_enum.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Bandwidth - - Bandwidth's Communication APIs - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum - -class TestBusinessRegistrationIssuingCountryEnum(unittest.TestCase): - """BusinessRegistrationIssuingCountryEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBusinessRegistrationIssuingCountryEnum(self): - """Test BusinessRegistrationIssuingCountryEnum""" - assert BusinessRegistrationIssuingCountryEnum('USA') == 'USA' - assert BusinessRegistrationIssuingCountryEnum('CAN') == 'CAN' - assert BusinessRegistrationIssuingCountryEnum('HKG') == 'HKG' - assert BusinessRegistrationIssuingCountryEnum('GBR') == 'GBR' - assert BusinessRegistrationIssuingCountryEnum('IRL') == 'IRL' - assert BusinessRegistrationIssuingCountryEnum('BRA') == 'BRA' - assert BusinessRegistrationIssuingCountryEnum('NLD') == 'NLD' - assert BusinessRegistrationIssuingCountryEnum('AUS') == 'AUS' - assert BusinessRegistrationIssuingCountryEnum('FRA') == 'FRA' - assert BusinessRegistrationIssuingCountryEnum('NZL') == 'NZL' - assert BusinessRegistrationIssuingCountryEnum('DEU') == 'DEU' - assert BusinessRegistrationIssuingCountryEnum('ESP') == 'ESP' - assert BusinessRegistrationIssuingCountryEnum('CHE') == 'CHE' - assert BusinessRegistrationIssuingCountryEnum('CYP') == 'CYP' - assert BusinessRegistrationIssuingCountryEnum('IND') == 'IND' - assert BusinessRegistrationIssuingCountryEnum('CHN') == 'CHN' - assert BusinessRegistrationIssuingCountryEnum('BGR') == 'BGR' - - -if __name__ == '__main__': - unittest.main() From 5f7f7297c176255bcebb0d84e9d616abdd6f20e7 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 7 Apr 2026 15:33:07 -0400 Subject: [PATCH 3/3] update test --- test/unit/api/test_toll_free_verification_api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/unit/api/test_toll_free_verification_api.py b/test/unit/api/test_toll_free_verification_api.py index 8c97d294..0a2dd3be 100644 --- a/test/unit/api/test_toll_free_verification_api.py +++ b/test/unit/api/test_toll_free_verification_api.py @@ -37,7 +37,6 @@ from bandwidth.models.tfv_submission_wrapper import TfvSubmissionWrapper from bandwidth.models.tfv_submission_info import TfvSubmissionInfo from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum -from bandwidth.models.business_registration_issuing_country_enum import BusinessRegistrationIssuingCountryEnum from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum @@ -99,7 +98,7 @@ def setUpClass(cls) -> None: 'businessDba': 'businessDba', 'businessRegistrationNumber': 'businessRegistrationNumber', 'businessRegistrationType': BusinessRegistrationTypeEnum.EIN, - 'businessRegistrationIssuingCountry': BusinessRegistrationIssuingCountryEnum.USA, + 'businessRegistrationIssuingCountry': 'USA', 'businessEntityType': BusinessEntityTypeEnum.NON_PROFIT, 'helpMessageResponse': 'helpMessageResponse', 'ageGatedContent': True,