diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 425d0417..4bd78244 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -93,6 +93,7 @@ docs/LinksObject.md
docs/ListEndpointsResponse.md
docs/ListMessageDirectionEnum.md
docs/ListMessageItem.md
+docs/LocationResponse.md
docs/LookupErrorResponse.md
docs/LookupErrorSchema.md
docs/LookupErrorSchemaMeta.md
@@ -150,7 +151,6 @@ docs/RbmActionTypeEnum.md
docs/RbmActionViewLocation.md
docs/RbmCardContent.md
docs/RbmCardContentMedia.md
-docs/RbmLocationResponse.md
docs/RbmMediaHeightEnum.md
docs/RbmMessageCarouselCard.md
docs/RbmMessageContentFile.md
@@ -159,7 +159,6 @@ docs/RbmMessageContentText.md
docs/RbmMessageMedia.md
docs/RbmOpenUrlEnum.md
docs/RbmStandaloneCard.md
-docs/RbmSuggestionResponse.md
docs/RbmWebViewEnum.md
docs/RecordingAvailableCallback.md
docs/RecordingCompleteCallback.md
@@ -178,6 +177,7 @@ docs/StatusCallback.md
docs/StatusCallbackMessage.md
docs/StatusCallbackTypeEnum.md
docs/StirShaken.md
+docs/SuggestionResponse.md
docs/SyncLookupRequest.md
docs/TelephoneNumber.md
docs/TfvBasicAuthentication.md
@@ -318,6 +318,7 @@ lib/bandwidth-sdk/models/links_object.rb
lib/bandwidth-sdk/models/list_endpoints_response.rb
lib/bandwidth-sdk/models/list_message_direction_enum.rb
lib/bandwidth-sdk/models/list_message_item.rb
+lib/bandwidth-sdk/models/location_response.rb
lib/bandwidth-sdk/models/lookup_error_response.rb
lib/bandwidth-sdk/models/lookup_error_schema.rb
lib/bandwidth-sdk/models/lookup_error_schema_meta.rb
@@ -370,7 +371,6 @@ lib/bandwidth-sdk/models/rbm_action_type_enum.rb
lib/bandwidth-sdk/models/rbm_action_view_location.rb
lib/bandwidth-sdk/models/rbm_card_content.rb
lib/bandwidth-sdk/models/rbm_card_content_media.rb
-lib/bandwidth-sdk/models/rbm_location_response.rb
lib/bandwidth-sdk/models/rbm_media_height_enum.rb
lib/bandwidth-sdk/models/rbm_message_carousel_card.rb
lib/bandwidth-sdk/models/rbm_message_content_file.rb
@@ -379,7 +379,6 @@ lib/bandwidth-sdk/models/rbm_message_content_text.rb
lib/bandwidth-sdk/models/rbm_message_media.rb
lib/bandwidth-sdk/models/rbm_open_url_enum.rb
lib/bandwidth-sdk/models/rbm_standalone_card.rb
-lib/bandwidth-sdk/models/rbm_suggestion_response.rb
lib/bandwidth-sdk/models/rbm_web_view_enum.rb
lib/bandwidth-sdk/models/recording_available_callback.rb
lib/bandwidth-sdk/models/recording_complete_callback.rb
@@ -396,6 +395,7 @@ lib/bandwidth-sdk/models/status_callback.rb
lib/bandwidth-sdk/models/status_callback_message.rb
lib/bandwidth-sdk/models/status_callback_type_enum.rb
lib/bandwidth-sdk/models/stir_shaken.rb
+lib/bandwidth-sdk/models/suggestion_response.rb
lib/bandwidth-sdk/models/sync_lookup_request.rb
lib/bandwidth-sdk/models/telephone_number.rb
lib/bandwidth-sdk/models/tfv_basic_authentication.rb
diff --git a/README.md b/README.md
index ad7e1e44..a88b6f12 100644
--- a/README.md
+++ b/README.md
@@ -262,6 +262,7 @@ Class | Method | HTTP request | Description
- [Bandwidth::ListEndpointsResponse](docs/ListEndpointsResponse.md)
- [Bandwidth::ListMessageDirectionEnum](docs/ListMessageDirectionEnum.md)
- [Bandwidth::ListMessageItem](docs/ListMessageItem.md)
+ - [Bandwidth::LocationResponse](docs/LocationResponse.md)
- [Bandwidth::LookupErrorResponse](docs/LookupErrorResponse.md)
- [Bandwidth::LookupErrorSchema](docs/LookupErrorSchema.md)
- [Bandwidth::LookupErrorSchemaMeta](docs/LookupErrorSchemaMeta.md)
@@ -314,7 +315,6 @@ Class | Method | HTTP request | Description
- [Bandwidth::RbmActionViewLocation](docs/RbmActionViewLocation.md)
- [Bandwidth::RbmCardContent](docs/RbmCardContent.md)
- [Bandwidth::RbmCardContentMedia](docs/RbmCardContentMedia.md)
- - [Bandwidth::RbmLocationResponse](docs/RbmLocationResponse.md)
- [Bandwidth::RbmMediaHeightEnum](docs/RbmMediaHeightEnum.md)
- [Bandwidth::RbmMessageCarouselCard](docs/RbmMessageCarouselCard.md)
- [Bandwidth::RbmMessageContentFile](docs/RbmMessageContentFile.md)
@@ -323,7 +323,6 @@ Class | Method | HTTP request | Description
- [Bandwidth::RbmMessageMedia](docs/RbmMessageMedia.md)
- [Bandwidth::RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md)
- [Bandwidth::RbmStandaloneCard](docs/RbmStandaloneCard.md)
- - [Bandwidth::RbmSuggestionResponse](docs/RbmSuggestionResponse.md)
- [Bandwidth::RbmWebViewEnum](docs/RbmWebViewEnum.md)
- [Bandwidth::RecordingAvailableCallback](docs/RecordingAvailableCallback.md)
- [Bandwidth::RecordingCompleteCallback](docs/RecordingCompleteCallback.md)
@@ -340,6 +339,7 @@ Class | Method | HTTP request | Description
- [Bandwidth::StatusCallbackMessage](docs/StatusCallbackMessage.md)
- [Bandwidth::StatusCallbackTypeEnum](docs/StatusCallbackTypeEnum.md)
- [Bandwidth::StirShaken](docs/StirShaken.md)
+ - [Bandwidth::SuggestionResponse](docs/SuggestionResponse.md)
- [Bandwidth::SyncLookupRequest](docs/SyncLookupRequest.md)
- [Bandwidth::TelephoneNumber](docs/TelephoneNumber.md)
- [Bandwidth::TfvBasicAuthentication](docs/TfvBasicAuthentication.md)
diff --git a/bandwidth.yml b/bandwidth.yml
index 5e2bc9b3..92f7b763 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -2880,7 +2880,7 @@ components:
type: string
media:
$ref: '#/components/schemas/rbmMessageContentFile'
- rbmSuggestionResponse:
+ suggestionResponse:
type: object
properties:
text:
@@ -2889,7 +2889,12 @@ components:
example: Yes, I would like to proceed
postbackData:
$ref: '#/components/schemas/rbmActionPostbackData'
- rbmLocationResponse:
+ pairedMessageId:
+ type: string
+ nullable: true
+ description: Corresponding parent message ID (MT).
+ example: 1752697342534u24xerqdukke523x
+ locationResponse:
type: object
properties:
latitude:
@@ -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:
@@ -3118,9 +3124,9 @@ components:
content:
$ref: '#/components/schemas/multiChannelMessageContent'
suggestionResponse:
- $ref: '#/components/schemas/rbmSuggestionResponse'
+ $ref: '#/components/schemas/suggestionResponse'
locationResponse:
- $ref: '#/components/schemas/rbmLocationResponse'
+ $ref: '#/components/schemas/locationResponse'
required:
- id
- owner
@@ -9154,7 +9160,7 @@ components:
tag: '{"myTag": "myTagValue"}'
updateEndpointBxmlRequestExample:
summary: Update Endpoint BXML Request Example
- value:
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/InboundCallbackMessage.md b/docs/InboundCallbackMessage.md
index 2ef8d8d9..e4e0526e 100644
--- a/docs/InboundCallbackMessage.md
+++ b/docs/InboundCallbackMessage.md
@@ -18,8 +18,8 @@
| **priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] |
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] |
| **content** | [**MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional] |
-| **suggestion_response** | [**RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional] |
-| **location_response** | [**RbmLocationResponse**](RbmLocationResponse.md) | | [optional] |
+| **suggestion_response** | [**SuggestionResponse**](SuggestionResponse.md) | | [optional] |
+| **location_response** | [**LocationResponse**](LocationResponse.md) | | [optional] |
## Example
diff --git a/docs/LocationResponse.md b/docs/LocationResponse.md
new file mode 100644
index 00000000..20581c6d
--- /dev/null
+++ b/docs/LocationResponse.md
@@ -0,0 +1,20 @@
+# Bandwidth::LocationResponse
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **latitude** | **Float** | The latitude of the client's location. | [optional] |
+| **longitude** | **Float** | The longitude of the client's location. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::LocationResponse.new(
+ latitude: 37.7749,
+ longitude: -122.4194
+)
+```
+
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/SuggestionResponse.md b/docs/SuggestionResponse.md
new file mode 100644
index 00000000..95430b3b
--- /dev/null
+++ b/docs/SuggestionResponse.md
@@ -0,0 +1,22 @@
+# Bandwidth::SuggestionResponse
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **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
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::SuggestionResponse.new(
+ text: Yes, I would like to proceed,
+ postback_data: [B@20706e70,
+ paired_message_id: 1752697342534u24xerqdukke523x
+)
+```
+
diff --git a/lib/bandwidth-sdk.rb b/lib/bandwidth-sdk.rb
index a15c309c..7d12b85c 100644
--- a/lib/bandwidth-sdk.rb
+++ b/lib/bandwidth-sdk.rb
@@ -104,6 +104,7 @@
require 'bandwidth-sdk/models/list_endpoints_response'
require 'bandwidth-sdk/models/list_message_direction_enum'
require 'bandwidth-sdk/models/list_message_item'
+require 'bandwidth-sdk/models/location_response'
require 'bandwidth-sdk/models/lookup_error_response'
require 'bandwidth-sdk/models/lookup_error_schema'
require 'bandwidth-sdk/models/lookup_error_schema_meta'
@@ -156,7 +157,6 @@
require 'bandwidth-sdk/models/rbm_action_view_location'
require 'bandwidth-sdk/models/rbm_card_content'
require 'bandwidth-sdk/models/rbm_card_content_media'
-require 'bandwidth-sdk/models/rbm_location_response'
require 'bandwidth-sdk/models/rbm_media_height_enum'
require 'bandwidth-sdk/models/rbm_message_carousel_card'
require 'bandwidth-sdk/models/rbm_message_content_file'
@@ -165,7 +165,6 @@
require 'bandwidth-sdk/models/rbm_message_media'
require 'bandwidth-sdk/models/rbm_open_url_enum'
require 'bandwidth-sdk/models/rbm_standalone_card'
-require 'bandwidth-sdk/models/rbm_suggestion_response'
require 'bandwidth-sdk/models/rbm_web_view_enum'
require 'bandwidth-sdk/models/recording_available_callback'
require 'bandwidth-sdk/models/recording_complete_callback'
@@ -182,6 +181,7 @@
require 'bandwidth-sdk/models/status_callback_message'
require 'bandwidth-sdk/models/status_callback_type_enum'
require 'bandwidth-sdk/models/stir_shaken'
+require 'bandwidth-sdk/models/suggestion_response'
require 'bandwidth-sdk/models/sync_lookup_request'
require 'bandwidth-sdk/models/telephone_number'
require 'bandwidth-sdk/models/tfv_basic_authentication'
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_message.rb b/lib/bandwidth-sdk/models/inbound_callback_message.rb
index cd3af0ad..ea64e838 100644
--- a/lib/bandwidth-sdk/models/inbound_callback_message.rb
+++ b/lib/bandwidth-sdk/models/inbound_callback_message.rb
@@ -126,8 +126,8 @@ def self.openapi_types
:'priority' => :'PriorityEnum',
:'channel' => :'MultiChannelMessageChannelEnum',
:'content' => :'MultiChannelMessageContent',
- :'suggestion_response' => :'RbmSuggestionResponse',
- :'location_response' => :'RbmLocationResponse'
+ :'suggestion_response' => :'SuggestionResponse',
+ :'location_response' => :'LocationResponse'
}
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/location_response.rb b/lib/bandwidth-sdk/models/location_response.rb
new file mode 100644
index 00000000..b6f5ea49
--- /dev/null
+++ b/lib/bandwidth-sdk/models/location_response.rb
@@ -0,0 +1,156 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class LocationResponse < ApiModelBase
+ # The latitude of the client's location.
+ attr_accessor :latitude
+
+ # The longitude of the client's location.
+ attr_accessor :longitude
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'latitude' => :'latitude',
+ :'longitude' => :'longitude'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'latitude' => :'Float',
+ :'longitude' => :'Float'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::LocationResponse` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::LocationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'latitude')
+ self.latitude = attributes[:'latitude']
+ end
+
+ if attributes.key?(:'longitude')
+ self.longitude = attributes[:'longitude']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ latitude == o.latitude &&
+ longitude == o.longitude
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [latitude, longitude].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/suggestion_response.rb b/lib/bandwidth-sdk/models/suggestion_response.rb
new file mode 100644
index 00000000..28d0162d
--- /dev/null
+++ b/lib/bandwidth-sdk/models/suggestion_response.rb
@@ -0,0 +1,186 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class SuggestionResponse < ApiModelBase
+ # The text associated with the suggestion response.
+ attr_accessor :text
+
+ # 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',
+ :'paired_message_id' => :'pairedMessageId'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'text' => :'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
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::SuggestionResponse` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::SuggestionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'text')
+ self.text = attributes[:'text']
+ end
+
+ 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?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if !@postback_data.nil? && @postback_data.to_s.length > 2048
+ invalid_properties.push('invalid value for "postback_data", the character length must be smaller than or equal to 2048.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if !@postback_data.nil? && @postback_data.to_s.length > 2048
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] postback_data Value to be assigned
+ def postback_data=(postback_data)
+ if postback_data.nil?
+ fail ArgumentError, 'postback_data cannot be nil'
+ end
+
+ if postback_data.to_s.length > 2048
+ fail ArgumentError, 'invalid value for "postback_data", the character length must be smaller than or equal to 2048.'
+ end
+
+ @postback_data = postback_data
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ text == o.text &&
+ postback_data == o.postback_data &&
+ paired_message_id == o.paired_message_id
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [text, postback_data, paired_message_id].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end