//Granify Android SDK/com.granifyinc.granifysdk.models/Product
Product
data class Product(val sku: String, val productId: String, val title: String, val price: Price, val regularPrice: Price, val image: URL? = null, val stock: ProductStock? = null, val reviews: ProductReviews? = null, val category: String? = null, val subCategory: String? = null, val color: String? = null, val size: String? = null, val childSiteOwnerId: SiteIdentifier? = null, val customProperties: Map<String, StringOrInt> = mapOf())
Represents a distinct product with basic identifiers, price, display information, and further optional detailed information.
Parameters
androidJvm
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. |
Constructors
Product | [androidJvm] 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()) |
Properties
Name | Summary |
---|---|
category | [androidJvm] val category: String? = null |
childSiteOwnerId | [androidJvm] val childSiteOwnerId: SiteIdentifier? = null |
color | [androidJvm] val color: String? = null |
customProperties | [androidJvm] val customProperties: Map<String, StringOrInt> |
image | [androidJvm] val image: URL? = null |
price | [androidJvm] val price: Price |
productId | [androidJvm] val productId: String |
regularPrice | [androidJvm] val regularPrice: Price |
reviews | [androidJvm] val reviews: ProductReviews? = null |
size | [androidJvm] val size: String? = null |
sku | [androidJvm] val sku: String |
stock | [androidJvm] val stock: ProductStock? = null |
subCategory | [androidJvm] val subCategory: String? = null |
title | [androidJvm] val title: String |