Interface MyCartAddDiscountCodeAction

All Superinterfaces:
MyCartUpdateAction, ResourceUpdateAction<MyCartUpdateAction>

public interface MyCartAddDiscountCodeAction extends MyCartUpdateAction

Adds a DiscountCode to the Cart to activate the related CartDiscounts. 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

     MyCartAddDiscountCodeAction myCartAddDiscountCodeAction = MyCartAddDiscountCodeAction.builder()
             .code("{code}")
             .build()
 
  • Field Details

    • ADD_DISCOUNT_CODE

      static final String ADD_DISCOUNT_CODE
      discriminator value for MyCartAddDiscountCodeAction
      See Also:
  • Method Details