Interface CartAddDiscountCodeAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>
All Known Implementing Classes:
CartAddDiscountCodeActionImpl

Adds a DiscountCode to the Cart to activate the related Cart Discounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Cart. Discount Codes can be added to frozen Carts, but their DiscountCodeState is then DoesNotMatchCart.

The maximum number of Discount Codes in a Cart is restricted by a limit.

Specific Error Code: MatchingPriceNotFound


Example to create an instance using the builder pattern

     CartAddDiscountCodeAction cartAddDiscountCodeAction = CartAddDiscountCodeAction.builder()
             .code("{code}")
             .build()