Class: ForestLiana::IntercomConversationSerializer

Inherits:
Object
  • Object
show all
Includes:
ForestAdmin::JSONAPI::Serializer
Defined in:
app/serializers/forest_liana/intercom_conversation_serializer.rb

Instance Method Summary collapse

Instance Method Details

#format_name(attribute_name) ⇒ Object



30
31
32
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 30

def format_name(attribute_name)
  attribute_name.to_s
end


42
43
44
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 42

def relationship_related_link(attribute_name)
  nil
end


38
39
40
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 38

def relationship_self_link(attribute_name)
  nil
end


22
23
24
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 22

def self_link
  "/forest#{super}"
end

#typeObject



26
27
28
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 26

def type
  @options[:context][:type] || 'intercom-conversations'
end

#unformat_name(attribute_name) ⇒ Object



34
35
36
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 34

def unformat_name(attribute_name)
  attribute_name.to_s.underscore
end