2020-11-05 00:09:16 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class Invitation < Grape::Entity
|
|
|
|
expose :access_level
|
2020-12-08 09:09:41 +00:00
|
|
|
expose :created_at
|
2020-11-05 00:09:16 +00:00
|
|
|
expose :expires_at
|
|
|
|
expose :invite_email
|
|
|
|
expose :invite_token
|
2020-11-16 15:09:23 +00:00
|
|
|
expose :user_name, if: -> (member, _) { member.user.present? }
|
|
|
|
expose :created_by_name
|
2020-11-05 00:09:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|