Interface CartSetCustomTypeAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>

public interface CartSetCustomTypeAction extends CartUpdateAction
CartSetCustomTypeAction
Example to create an instance using the builder pattern

     CartSetCustomTypeAction cartSetCustomTypeAction = CartSetCustomTypeAction.builder()
             .build()
 
  • Field Details

    • SET_CUSTOM_TYPE

      static final String SET_CUSTOM_TYPE
      discriminator value for CartSetCustomTypeAction
      See Also:
  • Method Details

    • getType

      @Valid @Valid TypeResourceIdentifier getType()

      Defines the Type that extends the Cart with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Cart.

      Returns:
      type
    • getFields

      @Valid @Valid FieldContainer getFields()

      Object containing the Custom Fields fields for the Cart.

      Required if at least one Custom Field is defined as required in the fieldDefinitions of the referenced Type.

      Returns:
      fields
    • setType

      void setType(TypeResourceIdentifier type)

      Defines the Type that extends the Cart with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Cart.

      Parameters:
      type - value to be set
    • setFields

      void setFields(FieldContainer fields)

      Object containing the Custom Fields fields for the Cart.

      Required if at least one Custom Field is defined as required in the fieldDefinitions of the referenced Type.

      Parameters:
      fields - value to be set
    • of

      factory method
      Returns:
      instance of CartSetCustomTypeAction
    • of

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

      Specified by:
      copyDeep in interface CartUpdateAction
    • deepCopy

      @Nullable static CartSetCustomTypeAction deepCopy(@Nullable CartSetCustomTypeAction template)
      factory method to create a deep copy of CartSetCustomTypeAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for CartSetCustomTypeAction
      Returns:
      builder
    • builder

      create builder for CartSetCustomTypeAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartSetCustomTypeAction

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