SEO. JSONLD. PriceSpecification
(SEO v0.3.0-rc.0)
View Source
A structured value representing a price or price range. Typically, only the subclasses of this type are used for markup. It is recommended to use SEO.JSONLD.MonetaryAmount to describe independent amounts of money such as a salary, credit card limits, etc.
Helper for building a Schema.org PriceSpecification JSON-LD structure.
Summary
Types
A JSON-LD map ready to be nested or rendered. String-keyed, always
includes "@type" set to "PriceSpecification", 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 PriceSpecification JSON-LD map.
Types
@type attrs() :: %{ optional(:eligible_quantity) => SEO.JSONLD.QuantitativeValue.t() | map(), optional(:eligible_transaction_volume) => 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() } | [ eligible_quantity: SEO.JSONLD.QuantitativeValue.t() | map(), eligible_transaction_volume: 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() ]
A JSON-LD map ready to be nested or rendered. String-keyed, always
includes "@type" set to "PriceSpecification", 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 PriceSpecification JSON-LD map.
Fields
:eligible_quantity- The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity.:eligible_transaction_volume- The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount.:max_price- The highest price if the price is a range.:membership_points_earned- The number of membership points earned by the member. If necessary, the unitText can be used to express the units the points are issued in. (E.g. stars, miles, etc.):min_price- The lowest price if the price is a range.:price- The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.
Usage guidelines:
- Use the
priceCurrencyproperty (with standard formats: ISO 4217 currency format, e.g. "USD"; Ticker symbol for cryptocurrencies, e.g. "BTC"; well known names for Local Exchange Trading Systems (LETS) and other currency types, e.g. "Ithaca HOUR") instead of including ambiguous symbols such as '$' in the value. - Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
- Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.
- Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
:price_currency- The currency of the price, or a price component when attached toSEO.JSONLD.PriceSpecificationand its subtypes.
Use standard formats: ISO 4217 currency format, e.g. "USD"; Ticker symbol for cryptocurrencies, e.g. "BTC"; well known names for Local Exchange Trading Systems (LETS) and other currency types, e.g. "Ithaca HOUR".
:valid_for_member_tier- The membership program tier(s) an Offer (or a PriceSpecification, OfferShippingDetails, or MerchantReturnPolicy under an Offer) is valid for.:valid_from- The date when the item becomes valid.:valid_through- The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.:value_added_tax_included- Specifies whether the applicable value-added tax (VAT) is included in the price specification or not.
Inherited properties
Additional properties are available through the inheritance chain. See each ancestor's docs for its properties: