public class AddItemRequest extends CartModifyingRequest implements Serializable
CartOperationService.addItemToCart(Cart, AddItemRequest, boolean, ContextInfo)
and is
used to inform the creation of a CartItem
.Constructor and Description |
---|
AddItemRequest() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Map<String,Object> |
getAdditionalAttributes()
Miscellaneous attributes that can be set to this request in order to inform business logic
for adding a
CartItem . |
Map<String,Object> |
getCartAttributes()
Attributes that should be copied to the
Cart.getAttributes() for this request. |
javax.money.CurrencyUnit |
getCurrency()
Deprecated.
in favor of using
PriceCartRequest for creating or pricing a cart. |
List<AddItemRequest> |
getDependentCartItems()
A list of additional
AddItemRequests that should be processed as
dependent items of the resulting parent item of this current AddItemRequest . |
Map<String,String> |
getItemAttributeChoices()
Attribute choices that should be copied to
CartItem.getAttributeChoices() for this
request. |
Map<String,Object> |
getItemAttributes()
Miscellaneous attributes that should be copied to the
CartItem.getAttributes() for
this request. |
String |
getItemChoiceKey()
If this
AddItemRequest is one within getDependentCartItems() ,
this is the key to use to relate to this CartItem to a configured product item
choice. |
Map<String,Object> |
getItemInternalAttributes()
Miscellaneous internal attributes that should be copied to the
CartItem.getInternalAttributes() for this request. |
Locale |
getLocale()
Deprecated.
in favor of using
PriceCartRequest for creating or pricing a cart. |
String |
getMerchandisingContext()
The value that should be mapped to
CartItem.getMerchandisingContext() . |
String |
getProductId()
The id of the product for this add item request.
|
int |
getQuantity()
The amount of this item to be added to the
Cart . |
String |
getSku()
The SKU code for the item (e.g., Product or Variant).
|
String |
getVariantId()
The id of the variant for this add item request.
|
int |
hashCode() |
void |
setAdditionalAttributes(Map<String,Object> additionalAttributes)
Miscellaneous attributes that can be set to this request in order to inform business logic
for adding a
CartItem . |
void |
setCartAttributes(Map<String,Object> cartAttributes)
Attributes that should be copied to the
Cart.getAttributes() for this request. |
void |
setCurrency(javax.money.CurrencyUnit currency)
Deprecated.
in favor of using
PriceCartRequest for creating or pricing a cart. |
void |
setDependentCartItems(List<AddItemRequest> dependentCartItems)
A list of additional
AddItemRequests that should be processed as
dependent items of the resulting parent item of this current AddItemRequest . |
void |
setItemAttributeChoices(Map<String,String> itemAttributeChoices)
Attribute choices that should be copied to
CartItem.getAttributeChoices() for this
request. |
void |
setItemAttributes(Map<String,Object> itemAttributes)
Miscellaneous attributes that should be copied to the
CartItem.getAttributes() for
this request. |
void |
setItemChoiceKey(String itemChoiceKey)
If this
AddItemRequest is one within getDependentCartItems() ,
this is the key to use to relate to this CartItem to a configured product item
choice. |
void |
setItemInternalAttributes(Map<String,Object> itemInternalAttributes)
Miscellaneous internal attributes that should be copied to the
CartItem.getInternalAttributes() for this request. |
void |
setLocale(Locale locale)
Deprecated.
in favor of using
PriceCartRequest for creating or pricing a cart. |
void |
setMerchandisingContext(String merchandisingContext)
The value that should be mapped to
CartItem.getMerchandisingContext() . |
void |
setProductId(String productId)
The id of the product for this add item request.
|
void |
setQuantity(int quantity)
The amount of this item to be added to the
Cart . |
void |
setSku(String sku)
The SKU code for the item (e.g., Product or Variant).
|
void |
setVariantId(String variantId)
The id of the variant for this add item request.
|
String |
toString() |
getCartVersion, getVersion, setCartVersion, setVersion
public String getVariantId()
public String getProductId()
public String getSku()
public int getQuantity()
Cart
.Cart
.@Deprecated public javax.money.CurrencyUnit getCurrency()
PriceCartRequest
for creating or pricing a cart.@Deprecated public Locale getLocale()
PriceCartRequest
for creating or pricing a cart.public Map<String,Object> getItemAttributes()
CartItem.getAttributes()
for
this request.CartItem.getAttributes()
for this request.public Map<String,Object> getItemInternalAttributes()
CartItem.getInternalAttributes()
for this request.CartItem.getInternalAttributes()
for this request.public Map<String,String> getItemAttributeChoices()
CartItem.getAttributeChoices()
for this
request.CartItem.getAttributeChoices()
for
this request.public Map<String,Object> getCartAttributes()
Cart.getAttributes()
for this request.Cart.getAttributes()
for this
request.public List<AddItemRequest> getDependentCartItems()
AddItemRequests
that should be processed as
dependent items of the resulting parent item of this current AddItemRequest
.AddItemRequests
that should be processed
as dependent items of the resulting parent item of this current
AddItemRequest
.public String getItemChoiceKey()
AddItemRequest
is one within getDependentCartItems()
,
this is the key to use to relate to this CartItem
to a configured product item
choice.CartItem
to a configured product item
choice.public String getMerchandisingContext()
CartItem.getMerchandisingContext()
. This holds the
selector or merchandising product's id.public Map<String,Object> getAdditionalAttributes()
CartItem
.CartItem
.public void setVariantId(String variantId)
variantId
- The id of the variant for this add item request. Used to retrieve variant
information for the cart item.public void setProductId(String productId)
productId
- The id of the product for this add item request. Used to retrieve product
information for the cart item.public void setSku(String sku)
sku
- SKU code for the itempublic void setQuantity(int quantity)
Cart
.quantity
- The amount of this item to be added to the Cart
.@Deprecated public void setCurrency(javax.money.CurrencyUnit currency)
PriceCartRequest
for creating or pricing a cart.@Deprecated public void setLocale(Locale locale)
PriceCartRequest
for creating or pricing a cart.public void setItemAttributes(Map<String,Object> itemAttributes)
CartItem.getAttributes()
for
this request.itemAttributes
- Miscellaneous attributes that should be copied to the
CartItem.getAttributes()
for this request.public void setItemInternalAttributes(Map<String,Object> itemInternalAttributes)
CartItem.getInternalAttributes()
for this request.itemAttributes
- Miscellaneous internal attributes that should be copied to the
CartItem.getInternalAttributes()
for this request.public void setItemAttributeChoices(Map<String,String> itemAttributeChoices)
CartItem.getAttributeChoices()
for this
request.itemAttributeChoices
- Attribute choices that should be copied to
CartItem.getAttributeChoices()
for this request.public void setCartAttributes(Map<String,Object> cartAttributes)
Cart.getAttributes()
for this request.cartAttributes
- Attributes that should be copied to the Cart.getAttributes()
for this request.public void setDependentCartItems(List<AddItemRequest> dependentCartItems)
AddItemRequests
that should be processed as
dependent items of the resulting parent item of this current AddItemRequest
.dependentCartItems
- A list of additional AddItemRequests
that
should be processed as dependent items of the resulting parent item of this current
AddItemRequest
.public void setItemChoiceKey(String itemChoiceKey)
AddItemRequest
is one within getDependentCartItems()
,
this is the key to use to relate to this CartItem
to a configured product item
choice.itemChoiceKey
- The key to use to relate to this CartItem
to a configured
product item choice.public void setMerchandisingContext(String merchandisingContext)
CartItem.getMerchandisingContext()
. This holds the
selector or merchandising product's id.merchandisingContext
- The context of the item signifying where it's added frompublic void setAdditionalAttributes(Map<String,Object> additionalAttributes)
CartItem
.additionalAttributes
- Miscellaneous attributes that can be set to this request in order
to inform business logic for adding a CartItem
.public boolean equals(Object o)
equals
in class CartModifyingRequest
protected boolean canEqual(Object other)
canEqual
in class CartModifyingRequest
public int hashCode()
hashCode
in class CartModifyingRequest
public String toString()
toString
in class CartModifyingRequest
Copyright © 2021. All rights reserved.