Method: PureCloud::QueueConversationSocialExpressionEventTopicJourneyContext#build_from_hash

Defined in:
lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_journey_context.rb

#build_from_hash(attributes) ⇒ Object

build the object from hash



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_journey_context.rb', line 157

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      else
        #TODO show warning in debug mode
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    else
      # data not found in attributes(hash), not an issue as the data can be optional
    end
  end

  self
end