diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9f05a602..3a07d2c4 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -26,6 +26,8 @@ bandwidth/models/answer_callback.py 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_type_enum.py bandwidth/models/call_direction_enum.py bandwidth/models/call_recording_metadata.py bandwidth/models/call_state.py @@ -180,6 +182,8 @@ docs/AnswerCallback.md docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md +docs/BusinessEntityTypeEnum.md +docs/BusinessRegistrationTypeEnum.md docs/CallDirectionEnum.md docs/CallRecordingMetadata.md docs/CallState.md diff --git a/README.md b/README.md index 8296ec33..dbf6a4e5 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,8 @@ Class | Method | HTTP request | Description - [BlockedWebhook](docs/BlockedWebhook.md) - [BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) + - [BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md) + - [BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md) - [CallDirectionEnum](docs/CallDirectionEnum.md) - [CallRecordingMetadata](docs/CallRecordingMetadata.md) - [CallState](docs/CallState.md) diff --git a/bandwidth.yml b/bandwidth.yml index 65afd419..004fb91b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -183,6 +183,8 @@ paths: - $ref: '#/components/parameters/bwQueued' - $ref: '#/components/parameters/product' - $ref: '#/components/parameters/location' + - $ref: '#/components/parameters/carrierQueued' + - $ref: '#/components/parameters/fromCarrierLatency' - $ref: '#/components/parameters/callingNumberCountryA3' - $ref: '#/components/parameters/calledNumberCountryA3' - $ref: '#/components/parameters/fromSegmentCount' @@ -1851,6 +1853,14 @@ components: accounts with the Advanced Quality Metrics feature enabled. nullable: true example: 20 + carrierLatency: + type: integer + description: >- + The carrier latency of the message in seconds. Only available for + OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + nullable: true + example: 20 callingNumberCountryA3: type: string description: The A3 country code of the calling number. @@ -5530,6 +5540,50 @@ components: description: The company 'Doing Business As'. example: Another Company Name Inc. type: string + businessRegistrationNumber: + type: string + description: >- + US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional + until early 2026. If a value is provided for this field, a value must be + provided for `businessRegistrationType` and `businessEntityType`. + Available starting October 1st, 2025. + nullable: true + maxLength: 500 + example: 12-3456789 + businessRegistrationTypeEnum: + type: string + description: >- + The type of business registration number. Optional until early 2026; + required if `businessRegistrationNumber` is provided. Available starting + October 1st, 2025. + enum: + - EIN + - CBN + nullable: true + businessEntityTypeEnum: + type: string + description: >- + The type of registered business. If no option is applicable, please + provide "SOLE_PROPRIETOR" as a value. Optional until early 2026; + required if `businessRegistrationNumber` is provided. Available starting + October 1st, 2025. + enum: + - SOLE_PROPRIETOR + - PRIVATE_PROFIT + - PUBLIC_PROFIT + - NON_PROFIT + - GOVERNMENT + nullable: true + helpMessageResponse: + type: string + description: A message that gets sent to users requesting help. + nullable: true + maxLength: 500 + example: Please contact support for assistance. + ageGatedContent: + type: boolean + description: Indicates whether the content is age-gated. + example: false additionalDenialReason: properties: statusCode: @@ -5616,6 +5670,16 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' verificationUpdateRequest: type: object required: @@ -5655,6 +5719,16 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' tfvBasicAuthentication: type: object properties: @@ -5858,6 +5932,12 @@ components: example: https://www.example.com/path/to/resource pattern: >- ^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*) + confirmationResponse: + type: string + minLength: 0 + maxLength: 500 + nullable: true + example: Thank you for opting in! isvReseller: type: string description: ISV name. @@ -6131,6 +6211,22 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + description: >- + US Federal Tax ID Number (EIN) or Canada Business Number (CBN). + Available starting October 1st, 2025. + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + description: >- + The type of business registration number. Available starting October + 1st, 2025. + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + description: >- + The type of registered business. If no option is applicable, please + provide "SOLE_PROPRIETOR" as a value. Available starting October + 1st, 2025. tfvStatusEnum: type: string enum: @@ -7028,6 +7124,28 @@ components: example: 123ABC schema: type: string + carrierQueued: + in: query + name: carrierQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the carrier + network. Only available for OUTBOUND messages from accounts with the + Advanced Quality Metrics feature enabled. + example: true + schema: + type: boolean + fromCarrierLatency: + in: query + name: fromCarrierLatency + required: false + description: >- + The minimum carrier latency of the message in seconds. Only available + for OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + example: 50 + schema: + type: integer callingNumberCountryA3: in: query name: callingNumberCountryA3 diff --git a/bandwidth/__init__.py b/bandwidth/__init__.py index e4e25091..ea2c741e 100644 --- a/bandwidth/__init__.py +++ b/bandwidth/__init__.py @@ -49,6 +49,8 @@ from bandwidth.models.blocked_webhook import BlockedWebhook 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_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.call_direction_enum import CallDirectionEnum from bandwidth.models.call_recording_metadata import CallRecordingMetadata from bandwidth.models.call_state import CallState diff --git a/bandwidth/api/messages_api.py b/bandwidth/api/messages_api.py index 440f3033..1dd1d128 100644 --- a/bandwidth/api/messages_api.py +++ b/bandwidth/api/messages_api.py @@ -27,6 +27,7 @@ from bandwidth.models.message_type_enum import MessageTypeEnum from bandwidth.models.messages_list import MessagesList from bandwidth.models.product_type_enum import ProductTypeEnum +from bandwidth.models.product_type_enum import ProductTypeEnum from bandwidth.api_client import ApiClient, RequestSerialized from bandwidth.api_response import ApiResponse @@ -384,6 +385,8 @@ def list_messages( bw_queued: Annotated[Optional[StrictBool], Field(description="A boolean value indicating whether the message is queued in the Bandwidth network.")] = None, product: Annotated[Optional[ProductTypeEnum], Field(description="Messaging product associated with the message.")] = None, location: Annotated[Optional[StrictStr], Field(description="Location Id associated with the message.")] = None, + carrier_queued: Annotated[Optional[StrictBool], Field(description="A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.")] = None, + from_carrier_latency: Annotated[Optional[StrictInt], Field(description="The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.")] = None, calling_number_country_a3: Annotated[Optional[StrictStr], Field(description="Calling number country in A3 format.")] = None, called_number_country_a3: Annotated[Optional[StrictStr], Field(description="Called number country in A3 format.")] = None, from_segment_count: Annotated[Optional[StrictInt], Field(description="Segment count (start range).")] = None, @@ -443,6 +446,10 @@ def list_messages( :type product: ProductTypeEnum :param location: Location Id associated with the message. :type location: str + :param carrier_queued: A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + :type carrier_queued: bool + :param from_carrier_latency: The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + :type from_carrier_latency: int :param calling_number_country_a3: Calling number country in A3 format. :type calling_number_country_a3: str :param called_number_country_a3: Called number country in A3 format. @@ -502,6 +509,8 @@ def list_messages( bw_queued=bw_queued, product=product, location=location, + carrier_queued=carrier_queued, + from_carrier_latency=from_carrier_latency, calling_number_country_a3=calling_number_country_a3, called_number_country_a3=called_number_country_a3, from_segment_count=from_segment_count, @@ -558,6 +567,8 @@ def list_messages_with_http_info( bw_queued: Annotated[Optional[StrictBool], Field(description="A boolean value indicating whether the message is queued in the Bandwidth network.")] = None, product: Annotated[Optional[ProductTypeEnum], Field(description="Messaging product associated with the message.")] = None, location: Annotated[Optional[StrictStr], Field(description="Location Id associated with the message.")] = None, + carrier_queued: Annotated[Optional[StrictBool], Field(description="A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.")] = None, + from_carrier_latency: Annotated[Optional[StrictInt], Field(description="The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.")] = None, calling_number_country_a3: Annotated[Optional[StrictStr], Field(description="Calling number country in A3 format.")] = None, called_number_country_a3: Annotated[Optional[StrictStr], Field(description="Called number country in A3 format.")] = None, from_segment_count: Annotated[Optional[StrictInt], Field(description="Segment count (start range).")] = None, @@ -617,6 +628,10 @@ def list_messages_with_http_info( :type product: ProductTypeEnum :param location: Location Id associated with the message. :type location: str + :param carrier_queued: A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + :type carrier_queued: bool + :param from_carrier_latency: The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + :type from_carrier_latency: int :param calling_number_country_a3: Calling number country in A3 format. :type calling_number_country_a3: str :param called_number_country_a3: Called number country in A3 format. @@ -676,6 +691,8 @@ def list_messages_with_http_info( bw_queued=bw_queued, product=product, location=location, + carrier_queued=carrier_queued, + from_carrier_latency=from_carrier_latency, calling_number_country_a3=calling_number_country_a3, called_number_country_a3=called_number_country_a3, from_segment_count=from_segment_count, @@ -732,6 +749,8 @@ def list_messages_without_preload_content( bw_queued: Annotated[Optional[StrictBool], Field(description="A boolean value indicating whether the message is queued in the Bandwidth network.")] = None, product: Annotated[Optional[ProductTypeEnum], Field(description="Messaging product associated with the message.")] = None, location: Annotated[Optional[StrictStr], Field(description="Location Id associated with the message.")] = None, + carrier_queued: Annotated[Optional[StrictBool], Field(description="A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.")] = None, + from_carrier_latency: Annotated[Optional[StrictInt], Field(description="The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.")] = None, calling_number_country_a3: Annotated[Optional[StrictStr], Field(description="Calling number country in A3 format.")] = None, called_number_country_a3: Annotated[Optional[StrictStr], Field(description="Called number country in A3 format.")] = None, from_segment_count: Annotated[Optional[StrictInt], Field(description="Segment count (start range).")] = None, @@ -791,6 +810,10 @@ def list_messages_without_preload_content( :type product: ProductTypeEnum :param location: Location Id associated with the message. :type location: str + :param carrier_queued: A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + :type carrier_queued: bool + :param from_carrier_latency: The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + :type from_carrier_latency: int :param calling_number_country_a3: Calling number country in A3 format. :type calling_number_country_a3: str :param called_number_country_a3: Called number country in A3 format. @@ -850,6 +873,8 @@ def list_messages_without_preload_content( bw_queued=bw_queued, product=product, location=location, + carrier_queued=carrier_queued, + from_carrier_latency=from_carrier_latency, calling_number_country_a3=calling_number_country_a3, called_number_country_a3=called_number_country_a3, from_segment_count=from_segment_count, @@ -901,6 +926,8 @@ def _list_messages_serialize( bw_queued, product, location, + carrier_queued, + from_carrier_latency, calling_number_country_a3, called_number_country_a3, from_segment_count, @@ -998,6 +1025,14 @@ def _list_messages_serialize( _query_params.append(('location', location)) + if carrier_queued is not None: + + _query_params.append(('carrierQueued', carrier_queued)) + + if from_carrier_latency is not None: + + _query_params.append(('fromCarrierLatency', from_carrier_latency)) + if calling_number_country_a3 is not None: _query_params.append(('callingNumberCountryA3', calling_number_country_a3)) diff --git a/bandwidth/models/__init__.py b/bandwidth/models/__init__.py index a7f24064..056461f2 100644 --- a/bandwidth/models/__init__.py +++ b/bandwidth/models/__init__.py @@ -22,6 +22,8 @@ from bandwidth.models.blocked_webhook import BlockedWebhook 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_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.call_direction_enum import CallDirectionEnum from bandwidth.models.call_recording_metadata import CallRecordingMetadata from bandwidth.models.call_state import CallState diff --git a/bandwidth/models/business_entity_type_enum.py b/bandwidth/models/business_entity_type_enum.py new file mode 100644 index 00000000..72784b37 --- /dev/null +++ b/bandwidth/models/business_entity_type_enum.py @@ -0,0 +1,41 @@ +# 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 BusinessEntityTypeEnum(str, Enum): + """ + The type of registered business. If no option is applicable, please provide \"SOLE_PROPRIETOR\" as a value. Optional until early 2026; required if `businessRegistrationNumber` is provided. Available starting October 1st, 2025. + """ + + """ + allowed enum values + """ + SOLE_PROPRIETOR = 'SOLE_PROPRIETOR' + PRIVATE_PROFIT = 'PRIVATE_PROFIT' + PUBLIC_PROFIT = 'PUBLIC_PROFIT' + NON_PROFIT = 'NON_PROFIT' + GOVERNMENT = 'GOVERNMENT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BusinessEntityTypeEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/bandwidth/models/business_registration_type_enum.py b/bandwidth/models/business_registration_type_enum.py new file mode 100644 index 00000000..9f8e02c0 --- /dev/null +++ b/bandwidth/models/business_registration_type_enum.py @@ -0,0 +1,38 @@ +# 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 BusinessRegistrationTypeEnum(str, Enum): + """ + The type of business registration number. Optional until early 2026; required if `businessRegistrationNumber` is provided. Available starting October 1st, 2025. + """ + + """ + allowed enum values + """ + EIN = 'EIN' + CBN = 'CBN' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BusinessRegistrationTypeEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/bandwidth/models/list_message_item.py b/bandwidth/models/list_message_item.py index 247e1135..f0ae8462 100644 --- a/bandwidth/models/list_message_item.py +++ b/bandwidth/models/list_message_item.py @@ -49,12 +49,13 @@ class ListMessageItem(BaseModel): campaign_class: Optional[StrictStr] = Field(default=None, description="The campaign class of the message if it has one.", alias="campaignClass") campaign_id: Optional[StrictStr] = Field(default=None, description="The campaign ID of the message if it has one.", alias="campaignId") bw_latency: Optional[StrictInt] = Field(default=None, description="The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled.", alias="bwLatency") + carrier_latency: Optional[StrictInt] = Field(default=None, description="The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.", alias="carrierLatency") calling_number_country_a3: Optional[StrictStr] = Field(default=None, description="The A3 country code of the calling number.", alias="callingNumberCountryA3") called_number_country_a3: Optional[StrictStr] = Field(default=None, description="The A3 country code of the called number.", alias="calledNumberCountryA3") product: Optional[StrictStr] = Field(default=None, description="The messaging product associated with the message.") location: Optional[StrictStr] = Field(default=None, description="The location ID associated with this message.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["messageId", "accountId", "sourceTn", "destinationTn", "messageStatus", "messageDirection", "messageType", "segmentCount", "errorCode", "receiveTime", "carrierName", "messageSize", "messageLength", "attachmentCount", "recipientCount", "campaignClass", "campaignId", "bwLatency", "callingNumberCountryA3", "calledNumberCountryA3", "product", "location"] + __properties: ClassVar[List[str]] = ["messageId", "accountId", "sourceTn", "destinationTn", "messageStatus", "messageDirection", "messageType", "segmentCount", "errorCode", "receiveTime", "carrierName", "messageSize", "messageLength", "attachmentCount", "recipientCount", "campaignClass", "campaignId", "bwLatency", "carrierLatency", "callingNumberCountryA3", "calledNumberCountryA3", "product", "location"] model_config = ConfigDict( populate_by_name=True, @@ -137,6 +138,11 @@ def to_dict(self) -> Dict[str, Any]: if self.bw_latency is None and "bw_latency" in self.model_fields_set: _dict['bwLatency'] = None + # set to None if carrier_latency (nullable) is None + # and model_fields_set contains the field + if self.carrier_latency is None and "carrier_latency" in self.model_fields_set: + _dict['carrierLatency'] = None + # set to None if calling_number_country_a3 (nullable) is None # and model_fields_set contains the field if self.calling_number_country_a3 is None and "calling_number_country_a3" in self.model_fields_set: @@ -187,6 +193,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "campaignClass": obj.get("campaignClass"), "campaignId": obj.get("campaignId"), "bwLatency": obj.get("bwLatency"), + "carrierLatency": obj.get("carrierLatency"), "callingNumberCountryA3": obj.get("callingNumberCountryA3"), "calledNumberCountryA3": obj.get("calledNumberCountryA3"), "product": obj.get("product"), diff --git a/bandwidth/models/opt_in_workflow.py b/bandwidth/models/opt_in_workflow.py index fbae5303..bc90b172 100644 --- a/bandwidth/models/opt_in_workflow.py +++ b/bandwidth/models/opt_in_workflow.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -30,8 +30,9 @@ class OptInWorkflow(BaseModel): """ # noqa: E501 description: Annotated[str, Field(min_length=1, strict=True, max_length=500)] image_urls: List[Annotated[str, Field(min_length=1, strict=True, max_length=500)]] = Field(alias="imageUrls") + confirmation_response: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, alias="confirmationResponse") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["description", "imageUrls"] + __properties: ClassVar[List[str]] = ["description", "imageUrls", "confirmationResponse"] model_config = ConfigDict( populate_by_name=True, @@ -79,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if confirmation_response (nullable) is None + # and model_fields_set contains the field + if self.confirmation_response is None and "confirmation_response" in self.model_fields_set: + _dict['confirmationResponse'] = None + return _dict @classmethod @@ -92,7 +98,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "description": obj.get("description"), - "imageUrls": obj.get("imageUrls") + "imageUrls": obj.get("imageUrls"), + "confirmationResponse": obj.get("confirmationResponse") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/bandwidth/models/tfv_submission_info.py b/bandwidth/models/tfv_submission_info.py index 323a0a39..aada3917 100644 --- a/bandwidth/models/tfv_submission_info.py +++ b/bandwidth/models/tfv_submission_info.py @@ -22,6 +22,8 @@ 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_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.contact import Contact from bandwidth.models.opt_in_workflow import OptInWorkflow from typing import Optional, Set @@ -43,8 +45,11 @@ class TfvSubmissionInfo(BaseModel): privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[StrictStr] = 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="US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025.", alias="businessRegistrationNumber") + business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") + 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"] + __properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType"] model_config = ConfigDict( populate_by_name=True, @@ -111,6 +116,21 @@ def to_dict(self) -> Dict[str, Any]: if self.isv_reseller is None and "isv_reseller" in self.model_fields_set: _dict['isvReseller'] = None + # set to None if business_registration_number (nullable) is None + # and model_fields_set contains the field + if self.business_registration_number is None and "business_registration_number" in self.model_fields_set: + _dict['businessRegistrationNumber'] = None + + # set to None if business_registration_type (nullable) is None + # and model_fields_set contains the field + if self.business_registration_type is None and "business_registration_type" in self.model_fields_set: + _dict['businessRegistrationType'] = None + + # set to None if business_entity_type (nullable) is None + # and model_fields_set contains the field + if self.business_entity_type is None and "business_entity_type" in self.model_fields_set: + _dict['businessEntityType'] = None + return _dict @classmethod @@ -134,7 +154,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isvReseller": obj.get("isvReseller"), "privacyPolicyUrl": obj.get("privacyPolicyUrl"), "termsAndConditionsUrl": obj.get("termsAndConditionsUrl"), - "businessDba": obj.get("businessDba") + "businessDba": obj.get("businessDba"), + "businessRegistrationNumber": obj.get("businessRegistrationNumber"), + "businessRegistrationType": obj.get("businessRegistrationType"), + "businessEntityType": obj.get("businessEntityType") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/bandwidth/models/verification_request.py b/bandwidth/models/verification_request.py index 9128738d..20a5d01c 100644 --- a/bandwidth/models/verification_request.py +++ b/bandwidth/models/verification_request.py @@ -18,10 +18,12 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, 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_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.contact import Contact from bandwidth.models.opt_in_workflow import OptInWorkflow from typing import Optional, Set @@ -44,8 +46,13 @@ class VerificationRequest(BaseModel): privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[StrictStr] = 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="US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025.", alias="businessRegistrationNumber") + business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") + business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, 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") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba"] + __properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent"] model_config = ConfigDict( populate_by_name=True, @@ -112,6 +119,26 @@ def to_dict(self) -> Dict[str, Any]: if self.isv_reseller is None and "isv_reseller" in self.model_fields_set: _dict['isvReseller'] = None + # set to None if business_registration_number (nullable) is None + # and model_fields_set contains the field + if self.business_registration_number is None and "business_registration_number" in self.model_fields_set: + _dict['businessRegistrationNumber'] = None + + # set to None if business_registration_type (nullable) is None + # and model_fields_set contains the field + if self.business_registration_type is None and "business_registration_type" in self.model_fields_set: + _dict['businessRegistrationType'] = None + + # set to None if business_entity_type (nullable) is None + # and model_fields_set contains the field + if self.business_entity_type is None and "business_entity_type" in self.model_fields_set: + _dict['businessEntityType'] = 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: + _dict['helpMessageResponse'] = None + return _dict @classmethod @@ -136,7 +163,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isvReseller": obj.get("isvReseller"), "privacyPolicyUrl": obj.get("privacyPolicyUrl"), "termsAndConditionsUrl": obj.get("termsAndConditionsUrl"), - "businessDba": obj.get("businessDba") + "businessDba": obj.get("businessDba"), + "businessRegistrationNumber": obj.get("businessRegistrationNumber"), + "businessRegistrationType": obj.get("businessRegistrationType"), + "businessEntityType": obj.get("businessEntityType"), + "helpMessageResponse": obj.get("helpMessageResponse"), + "ageGatedContent": obj.get("ageGatedContent") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/bandwidth/models/verification_update_request.py b/bandwidth/models/verification_update_request.py index 82c2e545..606b2640 100644 --- a/bandwidth/models/verification_update_request.py +++ b/bandwidth/models/verification_update_request.py @@ -18,10 +18,12 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +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_type_enum import BusinessRegistrationTypeEnum from bandwidth.models.contact import Contact from bandwidth.models.opt_in_workflow import OptInWorkflow from typing import Optional, Set @@ -43,8 +45,13 @@ class VerificationUpdateRequest(BaseModel): privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[StrictStr] = 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="US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025.", alias="businessRegistrationNumber") + business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") + business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, 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") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba"] + __properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent"] model_config = ConfigDict( populate_by_name=True, @@ -111,6 +118,26 @@ def to_dict(self) -> Dict[str, Any]: if self.isv_reseller is None and "isv_reseller" in self.model_fields_set: _dict['isvReseller'] = None + # set to None if business_registration_number (nullable) is None + # and model_fields_set contains the field + if self.business_registration_number is None and "business_registration_number" in self.model_fields_set: + _dict['businessRegistrationNumber'] = None + + # set to None if business_registration_type (nullable) is None + # and model_fields_set contains the field + if self.business_registration_type is None and "business_registration_type" in self.model_fields_set: + _dict['businessRegistrationType'] = None + + # set to None if business_entity_type (nullable) is None + # and model_fields_set contains the field + if self.business_entity_type is None and "business_entity_type" in self.model_fields_set: + _dict['businessEntityType'] = 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: + _dict['helpMessageResponse'] = None + return _dict @classmethod @@ -134,7 +161,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isvReseller": obj.get("isvReseller"), "privacyPolicyUrl": obj.get("privacyPolicyUrl"), "termsAndConditionsUrl": obj.get("termsAndConditionsUrl"), - "businessDba": obj.get("businessDba") + "businessDba": obj.get("businessDba"), + "businessRegistrationNumber": obj.get("businessRegistrationNumber"), + "businessRegistrationType": obj.get("businessRegistrationType"), + "businessEntityType": obj.get("businessEntityType"), + "helpMessageResponse": obj.get("helpMessageResponse"), + "ageGatedContent": obj.get("ageGatedContent") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/docs/BusinessEntityTypeEnum.md b/docs/BusinessEntityTypeEnum.md new file mode 100644 index 00000000..99f0d66e --- /dev/null +++ b/docs/BusinessEntityTypeEnum.md @@ -0,0 +1,19 @@ +# BusinessEntityTypeEnum + +The type of registered business. If no option is applicable, please provide \"SOLE_PROPRIETOR\" as a value. Optional until early 2026; required if `businessRegistrationNumber` is provided. Available starting October 1st, 2025. + +## Enum + +* `SOLE_PROPRIETOR` (value: `'SOLE_PROPRIETOR'`) + +* `PRIVATE_PROFIT` (value: `'PRIVATE_PROFIT'`) + +* `PUBLIC_PROFIT` (value: `'PUBLIC_PROFIT'`) + +* `NON_PROFIT` (value: `'NON_PROFIT'`) + +* `GOVERNMENT` (value: `'GOVERNMENT'`) + +[[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/docs/BusinessRegistrationTypeEnum.md b/docs/BusinessRegistrationTypeEnum.md new file mode 100644 index 00000000..cfcf8af1 --- /dev/null +++ b/docs/BusinessRegistrationTypeEnum.md @@ -0,0 +1,13 @@ +# BusinessRegistrationTypeEnum + +The type of business registration number. Optional until early 2026; required if `businessRegistrationNumber` is provided. Available starting October 1st, 2025. + +## Enum + +* `EIN` (value: `'EIN'`) + +* `CBN` (value: `'CBN'`) + +[[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/docs/ListMessageItem.md b/docs/ListMessageItem.md index c8309c95..1c7cd151 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **campaign_class** | **str** | The campaign class of the message if it has one. | [optional] **campaign_id** | **str** | The campaign ID of the message if it has one. | [optional] **bw_latency** | **int** | The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] +**carrier_latency** | **int** | The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] **calling_number_country_a3** | **str** | The A3 country code of the calling number. | [optional] **called_number_country_a3** | **str** | The A3 country code of the called number. | [optional] **product** | **str** | The messaging product associated with the message. | [optional] diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 4a41947d..132ca09d 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -100,7 +100,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_messages** -> MessagesList list_messages(account_id, message_id=message_id, source_tn=source_tn, destination_tn=destination_tn, message_status=message_status, message_direction=message_direction, carrier_name=carrier_name, message_type=message_type, error_code=error_code, from_date_time=from_date_time, to_date_time=to_date_time, campaign_id=campaign_id, from_bw_latency=from_bw_latency, bw_queued=bw_queued, product=product, location=location, calling_number_country_a3=calling_number_country_a3, called_number_country_a3=called_number_country_a3, from_segment_count=from_segment_count, to_segment_count=to_segment_count, from_message_size=from_message_size, to_message_size=to_message_size, sort=sort, page_token=page_token, limit=limit, limit_total_count=limit_total_count) +> MessagesList list_messages(account_id, message_id=message_id, source_tn=source_tn, destination_tn=destination_tn, message_status=message_status, message_direction=message_direction, carrier_name=carrier_name, message_type=message_type, error_code=error_code, from_date_time=from_date_time, to_date_time=to_date_time, campaign_id=campaign_id, from_bw_latency=from_bw_latency, bw_queued=bw_queued, product=product, location=location, carrier_queued=carrier_queued, from_carrier_latency=from_carrier_latency, calling_number_country_a3=calling_number_country_a3, called_number_country_a3=called_number_country_a3, from_segment_count=from_segment_count, to_segment_count=to_segment_count, from_message_size=from_message_size, to_message_size=to_message_size, sort=sort, page_token=page_token, limit=limit, limit_total_count=limit_total_count) List Messages @@ -117,6 +117,7 @@ from bandwidth.models.message_status_enum import MessageStatusEnum from bandwidth.models.message_type_enum import MessageTypeEnum from bandwidth.models.messages_list import MessagesList from bandwidth.models.product_type_enum import ProductTypeEnum +from bandwidth.models.product_type_enum import ProductTypeEnum from bandwidth.rest import ApiException from pprint import pprint @@ -157,6 +158,8 @@ with bandwidth.ApiClient(configuration) as api_client: bw_queued = true # bool | A boolean value indicating whether the message is queued in the Bandwidth network. (optional) product = bandwidth.ProductTypeEnum() # ProductTypeEnum | Messaging product associated with the message. (optional) location = '123ABC' # str | Location Id associated with the message. (optional) + carrier_queued = true # bool | A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + from_carrier_latency = 50 # int | The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) calling_number_country_a3 = 'USA' # str | Calling number country in A3 format. (optional) called_number_country_a3 = 'USA' # str | Called number country in A3 format. (optional) from_segment_count = 1 # int | Segment count (start range). (optional) @@ -170,7 +173,7 @@ with bandwidth.ApiClient(configuration) as api_client: try: # List Messages - api_response = api_instance.list_messages(account_id, message_id=message_id, source_tn=source_tn, destination_tn=destination_tn, message_status=message_status, message_direction=message_direction, carrier_name=carrier_name, message_type=message_type, error_code=error_code, from_date_time=from_date_time, to_date_time=to_date_time, campaign_id=campaign_id, from_bw_latency=from_bw_latency, bw_queued=bw_queued, product=product, location=location, calling_number_country_a3=calling_number_country_a3, called_number_country_a3=called_number_country_a3, from_segment_count=from_segment_count, to_segment_count=to_segment_count, from_message_size=from_message_size, to_message_size=to_message_size, sort=sort, page_token=page_token, limit=limit, limit_total_count=limit_total_count) + api_response = api_instance.list_messages(account_id, message_id=message_id, source_tn=source_tn, destination_tn=destination_tn, message_status=message_status, message_direction=message_direction, carrier_name=carrier_name, message_type=message_type, error_code=error_code, from_date_time=from_date_time, to_date_time=to_date_time, campaign_id=campaign_id, from_bw_latency=from_bw_latency, bw_queued=bw_queued, product=product, location=location, carrier_queued=carrier_queued, from_carrier_latency=from_carrier_latency, calling_number_country_a3=calling_number_country_a3, called_number_country_a3=called_number_country_a3, from_segment_count=from_segment_count, to_segment_count=to_segment_count, from_message_size=from_message_size, to_message_size=to_message_size, sort=sort, page_token=page_token, limit=limit, limit_total_count=limit_total_count) print("The response of MessagesApi->list_messages:\n") pprint(api_response) except Exception as e: @@ -200,6 +203,8 @@ Name | Type | Description | Notes **bw_queued** | **bool**| A boolean value indicating whether the message is queued in the Bandwidth network. | [optional] **product** | [**ProductTypeEnum**](.md)| Messaging product associated with the message. | [optional] **location** | **str**| Location Id associated with the message. | [optional] + **carrier_queued** | **bool**| A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] + **from_carrier_latency** | **int**| The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] **calling_number_country_a3** | **str**| Calling number country in A3 format. | [optional] **called_number_country_a3** | **str**| Called number country in A3 format. | [optional] **from_segment_count** | **int**| Segment count (start range). | [optional] diff --git a/docs/OptInWorkflow.md b/docs/OptInWorkflow.md index 6f42e17d..b3dfae64 100644 --- a/docs/OptInWorkflow.md +++ b/docs/OptInWorkflow.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **str** | | **image_urls** | **List[str]** | | +**confirmation_response** | **str** | | [optional] ## Example diff --git a/docs/TfvSubmissionInfo.md b/docs/TfvSubmissionInfo.md index 7d2c2403..f1a3f8de 100644 --- a/docs/TfvSubmissionInfo.md +++ b/docs/TfvSubmissionInfo.md @@ -17,6 +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** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] +**business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] ## Example diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index fd1ea043..7a1076a6 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -18,6 +18,11 @@ 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** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] +**business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [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] ## Example diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index 0718b748..34c64757 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -17,6 +17,11 @@ 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** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] +**business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [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] ## Example diff --git a/test/unit/api/test_toll_free_verification_api.py b/test/unit/api/test_toll_free_verification_api.py index 56bfce19..4cb0d54a 100644 --- a/test/unit/api/test_toll_free_verification_api.py +++ b/test/unit/api/test_toll_free_verification_api.py @@ -84,7 +84,8 @@ def setUp(self) -> None: 'productionMessageContent': 'productionMessageContent', 'optInWorkflow': OptInWorkflow( description='description', - image_urls=['https://example.com'] + image_urls=['https://example.com'], + confirmation_response='confirmationResponse' ), 'additionalInformation': 'additionalInformation', 'isvReseller': 'isvReseller' diff --git a/test/unit/models/test_business_entity_type_enum.py b/test/unit/models/test_business_entity_type_enum.py new file mode 100644 index 00000000..2ef6abb1 --- /dev/null +++ b/test/unit/models/test_business_entity_type_enum.py @@ -0,0 +1,44 @@ +# 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_entity_type_enum import BusinessEntityTypeEnum + +class TestBusinessEntityTypeEnum(unittest.TestCase): + """BusinessEntityTypeEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBusinessEntityTypeEnum(self): + """Test BusinessEntityTypeEnum""" + sole_proprietor = BusinessEntityTypeEnum('SOLE_PROPRIETOR') + private_profit = BusinessEntityTypeEnum('PRIVATE_PROFIT') + public_profit = BusinessEntityTypeEnum('PUBLIC_PROFIT') + non_profit = BusinessEntityTypeEnum('NON_PROFIT') + government = BusinessEntityTypeEnum('GOVERNMENT') + assert sole_proprietor == 'SOLE_PROPRIETOR' + assert private_profit == 'PRIVATE_PROFIT' + assert public_profit == 'PUBLIC_PROFIT' + assert non_profit == 'NON_PROFIT' + assert government == 'GOVERNMENT' + + +if __name__ == '__main__': + unittest.main() diff --git a/test/unit/models/test_business_registration_type_enum.py b/test/unit/models/test_business_registration_type_enum.py new file mode 100644 index 00000000..1a2b7723 --- /dev/null +++ b/test/unit/models/test_business_registration_type_enum.py @@ -0,0 +1,39 @@ +# 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_type_enum import BusinessRegistrationTypeEnum + +class TestBusinessRegistrationTypeEnum(unittest.TestCase): + """BusinessRegistrationTypeEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBusinessRegistrationTypeEnum(self): + """Test BusinessRegistrationTypeEnum""" + ein = BusinessRegistrationTypeEnum('EIN') + cbn = BusinessRegistrationTypeEnum('CBN') + assert ein == 'EIN' + assert cbn == 'CBN' + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/unit/models/test_list_message_item.py b/test/unit/models/test_list_message_item.py index 5477e818..1bf1187b 100644 --- a/test/unit/models/test_list_message_item.py +++ b/test/unit/models/test_list_message_item.py @@ -52,6 +52,7 @@ def make_instance(self, include_optional) -> ListMessageItem: campaign_class = 'T', campaign_id = 'CJEUMDK', bw_latency = 20, + carrier_latency = 20, calling_number_country_a3 = 'USA', called_number_country_a3 = 'USA', product = 'P2P', @@ -84,6 +85,7 @@ def testListMessageItem(self): assert instance.campaign_class == 'T' assert instance.campaign_id == 'CJEUMDK' assert instance.bw_latency == 20 + assert instance.carrier_latency == 20 assert instance.calling_number_country_a3 == 'USA' assert instance.called_number_country_a3 == 'USA' assert instance.product == 'P2P' diff --git a/test/unit/models/test_messages_list.py b/test/unit/models/test_messages_list.py index 9a6f6e0a..14434b51 100644 --- a/test/unit/models/test_messages_list.py +++ b/test/unit/models/test_messages_list.py @@ -60,7 +60,13 @@ def make_instance(self, include_optional) -> MessagesList: attachment_count = 1, recipient_count = 1, campaign_class = 'T', - campaign_id = 'CJEUMDK', ) + campaign_id = 'CJEUMDK', + bw_latency = 20, + carrier_latency = 20, + calling_number_country_a3 = 'USA', + called_number_country_a3 = 'USA', + product = 'P2P', + location = '123ID', ) ] ) else: @@ -98,6 +104,12 @@ def testMessagesList(self): assert instance.messages[0].recipient_count == 1 assert instance.messages[0].campaign_class == 'T' assert instance.messages[0].campaign_id == 'CJEUMDK' + assert instance.messages[0].bw_latency == 20 + assert instance.messages[0].carrier_latency == 20 + assert instance.messages[0].calling_number_country_a3 == 'USA' + assert instance.messages[0].called_number_country_a3 == 'USA' + assert instance.messages[0].product == 'P2P' + assert instance.messages[0].location == '123ID' if __name__ == '__main__': unittest.main() diff --git a/test/unit/models/test_opt_in_workflow.py b/test/unit/models/test_opt_in_workflow.py index 8aa813df..3ce232d9 100644 --- a/test/unit/models/test_opt_in_workflow.py +++ b/test/unit/models/test_opt_in_workflow.py @@ -36,14 +36,16 @@ def make_instance(self, include_optional) -> OptInWorkflow: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ] + ], + confirmation_response = 'Thank you for opting in!' ) else: return OptInWorkflow( description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], + ], + confirmation_response = 'Thank you for opting in!' ) def testOptInWorkflow(self): @@ -55,6 +57,7 @@ def testOptInWorkflow(self): assert isinstance(instance.image_urls, list) assert len(instance.image_urls) == 1 assert instance.image_urls[0] == 'https://www.example.com/path/to/resource' + assert instance.confirmation_response == 'Thank you for opting in!' if __name__ == '__main__': unittest.main() diff --git a/test/unit/models/test_tfv_status.py b/test/unit/models/test_tfv_status.py index 6dc76402..82220553 100644 --- a/test/unit/models/test_tfv_status.py +++ b/test/unit/models/test_tfv_status.py @@ -67,12 +67,16 @@ def make_instance(self, include_optional) -> TfvStatus: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], ), + ], + confirmation_response = 'Thank you for opting in!', ), additional_information = 'Any additional information', isv_reseller = 'Test ISV', privacy_policy_url = 'https://www.example.com/path/to/resource', terms_and_conditions_url = 'https://www.example.com/path/to/resource', - business_dba = 'Bandwidth Inc.' + business_dba = 'Bandwidth Inc.', + business_registration_number = '12-3456789', + business_registration_type = 'EIN', + business_entity_type = 'SOLE_PROPRIETOR' ), blocked = False, blocked_reason = 'Blocked Reason' @@ -116,11 +120,15 @@ def testTfvStatus(self): assert isinstance(instance.submission.opt_in_workflow.image_urls, list) assert len(instance.submission.opt_in_workflow.image_urls) == 1 assert instance.submission.opt_in_workflow.image_urls[0] == 'https://www.example.com/path/to/resource' + assert instance.submission.opt_in_workflow.confirmation_response == 'Thank you for opting in!' assert instance.submission.additional_information == 'Any additional information' assert instance.submission.isv_reseller == 'Test ISV' assert instance.submission.privacy_policy_url == 'https://www.example.com/path/to/resource' assert instance.submission.terms_and_conditions_url == 'https://www.example.com/path/to/resource' assert instance.submission.business_dba == 'Bandwidth Inc.' + assert instance.submission.business_registration_number == '12-3456789' + assert instance.submission.business_registration_type == 'EIN' + assert instance.submission.business_entity_type == 'SOLE_PROPRIETOR' assert instance.submission.additional_information == 'Any additional information' assert instance.blocked == False assert instance.blocked_reason == 'Blocked Reason' diff --git a/test/unit/models/test_tfv_submission_info.py b/test/unit/models/test_tfv_submission_info.py index f5c9a8c4..1f55c39e 100644 --- a/test/unit/models/test_tfv_submission_info.py +++ b/test/unit/models/test_tfv_submission_info.py @@ -57,12 +57,16 @@ def make_instance(self, include_optional) -> TfvSubmissionInfo: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], ), + ], + confirmation_response = 'Thank you for opting in!', ), additional_information = 'Any additional information', isv_reseller = 'Test ISV', privacy_policy_url = 'https://www.example.com/path/to/resource', terms_and_conditions_url = 'https://www.example.com/path/to/resource', - business_dba = 'Bandwidth Inc.' + business_dba = 'Bandwidth Inc.', + business_registration_number = '12-3456789', + business_registration_type = 'EIN', + business_entity_type = 'SOLE_PROPRIETOR' ) else: return TfvSubmissionInfo( @@ -95,11 +99,15 @@ def testTfvSubmissionInfo(self): assert isinstance(instance.opt_in_workflow.image_urls, list) assert len(instance.opt_in_workflow.image_urls) == 1 assert instance.opt_in_workflow.image_urls[0] == 'https://www.example.com/path/to/resource' + assert instance.opt_in_workflow.confirmation_response == 'Thank you for opting in!' assert instance.additional_information == 'Any additional information' assert instance.isv_reseller == 'Test ISV' assert instance.privacy_policy_url == 'https://www.example.com/path/to/resource' assert instance.terms_and_conditions_url == 'https://www.example.com/path/to/resource' assert instance.business_dba == 'Bandwidth Inc.' + assert instance.business_registration_number == '12-3456789' + assert instance.business_registration_type == 'EIN' + assert instance.business_entity_type == 'SOLE_PROPRIETOR' if __name__ == '__main__': unittest.main() diff --git a/test/unit/models/test_tfv_submission_wrapper.py b/test/unit/models/test_tfv_submission_wrapper.py index 7f299ad7..75a86522 100644 --- a/test/unit/models/test_tfv_submission_wrapper.py +++ b/test/unit/models/test_tfv_submission_wrapper.py @@ -59,7 +59,8 @@ def make_instance(self, include_optional) -> TfvSubmissionWrapper: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], ), + ], + confirmation_response = 'Thank you for opting in!', ), additional_information = 'Any additional information', isv_reseller = 'Test ISV', ) ) @@ -95,6 +96,7 @@ def testTfvSubmissionWrapper(self): assert isinstance(instance.submission.opt_in_workflow.image_urls, list) assert len(instance.submission.opt_in_workflow.image_urls) == 1 assert instance.submission.opt_in_workflow.image_urls[0] == 'https://www.example.com/path/to/resource' + assert instance.submission.opt_in_workflow.confirmation_response == 'Thank you for opting in!' assert instance.submission.additional_information == 'Any additional information' assert instance.submission.isv_reseller == 'Test ISV' diff --git a/test/unit/models/test_verification_request.py b/test/unit/models/test_verification_request.py index a7281398..dc94c261 100644 --- a/test/unit/models/test_verification_request.py +++ b/test/unit/models/test_verification_request.py @@ -60,12 +60,18 @@ def make_instance(self, include_optional) -> VerificationRequest: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], ), + ], + confirmation_response = 'Thank you for opting in!', ), additional_information = '', isv_reseller = 'Test ISV', privacy_policy_url = 'https://www.example.com/path/to/resource', terms_and_conditions_url = 'https://www.example.com/path/to/resource', - business_dba = 'Bandwidth Inc.' + business_dba = 'Bandwidth Inc.', + business_registration_number = '12-3456789', + business_registration_type = 'EIN', + business_entity_type = 'SOLE_PROPRIETOR', + help_message_response = 'Please contact support for assistance.', + age_gated_content = False ) else: return VerificationRequest( @@ -93,7 +99,8 @@ def make_instance(self, include_optional) -> VerificationRequest: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], ), + ], + confirmation_response = 'Thank you for opting in!', ), ) def testVerificationRequest(self): @@ -126,11 +133,17 @@ def testVerificationRequest(self): assert isinstance(instance.opt_in_workflow.image_urls, list) assert len(instance.opt_in_workflow.image_urls) == 1 assert instance.opt_in_workflow.image_urls[0] == 'https://www.example.com/path/to/resource' + assert instance.opt_in_workflow.confirmation_response == 'Thank you for opting in!' assert instance.additional_information == '' assert instance.isv_reseller == 'Test ISV' assert instance.privacy_policy_url == 'https://www.example.com/path/to/resource' assert instance.terms_and_conditions_url == 'https://www.example.com/path/to/resource' assert instance.business_dba == 'Bandwidth Inc.' + assert instance.business_registration_number == '12-3456789' + assert instance.business_registration_type == 'EIN' + assert instance.business_entity_type == 'SOLE_PROPRIETOR' + assert instance.help_message_response == 'Please contact support for assistance.' + assert instance.age_gated_content == False if __name__ == '__main__': unittest.main() diff --git a/test/unit/models/test_verification_update_request.py b/test/unit/models/test_verification_update_request.py index 6ad4f41e..c51b42c8 100644 --- a/test/unit/models/test_verification_update_request.py +++ b/test/unit/models/test_verification_update_request.py @@ -57,12 +57,18 @@ def make_instance(self, include_optional) -> VerificationUpdateRequest: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], ), + ], + confirmation_response = 'Thank you for opting in!', ), additional_information = '', isv_reseller = 'Test ISV', privacy_policy_url = 'https://www.example.com/path/to/resource', terms_and_conditions_url = 'https://www.example.com/path/to/resource', - business_dba = 'Bandwidth Inc.' + business_dba = 'Bandwidth Inc.', + business_registration_number = '12-3456789', + business_registration_type = 'EIN', + business_entity_type = 'SOLE_PROPRIETOR', + help_message_response = 'Please contact support for assistance.', + age_gated_content = False ) else: return VerificationUpdateRequest( @@ -87,7 +93,8 @@ def make_instance(self, include_optional) -> VerificationUpdateRequest: description = 'Opt In Flow', image_urls = [ 'https://www.example.com/path/to/resource' - ], ), + ], + confirmation_response = 'Thank you for opting in!', ), ) def testVerificationUpdateRequest(self): @@ -117,11 +124,17 @@ def testVerificationUpdateRequest(self): assert isinstance(instance.opt_in_workflow.image_urls, list) assert len(instance.opt_in_workflow.image_urls) == 1 assert instance.opt_in_workflow.image_urls[0] == 'https://www.example.com/path/to/resource' + assert instance.opt_in_workflow.confirmation_response == 'Thank you for opting in!' assert instance.additional_information == '' assert instance.isv_reseller == 'Test ISV' assert instance.privacy_policy_url == 'https://www.example.com/path/to/resource' assert instance.terms_and_conditions_url == 'https://www.example.com/path/to/resource' assert instance.business_dba == 'Bandwidth Inc.' + assert instance.business_registration_number == '12-3456789' + assert instance.business_registration_type == 'EIN' + assert instance.business_entity_type == 'SOLE_PROPRIETOR' + assert instance.help_message_response == 'Please contact support for assistance.' + assert instance.age_gated_content == False if __name__ == '__main__': unittest.main()