Oihana PHP System

Offer extends Intangible

An event happening at a certain time and location, such as a concert, lecture, or festival.

Repeated events may be structured as separate Event objects.

Tags
see
https://schema.org/Offer

Table of Contents

Constants

CONTEXT  = 'https://schema.org'
JSON-LD @context declaration for Schema.org.

Properties

$_from  : string|null
The metadata to indicates the edge 'from' identifier.
$_id  : null|string
The metadata identifier of the item.
$_key  : null|string
The metadata unique key identifier of the thing.
$_rev  : null|string
The metadata revision value of the thing.
$_to  : string|null
The metadata to indicates the edge 'to' identifier.
$acceptedPaymentMethod  : null|string|array<string|int, mixed>|PaymentMethod|LoanOrCredit
The payment method(s) that are accepted in general by an organization, or for some specific demand or offer.
$active  : bool|null
The active flag.
$additionalProperty  : null|array<string|int, mixed>|PropertyValue
A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.
$additionalType  : array<string|int, mixed>|string|null|object
An additionalType for the item.
$addon  : array<string|int, mixed>|Offer|null
An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge).
$advanceBookingRequirement  : QuantitativeValue|null
The amount of time that is required between accepting the offer and the actual usage of the resource or service.
$aggregateRating  : array<string|int, mixed>|AggregateRating|null
The overall rating, based on a collection of reviews or ratings, of the item.
$alternateName  : string|object|null
An alias for the item.
$areaServed  : null|string|Place|GeoShape|AdministrativeArea
The geographic area where a service or offered item is provided.
$asin  : null|string
An Amazon Standard Identification Number (ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com and its partners for product identification within the Amazon organization.
$availability  : string|object|null
The availability of this item—for example In stock, Out of stock, Pre-order, etc.
$availabilityEnds  : string|null
The end of the availability of the product or service included in the offer.
$availabilityStarts  : string|null
The beginning of the availability of the product or service included in the offer.
$availableAtOrFrom  : null|array<string|int, mixed>|Place
The place(s) from which the offer can be obtained (e.g. store locations).
$availableDeliveryMethod  : null|array<string|int, mixed>|DeliveryMethod
The delivery method(s) available for this offer.
$businessFunction  : null|array<string|int, mixed>|BusinessFunction|DefinedTerm|string
The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode).
$category  : null|string|CategoryCode|Thing
A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.
$checkoutPageURLTemplate  : string|null
A URL template (RFC 6570) for a checkout page for an offer.
$created  : null|string|DateTime
Date of creation of the resource.
$deliveryLeadTime  : QuantitativeValue|null
The typical delay between the receipt of the order and the goods either leaving the warehouse or being prepared for pickup, in case the delivery method is on site pickup.
$description  : string|null
A short description of the item.
$disambiguatingDescription  : string|null
A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.
$eligibleCustomerType  : null|array<string|int, mixed>|BusinessEntityType|DefinedTerm|string
The type(s) of customers for which the given offer is valid.
$eligibleDuration  : QuantitativeValue|null
The duration for which the given offer is valid.
$eligibleQuantity  : QuantitativeValue|null
The interval and unit of measurement of ordering quantities for which the offer or price specification is valid.
$eligibleRegion  : null|string|Place|GeoShape
The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid.
$eligibleTransactionVolume  : PriceSpecification|null
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.
$gtin  : string|null
A correct gtin value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string.
$gtin12  : string|null
The GTIN-12 code of the product, or the product to which the offer refers.
$gtin13  : string|null
The GTIN-13 code of the product, or the product to which the offer refers.
$gtin14  : string|null
The GTIN-14 code of the product, or the product to which the offer refers.
$gtin8  : string|null
The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN.
$hasAdultConsideration  : string|AdultOrientedEnumeration|DefinedTerm|array<string|int, mixed>|null
Used to tag an item to be intended or suitable for consumption or use by adults only.
$hasGS1DigitalLink  : string|null
The GS1 digital link associated with the object.
$hasMeasurement  : array<string|int, mixed>|QuantitativeValue|null
A measurement of an item, For example, the inseam of pants, the wheel size of a bicycle, the gauge of a screw, or the carbon footprint measured for certification by an authority.
$hasMerchantReturnPolicy  : null|array<string|int, mixed>|MerchantReturnPolicy
Specifies a MerchantReturnPolicy that may be applicable.
$hasPart  : string|Thing|array<string|int, mixed>|null
Indicates an item that this part of this item.
$id  : null|int|string
The unique identifier of the item.
$identifier  : string|null
The identifier of the item.
$image  : string|object|null
The image reference of this resource.
$includesObject  : array<string|int, mixed>|TypeAndQuantityNode|null
This links to a node or nodes indicating the exact quantity of the products included in an Offer or ProductCollection.
$ineligibleRegion  : null|string|Place|GeoShape
The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.
$inventoryLevel  : QuantitativeValue|null
The current approximate inventory level for the item or items.
$isFamilyFriendly  : bool|null
Indicates whether this content is family friendly.
$isPartOf  : string|Thing|array<string|int, mixed>|null
Indicates an item that this item is part of.
$itemCondition  : OfferItemCondition|DefinedTerm|null
A predefined value from OfferItemCondition specifying the condition of the product or service, or the products or services included in the offer.
$itemOffered  : array<string|int, mixed>|CreativeWork|Event|Product|Service|null
An item being offered (or demanded). The transactional nature of the offer or demand is documented using businessFunction, e.g. sell, lease etc.
$leaseLength  : QuantitativeValue|Duration|null
Length of the lease for some Accommodation, either particular to some Offer or in some cases intrinsic to the property.
$license  : string|object|null
A legal document giving official permission to do something with the resource.
$mobileUrl  : string|null
The mobileUrl property is provided for specific situations in which data consumers need to determine whether one of several provided URLs is a dedicated 'mobile site'.
$modified  : null|string|DateTime
Date on which the resource was changed.
$mpn  : string|null
The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.
$name  : int|string|null
The name of the item.
$offeredBy  : array<string|int, mixed>|Organization|Person|null
A pointer to the organization or person making the offer.
$price  : string|float|null
The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.
$priceCurrency  : string|object|null
The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes.
$priceSpecification  : null|array<string|int, mixed>|PriceSpecification
One or more detailed price specifications, indicating the unit price and delivery or payment charges.
$priceValidUntil  : DateTime|string|null
The date after which the price is no longer available.
$publisher  : string|array<string|int, mixed>|Person|Organization|null
The publisher of the resource.
$review  : array<string|int, mixed>|Review|null
A review of the item.
$seller  : null|Organization|Person|Thing|string|int
An entity which offers (sells / leases / lends / loans) the services / goods.
$serialNumber  : string|null
The serial number or any alphanumeric identifier of a particular product.
$shippingDetails  : array<string|int, mixed>|OfferShippingDetails|null
Indicates information about the shipping policies and options associated with an Offer.
$sku  : string|null
The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
$url  : int|string|null
URL of the item.
$validForMemberTier  : MemberProgramTier|null
The membership program tier an Offer (or a PriceSpecification, OfferShippingDetails, or MerchantReturnPolicy under an Offer) is valid for.
$validFrom  : null|string|int|DateTime
The date when the item becomes valid (DateTime).
$validThrough  : null|string|int|DateTime
The end of the validity of offer, price specification, or opening hours data (DateTime).
$warranty  : null|string|DefinedTerm|WarrantyPromise
The end of the validity of offer, price specification, or opening hours data (DateTime).

Methods

__construct()  : mixed
Constructor to hydrate public properties from an array or stdClass.
jsonSerialize()  : array<string|int, mixed>
Serializes the current object into a JSON-LD array.

Constants

CONTEXT

JSON-LD @context declaration for Schema.org.

public mixed CONTEXT = 'https://schema.org'

Properties

$_from

The metadata to indicates the edge 'from' identifier.

public string|null $_from

$_id

The metadata identifier of the item.

public null|string $_id

$_key

The metadata unique key identifier of the thing.

public null|string $_key

$_rev

The metadata revision value of the thing.

public null|string $_rev

$_to

The metadata to indicates the edge 'to' identifier.

public string|null $_to

$acceptedPaymentMethod

The payment method(s) that are accepted in general by an organization, or for some specific demand or offer.

public null|string|array<string|int, mixed>|PaymentMethod|LoanOrCredit $acceptedPaymentMethod

$active

The active flag.

public bool|null $active

$additionalProperty

A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.

public null|array<string|int, mixed>|PropertyValue $additionalProperty

$additionalType

An additionalType for the item.

public array<string|int, mixed>|string|null|object $additionalType

$addon

An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge).

public array<string|int, mixed>|Offer|null $addon

$advanceBookingRequirement

The amount of time that is required between accepting the offer and the actual usage of the resource or service.

public QuantitativeValue|null $advanceBookingRequirement

$aggregateRating

The overall rating, based on a collection of reviews or ratings, of the item.

public array<string|int, mixed>|AggregateRating|null $aggregateRating

$alternateName

An alias for the item.

public string|object|null $alternateName

$asin

An Amazon Standard Identification Number (ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com and its partners for product identification within the Amazon organization.

public null|string $asin

$availability

The availability of this item—for example In stock, Out of stock, Pre-order, etc.

public string|object|null $availability

$availabilityEnds

The end of the availability of the product or service included in the offer.

public string|null $availabilityEnds

$availabilityStarts

The beginning of the availability of the product or service included in the offer.

public string|null $availabilityStarts

$availableAtOrFrom

The place(s) from which the offer can be obtained (e.g. store locations).

public null|array<string|int, mixed>|Place $availableAtOrFrom

$availableDeliveryMethod

The delivery method(s) available for this offer.

public null|array<string|int, mixed>|DeliveryMethod $availableDeliveryMethod

$businessFunction

The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode).

public null|array<string|int, mixed>|BusinessFunction|DefinedTerm|string $businessFunction

The default is http://purl.org/goodrelations/v1#Sell. Commonly used values:

  • http://purl.org/goodrelations/v1#ConstructionInstallation
  • http://purl.org/goodrelations/v1#Dispose
  • http://purl.org/goodrelations/v1#LeaseOut
  • http://purl.org/goodrelations/v1#Maintain
  • http://purl.org/goodrelations/v1#ProvideService
  • http://purl.org/goodrelations/v1#Repair
  • http://purl.org/goodrelations/v1#Sell
  • http://purl.org/goodrelations/v1#Buy

$category

A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.

public null|string|CategoryCode|Thing $category
Tags
see

null|string|CategoryCode|Thing

$checkoutPageURLTemplate

A URL template (RFC 6570) for a checkout page for an offer.

public string|null $checkoutPageURLTemplate

This approach allows merchants to specify a URL for online checkout of the offered product, by interpolating parameters such as the logged in user ID, product ID, quantity, discount code etc. Parameter naming and standardization are not specified here.

$created

Date of creation of the resource.

public null|string|DateTime $created

$deliveryLeadTime

The typical delay between the receipt of the order and the goods either leaving the warehouse or being prepared for pickup, in case the delivery method is on site pickup.

public QuantitativeValue|null $deliveryLeadTime

$description

A short description of the item.

public string|null $description

$disambiguatingDescription

A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.

public string|null $disambiguatingDescription

$eligibleCustomerType

The type(s) of customers for which the given offer is valid.

public null|array<string|int, mixed>|BusinessEntityType|DefinedTerm|string $eligibleCustomerType

$eligibleDuration

The duration for which the given offer is valid.

public QuantitativeValue|null $eligibleDuration

$eligibleQuantity

The interval and unit of measurement of ordering quantities for which the offer or price specification is valid.

public QuantitativeValue|null $eligibleQuantity

This allows e.g. specifying that a certain freight charge is valid only for a certain quantity.

$eligibleRegion

The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid.

public null|string|Place|GeoShape $eligibleRegion

$eligibleTransactionVolume

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.

public PriceSpecification|null $eligibleTransactionVolume

$gtin

A correct gtin value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string.

public string|null $gtin

The numeric component should also have a valid GS1 check digit and meet the other rules for valid GTINs.

$gtin12

The GTIN-12 code of the product, or the product to which the offer refers.

public string|null $gtin12

The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items.

$gtin13

The GTIN-13 code of the product, or the product to which the offer refers.

public string|null $gtin13

This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceding zero.

$gtin14

The GTIN-14 code of the product, or the product to which the offer refers.

public string|null $gtin14

$gtin8

The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN.

public string|null $gtin8

$hasAdultConsideration

Used to tag an item to be intended or suitable for consumption or use by adults only.

public string|AdultOrientedEnumeration|DefinedTerm|array<string|int, mixed>|null $hasAdultConsideration

Example:

  • AlcoholConsideration
  • DangerousGoodConsideration
  • HealthcareConsideration
  • NarcoticConsideration
  • ReducedRelevanceForChildrenConsideration
  • SexualContentConsideration
  • TobaccoNicotineConsideration
  • UnclassifiedAdultConsideration
  • ViolenceConsideration
  • WeaponConsideration

The GS1 digital link associated with the object.

public string|null $hasGS1DigitalLink

This URL should conform to the particular requirements of digital links. The link should only contain the Application Identifiers (AIs) that are relevant for the entity being annotated, for instance a Product or an Organization, and for the correct granularity.

$hasMeasurement

A measurement of an item, For example, the inseam of pants, the wheel size of a bicycle, the gauge of a screw, or the carbon footprint measured for certification by an authority.

public array<string|int, mixed>|QuantitativeValue|null $hasMeasurement

Usually an exact measurement, but can also be a range of measurements for adjustable products, for example belts and ski bindings.

$hasMerchantReturnPolicy

Specifies a MerchantReturnPolicy that may be applicable.

public null|array<string|int, mixed>|MerchantReturnPolicy $hasMerchantReturnPolicy

$hasPart

Indicates an item that this part of this item.

public string|Thing|array<string|int, mixed>|null $hasPart

$id

The unique identifier of the item.

public null|int|string $id

$identifier

The identifier of the item.

public string|null $identifier

$image

The image reference of this resource.

public string|object|null $image

$includesObject

This links to a node or nodes indicating the exact quantity of the products included in an Offer or ProductCollection.

public array<string|int, mixed>|TypeAndQuantityNode|null $includesObject

$ineligibleRegion

The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.

public null|string|Place|GeoShape $ineligibleRegion

$inventoryLevel

The current approximate inventory level for the item or items.

public QuantitativeValue|null $inventoryLevel

$isFamilyFriendly

Indicates whether this content is family friendly.

public bool|null $isFamilyFriendly

$isPartOf

Indicates an item that this item is part of.

public string|Thing|array<string|int, mixed>|null $isPartOf

$itemCondition

A predefined value from OfferItemCondition specifying the condition of the product or service, or the products or services included in the offer.

public OfferItemCondition|DefinedTerm|null $itemCondition

Also used for product return policies to specify the condition of products accepted for returns.

$itemOffered

An item being offered (or demanded). The transactional nature of the offer or demand is documented using businessFunction, e.g. sell, lease etc.

public array<string|int, mixed>|CreativeWork|Event|Product|Service|null $itemOffered

While several common expected types are listed explicitly in this definition, others can be used. Using a second type, such as Product or a subtype of Product, can clarify the nature of the offer.

$leaseLength

Length of the lease for some Accommodation, either particular to some Offer or in some cases intrinsic to the property.

public QuantitativeValue|Duration|null $leaseLength

$license

A legal document giving official permission to do something with the resource.

public string|object|null $license

$mobileUrl

The mobileUrl property is provided for specific situations in which data consumers need to determine whether one of several provided URLs is a dedicated 'mobile site'.

public string|null $mobileUrl

$modified

Date on which the resource was changed.

public null|string|DateTime $modified

$mpn

The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.

public string|null $mpn

$name

The name of the item.

public int|string|null $name

$offeredBy

A pointer to the organization or person making the offer.

public array<string|int, mixed>|Organization|Person|null $offeredBy

$price

The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.

public string|float|null $price

$priceCurrency

The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes.

public string|object|null $priceCurrency

$priceSpecification

One or more detailed price specifications, indicating the unit price and delivery or payment charges.

public null|array<string|int, mixed>|PriceSpecification $priceSpecification

$priceValidUntil

The date after which the price is no longer available.

public DateTime|string|null $priceValidUntil

$review

A review of the item.

public array<string|int, mixed>|Review|null $review

$seller

An entity which offers (sells / leases / lends / loans) the services / goods.

public null|Organization|Person|Thing|string|int $seller

A seller may also be a provider.

$serialNumber

The serial number or any alphanumeric identifier of a particular product.

public string|null $serialNumber

When attached to an offer, it is a shortcut for the serial number of the product included in the offer.

$shippingDetails

Indicates information about the shipping policies and options associated with an Offer.

public array<string|int, mixed>|OfferShippingDetails|null $shippingDetails

$sku

The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.

public string|null $sku

$url

URL of the item.

public int|string|null $url

$validForMemberTier

The membership program tier an Offer (or a PriceSpecification, OfferShippingDetails, or MerchantReturnPolicy under an Offer) is valid for.

public MemberProgramTier|null $validForMemberTier

$validFrom

The date when the item becomes valid (DateTime).

public null|string|int|DateTime $validFrom

$validThrough

The end of the validity of offer, price specification, or opening hours data (DateTime).

public null|string|int|DateTime $validThrough

Methods

__construct()

Constructor to hydrate public properties from an array or stdClass.

public __construct([array<string|int, mixed>|object|null $init = null ]) : mixed

This allows objects to be quickly populated with associative data without manually setting each property.

Parameters
$init : array<string|int, mixed>|object|null = null

A data array or object used to initialize the instance. Keys must match public property names.

Tags
example
use org\schema\Person;
use org\schema\constants\Prop;

$person = new Person
([
    Prop::NAME => 'Jane Doe',
    Prop::URL  => 'https://example.com/janedoe'
]);

echo $person->name; // Outputs: Jane Doe

jsonSerialize()

Serializes the current object into a JSON-LD array.

public jsonSerialize() : array<string|int, mixed>

This method will include all public properties, the schema.org @context, and the inferred @type based on the class name.

Null values will be automatically removed using compress().

Tags
throws
ReflectionException

If reflection fails when accessing properties.

example
use org\schema\Person;
use org\schema\constants\Prop;

$person = new Person([
    Prop::NAME => 'John Smith',
    Prop::ID   => 'jsmith-001'
]);

echo json_encode($person, JSON_PRETTY_PRINT);

Output:

{
  "@type": "Person",
  "@context": "https://schema.org",
  "id": "jsmith-001",
  "name": "John Smith"
}
Return values
array<string|int, mixed>

A JSON-LD array representation of the object.


        
On this page

Search results