1# frozen_string_literal: true 2 3module API 4 module Entities 5 class PagesDomain < Grape::Entity 6 expose :domain 7 expose :url 8 expose :verified?, as: :verified 9 expose :verification_code, as: :verification_code 10 expose :enabled_until 11 expose :auto_ssl_enabled 12 13 expose :certificate, 14 if: ->(pages_domain, _) { pages_domain.certificate? }, 15 using: Entities::PagesDomainCertificate do |pages_domain| 16 pages_domain 17 end 18 end 19 end 20end 21