Interface CartSetAnonymousIdAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>

public interface CartSetAnonymousIdAction extends CartUpdateAction

If the Cart is already associated with a Customer, an InvalidOperation error is returned.


Example to create an instance using the builder pattern

     CartSetAnonymousIdAction cartSetAnonymousIdAction = CartSetAnonymousIdAction.builder()
             .build()
 
  • Field Details

    • SET_ANONYMOUS_ID

      static final String SET_ANONYMOUS_ID
      discriminator value for CartSetAnonymousIdAction
      See Also:
  • Method Details

    • getAnonymousId

      String getAnonymousId()

      Value to set. If empty, any existing value is removed.

      Returns:
      anonymousId
    • setAnonymousId

      void setAnonymousId(String anonymousId)

      Value to set. If empty, any existing value is removed.

      Parameters:
      anonymousId - value to be set
    • of

      factory method
      Returns:
      instance of CartSetAnonymousIdAction
    • of

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

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

      builder factory method for CartSetAnonymousIdAction
      Returns:
      builder
    • builder

      create builder for CartSetAnonymousIdAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartSetAnonymousIdAction

      default <T> T withCartSetAnonymousIdAction(Function<CartSetAnonymousIdAction,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<CartSetAnonymousIdAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference