Class SetPricesChangeBuilder

java.lang.Object
com.commercetools.history.models.change.SetPricesChangeBuilder
All Implemented Interfaces:
Builder<SetPricesChange>

public class SetPricesChangeBuilder extends Object implements Builder<SetPricesChange>
SetPricesChangeBuilder
Example to create an instance using the builder pattern

     SetPricesChange setPricesChange = SetPricesChange.builder()
             .change("{change}")
             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
             .plusNextValue(nextValueBuilder -> nextValueBuilder)
             .catalogData("{catalogData}")
             .variant("{variant}")
             .build()
 
  • Constructor Details

    • SetPricesChangeBuilder

      public SetPricesChangeBuilder()
  • Method Details

    • change

      public SetPricesChangeBuilder change(String change)
      set the value to the change
      Parameters:
      change - value to be set
      Returns:
      Builder
    • previousValue

      public SetPricesChangeBuilder previousValue(Price... previousValue)

      Value before the change.

      Parameters:
      previousValue - value to be set
      Returns:
      Builder
    • previousValue

      public SetPricesChangeBuilder previousValue(List<Price> previousValue)

      Value before the change.

      Parameters:
      previousValue - value to be set
      Returns:
      Builder
    • plusPreviousValue

      public SetPricesChangeBuilder plusPreviousValue(Price... previousValue)

      Value before the change.

      Parameters:
      previousValue - value to be set
      Returns:
      Builder
    • plusPreviousValue

      public SetPricesChangeBuilder plusPreviousValue(Function<PriceBuilder,PriceBuilder> builder)

      Value before the change.

      Parameters:
      builder - function to build the previousValue value
      Returns:
      Builder
    • withPreviousValue

      public SetPricesChangeBuilder withPreviousValue(Function<PriceBuilder,PriceBuilder> builder)

      Value before the change.

      Parameters:
      builder - function to build the previousValue value
      Returns:
      Builder
    • addPreviousValue

      public SetPricesChangeBuilder addPreviousValue(Function<PriceBuilder,Price> builder)

      Value before the change.

      Parameters:
      builder - function to build the previousValue value
      Returns:
      Builder
    • setPreviousValue

      public SetPricesChangeBuilder setPreviousValue(Function<PriceBuilder,Price> builder)

      Value before the change.

      Parameters:
      builder - function to build the previousValue value
      Returns:
      Builder
    • nextValue

      public SetPricesChangeBuilder nextValue(Price... nextValue)

      Value after the change.

      Parameters:
      nextValue - value to be set
      Returns:
      Builder
    • nextValue

      public SetPricesChangeBuilder nextValue(List<Price> nextValue)

      Value after the change.

      Parameters:
      nextValue - value to be set
      Returns:
      Builder
    • plusNextValue

      public SetPricesChangeBuilder plusNextValue(Price... nextValue)

      Value after the change.

      Parameters:
      nextValue - value to be set
      Returns:
      Builder
    • plusNextValue

      public SetPricesChangeBuilder plusNextValue(Function<PriceBuilder,PriceBuilder> builder)

      Value after the change.

      Parameters:
      builder - function to build the nextValue value
      Returns:
      Builder
    • withNextValue

      public SetPricesChangeBuilder withNextValue(Function<PriceBuilder,PriceBuilder> builder)

      Value after the change.

      Parameters:
      builder - function to build the nextValue value
      Returns:
      Builder
    • addNextValue

      public SetPricesChangeBuilder addNextValue(Function<PriceBuilder,Price> builder)

      Value after the change.

      Parameters:
      builder - function to build the nextValue value
      Returns:
      Builder
    • setNextValue

      public SetPricesChangeBuilder setNextValue(Function<PriceBuilder,Price> builder)

      Value after the change.

      Parameters:
      builder - function to build the nextValue value
      Returns:
      Builder
    • catalogData

      public SetPricesChangeBuilder catalogData(String catalogData)
      • staged, if the staged ProductCatalogData was updated.
      • current, if the current ProductCatalogData was updated.
      Parameters:
      catalogData - value to be set
      Returns:
      Builder
    • variant

      public SetPricesChangeBuilder variant(String variant)

      sku or key of the ProductVariant.

      Parameters:
      variant - value to be set
      Returns:
      Builder
    • getChange

      public String getChange()
      value of change}
      Returns:
      change
    • getPreviousValue

      public List<Price> getPreviousValue()

      Value before the change.

      Returns:
      previousValue
    • getNextValue

      public List<Price> getNextValue()

      Value after the change.

      Returns:
      nextValue
    • getCatalogData

      public String getCatalogData()
      • staged, if the staged ProductCatalogData was updated.
      • current, if the current ProductCatalogData was updated.
      Returns:
      catalogData
    • getVariant

      public String getVariant()

      sku or key of the ProductVariant.

      Returns:
      variant
    • build

      public SetPricesChange build()
      builds SetPricesChange with checking for non-null required values
      Specified by:
      build in interface Builder<SetPricesChange>
      Returns:
      SetPricesChange
    • buildUnchecked

      public SetPricesChange buildUnchecked()
      builds SetPricesChange without checking for non-null required values
      Returns:
      SetPricesChange
    • of

      public static SetPricesChangeBuilder of()
      factory method for an instance of SetPricesChangeBuilder
      Returns:
      builder
    • of

      public static SetPricesChangeBuilder of(SetPricesChange template)
      create builder for SetPricesChange instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder