public static class Storefront.Cart extends AbstractResponse<Storefront.Cart> implements Storefront.HasMetafields, Storefront.MetafieldParentResource, Storefront.Node
optimisticData, responseData| Modifier and Type | Method and Description |
|---|---|
java.util.List<Storefront.AppliedGiftCard> |
getAppliedGiftCards()
The gift cards that have been applied to the cart.
|
Storefront.Attribute |
getAttribute()
An attribute associated with the cart.
|
java.util.List<Storefront.Attribute> |
getAttributes()
The attributes associated with the cart.
|
Storefront.CartBuyerIdentity |
getBuyerIdentity()
Information about the buyer that's interacting with the cart.
|
java.lang.String |
getCheckoutUrl()
The URL of the checkout for the cart.
|
Storefront.CartCost |
getCost()
The estimated costs that the buyer will pay at checkout.
|
DateTime |
getCreatedAt()
The date and time when the cart was created.
|
Storefront.CartDeliveryGroupConnection |
getDeliveryGroups()
The delivery groups available for the cart, based on the buyer identity default
delivery address preference or the default address of the logged-in customer.
|
java.util.List<Storefront.CartDiscountAllocation> |
getDiscountAllocations()
The discounts that have been applied to the entire cart.
|
java.util.List<Storefront.CartDiscountCode> |
getDiscountCodes()
The case-insensitive discount codes that the customer added at checkout.
|
Storefront.CartEstimatedCost |
getEstimatedCost()
Deprecated.
Use `cost` instead.
|
java.lang.String |
getGraphQlTypeName() |
ID |
getId()
A globally-unique ID.
|
Storefront.BaseCartLineConnection |
getLines()
A list of lines containing information about the items the customer intends to purchase.
|
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 |
getNote()
A note that's associated with the cart.
|
java.lang.Integer |
getTotalQuantity()
The total number of items in the cart.
|
DateTime |
getUpdatedAt()
The date and time when the cart was updated.
|
Storefront.Cart |
setAppliedGiftCards(java.util.List<Storefront.AppliedGiftCard> arg) |
Storefront.Cart |
setAttribute(Storefront.Attribute arg) |
Storefront.Cart |
setAttributes(java.util.List<Storefront.Attribute> arg) |
Storefront.Cart |
setBuyerIdentity(Storefront.CartBuyerIdentity arg) |
Storefront.Cart |
setCheckoutUrl(java.lang.String arg) |
Storefront.Cart |
setCost(Storefront.CartCost arg) |
Storefront.Cart |
setCreatedAt(DateTime arg) |
Storefront.Cart |
setDeliveryGroups(Storefront.CartDeliveryGroupConnection arg) |
Storefront.Cart |
setDiscountAllocations(java.util.List<Storefront.CartDiscountAllocation> arg) |
Storefront.Cart |
setDiscountCodes(java.util.List<Storefront.CartDiscountCode> arg) |
Storefront.Cart |
setEstimatedCost(Storefront.CartEstimatedCost arg) |
Storefront.Cart |
setLines(Storefront.BaseCartLineConnection arg) |
Storefront.Cart |
setMetafield(Storefront.Metafield arg) |
Storefront.Cart |
setMetafields(java.util.List<Storefront.Metafield> arg) |
Storefront.Cart |
setNote(java.lang.String arg) |
Storefront.Cart |
setTotalQuantity(java.lang.Integer arg) |
Storefront.Cart |
setUpdatedAt(DateTime arg) |
boolean |
unwrapsToObject(java.lang.String key) |
collectNodes, get, getFieldName, getKey, jsonAsArray, jsonAsBoolean, jsonAsDouble, jsonAsInteger, jsonAsObject, jsonAsString, withAliaspublic Cart()
public Cart(JsonObject fields)
throws SchemaViolationError
SchemaViolationErrorpublic java.lang.String getGraphQlTypeName()
getGraphQlTypeName in interface Storefront.HasMetafieldsgetGraphQlTypeName in interface Storefront.MetafieldParentResourcegetGraphQlTypeName in interface Storefront.NodegetGraphQlTypeName in interface Nodepublic java.util.List<Storefront.AppliedGiftCard> getAppliedGiftCards()
public Storefront.Cart setAppliedGiftCards(java.util.List<Storefront.AppliedGiftCard> arg)
public Storefront.Attribute getAttribute()
public Storefront.Cart setAttribute(Storefront.Attribute arg)
public java.util.List<Storefront.Attribute> getAttributes()
public Storefront.Cart setAttributes(java.util.List<Storefront.Attribute> arg)
public Storefront.CartBuyerIdentity getBuyerIdentity()
public Storefront.Cart setBuyerIdentity(Storefront.CartBuyerIdentity arg)
public java.lang.String getCheckoutUrl()
public Storefront.Cart setCheckoutUrl(java.lang.String arg)
public Storefront.CartCost getCost()
public Storefront.Cart setCost(Storefront.CartCost arg)
public DateTime getCreatedAt()
public Storefront.Cart setCreatedAt(DateTime arg)
public Storefront.CartDeliveryGroupConnection getDeliveryGroups()
public Storefront.Cart setDeliveryGroups(Storefront.CartDeliveryGroupConnection arg)
public java.util.List<Storefront.CartDiscountAllocation> getDiscountAllocations()
public Storefront.Cart setDiscountAllocations(java.util.List<Storefront.CartDiscountAllocation> arg)
public java.util.List<Storefront.CartDiscountCode> getDiscountCodes()
public Storefront.Cart setDiscountCodes(java.util.List<Storefront.CartDiscountCode> arg)
public Storefront.CartEstimatedCost getEstimatedCost()
public Storefront.Cart setEstimatedCost(Storefront.CartEstimatedCost arg)
public ID getId()
getId in interface Storefront.NodegetId in interface Nodepublic Storefront.BaseCartLineConnection getLines()
public Storefront.Cart setLines(Storefront.BaseCartLineConnection arg)
public Storefront.Metafield getMetafield()
getMetafield in interface Storefront.HasMetafieldspublic Storefront.Cart setMetafield(Storefront.Metafield arg)
public java.util.List<Storefront.Metafield> getMetafields()
getMetafields in interface Storefront.HasMetafieldspublic Storefront.Cart setMetafields(java.util.List<Storefront.Metafield> arg)
public java.lang.String getNote()
public Storefront.Cart setNote(java.lang.String arg)
public java.lang.Integer getTotalQuantity()
public Storefront.Cart setTotalQuantity(java.lang.Integer arg)
public DateTime getUpdatedAt()
public Storefront.Cart setUpdatedAt(DateTime arg)
public boolean unwrapsToObject(java.lang.String key)
unwrapsToObject in class AbstractResponse<Storefront.Cart>