2020-12-03 04:22:51 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class REST::ChatMessageSerializer < ActiveModel::Serializer
|
|
|
|
attributes :id, :text, :language, :from_account_id,
|
|
|
|
:chat_conversation_id, :created_at
|
|
|
|
|
|
|
|
def id
|
|
|
|
object.id.to_s
|
|
|
|
end
|
2020-12-03 22:13:11 +00:00
|
|
|
|
|
|
|
def from_account_id
|
|
|
|
object.from_account_id.to_s
|
|
|
|
end
|
|
|
|
|
|
|
|
def chat_conversation_id
|
|
|
|
object.chat_conversation_id.to_s
|
|
|
|
end
|
|
|
|
|
2020-12-03 04:22:51 +00:00
|
|
|
end
|