From 582b2e193b2714a09d185795db134a767ed49c37 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Fri, 19 Jun 2026 17:20:02 +0000 Subject: [PATCH 1/2] Generate SDK with OpenAPI Generator Version --- bandwidth.yml | 20 ++++++++++++------- bandwidth/models/callback.py | 2 +- .../models/inbound_callback_type_enum.py | 4 ++-- bandwidth/models/rbm_suggestion_response.py | 11 ++++++++-- docs/InboundCallbackTypeEnum.md | 4 ++-- docs/RbmSuggestionResponse.md | 1 + 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 5e2bc9b3..a380e26d 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2889,6 +2889,11 @@ components: example: Yes, I would like to proceed postbackData: $ref: '#/components/schemas/rbmActionPostbackData' + pairedMessageId: + type: string + nullable: true + description: Corresponding parent message ID (MT). + example: 1752697342534u24xerqdukke523x rbmLocationResponse: type: object properties: @@ -2925,7 +2930,7 @@ components: message-failed: '#/components/schemas/statusCallback' message-read: '#/components/schemas/statusCallback' message-received: '#/components/schemas/inboundCallback' - request-location-response: '#/components/schemas/inboundCallback' + requested-location-response: '#/components/schemas/inboundCallback' suggestion-response: '#/components/schemas/inboundCallback' statusCallback: type: object @@ -3035,14 +3040,15 @@ components: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - - `request-location-response` indicates a response to a location request - sent by the Bandwidth user's client after receiving an RBM message. + - `requested-location-response` indicates a response to a location + request sent by the Bandwidth user's client after receiving an RBM + message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. enum: - message-received - - request-location-response + - requested-location-response - suggestion-response example: message-received statusCallbackMessage: @@ -9154,7 +9160,7 @@ components: tag: '{"myTag": "myTagValue"}' updateEndpointBxmlRequestExample: summary: Update Endpoint BXML Request Example - value: + value: endpointDisconnectedEventExample: summary: Endpoint Disconnected Event value: @@ -9678,10 +9684,10 @@ components:

The payload type will be one of message-received, suggestion-response, or - location-request-response. + requested-location-response.

Note that suggestion-response and - location-request-response callback types are + requested-location-response callback types are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. diff --git a/bandwidth/models/callback.py b/bandwidth/models/callback.py index 4fc0e9ec..1e5fc32a 100644 --- a/bandwidth/models/callback.py +++ b/bandwidth/models/callback.py @@ -53,7 +53,7 @@ class Callback(BaseModel): 'message-received': 'InboundCallback', 'message-sending': 'StatusCallback', 'message-sent': 'StatusCallback', - 'request-location-response': 'InboundCallback', + 'requested-location-response': 'InboundCallback', 'suggestion-response': 'InboundCallback' } diff --git a/bandwidth/models/inbound_callback_type_enum.py b/bandwidth/models/inbound_callback_type_enum.py index 69527df3..b2527e05 100644 --- a/bandwidth/models/inbound_callback_type_enum.py +++ b/bandwidth/models/inbound_callback_type_enum.py @@ -21,14 +21,14 @@ class InboundCallbackTypeEnum(str, Enum): """ - The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. + The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `requested-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. """ """ allowed enum values """ MESSAGE_MINUS_RECEIVED = 'message-received' - REQUEST_MINUS_LOCATION_MINUS_RESPONSE = 'request-location-response' + REQUESTED_MINUS_LOCATION_MINUS_RESPONSE = 'requested-location-response' SUGGESTION_MINUS_RESPONSE = 'suggestion-response' @classmethod diff --git a/bandwidth/models/rbm_suggestion_response.py b/bandwidth/models/rbm_suggestion_response.py index b8de63ac..a0f4c30a 100644 --- a/bandwidth/models/rbm_suggestion_response.py +++ b/bandwidth/models/rbm_suggestion_response.py @@ -30,8 +30,9 @@ class RbmSuggestionResponse(BaseModel): """ # noqa: E501 text: Optional[StrictStr] = Field(default=None, description="The text associated with the suggestion response.") postback_data: Optional[Union[Annotated[bytes, Field(strict=True, max_length=2048)], Annotated[str, Field(strict=True, max_length=2048)]]] = Field(default=None, description="Base64 payload the customer receives when the reply is clicked.", alias="postbackData") + paired_message_id: Optional[StrictStr] = Field(default=None, description="Corresponding parent message ID (MT).", alias="pairedMessageId") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["text", "postbackData"] + __properties: ClassVar[List[str]] = ["text", "postbackData", "pairedMessageId"] 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 paired_message_id (nullable) is None + # and model_fields_set contains the field + if self.paired_message_id is None and "paired_message_id" in self.model_fields_set: + _dict['pairedMessageId'] = None + return _dict @classmethod @@ -92,7 +98,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "text": obj.get("text"), - "postbackData": obj.get("postbackData") + "postbackData": obj.get("postbackData"), + "pairedMessageId": obj.get("pairedMessageId") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/docs/InboundCallbackTypeEnum.md b/docs/InboundCallbackTypeEnum.md index f1259de4..1475f5f4 100644 --- a/docs/InboundCallbackTypeEnum.md +++ b/docs/InboundCallbackTypeEnum.md @@ -1,12 +1,12 @@ # InboundCallbackTypeEnum -The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. +The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `requested-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. ## Enum * `MESSAGE_MINUS_RECEIVED` (value: `'message-received'`) -* `REQUEST_MINUS_LOCATION_MINUS_RESPONSE` (value: `'request-location-response'`) +* `REQUESTED_MINUS_LOCATION_MINUS_RESPONSE` (value: `'requested-location-response'`) * `SUGGESTION_MINUS_RESPONSE` (value: `'suggestion-response'`) diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index fb688489..40d80934 100644 --- a/docs/RbmSuggestionResponse.md +++ b/docs/RbmSuggestionResponse.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **str** | The text associated with the suggestion response. | [optional] **postback_data** | **bytearray** | Base64 payload the customer receives when the reply is clicked. | [optional] +**paired_message_id** | **str** | Corresponding parent message ID (MT). | [optional] ## Example From dfe7613bcab1dc3b21a672e027ad1a0074f2031b Mon Sep 17 00:00:00 2001 From: ckoegel Date: Fri, 19 Jun 2026 14:46:50 -0400 Subject: [PATCH 2/2] unit tests --- test/unit/models/test_inbound_callback_type_enum.py | 2 +- test/unit/models/test_rbm_suggestion_response.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/models/test_inbound_callback_type_enum.py b/test/unit/models/test_inbound_callback_type_enum.py index 2aa888bf..aa134e25 100644 --- a/test/unit/models/test_inbound_callback_type_enum.py +++ b/test/unit/models/test_inbound_callback_type_enum.py @@ -29,7 +29,7 @@ def tearDown(self): def testInboundCallbackTypeEnum(self): """Test InboundCallbackTypeEnum""" assert InboundCallbackTypeEnum('message-received') == 'message-received' - assert InboundCallbackTypeEnum('request-location-response') == 'request-location-response' + assert InboundCallbackTypeEnum('requested-location-response') == 'requested-location-response' assert InboundCallbackTypeEnum('suggestion-response') == 'suggestion-response' if __name__ == '__main__': diff --git a/test/unit/models/test_rbm_suggestion_response.py b/test/unit/models/test_rbm_suggestion_response.py index 0579c4fc..04987ad9 100644 --- a/test/unit/models/test_rbm_suggestion_response.py +++ b/test/unit/models/test_rbm_suggestion_response.py @@ -34,7 +34,8 @@ def make_instance(self, include_optional) -> RbmSuggestionResponse: if include_optional: return RbmSuggestionResponse( text = 'Yes, I would like to proceed', - postback_data = '[B@5d4a34ff' + postback_data = '[B@5d4a34ff', + paired_message_id = '1234567890' ) else: return RbmSuggestionResponse( @@ -47,6 +48,7 @@ def testRbmSuggestionResponse(self): assert isinstance(instance, RbmSuggestionResponse) assert instance.text == 'Yes, I would like to proceed' assert instance.postback_data == '[B@5d4a34ff' + assert instance.paired_message_id == '1234567890' if __name__ == '__main__': unittest.main()