Interface DiscountGroupDraft

All Superinterfaces:
Draft<DiscountGroupDraft>

public interface DiscountGroupDraft extends Draft<DiscountGroupDraft>
DiscountGroupDraft
Example to create an instance using the builder pattern

     DiscountGroupDraft discountGroupDraft = DiscountGroupDraft.builder()
             .key("{key}")
             .sortOrder("{sortOrder}")
             .build()
 
  • Method Details

    • getName

      @Valid @Valid LocalizedString getName()

      Name of the DiscountGroup.

      Returns:
      name
    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier for the DiscountGroup.

      Returns:
      key
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description for the DiscountGroup.

      Returns:
      description
    • getSortOrder

      @NotNull @NotNull String getSortOrder()

      Value between 0 and 1 that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.

      The sort order must be unique among all DiscountGroups and CartDiscounts.

      Returns:
      sortOrder
    • setName

      void setName(LocalizedString name)

      Name of the DiscountGroup.

      Parameters:
      name - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier for the DiscountGroup.

      Parameters:
      key - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description for the DiscountGroup.

      Parameters:
      description - value to be set
    • setSortOrder

      void setSortOrder(String sortOrder)

      Value between 0 and 1 that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.

      The sort order must be unique among all DiscountGroups and CartDiscounts.

      Parameters:
      sortOrder - value to be set
    • of

      static DiscountGroupDraft of()
      factory method
      Returns:
      instance of DiscountGroupDraft
    • of

      static DiscountGroupDraft of(DiscountGroupDraft template)
      factory method to create a shallow copy DiscountGroupDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      DiscountGroupDraft copyDeep()
    • deepCopy

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

      static DiscountGroupDraftBuilder builder()
      builder factory method for DiscountGroupDraft
      Returns:
      builder
    • builder

      static DiscountGroupDraftBuilder builder(DiscountGroupDraft template)
      create builder for DiscountGroupDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDiscountGroupDraft

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