Class CartAddLineItemActionImpl

java.lang.Object
com.commercetools.api.models.cart.CartAddLineItemActionImpl
All Implemented Interfaces:
CartAddLineItemAction, CartUpdateAction, CustomizableDraft<CartAddLineItemAction>, ResourceUpdateAction<CartUpdateAction>, io.vrap.rmf.base.client.ModelBase

public class CartAddLineItemActionImpl extends Object implements CartAddLineItemAction, io.vrap.rmf.base.client.ModelBase

If the Cart contains a LineItem for a Product Variant with the same LineItemMode, Custom Fields, supply and distribution channel, then only the quantity of the existing Line Item is increased. If LineItem shippingDetails is set, it is merged. All addresses will be present afterwards and, for address keys present in both shipping details, the quantity will be summed up. A new Line Item is added when the externalPrice or externalTotalPrice is set in this update action. The LineItem price is set as described in LineItem Price selection.

If the Tax Rate is not set, a MissingTaxRateForCountry error is returned.

If the Line Items do not have a Price according to the Product priceMode value for a selected currency and/or country, Customer Group, or Channel, a MatchingPriceNotFound error is returned.