Interface ProductTailoring

All Superinterfaces:
BaseResource

public interface ProductTailoring extends BaseResource

A single ProductTailoring representation contains the current and the staged representation of its product information tailored per Store.


Example to create an instance using the builder pattern

     ProductTailoring productTailoring = ProductTailoring.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .store(storeBuilder -> storeBuilder)
             .product(productBuilder -> productBuilder)
             .published(true)
             .current(currentBuilder -> currentBuilder)
             .staged(stagedBuilder -> stagedBuilder)
             .hasStagedChanges(true)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the ProductTailoring.

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

      @NotNull @NotNull Long getVersion()

      Current version of the ProductTailoring.

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

      @NotNull @NotNull ZonedDateTime getCreatedAt()

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

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

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

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

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

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the ProductTailoring.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the ProductTailoring.

      Returns:
      createdBy
    • getKey

      String getKey()

      User-defined unique identifier of the ProductTailoring.

      Returns:
      key
    • getStore

      @NotNull @Valid @NotNull @Valid StoreKeyReference getStore()

      The Store to which the ProductTailoring belongs.

      Returns:
      store
    • getProduct

      @NotNull @Valid @NotNull @Valid ProductReference getProduct()

      Reference to the Product the ProductTailoring belongs to.

      Returns:
      product
    • getPublished

      @NotNull @NotNull Boolean getPublished()

      If true, the tailored information contained in the current ProductTailoringData is provided when retrieving the ProductProjection in Store. For information not part of the ProductTailoringData, the original information contained in the ProductData is provided. If false, only the original information contained in the ProductData is provided.

      Returns:
      published
    • getCurrent

      @NotNull @Valid @NotNull @Valid ProductTailoringData getCurrent()

      Current (published) data of the ProductTailoring.

      Returns:
      current
    • getStaged

      @NotNull @Valid @NotNull @Valid ProductTailoringData getStaged()

      Staged (unpublished) data of the ProductTailoring.

      Returns:
      staged
    • getHasStagedChanges

      @NotNull @NotNull Boolean getHasStagedChanges()

      true if the staged data is different from the current data.

      Returns:
      hasStagedChanges
    • getWarnings

      @Valid @Valid List<WarningObject> getWarnings()

      Warnings about processing of a request. Appears in response to requests with response status code 202 Accepted.

      Returns:
      warnings
    • setId

      void setId(String id)

      Unique identifier of the ProductTailoring.

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

      void setVersion(Long version)

      Current version of the ProductTailoring.

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

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the ProductTailoring 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 ProductTailoring 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 ProductTailoring.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the ProductTailoring.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the ProductTailoring.

      Parameters:
      key - value to be set
    • setStore

      void setStore(StoreKeyReference store)

      The Store to which the ProductTailoring belongs.

      Parameters:
      store - value to be set
    • setProduct

      void setProduct(ProductReference product)

      Reference to the Product the ProductTailoring belongs to.

      Parameters:
      product - value to be set
    • setPublished

      void setPublished(Boolean published)

      If true, the tailored information contained in the current ProductTailoringData is provided when retrieving the ProductProjection in Store. For information not part of the ProductTailoringData, the original information contained in the ProductData is provided. If false, only the original information contained in the ProductData is provided.

      Parameters:
      published - value to be set
    • setCurrent

      void setCurrent(ProductTailoringData current)

      Current (published) data of the ProductTailoring.

      Parameters:
      current - value to be set
    • setStaged

      void setStaged(ProductTailoringData staged)

      Staged (unpublished) data of the ProductTailoring.

      Parameters:
      staged - value to be set
    • setHasStagedChanges

      void setHasStagedChanges(Boolean hasStagedChanges)

      true if the staged data is different from the current data.

      Parameters:
      hasStagedChanges - value to be set
    • setWarnings

      void setWarnings(WarningObject... warnings)

      Warnings about processing of a request. Appears in response to requests with response status code 202 Accepted.

      Parameters:
      warnings - values to be set
    • setWarnings

      void setWarnings(List<WarningObject> warnings)

      Warnings about processing of a request. Appears in response to requests with response status code 202 Accepted.

      Parameters:
      warnings - values to be set
    • of

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

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

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

      static ProductTailoringBuilder builder()
      builder factory method for ProductTailoring
      Returns:
      builder
    • builder

      static ProductTailoringBuilder builder(ProductTailoring template)
      create builder for ProductTailoring instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductTailoring

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