Interface CartDiscountAddStoreAction

All Superinterfaces:
CartDiscountUpdateAction, ResourceUpdateAction<CartDiscountUpdateAction>

public interface CartDiscountAddStoreAction extends CartDiscountUpdateAction

If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.

This action generates a CartDiscountStoreAdded Message.


Example to create an instance using the builder pattern

     CartDiscountAddStoreAction cartDiscountAddStoreAction = CartDiscountAddStoreAction.builder()
             .store(storeBuilder -> storeBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getStore

      @NotNull @Valid @NotNull @Valid StoreResourceIdentifier getStore()

      Store to add.

      A failed update can return the following errors:

      • If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
      • If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
      Returns:
      store
    • setStore

      void setStore(StoreResourceIdentifier store)

      Store to add.

      A failed update can return the following errors:

      • If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
      • If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
      Parameters:
      store - value to be set
    • of

      factory method
      Returns:
      instance of CartDiscountAddStoreAction
    • of

      factory method to create a shallow copy CartDiscountAddStoreAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of CartDiscountAddStoreAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for CartDiscountAddStoreAction
      Returns:
      builder
    • builder

      create builder for CartDiscountAddStoreAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartDiscountAddStoreAction

      default <T> T withCartDiscountAddStoreAction(Function<CartDiscountAddStoreAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CartDiscountAddStoreAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference