Sha256: 41fb972ddaf29fec6505f9f96b91bec63bb026f245fd3a753f4307f905a8a0f9

Contents?: true

Size: 799 Bytes

Versions: 14

Compression:

Stored size: 799 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Entities
    class WhoisRecord < Grape::Entity
      expose :domain, documentation: { type: String, required: true }
      expose :created_on, documentation: { type: Date, required: false }, as: :createdOn
      expose :updated_on, documentation: { type: Date, required: false }, as: :updatedOn
      expose :expires_on, documentation: { type: Date, required: false }, as: :expiresOn
      expose :registrar, documentation: { type: Hash, required: false }
      expose :contacts, documentation: { type: Hash, is_array: true, required: true } do |whois_record, _options|
        whois_record.contacts.map(&:to_camelback_keys)
      end
      expose :created_at, documentation: { type: DateTime, required: true }, as: :createdAt
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mihari-7.3.2 lib/mihari/entities/whois.rb
mihari-7.3.1 lib/mihari/entities/whois.rb
mihari-7.3.0 lib/mihari/entities/whois.rb
mihari-7.2.0 lib/mihari/entities/whois.rb
mihari-7.1.3 lib/mihari/entities/whois.rb
mihari-7.1.2 lib/mihari/entities/whois.rb
mihari-7.1.1 lib/mihari/entities/whois.rb
mihari-7.1.0 lib/mihari/entities/whois.rb
mihari-7.0.5 lib/mihari/entities/whois.rb
mihari-7.0.4 lib/mihari/entities/whois.rb
mihari-7.0.3 lib/mihari/entities/whois.rb
mihari-7.0.2 lib/mihari/entities/whois.rb
mihari-7.0.1 lib/mihari/entities/whois.rb
mihari-7.0.0 lib/mihari/entities/whois.rb