Interface CartSetCustomerIdAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>

public interface CartSetCustomerIdAction extends CartUpdateAction

Setting the Cart's customerId can lead to updates on all its LineItem prices.

If the Customer with the specified id cannot be found, this update action returns a ReferencedResourceNotFound error.


Example to create an instance using the builder pattern

     CartSetCustomerIdAction cartSetCustomerIdAction = CartSetCustomerIdAction.builder()
             .build()
 
  • Field Details

    • SET_CUSTOMER_ID

      static final String SET_CUSTOMER_ID
      discriminator value for CartSetCustomerIdAction
      See Also:
  • Method Details

    • getCustomerId

      String getCustomerId()

      id of an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for the customerGroup field. If empty, the update action removes the value for both customerId and customerGroup.

      Returns:
      customerId
    • setCustomerId

      void setCustomerId(String customerId)

      id of an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for the customerGroup field. If empty, the update action removes the value for both customerId and customerGroup.

      Parameters:
      customerId - value to be set
    • of

      factory method
      Returns:
      instance of CartSetCustomerIdAction
    • of

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

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

      builder factory method for CartSetCustomerIdAction
      Returns:
      builder
    • builder

      create builder for CartSetCustomerIdAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartSetCustomerIdAction

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