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

View Source

ShippingConditions represent a set of constraints and information about the conditions of shipping a product. Such conditions may apply to only a subset of the products being shipped, depending on aspects of the product like weight, size, price, destination, and others. All the specified conditions must be met for this ShippingConditions to apply.

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

Summary

Types

t()

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "ShippingConditions", 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 ShippingConditions JSON-LD map.

Types

attrs()

@type attrs() ::
  %{
    optional(:depth) => SEO.JSONLD.QuantitativeValue.t() | map(),
    optional(:does_not_ship) => boolean(),
    optional(:height) => SEO.JSONLD.QuantitativeValue.t() | map(),
    optional(:num_items) => SEO.JSONLD.QuantitativeValue.t() | map(),
    optional(:order_value) => SEO.JSONLD.MonetaryAmount.t() | map(),
    optional(:seasonal_override) =>
      SEO.JSONLD.OpeningHoursSpecification.t() | map(),
    optional(:shipping_destination) => SEO.JSONLD.DefinedRegion.t() | map(),
    optional(:shipping_origin) => SEO.JSONLD.DefinedRegion.t() | map(),
    optional(:shipping_rate) =>
      SEO.JSONLD.MonetaryAmount.t()
      | map()
      | SEO.JSONLD.ShippingRateSettings.t(),
    optional(:transit_time) =>
      SEO.JSONLD.QuantitativeValue.t() | map() | SEO.JSONLD.ServicePeriod.t(),
    optional(:weight) => SEO.JSONLD.QuantitativeValue.t() | map(),
    optional(:width) => SEO.JSONLD.QuantitativeValue.t() | map(),
    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()
  }
  | [
      depth: SEO.JSONLD.QuantitativeValue.t() | map(),
      does_not_ship: boolean(),
      height: SEO.JSONLD.QuantitativeValue.t() | map(),
      num_items: SEO.JSONLD.QuantitativeValue.t() | map(),
      order_value: SEO.JSONLD.MonetaryAmount.t() | map(),
      seasonal_override: SEO.JSONLD.OpeningHoursSpecification.t() | map(),
      shipping_destination: SEO.JSONLD.DefinedRegion.t() | map(),
      shipping_origin: SEO.JSONLD.DefinedRegion.t() | map(),
      shipping_rate:
        SEO.JSONLD.MonetaryAmount.t()
        | map()
        | SEO.JSONLD.ShippingRateSettings.t(),
      transit_time:
        SEO.JSONLD.QuantitativeValue.t() | map() | SEO.JSONLD.ServicePeriod.t(),
      weight: SEO.JSONLD.QuantitativeValue.t() | map(),
      width: SEO.JSONLD.QuantitativeValue.t() | map(),
      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 "ShippingConditions", 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 ShippingConditions JSON-LD map.

Fields

  • :depth - The depth of the item.
  • :does_not_ship - Indicates when shipping to a particular shippingDestination is not available.
  • :height - The height of the item.
  • :num_items - Limits the number of items being shipped for which these conditions apply.
  • :order_value - Minimum and maximum order value for which these shipping conditions are valid.
  • :seasonal_override - Limited period during which these shipping conditions apply.
  • :shipping_destination - indicates (possibly multiple) shipping destinations. These can be defined in several ways, e.g. postalCode ranges.
  • :shipping_origin - Indicates the origin of a shipment, i.e. where it should be coming from.
  • :shipping_rate - The shipping rate is the cost of shipping to the specified destination. Typically, the maxValue and currency values (of the SEO.JSONLD.MonetaryAmount) are most appropriate.
  • :transit_time - The typical delay the order has been sent for delivery and the goods reach the final customer.

In the context of SEO.JSONLD.ShippingDeliveryTime, use the SEO.JSONLD.QuantitativeValue. Typical properties: minValue, maxValue, unitCode (d for DAY).

In the context of SEO.JSONLD.ShippingConditions, use the SEO.JSONLD.ServicePeriod. It has a duration (as a SEO.JSONLD.QuantitativeValue) and also business days and a cut-off time.

  • :weight - The weight of the product or person.
  • :width - The width of the item.

Inherited properties

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