Created
April 21, 2016 20:22
-
-
Save richessler/4c857346926df0f81128653ba519a8ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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