Class ProductSetSkuActionBuilder

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

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

     ProductSetSkuAction productSetSkuAction = ProductSetSkuAction.builder()
             .variantId(0.3)
             .build()
 
  • Constructor Details

    • ProductSetSkuActionBuilder

      public ProductSetSkuActionBuilder()
  • Method Details

    • variantId

      public ProductSetSkuActionBuilder variantId(Long variantId)

      The id of the ProductVariant to update.

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

      Value to set. Must be unique. If empty, any existing value will be removed.

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

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

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

      public Long getVariantId()

      The id of the ProductVariant to update.

      Returns:
      variantId
    • getSku

      @Nullable public String getSku()

      Value to set. Must be unique. If empty, any existing value will be removed.

      Returns:
      sku
    • getStaged

      @Nullable public Boolean getStaged()

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

      Returns:
      staged
    • build

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

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

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

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