Skip to content

Instantly share code, notes, and snippets.

@richessler
Created April 21, 2016 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richessler/4c857346926df0f81128653ba519a8ea to your computer and use it in GitHub Desktop.
Save richessler/4c857346926df0f81128653ba519a8ea to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
module API
module V1
module Entities
module Messaging
class Conversation < Grape::Entity
format_with(:iso_timestamp, &:iso8601)
expose :id, documentation: { type: Integer, desc: 'The unique Conversation Identifier.' }
expose :users, as: :user_previews, using: API::V1::Entities::Messaging::Preview
with_options(format_with: :iso_timestamp) do
expose :created_at
expose :updated_at
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment