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

View Source

A compound price specification is one that bundles multiple prices that all apply in combination for different dimensions of consumption. Use the name property of the attached unit price specification for indicating the dimension of a price component (e.g. "electricity" or "final cleaning").

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

Summary

Types

t()

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

Types

attrs()

@type attrs() ::
  %{
    optional(:price_component) => SEO.JSONLD.PriceSpecification.t() | map(),
    optional(:price_type) =>
      String.t()
      | :invoice_price
      | :list_price
      | :minimum_advertised_price
      | :msrp
      | :regular_price
      | :sale_price
      | :srp
      | :strikethrough_price,
    optional(:eligible_quantity) => SEO.JSONLD.QuantitativeValue.t() | map(),
    optional(:eligible_transaction_volume) =>
      SEO.JSONLD.PriceSpecification.t() | map(),
    optional(:max_price) => number(),
    optional(:membership_points_earned) =>
      number() | SEO.JSONLD.QuantitativeValue.t() | map(),
    optional(:min_price) => number(),
    optional(:price) => String.t() | number(),
    optional(:price_currency) => String.t(),
    optional(:valid_for_member_tier) =>
      SEO.JSONLD.MemberProgramTier.t() | map(),
    optional(:valid_from) =>
      DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
    optional(:valid_through) =>
      DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
    optional(:value_added_tax_included) => boolean(),
    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()
  }
  | [
      price_component: SEO.JSONLD.PriceSpecification.t() | map(),
      price_type:
        String.t()
        | :invoice_price
        | :list_price
        | :minimum_advertised_price
        | :msrp
        | :regular_price
        | :sale_price
        | :srp
        | :strikethrough_price,
      eligible_quantity: SEO.JSONLD.QuantitativeValue.t() | map(),
      eligible_transaction_volume: SEO.JSONLD.PriceSpecification.t() | map(),
      max_price: number(),
      membership_points_earned:
        number() | SEO.JSONLD.QuantitativeValue.t() | map(),
      min_price: number(),
      price: String.t() | number(),
      price_currency: String.t(),
      valid_for_member_tier: SEO.JSONLD.MemberProgramTier.t() | map(),
      valid_from: DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
      valid_through: DateTime.t() | NaiveDateTime.t() | String.t() | Date.t(),
      value_added_tax_included: boolean(),
      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 "CompoundPriceSpecification", 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 CompoundPriceSpecification JSON-LD map.

Fields

  • :price_component - This property links to all SEO.JSONLD.UnitPriceSpecification nodes that apply in parallel for the SEO.JSONLD.CompoundPriceSpecification node.
  • :price_type - Defines the type of a price specified for an offered product, for example a list price, a (temporary) sale price or a manufacturer suggested retail price. If multiple prices are specified for an offer the priceType property can be used to identify the type of each such specified price. The value of priceType can be specified as a value from enumeration PriceTypeEnumeration or, a UN/EDIFACT 5387 code, or as a free form text string for price types that are not already predefined in PriceTypeEnumeration. One of: :invoice_price, :list_price, :minimum_advertised_price, :msrp, :regular_price, :sale_price, :srp, :strikethrough_price.

Inherited properties

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