From 2cf39e5aa2ca42fe22335aef103a08f5e6f74fd8 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 26 Aug 2025 14:06:55 +0000 Subject: [PATCH 1/3] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 6 + README.md | 3 + bandwidth.yml | 254 ++++++++++++++++++ bandwidth/__init__.py | 3 + bandwidth/api/messages_api.py | 205 ++++++++++++++ bandwidth/models/__init__.py | 3 + bandwidth/models/business_entity_type_enum.py | 41 +++ .../models/business_registration_type_enum.py | 38 +++ bandwidth/models/list_message_item.py | 46 +++- bandwidth/models/message_type_enum.py | 1 + bandwidth/models/opt_in_workflow.py | 13 +- bandwidth/models/product_type_enum.py | 45 ++++ bandwidth/models/tfv_submission_info.py | 27 +- bandwidth/models/verification_request.py | 38 ++- .../models/verification_update_request.py | 38 ++- docs/BusinessEntityTypeEnum.md | 19 ++ docs/BusinessRegistrationTypeEnum.md | 13 + docs/ListMessageItem.md | 6 + docs/MessageTypeEnum.md | 2 + docs/MessagesApi.md | 29 +- docs/OptInWorkflow.md | 1 + docs/ProductTypeEnum.md | 27 ++ docs/TfvSubmissionInfo.md | 3 + docs/VerificationRequest.md | 5 + docs/VerificationUpdateRequest.md | 5 + 25 files changed, 856 insertions(+), 15 deletions(-) create mode 100644 bandwidth/models/business_entity_type_enum.py create mode 100644 bandwidth/models/business_registration_type_enum.py create mode 100644 bandwidth/models/product_type_enum.py create mode 100644 docs/BusinessEntityTypeEnum.md create mode 100644 docs/BusinessRegistrationTypeEnum.md create mode 100644 docs/ProductTypeEnum.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 21ce874e..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 @@ -108,6 +110,7 @@ bandwidth/models/multi_channel_message_response_data_channel_list_inner.py bandwidth/models/opt_in_workflow.py bandwidth/models/page_info.py bandwidth/models/priority_enum.py +bandwidth/models/product_type_enum.py bandwidth/models/rbm_action_base.py bandwidth/models/rbm_action_dial.py bandwidth/models/rbm_action_open_url.py @@ -179,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 @@ -268,6 +273,7 @@ docs/OptInWorkflow.md docs/PageInfo.md docs/PhoneNumberLookupApi.md docs/PriorityEnum.md +docs/ProductTypeEnum.md docs/RbmActionBase.md docs/RbmActionDial.md docs/RbmActionOpenUrl.md diff --git a/README.md b/README.md index b184faed..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) @@ -239,6 +241,7 @@ Class | Method | HTTP request | Description - [OptInWorkflow](docs/OptInWorkflow.md) - [PageInfo](docs/PageInfo.md) - [PriorityEnum](docs/PriorityEnum.md) + - [ProductTypeEnum](docs/ProductTypeEnum.md) - [RbmActionBase](docs/RbmActionBase.md) - [RbmActionDial](docs/RbmActionDial.md) - [RbmActionOpenUrl](docs/RbmActionOpenUrl.md) diff --git a/bandwidth.yml b/bandwidth.yml index 4b3681cb..004fb91b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -179,6 +179,18 @@ paths: - $ref: '#/components/parameters/fromDateTime' - $ref: '#/components/parameters/toDateTime' - $ref: '#/components/parameters/campaignId' + - $ref: '#/components/parameters/fromBwLatency' + - $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' + - $ref: '#/components/parameters/toSegmentCount' + - $ref: '#/components/parameters/fromMessageSize' + - $ref: '#/components/parameters/toMessageSize' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/pageToken' - $ref: '#/components/parameters/limit' @@ -1716,7 +1728,22 @@ components: enum: - sms - mms + - rcs example: sms + productTypeEnum: + type: string + description: The type of product associated with the message. + enum: + - LOCAL_A2P + - P2P + - SHORT_CODE_REACH + - TOLL_FREE + - HOSTED_SHORT_CODE + - ALPHA_NUMERIC + - RBM_MEDIA + - RBM_RICH + - RBM_CONVERSATIONAL + example: P2P fieldError: type: object properties: @@ -1819,6 +1846,41 @@ components: description: The campaign ID of the message if it has one. nullable: true example: CJEUMDK + bwLatency: + type: integer + description: >- + The Bandwidth latency of the message in seconds. Only available for + 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. + nullable: true + example: USA + calledNumberCountryA3: + type: string + description: The A3 country code of the called number. + nullable: true + example: USA + product: + type: string + description: The messaging product associated with the message. + nullable: true + example: P2P + location: + type: string + description: The location ID associated with this message. + nullable: true + example: 123ID pageInfo: title: PageInfo type: object @@ -5478,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: @@ -5564,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: @@ -5603,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: @@ -5806,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. @@ -6079,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: @@ -6940,6 +7088,112 @@ components: example: CJEUMDK schema: type: string + fromBwLatency: + in: query + name: fromBwLatency + required: false + description: >- + The minimum Bandwidth latency of the message in seconds. Only available + for accounts with the Advanced Quality Metrics feature enabled. + example: 5 + schema: + type: integer + bwQueued: + in: query + name: bwQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the + Bandwidth network. + example: true + schema: + type: boolean + product: + in: query + name: product + required: false + description: Messaging product associated with the message. + example: P2P + schema: + $ref: '#/components/schemas/productTypeEnum' + location: + in: query + name: location + required: false + description: Location Id associated with the message. + 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 + required: false + description: Calling number country in A3 format. + example: USA + schema: + type: string + calledNumberCountryA3: + in: query + name: calledNumberCountryA3 + required: false + description: Called number country in A3 format. + example: USA + schema: + type: string + fromSegmentCount: + in: query + name: fromSegmentCount + required: false + description: Segment count (start range). + example: 1 + schema: + type: integer + toSegmentCount: + in: query + name: toSegmentCount + required: false + description: Segment count (end range). + example: 3 + schema: + type: integer + fromMessageSize: + in: query + name: fromMessageSize + required: false + description: Message size (start range). + example: 100 + schema: + type: integer + toMessageSize: + in: query + name: toMessageSize + required: false + description: Message size (end range). + example: 120 + schema: + type: integer sort: in: query name: sort diff --git a/bandwidth/__init__.py b/bandwidth/__init__.py index 3bc9eb78..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 @@ -131,6 +133,7 @@ from bandwidth.models.opt_in_workflow import OptInWorkflow from bandwidth.models.page_info import PageInfo from bandwidth.models.priority_enum import PriorityEnum +from bandwidth.models.product_type_enum import ProductTypeEnum from bandwidth.models.rbm_action_base import RbmActionBase from bandwidth.models.rbm_action_dial import RbmActionDial from bandwidth.models.rbm_action_open_url import RbmActionOpenUrl diff --git a/bandwidth/api/messages_api.py b/bandwidth/api/messages_api.py index a1f9128a..1b89537b 100644 --- a/bandwidth/api/messages_api.py +++ b/bandwidth/api/messages_api.py @@ -26,6 +26,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.api_client import ApiClient, RequestSerialized from bandwidth.api_response import ApiResponse @@ -379,6 +380,18 @@ def list_messages( from_date_time: Annotated[Optional[StrictStr], Field(description="The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.")] = None, to_date_time: Annotated[Optional[StrictStr], Field(description="The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.")] = None, campaign_id: Annotated[Optional[StrictStr], Field(description="The campaign ID of the message.")] = None, + from_bw_latency: Annotated[Optional[StrictInt], Field(description="The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled.")] = None, + 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, + to_segment_count: Annotated[Optional[StrictInt], Field(description="Segment count (end range).")] = None, + from_message_size: Annotated[Optional[StrictInt], Field(description="Message size (start range).")] = None, + to_message_size: Annotated[Optional[StrictInt], Field(description="Message size (end range).")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field and direction to sort by combined with a colon. Direction is either asc or desc.")] = None, page_token: Annotated[Optional[StrictStr], Field(description="A base64 encoded value used for pagination of results.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000.")] = None, @@ -424,6 +437,30 @@ def list_messages( :type to_date_time: str :param campaign_id: The campaign ID of the message. :type campaign_id: str + :param from_bw_latency: The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + :type from_bw_latency: int + :param bw_queued: A boolean value indicating whether the message is queued in the Bandwidth network. + :type bw_queued: bool + :param product: Messaging product associated with the message. + :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. + :type called_number_country_a3: str + :param from_segment_count: Segment count (start range). + :type from_segment_count: int + :param to_segment_count: Segment count (end range). + :type to_segment_count: int + :param from_message_size: Message size (start range). + :type from_message_size: int + :param to_message_size: Message size (end range). + :type to_message_size: int :param sort: The field and direction to sort by combined with a colon. Direction is either asc or desc. :type sort: str :param page_token: A base64 encoded value used for pagination of results. @@ -467,6 +504,18 @@ def list_messages( 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, @@ -513,6 +562,18 @@ def list_messages_with_http_info( from_date_time: Annotated[Optional[StrictStr], Field(description="The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.")] = None, to_date_time: Annotated[Optional[StrictStr], Field(description="The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.")] = None, campaign_id: Annotated[Optional[StrictStr], Field(description="The campaign ID of the message.")] = None, + from_bw_latency: Annotated[Optional[StrictInt], Field(description="The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled.")] = None, + 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, + to_segment_count: Annotated[Optional[StrictInt], Field(description="Segment count (end range).")] = None, + from_message_size: Annotated[Optional[StrictInt], Field(description="Message size (start range).")] = None, + to_message_size: Annotated[Optional[StrictInt], Field(description="Message size (end range).")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field and direction to sort by combined with a colon. Direction is either asc or desc.")] = None, page_token: Annotated[Optional[StrictStr], Field(description="A base64 encoded value used for pagination of results.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000.")] = None, @@ -558,6 +619,30 @@ def list_messages_with_http_info( :type to_date_time: str :param campaign_id: The campaign ID of the message. :type campaign_id: str + :param from_bw_latency: The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + :type from_bw_latency: int + :param bw_queued: A boolean value indicating whether the message is queued in the Bandwidth network. + :type bw_queued: bool + :param product: Messaging product associated with the message. + :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. + :type called_number_country_a3: str + :param from_segment_count: Segment count (start range). + :type from_segment_count: int + :param to_segment_count: Segment count (end range). + :type to_segment_count: int + :param from_message_size: Message size (start range). + :type from_message_size: int + :param to_message_size: Message size (end range). + :type to_message_size: int :param sort: The field and direction to sort by combined with a colon. Direction is either asc or desc. :type sort: str :param page_token: A base64 encoded value used for pagination of results. @@ -601,6 +686,18 @@ def list_messages_with_http_info( 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, @@ -647,6 +744,18 @@ def list_messages_without_preload_content( from_date_time: Annotated[Optional[StrictStr], Field(description="The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.")] = None, to_date_time: Annotated[Optional[StrictStr], Field(description="The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.")] = None, campaign_id: Annotated[Optional[StrictStr], Field(description="The campaign ID of the message.")] = None, + from_bw_latency: Annotated[Optional[StrictInt], Field(description="The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled.")] = None, + 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, + to_segment_count: Annotated[Optional[StrictInt], Field(description="Segment count (end range).")] = None, + from_message_size: Annotated[Optional[StrictInt], Field(description="Message size (start range).")] = None, + to_message_size: Annotated[Optional[StrictInt], Field(description="Message size (end range).")] = None, sort: Annotated[Optional[StrictStr], Field(description="The field and direction to sort by combined with a colon. Direction is either asc or desc.")] = None, page_token: Annotated[Optional[StrictStr], Field(description="A base64 encoded value used for pagination of results.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000.")] = None, @@ -692,6 +801,30 @@ def list_messages_without_preload_content( :type to_date_time: str :param campaign_id: The campaign ID of the message. :type campaign_id: str + :param from_bw_latency: The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + :type from_bw_latency: int + :param bw_queued: A boolean value indicating whether the message is queued in the Bandwidth network. + :type bw_queued: bool + :param product: Messaging product associated with the message. + :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. + :type called_number_country_a3: str + :param from_segment_count: Segment count (start range). + :type from_segment_count: int + :param to_segment_count: Segment count (end range). + :type to_segment_count: int + :param from_message_size: Message size (start range). + :type from_message_size: int + :param to_message_size: Message size (end range). + :type to_message_size: int :param sort: The field and direction to sort by combined with a colon. Direction is either asc or desc. :type sort: str :param page_token: A base64 encoded value used for pagination of results. @@ -735,6 +868,18 @@ def list_messages_without_preload_content( 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, @@ -776,6 +921,18 @@ def _list_messages_serialize( from_date_time, to_date_time, campaign_id, + from_bw_latency, + bw_queued, + product, + location, + carrier_queued, + from_carrier_latency, + calling_number_country_a3, + called_number_country_a3, + from_segment_count, + to_segment_count, + from_message_size, + to_message_size, sort, page_token, limit, @@ -851,6 +1008,54 @@ def _list_messages_serialize( _query_params.append(('campaignId', campaign_id)) + if from_bw_latency is not None: + + _query_params.append(('fromBwLatency', from_bw_latency)) + + if bw_queued is not None: + + _query_params.append(('bwQueued', bw_queued)) + + if product is not None: + + _query_params.append(('product', product.value)) + + if location is not None: + + _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)) + + if called_number_country_a3 is not None: + + _query_params.append(('calledNumberCountryA3', called_number_country_a3)) + + if from_segment_count is not None: + + _query_params.append(('fromSegmentCount', from_segment_count)) + + if to_segment_count is not None: + + _query_params.append(('toSegmentCount', to_segment_count)) + + if from_message_size is not None: + + _query_params.append(('fromMessageSize', from_message_size)) + + if to_message_size is not None: + + _query_params.append(('toMessageSize', to_message_size)) + if sort is not None: _query_params.append(('sort', sort)) diff --git a/bandwidth/models/__init__.py b/bandwidth/models/__init__.py index e196281b..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 @@ -104,6 +106,7 @@ from bandwidth.models.opt_in_workflow import OptInWorkflow from bandwidth.models.page_info import PageInfo from bandwidth.models.priority_enum import PriorityEnum +from bandwidth.models.product_type_enum import ProductTypeEnum from bandwidth.models.rbm_action_base import RbmActionBase from bandwidth.models.rbm_action_dial import RbmActionDial from bandwidth.models.rbm_action_open_url import RbmActionOpenUrl 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 6a6b4903..f0ae8462 100644 --- a/bandwidth/models/list_message_item.py +++ b/bandwidth/models/list_message_item.py @@ -48,8 +48,14 @@ class ListMessageItem(BaseModel): recipient_count: Optional[StrictInt] = Field(default=None, description="The number of recipients the message has.", alias="recipientCount") 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"] + __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, @@ -127,6 +133,36 @@ def to_dict(self) -> Dict[str, Any]: if self.campaign_id is None and "campaign_id" in self.model_fields_set: _dict['campaignId'] = None + # set to None if bw_latency (nullable) is None + # and model_fields_set contains the field + 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: + _dict['callingNumberCountryA3'] = None + + # set to None if called_number_country_a3 (nullable) is None + # and model_fields_set contains the field + if self.called_number_country_a3 is None and "called_number_country_a3" in self.model_fields_set: + _dict['calledNumberCountryA3'] = None + + # set to None if product (nullable) is None + # and model_fields_set contains the field + if self.product is None and "product" in self.model_fields_set: + _dict['product'] = None + + # set to None if location (nullable) is None + # and model_fields_set contains the field + if self.location is None and "location" in self.model_fields_set: + _dict['location'] = None + return _dict @classmethod @@ -155,7 +191,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "attachmentCount": obj.get("attachmentCount"), "recipientCount": obj.get("recipientCount"), "campaignClass": obj.get("campaignClass"), - "campaignId": obj.get("campaignId") + "campaignId": obj.get("campaignId"), + "bwLatency": obj.get("bwLatency"), + "carrierLatency": obj.get("carrierLatency"), + "callingNumberCountryA3": obj.get("callingNumberCountryA3"), + "calledNumberCountryA3": obj.get("calledNumberCountryA3"), + "product": obj.get("product"), + "location": obj.get("location") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/bandwidth/models/message_type_enum.py b/bandwidth/models/message_type_enum.py index 7f289c03..6873f887 100644 --- a/bandwidth/models/message_type_enum.py +++ b/bandwidth/models/message_type_enum.py @@ -29,6 +29,7 @@ class MessageTypeEnum(str, Enum): """ SMS = 'sms' MMS = 'mms' + RCS = 'rcs' @classmethod def from_json(cls, json_str: str) -> Self: 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/product_type_enum.py b/bandwidth/models/product_type_enum.py new file mode 100644 index 00000000..7d3a9b24 --- /dev/null +++ b/bandwidth/models/product_type_enum.py @@ -0,0 +1,45 @@ +# 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 ProductTypeEnum(str, Enum): + """ + The type of product associated with the message. + """ + + """ + allowed enum values + """ + LOCAL_A2_P = 'LOCAL_A2P' + P2P = 'P2P' + SHORT_CODE_REACH = 'SHORT_CODE_REACH' + TOLL_FREE = 'TOLL_FREE' + HOSTED_SHORT_CODE = 'HOSTED_SHORT_CODE' + ALPHA_NUMERIC = 'ALPHA_NUMERIC' + RBM_MEDIA = 'RBM_MEDIA' + RBM_RICH = 'RBM_RICH' + RBM_CONVERSATIONAL = 'RBM_CONVERSATIONAL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ProductTypeEnum from a JSON string""" + return cls(json.loads(json_str)) + + 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 dae8e437..1c7cd151 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -22,6 +22,12 @@ Name | Type | Description | Notes **recipient_count** | **int** | The number of recipients the message has. | [optional] **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] +**location** | **str** | The location ID associated with this message. | [optional] ## Example diff --git a/docs/MessageTypeEnum.md b/docs/MessageTypeEnum.md index 1cf77340..eee539bd 100644 --- a/docs/MessageTypeEnum.md +++ b/docs/MessageTypeEnum.md @@ -8,6 +8,8 @@ The type of message. Either SMS or MMS. * `MMS` (value: `'mms'`) +* `RCS` (value: `'rcs'`) + [[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/MessagesApi.md b/docs/MessagesApi.md index cdf868ce..cab2fc2e 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, 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 @@ -116,6 +116,7 @@ from bandwidth.models.list_message_direction_enum import ListMessageDirectionEnu 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.rest import ApiException from pprint import pprint @@ -152,6 +153,18 @@ with bandwidth.ApiClient(configuration) as api_client: from_date_time = '2022-09-14T18:20:16.000Z' # str | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) to_date_time = '2022-09-14T18:20:16.000Z' # str | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) campaign_id = 'CJEUMDK' # str | The campaign ID of the message. (optional) + from_bw_latency = 5 # int | The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + 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) + to_segment_count = 3 # int | Segment count (end range). (optional) + from_message_size = 100 # int | Message size (start range). (optional) + to_message_size = 120 # int | Message size (end range). (optional) sort = 'sourceTn:desc' # str | The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) page_token = 'gdEewhcJLQRB5' # str | A base64 encoded value used for pagination of results. (optional) limit = 50 # int | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) @@ -159,7 +172,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, 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: @@ -185,6 +198,18 @@ Name | Type | Description | Notes **from_date_time** | **str**| The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] **to_date_time** | **str**| The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] **campaign_id** | **str**| The campaign ID of the message. | [optional] + **from_bw_latency** | **int**| The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] + **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] + **to_segment_count** | **int**| Segment count (end range). | [optional] + **from_message_size** | **int**| Message size (start range). | [optional] + **to_message_size** | **int**| Message size (end range). | [optional] **sort** | **str**| The field and direction to sort by combined with a colon. Direction is either asc or desc. | [optional] **page_token** | **str**| A base64 encoded value used for pagination of results. | [optional] **limit** | **int**| The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. | [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/ProductTypeEnum.md b/docs/ProductTypeEnum.md new file mode 100644 index 00000000..101fef89 --- /dev/null +++ b/docs/ProductTypeEnum.md @@ -0,0 +1,27 @@ +# ProductTypeEnum + +The type of product associated with the message. + +## Enum + +* `LOCAL_A2_P` (value: `'LOCAL_A2P'`) + +* `P2P` (value: `'P2P'`) + +* `SHORT_CODE_REACH` (value: `'SHORT_CODE_REACH'`) + +* `TOLL_FREE` (value: `'TOLL_FREE'`) + +* `HOSTED_SHORT_CODE` (value: `'HOSTED_SHORT_CODE'`) + +* `ALPHA_NUMERIC` (value: `'ALPHA_NUMERIC'`) + +* `RBM_MEDIA` (value: `'RBM_MEDIA'`) + +* `RBM_RICH` (value: `'RBM_RICH'`) + +* `RBM_CONVERSATIONAL` (value: `'RBM_CONVERSATIONAL'`) + +[[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/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 From 7377fb30d55bacf02b4e4903bf867b360d4b3d1a Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 4 Sep 2025 16:00:53 -0400 Subject: [PATCH 2/3] tests --- .../api/test_toll_free_verification_api.py | 3 +- .../models/test_business_entity_type_enum.py | 44 +++++++++++++++++++ .../test_business_registration_type_enum.py | 39 ++++++++++++++++ test/unit/models/test_list_message_item.py | 2 + test/unit/models/test_messages_list.py | 14 +++++- test/unit/models/test_opt_in_workflow.py | 7 ++- test/unit/models/test_tfv_status.py | 12 ++++- test/unit/models/test_tfv_submission_info.py | 12 ++++- .../models/test_tfv_submission_wrapper.py | 4 +- test/unit/models/test_verification_request.py | 19 ++++++-- .../test_verification_update_request.py | 19 ++++++-- 11 files changed, 160 insertions(+), 15 deletions(-) create mode 100644 test/unit/models/test_business_entity_type_enum.py create mode 100644 test/unit/models/test_business_registration_type_enum.py 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..b24d75da --- /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('CBM') + assert ein == 'EIN' + assert cbn == 'CBM' + + + +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() From 2727fe83c42a06968676e39d06bf37a07ff6fc68 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 4 Sep 2025 16:03:24 -0400 Subject: [PATCH 3/3] CBN --- test/unit/models/test_business_registration_type_enum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/models/test_business_registration_type_enum.py b/test/unit/models/test_business_registration_type_enum.py index b24d75da..1a2b7723 100644 --- a/test/unit/models/test_business_registration_type_enum.py +++ b/test/unit/models/test_business_registration_type_enum.py @@ -29,9 +29,9 @@ def tearDown(self): def testBusinessRegistrationTypeEnum(self): """Test BusinessRegistrationTypeEnum""" ein = BusinessRegistrationTypeEnum('EIN') - cbn = BusinessRegistrationTypeEnum('CBM') + cbn = BusinessRegistrationTypeEnum('CBN') assert ein == 'EIN' - assert cbn == 'CBM' + assert cbn == 'CBN'