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/docs/Callback.md b/docs/Callback.md index f4863b05..80aaca3e 100644 --- a/docs/Callback.md +++ b/docs/Callback.md @@ -50,7 +50,7 @@ Bandwidth::Callback.openapi_discriminator_mapping # :'message-received' => :'InboundCallback', # :'message-sending' => :'StatusCallback', # :'message-sent' => :'StatusCallback', -# :'request-location-response' => :'InboundCallback', +# :'requested-location-response' => :'InboundCallback', # :'suggestion-response' => :'InboundCallback' # } ``` diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md index 533a7bc4..aa1ab41a 100644 --- a/docs/RbmActionBase.md +++ b/docs/RbmActionBase.md @@ -16,7 +16,7 @@ require 'bandwidth-sdk' instance = Bandwidth::RbmActionBase.new( type: null, text: Hello world, - postback_data: [B@24fb752f + postback_data: [B@20706e70 ) ``` diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 36dea1f5..5df0ccb8 100644 --- a/docs/RbmSuggestionResponse.md +++ b/docs/RbmSuggestionResponse.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **text** | **String** | The text associated with the suggestion response. | [optional] | | **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | [optional] | +| **paired_message_id** | **String** | Corresponding parent message ID (MT). | [optional] | ## Example @@ -14,7 +15,8 @@ require 'bandwidth-sdk' instance = Bandwidth::RbmSuggestionResponse.new( text: Yes, I would like to proceed, - postback_data: [B@24fb752f + postback_data: [B@20706e70, + paired_message_id: 1752697342534u24xerqdukke523x ) ``` diff --git a/lib/bandwidth-sdk/models/callback.rb b/lib/bandwidth-sdk/models/callback.rb index 126d00f5..fec0367d 100644 --- a/lib/bandwidth-sdk/models/callback.rb +++ b/lib/bandwidth-sdk/models/callback.rb @@ -39,7 +39,7 @@ def openapi_discriminator_mapping :'message-received' => :'InboundCallback', :'message-sending' => :'StatusCallback', :'message-sent' => :'StatusCallback', - :'request-location-response' => :'InboundCallback', + :'requested-location-response' => :'InboundCallback', :'suggestion-response' => :'InboundCallback' } end diff --git a/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb b/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb index c0f2e285..a5f749ce 100644 --- a/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb +++ b/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb @@ -16,11 +16,11 @@ module Bandwidth class InboundCallbackTypeEnum MESSAGE_RECEIVED = 'message-received'.freeze - REQUEST_LOCATION_RESPONSE = 'request-location-response'.freeze + REQUESTED_LOCATION_RESPONSE = 'requested-location-response'.freeze SUGGESTION_RESPONSE = 'suggestion-response'.freeze def self.all_vars - @all_vars ||= [MESSAGE_RECEIVED, REQUEST_LOCATION_RESPONSE, SUGGESTION_RESPONSE].freeze + @all_vars ||= [MESSAGE_RECEIVED, REQUESTED_LOCATION_RESPONSE, SUGGESTION_RESPONSE].freeze end # Builds the enum from string diff --git a/lib/bandwidth-sdk/models/rbm_suggestion_response.rb b/lib/bandwidth-sdk/models/rbm_suggestion_response.rb index 720250f0..dc595b7f 100644 --- a/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +++ b/lib/bandwidth-sdk/models/rbm_suggestion_response.rb @@ -21,11 +21,15 @@ class RbmSuggestionResponse < ApiModelBase # Base64 payload the customer receives when the reply is clicked. attr_accessor :postback_data + # Corresponding parent message ID (MT). + attr_accessor :paired_message_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'text' => :'text', - :'postback_data' => :'postbackData' + :'postback_data' => :'postbackData', + :'paired_message_id' => :'pairedMessageId' } end @@ -43,13 +47,15 @@ def self.acceptable_attributes def self.openapi_types { :'text' => :'String', - :'postback_data' => :'String' + :'postback_data' => :'String', + :'paired_message_id' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'paired_message_id' ]) end @@ -76,6 +82,10 @@ def initialize(attributes = {}) if attributes.key?(:'postback_data') self.postback_data = attributes[:'postback_data'] end + + if attributes.key?(:'paired_message_id') + self.paired_message_id = attributes[:'paired_message_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -118,7 +128,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && text == o.text && - postback_data == o.postback_data + postback_data == o.postback_data && + paired_message_id == o.paired_message_id end # @see the `==` method @@ -130,7 +141,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [text, postback_data].hash + [text, postback_data, paired_message_id].hash end # Builds the object from hash diff --git a/spec/unit/models/callback_spec.rb b/spec/unit/models/callback_spec.rb index b3a675ee..d6a011bc 100644 --- a/spec/unit/models/callback_spec.rb +++ b/spec/unit/models/callback_spec.rb @@ -24,7 +24,7 @@ :'message-received' => :'InboundCallback', :'message-sending' => :'StatusCallback', :'message-sent' => :'StatusCallback', - :'request-location-response' => :'InboundCallback', + :'requested-location-response' => :'InboundCallback', :'suggestion-response' => :'InboundCallback' }) end diff --git a/spec/unit/models/inbound_callback_type_enum_spec.rb b/spec/unit/models/inbound_callback_type_enum_spec.rb index 5cbeb78e..d0450a04 100644 --- a/spec/unit/models/inbound_callback_type_enum_spec.rb +++ b/spec/unit/models/inbound_callback_type_enum_spec.rb @@ -6,7 +6,7 @@ end it 'defines REQUEST_LOCATION_RESPONSE' do - expect(Bandwidth::InboundCallbackTypeEnum::REQUEST_LOCATION_RESPONSE).to eq('request-location-response') + expect(Bandwidth::InboundCallbackTypeEnum::REQUESTED_LOCATION_RESPONSE).to eq('requested-location-response') end it 'defines SUGGESTION_RESPONSE' do @@ -18,7 +18,7 @@ it 'returns every valid enum value' do expect(Bandwidth::InboundCallbackTypeEnum.all_vars).to eq([ 'message-received', - 'request-location-response', + 'requested-location-response', 'suggestion-response' ]) end @@ -27,7 +27,7 @@ describe '.build_from_hash' do it 'returns the value when it matches a valid enum value' do expect(Bandwidth::InboundCallbackTypeEnum.build_from_hash('message-received')).to eq('message-received') - expect(Bandwidth::InboundCallbackTypeEnum.build_from_hash('request-location-response')).to eq('request-location-response') + expect(Bandwidth::InboundCallbackTypeEnum.build_from_hash('requested-location-response')).to eq('requested-location-response') expect(Bandwidth::InboundCallbackTypeEnum.build_from_hash('suggestion-response')).to eq('suggestion-response') end diff --git a/spec/unit/models/rbm_suggestion_response_spec.rb b/spec/unit/models/rbm_suggestion_response_spec.rb index 609da35e..775dbc11 100644 --- a/spec/unit/models/rbm_suggestion_response_spec.rb +++ b/spec/unit/models/rbm_suggestion_response_spec.rb @@ -3,7 +3,8 @@ let(:rbm_suggestion_response_default) { Bandwidth::RbmSuggestionResponse.new } let(:rbm_suggestion_response_values) { Bandwidth::RbmSuggestionResponse.new({ text: 'Yes', - postback_data: 'reply_yes' + postback_data: 'reply_yes', + paired_message_id: 'paired_message_123' }) } describe '#initialize' do @@ -28,7 +29,7 @@ describe '#openapi_nullable' do it 'expects nullable attributes to be an empty set' do - expect(Bandwidth::RbmSuggestionResponse.openapi_nullable).to eq(Set.new([])) + expect(Bandwidth::RbmSuggestionResponse.openapi_nullable).to eq(Set.new([:paired_message_id])) end end @@ -36,17 +37,19 @@ it 'validates instance of RbmSuggestionResponse created by the build_from_hash method' do rbm_suggestion_response_from_hash = Bandwidth::RbmSuggestionResponse.build_from_hash({ text: 'Yes', - postbackData: 'reply_yes' + postbackData: 'reply_yes', + pairedMessageId: 'paired_message_123' }) expect(rbm_suggestion_response_from_hash).to be_instance_of(Bandwidth::RbmSuggestionResponse) expect(rbm_suggestion_response_from_hash.text).to eq('Yes') expect(rbm_suggestion_response_from_hash.postback_data).to eq('reply_yes') + expect(rbm_suggestion_response_from_hash.paired_message_id).to eq('paired_message_123') end end describe '#to_s' do it 'returns a string representation of the object' do - expect(rbm_suggestion_response_values.to_s).to eq('{:text=>"Yes", :postbackData=>"reply_yes"}') + expect(rbm_suggestion_response_values.to_s).to eq('{:text=>"Yes", :postbackData=>"reply_yes", :pairedMessageId=>"paired_message_123"}') end end @@ -61,7 +64,8 @@ it 'returns a hash representation of the object' do expect(rbm_suggestion_response_values.to_body).to eq({ text: 'Yes', - postbackData: 'reply_yes' + postbackData: 'reply_yes', + pairedMessageId: 'paired_message_123' }) end end