SEO.JSONLD.ParcelDelivery (SEO v0.3.0-rc.0)

View Source

The delivery of a parcel either via the postal service or a commercial service.

Helper for building a Schema.org ParcelDelivery JSON-LD structure.

Summary

Types

t()

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "ParcelDelivery", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

Build a ParcelDelivery JSON-LD map.

Types

attrs()

@type attrs() ::
  %{
    optional(:carrier) => SEO.JSONLD.Organization.t() | map(),
    optional(:delivery_address) => SEO.JSONLD.PostalAddress.t() | map(),
    optional(:delivery_status) => SEO.JSONLD.DeliveryEvent.t() | map(),
    optional(:expected_arrival_from) =>
      DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
    optional(:expected_arrival_until) =>
      DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
    optional(:has_delivery_method) =>
      :locker_delivery | :on_site_pickup | :parcel_service,
    optional(:item_shipped) => SEO.JSONLD.Product.t() | map(),
    optional(:origin_address) => SEO.JSONLD.PostalAddress.t() | map(),
    optional(:part_of_order) => SEO.JSONLD.Order.t() | map(),
    optional(:provider) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:tracking_number) => String.t(),
    optional(:tracking_url) => URI.t() | String.t(),
    optional(:additional_type) => String.t() | URI.t(),
    optional(:alternate_name) => String.t(),
    optional(:description) => SEO.JSONLD.TextObject.t() | map() | String.t(),
    optional(:disambiguating_description) => String.t(),
    optional(:identifier) =>
      String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
    optional(:image) =>
      URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
    optional(:main_entity_of_page) =>
      SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
    optional(:name) => String.t(),
    optional(:owner) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:potential_action) => SEO.JSONLD.Action.t() | map(),
    optional(:same_as) => URI.t() | String.t(),
    optional(:subject_of) =>
      SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
    optional(:url) => URI.t() | String.t()
  }
  | [
      carrier: SEO.JSONLD.Organization.t() | map(),
      delivery_address: SEO.JSONLD.PostalAddress.t() | map(),
      delivery_status: SEO.JSONLD.DeliveryEvent.t() | map(),
      expected_arrival_from:
        DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
      expected_arrival_until:
        DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
      has_delivery_method: :locker_delivery | :on_site_pickup | :parcel_service,
      item_shipped: SEO.JSONLD.Product.t() | map(),
      origin_address: SEO.JSONLD.PostalAddress.t() | map(),
      part_of_order: SEO.JSONLD.Order.t() | map(),
      provider: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      tracking_number: String.t(),
      tracking_url: URI.t() | String.t(),
      additional_type: String.t() | URI.t(),
      alternate_name: String.t(),
      description: SEO.JSONLD.TextObject.t() | map() | String.t(),
      disambiguating_description: String.t(),
      identifier: String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
      image: URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
      main_entity_of_page:
        SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
      name: String.t(),
      owner: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      potential_action: SEO.JSONLD.Action.t() | map(),
      same_as: URI.t() | String.t(),
      subject_of: SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
      url: URI.t() | String.t()
    ]

t()

@type t() :: %{required(String.t()) => term()}

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "ParcelDelivery", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

build(attrs)

@spec build(attrs()) :: t()

Build a ParcelDelivery JSON-LD map.

Fields

  • :carrier - 'carrier' is an out-dated term indicating the 'provider' for parcel delivery and flights.
  • :delivery_address - Destination address.
  • :delivery_status - New entry added as the package passes through each leg of its journey (from shipment to final delivery).
  • :expected_arrival_from - The earliest date the package may arrive.
  • :expected_arrival_until - The latest date the package may arrive.
  • :has_delivery_method - Method used for delivery or shipping. One of: :locker_delivery, :on_site_pickup, :parcel_service.
  • :item_shipped - Item(s) being shipped.
  • :origin_address - Shipper's address.
  • :part_of_order - The overall order the items in this delivery were included in.
  • :provider - The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
  • :tracking_number - Shipper tracking number.
  • :tracking_url - Tracking url for the parcel delivery.

Inherited properties

Additional properties are available through the inheritance chain. See each ancestor's docs for its properties: