public static class Storefront.Product extends <any> implements Storefront.HasMetafields, Storefront.MetafieldParentResource, Storefront.Node
| Constructor and Description |
|---|
Product() |
Product(ID id) |
Product(JsonObject fields) |
| 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.
|
java.lang.String |
getGraphQlTypeName() |
java.lang.String |
getHandle()
A human-friendly unique string for the Product automatically generated from its title.
|
ID |
getId()
Globally unique identifier.
|
Storefront.ImageConnection |
getImages()
List of images associated with the product.
|
Storefront.MediaConnection |
getMedia()
The media associated with the product.
|
Storefront.Metafield |
getMetafield()
The metafield associated with the resource.
|
Storefront.MetafieldConnection |
getMetafields()
A paginated list of metafields associated with the resource.
|
java.lang.String |
getOnlineStoreUrl()
The online store URL for the product.
|
java.util.List<Storefront.ProductOption> |
getOptions()
List of product options.
|
Storefront.ProductPriceRangeConnection |
getPresentmentPriceRanges()
List of price ranges in the presentment currencies for this shop.
|
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.
|
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.
|
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 |
setHandle(java.lang.String arg) |
Storefront.Product |
setImages(Storefront.ImageConnection arg) |
Storefront.Product |
setMedia(Storefront.MediaConnection arg) |
Storefront.Product |
setMetafield(Storefront.Metafield arg) |
Storefront.Product |
setMetafields(Storefront.MetafieldConnection arg) |
Storefront.Product |
setOnlineStoreUrl(java.lang.String arg) |
Storefront.Product |
setOptions(java.util.List<Storefront.ProductOption> arg) |
Storefront.Product |
setPresentmentPriceRanges(Storefront.ProductPriceRangeConnection arg) |
Storefront.Product |
setPriceRange(Storefront.ProductPriceRange arg) |
Storefront.Product |
setProductType(java.lang.String arg) |
Storefront.Product |
setPublishedAt(DateTime 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 |
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) |
public Product()
public Product(JsonObject fields)
throws SchemaViolationError
SchemaViolationErrorpublic Product(ID id)
public java.lang.String getGraphQlTypeName()
getGraphQlTypeName in interface Storefront.HasMetafieldsgetGraphQlTypeName in interface Storefront.MetafieldParentResourcegetGraphQlTypeName in interface Storefront.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 java.lang.String getHandle()
public Storefront.Product setHandle(java.lang.String arg)
public ID getId()
getId in interface Storefront.Nodepublic Storefront.ImageConnection getImages()
public Storefront.Product setImages(Storefront.ImageConnection 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 Storefront.MetafieldConnection getMetafields()
getMetafields in interface Storefront.HasMetafieldspublic Storefront.Product setMetafields(Storefront.MetafieldConnection arg)
public java.lang.String getOnlineStoreUrl()
public 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.ProductPriceRangeConnection getPresentmentPriceRanges()
public Storefront.Product setPresentmentPriceRanges(Storefront.ProductPriceRangeConnection 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 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 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)