lib/purecloudplatformclientv2/models/messaging_template.rb in purecloudplatformclientv2-82.0.0 vs lib/purecloudplatformclientv2/models/messaging_template.rb in purecloudplatformclientv2-83.0.0
- old
+ new
@@ -15,44 +15,30 @@
=end
require 'date'
module PureCloud
- # The messaging template identifies a structured message templates supported by a messaging channel. For example, WhatsApp
+ # The messaging template identifies a structured message templates supported by a messaging channel.
class MessagingTemplate
- # The messaging template name.
- attr_accessor :name
+ # Defines a messaging template for a WhatsApp messaging channel
+ attr_accessor :whats_app
- # The messaging template namespace.
- attr_accessor :namespace
-
- # The messaging template language. For example, 'en-US'
- attr_accessor :language
-
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'name' => :'name',
+ :'whats_app' => :'whatsApp'
- :'namespace' => :'namespace',
-
- :'language' => :'language'
-
}
end
# Attribute type mapping.
def self.swagger_types
{
- :'name' => :'String',
+ :'whats_app' => :'WhatsAppDefinition'
- :'namespace' => :'String',
-
- :'language' => :'String'
-
}
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
@@ -61,37 +47,19 @@
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
- if attributes.has_key?(:'name')
+ if attributes.has_key?(:'whatsApp')
- self.name = attributes[:'name']
+ self.whats_app = attributes[:'whatsApp']
end
- if attributes.has_key?(:'namespace')
-
-
- self.namespace = attributes[:'namespace']
-
-
- end
-
-
- if attributes.has_key?(:'language')
-
-
- self.language = attributes[:'language']
-
-
- end
-
-
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properies with the reasons
def list_invalid_properties
@@ -104,62 +72,27 @@
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
- if @name.nil?
- return false
- end
-
-
-
- if @namespace.nil?
- return false
- end
-
-
-
-
-
-
- if @language.nil?
- return false
- end
-
-
-
-
-
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 &&
- name == o.name &&
- namespace == o.namespace &&
- language == o.language
+ whats_app == o.whats_app
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -167,10 +100,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [name, namespace, language].hash
+ [whats_app].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)