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

View Source

The price asked for a given offer by the respective organization or person.

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

Summary

Types

t()

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

Types

attrs()

@type attrs() ::
  %{
    optional(:billing_duration) =>
      SEO.JSONLD.QuantitativeValue.t()
      | map()
      | number()
      | Duration.t()
      | String.t(),
    optional(:billing_increment) => number(),
    optional(:billing_start) => number(),
    optional(:price_component_type) =>
      :activation_fee
      | :cleaning_fee
      | :distance_fee
      | :downpayment
      | :installment
      | :subscription,
    optional(:price_type) =>
      String.t()
      | :invoice_price
      | :list_price
      | :minimum_advertised_price
      | :msrp
      | :regular_price
      | :sale_price
      | :srp
      | :strikethrough_price,
    optional(:reference_quantity) => SEO.JSONLD.QuantitativeValue.t() | map(),
    optional(:unit_code) => String.t() | URI.t(),
    optional(:unit_text) => String.t(),
    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()
  }
  | [
      billing_duration:
        SEO.JSONLD.QuantitativeValue.t()
        | map()
        | number()
        | Duration.t()
        | String.t(),
      billing_increment: number(),
      billing_start: number(),
      price_component_type:
        :activation_fee
        | :cleaning_fee
        | :distance_fee
        | :downpayment
        | :installment
        | :subscription,
      price_type:
        String.t()
        | :invoice_price
        | :list_price
        | :minimum_advertised_price
        | :msrp
        | :regular_price
        | :sale_price
        | :srp
        | :strikethrough_price,
      reference_quantity: SEO.JSONLD.QuantitativeValue.t() | map(),
      unit_code: String.t() | URI.t(),
      unit_text: String.t(),
      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 "UnitPriceSpecification", 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 UnitPriceSpecification JSON-LD map.

Fields

  • :billing_duration - Specifies for how long this price (or price component) will be billed. Can be used, for example, to model the contractual duration of a subscription or payment plan. Type can be either a Duration or a Number (in which case the unit of measurement, for example month, is specified by the unitCode property).
  • :billing_increment - This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property.
  • :billing_start - Specifies after how much time this price (or price component) becomes valid and billing starts. Can be used, for example, to model a price increase after the first year of a subscription. The unit of measurement is specified by the unitCode property.
  • :price_component_type - Identifies a price component (for example, a line item on an invoice), part of the total price for an offer. One of: :activation_fee, :cleaning_fee, :distance_fee, :downpayment, :installment, :subscription.
  • :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.
  • :reference_quantity - The reference quantity for which a certain price applies, e.g. 1 EUR per 4 kWh of electricity. This property is a replacement for unitOfMeasurement for the advanced cases where the price does not relate to a standard unit.
  • :unit_code - The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.
  • :unit_text - A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode.

Inherited properties

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