Interface DiscountGroup

All Superinterfaces:
BaseResource

public interface DiscountGroup extends BaseResource
DiscountGroup
Example to create an instance using the builder pattern

     DiscountGroup discountGroup = DiscountGroup.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .key("{key}")
             .sortOrder("{sortOrder}")
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the DiscountGroup.

      Specified by:
      getId in interface BaseResource
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the DiscountGroup.

      Specified by:
      getVersion in interface BaseResource
      Returns:
      version
    • getName

      @Valid @Valid LocalizedString getName()

      Name of the DiscountGroup.

      Returns:
      name
    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier of the DiscountGroup.

      Returns:
      key
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of 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 is applied; a CartDiscount with a higher value is prioritized.

      The sort order is unique among all DiscountGroups and CartDiscounts.

      Returns:
      sortOrder
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the DiscountGroup was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the DiscountGroup was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the DiscountGroup.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the DiscountGroup.

      Returns:
      createdBy
    • setId

      void setId(String id)

      Unique identifier of the DiscountGroup.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the DiscountGroup.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the DiscountGroup.

      Parameters:
      name - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the DiscountGroup.

      Parameters:
      key - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of 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 is applied; a CartDiscount with a higher value is prioritized.

      The sort order is unique among all DiscountGroups and CartDiscounts.

      Parameters:
      sortOrder - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the DiscountGroup was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the DiscountGroup was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the DiscountGroup.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the DiscountGroup.

      Parameters:
      createdBy - value to be set
    • of

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

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

      DiscountGroup copyDeep()
      Specified by:
      copyDeep in interface BaseResource
    • deepCopy

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

      static DiscountGroupBuilder builder()
      builder factory method for DiscountGroup
      Returns:
      builder
    • builder

      static DiscountGroupBuilder builder(DiscountGroup template)
      create builder for DiscountGroup instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDiscountGroup

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