Method: PureCloud::ConversationSocialExpressionEventTopicJourneyAction#_to_hash

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

#_to_hash(value) ⇒ Object

Method to output non-array value in the form of hash For object, use to_hash. Otherwise, just return the value



211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'lib/purecloudplatformclientv2/models/conversation_social_expression_event_topic_journey_action.rb', line 211

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end