public static class Storefront.Collection extends AbstractResponse<Storefront.Collection> implements Storefront.HasMetafields, Storefront.MenuItemResource, Storefront.MetafieldParentResource, Storefront.MetafieldReference, Storefront.Node, Storefront.OnlineStorePublishable, Storefront.Trackable
optimisticData, responseData| Constructor and Description |
|---|
Collection() |
Collection(JsonObject fields) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
Stripped description of the collection, single line with HTML tags removed.
|
java.lang.String |
getDescriptionHtml()
The description of the collection, complete with HTML formatting.
|
java.lang.String |
getGraphQlTypeName() |
java.lang.String |
getHandle()
A human-friendly unique string for the collection automatically generated from its title.
|
ID |
getId()
A globally-unique ID.
|
Storefront.Image |
getImage()
Image associated with the collection.
|
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.
|
Storefront.ProductConnection |
getProducts()
List of products in the collection.
|
Storefront.SEO |
getSeo()
The collection's SEO information.
|
java.lang.String |
getTitle()
The collection’s name.
|
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 collection was last modified.
|
Storefront.Collection |
setDescription(java.lang.String arg) |
Storefront.Collection |
setDescriptionHtml(java.lang.String arg) |
Storefront.Collection |
setHandle(java.lang.String arg) |
Storefront.Collection |
setImage(Storefront.Image arg) |
Storefront.Collection |
setMetafield(Storefront.Metafield arg) |
Storefront.Collection |
setMetafields(java.util.List<Storefront.Metafield> arg) |
Storefront.Collection |
setOnlineStoreUrl(java.lang.String arg) |
Storefront.Collection |
setProducts(Storefront.ProductConnection arg) |
Storefront.Collection |
setSeo(Storefront.SEO arg) |
Storefront.Collection |
setTitle(java.lang.String arg) |
Storefront.Collection |
setTrackingParameters(java.lang.String arg) |
Storefront.Collection |
setUpdatedAt(DateTime arg) |
boolean |
unwrapsToObject(java.lang.String key) |
collectNodes, get, getFieldName, getKey, jsonAsArray, jsonAsBoolean, jsonAsDouble, jsonAsInteger, jsonAsObject, jsonAsString, withAliaspublic Collection()
public Collection(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.TrackablegetGraphQlTypeName in interface Nodepublic java.lang.String getDescription()
public Storefront.Collection setDescription(java.lang.String arg)
public java.lang.String getDescriptionHtml()
public Storefront.Collection setDescriptionHtml(java.lang.String arg)
public java.lang.String getHandle()
public Storefront.Collection setHandle(java.lang.String arg)
public ID getId()
getId in interface Storefront.NodegetId in interface Nodepublic Storefront.Image getImage()
public Storefront.Collection setImage(Storefront.Image arg)
public Storefront.Metafield getMetafield()
getMetafield in interface Storefront.HasMetafieldspublic Storefront.Collection setMetafield(Storefront.Metafield arg)
public java.util.List<Storefront.Metafield> getMetafields()
getMetafields in interface Storefront.HasMetafieldspublic Storefront.Collection setMetafields(java.util.List<Storefront.Metafield> arg)
public java.lang.String getOnlineStoreUrl()
getOnlineStoreUrl in interface Storefront.OnlineStorePublishablepublic Storefront.Collection setOnlineStoreUrl(java.lang.String arg)
public Storefront.ProductConnection getProducts()
public Storefront.Collection setProducts(Storefront.ProductConnection arg)
public Storefront.SEO getSeo()
public Storefront.Collection setSeo(Storefront.SEO arg)
public java.lang.String getTitle()
public Storefront.Collection setTitle(java.lang.String arg)
public java.lang.String getTrackingParameters()
getTrackingParameters in interface Storefront.Trackablepublic Storefront.Collection setTrackingParameters(java.lang.String arg)
public DateTime getUpdatedAt()
public Storefront.Collection setUpdatedAt(DateTime arg)
public boolean unwrapsToObject(java.lang.String key)
unwrapsToObject in class AbstractResponse<Storefront.Collection>