Interface VariantValues


public interface VariantValues
VariantValues
Example to create an instance using the builder pattern

     VariantValues variantValues = VariantValues.builder()
             .plusPrices(pricesBuilder -> pricesBuilder)
             .plusAttributes(attributesBuilder -> attributesBuilder)
             .build()
 
  • Method Details

    • getSku

      String getSku()

      SKU of the ProductVariant.

      Returns:
      sku
    • getPrices

      @NotNull @Valid @NotNull @Valid List<PriceDraft> getPrices()

      Embedded Prices of the ProductVariant.

      Returns:
      prices
    • getAttributes

      @NotNull @Valid @NotNull @Valid List<Attribute> getAttributes()

      Attributes of the ProductVariant.

      Returns:
      attributes
    • setSku

      void setSku(String sku)

      SKU of the ProductVariant.

      Parameters:
      sku - value to be set
    • setPrices

      void setPrices(PriceDraft... prices)

      Embedded Prices of the ProductVariant.

      Parameters:
      prices - values to be set
    • setPrices

      void setPrices(List<PriceDraft> prices)

      Embedded Prices of the ProductVariant.

      Parameters:
      prices - values to be set
    • setAttributes

      void setAttributes(Attribute... attributes)

      Attributes of the ProductVariant.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)

      Attributes of the ProductVariant.

      Parameters:
      attributes - values to be set
    • of

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

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

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

      static VariantValuesBuilder builder()
      builder factory method for VariantValues
      Returns:
      builder
    • builder

      static VariantValuesBuilder builder(VariantValues template)
      create builder for VariantValues instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withVariantValues

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