diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 21ce874e..9f05a602 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -108,6 +108,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 @@ -268,6 +269,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..8296ec33 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,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..65afd419 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -179,6 +179,16 @@ 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/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 +1726,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 +1844,33 @@ 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 + 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 @@ -6940,6 +6992,90 @@ 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 + 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..e4e25091 100644 --- a/bandwidth/__init__.py +++ b/bandwidth/__init__.py @@ -131,6 +131,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..440f3033 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,16 @@ 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, + 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 +435,26 @@ 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 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 +498,16 @@ 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, + 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 +554,16 @@ 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, + 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 +609,26 @@ 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 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 +672,16 @@ 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, + 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 +728,16 @@ 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, + 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 +783,26 @@ 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 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 +846,16 @@ 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, + 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 +897,16 @@ def _list_messages_serialize( from_date_time, to_date_time, campaign_id, + from_bw_latency, + bw_queued, + product, + location, + 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 +982,46 @@ 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 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..a7f24064 100644 --- a/bandwidth/models/__init__.py +++ b/bandwidth/models/__init__.py @@ -104,6 +104,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/list_message_item.py b/bandwidth/models/list_message_item.py index 6a6b4903..247e1135 100644 --- a/bandwidth/models/list_message_item.py +++ b/bandwidth/models/list_message_item.py @@ -48,8 +48,13 @@ 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") + 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", "callingNumberCountryA3", "calledNumberCountryA3", "product", "location"] model_config = ConfigDict( populate_by_name=True, @@ -127,6 +132,31 @@ 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 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 +185,12 @@ 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"), + "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/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/docs/ListMessageItem.md b/docs/ListMessageItem.md index dae8e437..c8309c95 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -22,6 +22,11 @@ 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] +**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..4a41947d 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, 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,16 @@ 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) + 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 +170,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, 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 +196,16 @@ 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] + **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/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) + +