Interface CartDiscountSetDiscountGroupAction

All Superinterfaces:
CartDiscountUpdateAction, ResourceUpdateAction<CartDiscountUpdateAction>

public interface CartDiscountSetDiscountGroupAction extends CartDiscountUpdateAction
CartDiscountSetDiscountGroupAction
Example to create an instance using the builder pattern

     CartDiscountSetDiscountGroupAction cartDiscountSetDiscountGroupAction = CartDiscountSetDiscountGroupAction.builder()
             .build()
 
  • Field Details

    • SET_DISCOUNT_GROUP

      static final String SET_DISCOUNT_GROUP
      discriminator value for CartDiscountSetDiscountGroupAction
      See Also:
  • Method Details

    • getDiscountGroup

      @Valid @Valid DiscountGroupResourceIdentifier getDiscountGroup()

      Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.

      Returns:
      discountGroup
    • getSortOrder

      String getSortOrder()

      New value to set (between 0 and 1) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.

      Required if discountGroup is absent. If discountGroup is set, the CartDiscount will use the sort order of the DiscountGroup.

      Returns:
      sortOrder
    • setDiscountGroup

      void setDiscountGroup(DiscountGroupResourceIdentifier discountGroup)

      Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.

      Parameters:
      discountGroup - value to be set
    • setSortOrder

      void setSortOrder(String sortOrder)

      New value to set (between 0 and 1) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.

      Required if discountGroup is absent. If discountGroup is set, the CartDiscount will use the sort order of the DiscountGroup.

      Parameters:
      sortOrder - value to be set
    • of

      factory method
      Returns:
      instance of CartDiscountSetDiscountGroupAction
    • of

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

      Specified by:
      copyDeep in interface CartDiscountUpdateAction
    • deepCopy

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

      builder factory method for CartDiscountSetDiscountGroupAction
      Returns:
      builder
    • builder

      create builder for CartDiscountSetDiscountGroupAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartDiscountSetDiscountGroupAction

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