Product

constructor(sku: String, productId: String, title: String, price: Price, regularPrice: Price, image: URL? = null, stock: ProductStock? = null, reviews: ProductReviews? = null, category: String? = null, subCategory: String? = null, color: String? = null, size: String? = null, childSiteOwnerId: SiteIdentifier? = null, customProperties: Map<String, StringOrInt> = mapOf())

Parameters

sku

The specific SKU of the product/variant.

productId

The parent ID of the product.

title

The name or title of the product.

price

The current unit price of the product (after discount or sale pricing).

regularPrice

The regular price of the product before sales or discounts.

image

The address of the product image. If supplied, must use HTTPS. (optional).

stock

The stock information for the product (optional).

reviews

The review and rating information for the product (optional).

category

The broad category containing this item (optional).

subCategory

Further categorical identification for the item (optional).

color

The color of the SKU item (optional).

size

The size of the SKU item (optional).

childSiteOwnerId

The site id of the child site this product belongs to. Leave this null unless your configuration uses child sites, in which case this value is required (optional).

customProperties

Named (keys) custom properties (values with a valid string or integer representation) to be stored and reported to Granify with the product. This is useful for adding additional properties that may be domain-specific to your site and do not fit into any of the existing properties available on this class.