Class ProductSetPricesActionBuilder

java.lang.Object
com.commercetools.api.models.product.ProductSetPricesActionBuilder
All Implemented Interfaces:
Builder<ProductSetPricesAction>

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

     ProductSetPricesAction productSetPricesAction = ProductSetPricesAction.builder()
             .plusPrices(pricesBuilder -> pricesBuilder)
             .build()
 
  • Constructor Details

    • ProductSetPricesActionBuilder

      public ProductSetPricesActionBuilder()
  • Method Details

    • variantId

      public ProductSetPricesActionBuilder variantId(@Nullable Long variantId)

      The id of the ProductVariant to update.

      Parameters:
      variantId - value to be set
      Returns:
      Builder
    • sku

      The sku of the ProductVariant to update.

      Parameters:
      sku - value to be set
      Returns:
      Builder
    • prices

      public ProductSetPricesActionBuilder prices(PriceDraft... prices)

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

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

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

      Parameters:
      prices - value to be set
      Returns:
      Builder
    • plusPrices

      public ProductSetPricesActionBuilder plusPrices(PriceDraft... prices)

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

      Parameters:
      prices - value to be set
      Returns:
      Builder
    • plusPrices

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

      Parameters:
      builder - function to build the prices value
      Returns:
      Builder
    • withPrices

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

      Parameters:
      builder - function to build the prices value
      Returns:
      Builder
    • addPrices

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

      Parameters:
      builder - function to build the prices value
      Returns:
      Builder
    • setPrices

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

      Parameters:
      builder - function to build the prices value
      Returns:
      Builder
    • staged

      If true, only the staged ProductVariant is updated. If false, both the current and staged ProductVariant are updated.

      Parameters:
      staged - value to be set
      Returns:
      Builder
    • getVariantId

      @Nullable public Long getVariantId()

      The id of the ProductVariant to update.

      Returns:
      variantId
    • getSku

      @Nullable public String getSku()

      The sku of the ProductVariant to update.

      Returns:
      sku
    • getPrices

      public List<PriceDraft> getPrices()

      The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

      Returns:
      prices
    • getStaged

      @Nullable public Boolean getStaged()

      If true, only the staged ProductVariant is updated. If false, both the current and staged ProductVariant are updated.

      Returns:
      staged
    • build

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

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

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

      create builder for ProductSetPricesAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder