Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
118 changes: 118 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions bandwidth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 35 additions & 0 deletions bandwidth/api/messages_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions bandwidth/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 41 additions & 0 deletions bandwidth/models/business_entity_type_enum.py
Original file line number Diff line number Diff line change
@@ -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))


Loading