public static class Storefront.Product extends AbstractResponse<Storefront.Product> implements Storefront.HasMetafields, Storefront.MenuItemResource, Storefront.MetafieldParentResource, Storefront.MetafieldReference, Storefront.Node, Storefront.OnlineStorePublishable, Storefront.SearchResultItem, Storefront.Trackable
optimisticData, responseData| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
getAvailableForSale()
Indicates if at least one product variant is available for sale.
|
Storefront.CollectionConnection |
getCollections()
List of collections a product belongs to.
|
Storefront.ProductPriceRange |
getCompareAtPriceRange()
The compare at price of the product across all variants.
|
DateTime |
getCreatedAt()
The date and time when the product was created.
|
java.lang.String |
getDescription()
Stripped description of the product, single line with HTML tags removed.
|
java.lang.String |
getDescriptionHtml()
The description of the product, complete with HTML formatting.
|
Storefront.Image |
getFeaturedImage()
The featured image for the product.
|
java.lang.String |
getGraphQlTypeName() |
java.lang.String |
getHandle()
A human-friendly unique string for the Product automatically generated from its title.
|
ID |
getId()
A globally-unique ID.
|
Storefront.ImageConnection |
getImages()
List of images associated with the product.
|
java.lang.Boolean |
getIsGiftCard()
Whether the product is a gift card.
|
Storefront.MediaConnection |
getMedia()
The media associated with the product.
|
Storefront.Metafield |
getMetafield()
Returns a metafield found by namespace and key.
|
java.util.List<Storefront.Metafield> |
getMetafields()
The metafields associated with the resource matching the supplied list of namespaces and keys.
|
java.lang.String |
getOnlineStoreUrl()
The URL used for viewing the resource on the shop's Online Store.
|
java.util.List<Storefront.ProductOption> |
getOptions()
List of product options.
|
Storefront.ProductPriceRange |
getPriceRange()
The price range.
|
java.lang.String |
getProductType()
A categorization that a product can be tagged with, commonly used for filtering and searching.
|
DateTime |
getPublishedAt()
The date and time when the product was published to the channel.
|
java.lang.Boolean |
getRequiresSellingPlan()
Whether the product can only be purchased with a selling plan.
|
Storefront.SellingPlanGroupConnection |
getSellingPlanGroups()
A list of a product's available selling plan groups.
|
Storefront.SEO |
getSeo()
The product's SEO information.
|
java.util.List<java.lang.String> |
getTags()
A comma separated list of tags that have been added to the product.
|
java.lang.String |
getTitle()
The product’s title.
|
java.lang.Integer |
getTotalInventory()
The total quantity of inventory in stock for this Product.
|
java.lang.String |
getTrackingParameters()
A URL parameters to be added to a page URL when it is linked from a GraphQL result.
|
DateTime |
getUpdatedAt()
The date and time when the product was last modified.
|
Storefront.ProductVariant |
getVariantBySelectedOptions()
Find a product’s variant based on its selected options.
|
Storefront.ProductVariantConnection |
getVariants()
List of the product’s variants.
|
java.lang.String |
getVendor()
The product’s vendor name.
|
Storefront.Product |
setAvailableForSale(java.lang.Boolean arg) |
Storefront.Product |
setCollections(Storefront.CollectionConnection arg) |
Storefront.Product |
setCompareAtPriceRange(Storefront.ProductPriceRange arg) |
Storefront.Product |
setCreatedAt(DateTime arg) |
Storefront.Product |
setDescription(java.lang.String arg) |
Storefront.Product |
setDescriptionHtml(java.lang.String arg) |
Storefront.Product |
setFeaturedImage(Storefront.Image arg) |
Storefront.Product |
setHandle(java.lang.String arg) |
Storefront.Product |
setImages(Storefront.ImageConnection arg) |
Storefront.Product |
setIsGiftCard(java.lang.Boolean arg) |
Storefront.Product |
setMedia(Storefront.MediaConnection arg) |
Storefront.Product |
setMetafield(Storefront.Metafield arg) |
Storefront.Product |
setMetafields(java.util.List<Storefront.Metafield> arg) |
Storefront.Product |
setOnlineStoreUrl(java.lang.String arg) |
Storefront.Product |
setOptions(java.util.List<Storefront.ProductOption> arg) |
Storefront.Product |
setPriceRange(Storefront.ProductPriceRange arg) |
Storefront.Product |
setProductType(java.lang.String arg) |
Storefront.Product |
setPublishedAt(DateTime arg) |
Storefront.Product |
setRequiresSellingPlan(java.lang.Boolean arg) |
Storefront.Product |
setSellingPlanGroups(Storefront.SellingPlanGroupConnection arg) |
Storefront.Product |
setSeo(Storefront.SEO arg) |
Storefront.Product |
setTags(java.util.List<java.lang.String> arg) |
Storefront.Product |
setTitle(java.lang.String arg) |
Storefront.Product |
setTotalInventory(java.lang.Integer arg) |
Storefront.Product |
setTrackingParameters(java.lang.String arg) |
Storefront.Product |
setUpdatedAt(DateTime arg) |
Storefront.Product |
setVariantBySelectedOptions(Storefront.ProductVariant arg) |
Storefront.Product |
setVariants(Storefront.ProductVariantConnection arg) |
Storefront.Product |
setVendor(java.lang.String arg) |
boolean |
unwrapsToObject(java.lang.String key) |
collectNodes, get, getFieldName, getKey, jsonAsArray, jsonAsBoolean, jsonAsDouble, jsonAsInteger, jsonAsObject, jsonAsString, withAliaspublic Product()
public Product(JsonObject fields)
throws SchemaViolationError
SchemaViolationErrorpublic java.lang.String getGraphQlTypeName()
getGraphQlTypeName in interface Storefront.HasMetafieldsgetGraphQlTypeName in interface Storefront.MenuItemResourcegetGraphQlTypeName in interface Storefront.MetafieldParentResourcegetGraphQlTypeName in interface Storefront.MetafieldReferencegetGraphQlTypeName in interface Storefront.NodegetGraphQlTypeName in interface Storefront.OnlineStorePublishablegetGraphQlTypeName in interface Storefront.SearchResultItemgetGraphQlTypeName in interface Storefront.TrackablegetGraphQlTypeName in interface Nodepublic java.lang.Boolean getAvailableForSale()
public Storefront.Product setAvailableForSale(java.lang.Boolean arg)
public Storefront.CollectionConnection getCollections()
public Storefront.Product setCollections(Storefront.CollectionConnection arg)
public Storefront.ProductPriceRange getCompareAtPriceRange()
public Storefront.Product setCompareAtPriceRange(Storefront.ProductPriceRange arg)
public DateTime getCreatedAt()
public Storefront.Product setCreatedAt(DateTime arg)
public java.lang.String getDescription()
public Storefront.Product setDescription(java.lang.String arg)
public java.lang.String getDescriptionHtml()
public Storefront.Product setDescriptionHtml(java.lang.String arg)
public Storefront.Image getFeaturedImage()
public Storefront.Product setFeaturedImage(Storefront.Image arg)
public java.lang.String getHandle()
public Storefront.Product setHandle(java.lang.String arg)
public ID getId()
getId in interface Storefront.NodegetId in interface Nodepublic Storefront.ImageConnection getImages()
public Storefront.Product setImages(Storefront.ImageConnection arg)
public java.lang.Boolean getIsGiftCard()
public Storefront.Product setIsGiftCard(java.lang.Boolean arg)
public Storefront.MediaConnection getMedia()
public Storefront.Product setMedia(Storefront.MediaConnection arg)
public Storefront.Metafield getMetafield()
getMetafield in interface Storefront.HasMetafieldspublic Storefront.Product setMetafield(Storefront.Metafield arg)
public java.util.List<Storefront.Metafield> getMetafields()
getMetafields in interface Storefront.HasMetafieldspublic Storefront.Product setMetafields(java.util.List<Storefront.Metafield> arg)
public java.lang.String getOnlineStoreUrl()
getOnlineStoreUrl in interface Storefront.OnlineStorePublishablepublic Storefront.Product setOnlineStoreUrl(java.lang.String arg)
public java.util.List<Storefront.ProductOption> getOptions()
public Storefront.Product setOptions(java.util.List<Storefront.ProductOption> arg)
public Storefront.ProductPriceRange getPriceRange()
public Storefront.Product setPriceRange(Storefront.ProductPriceRange arg)
public java.lang.String getProductType()
public Storefront.Product setProductType(java.lang.String arg)
public DateTime getPublishedAt()
public Storefront.Product setPublishedAt(DateTime arg)
public java.lang.Boolean getRequiresSellingPlan()
public Storefront.Product setRequiresSellingPlan(java.lang.Boolean arg)
public Storefront.SellingPlanGroupConnection getSellingPlanGroups()
public Storefront.Product setSellingPlanGroups(Storefront.SellingPlanGroupConnection arg)
public Storefront.SEO getSeo()
public Storefront.Product setSeo(Storefront.SEO arg)
public java.util.List<java.lang.String> getTags()
public Storefront.Product setTags(java.util.List<java.lang.String> arg)
public java.lang.String getTitle()
public Storefront.Product setTitle(java.lang.String arg)
public java.lang.Integer getTotalInventory()
public Storefront.Product setTotalInventory(java.lang.Integer arg)
public java.lang.String getTrackingParameters()
getTrackingParameters in interface Storefront.Trackablepublic Storefront.Product setTrackingParameters(java.lang.String arg)
public DateTime getUpdatedAt()
public Storefront.Product setUpdatedAt(DateTime arg)
public Storefront.ProductVariant getVariantBySelectedOptions()
public Storefront.Product setVariantBySelectedOptions(Storefront.ProductVariant arg)
public Storefront.ProductVariantConnection getVariants()
public Storefront.Product setVariants(Storefront.ProductVariantConnection arg)
public java.lang.String getVendor()
public Storefront.Product setVendor(java.lang.String arg)
public boolean unwrapsToObject(java.lang.String key)
unwrapsToObject in class AbstractResponse<Storefront.Product>