Sha256: 49954b269efa3afe6e25bf1f844bf3c2b3bd1859cfcd786ecad4085c5fec4b12

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require 'mida_vocabulary/vocabulary'

module Mida
  module SchemaOrg

    autoload :Event, 'mida_vocabulary/vocabularies/schemaorg/event'
    autoload :Thing, 'mida_vocabulary/vocabularies/schemaorg/thing'
    autoload :DeliveryMethod, 'mida_vocabulary/vocabularies/schemaorg/deliverymethod'

    # An event involving the delivery of an item.
    class DeliveryEvent < Mida::Vocabulary
      itemtype %r{http://schema.org/DeliveryEvent}i
      include_vocabulary Mida::SchemaOrg::Event
      include_vocabulary Mida::SchemaOrg::Thing

      # Password, PIN, or access code needed for delivery (e.g. from a locker).
      has_many 'accessCode'

      # When the item is available for pickup from the store, locker, etc.
      has_many 'availableFrom' do
        extract Mida::DataType::ISO8601Date
      end

      # After this date, the item will no longer be available for pickup.
      has_many 'availableThrough' do
        extract Mida::DataType::ISO8601Date
      end

      # Method used for delivery or shipping.
      has_many 'hasDeliveryMethod' do
        extract Mida::SchemaOrg::DeliveryMethod
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mida_vocabulary-0.2.2 lib/mida_vocabulary/vocabularies/schemaorg/deliveryevent.rb