Interface ProductChangeMasterVariantAction

All Superinterfaces:
ProductUpdateAction, ResourceUpdateAction<ProductUpdateAction>

public interface ProductChangeMasterVariantAction extends ProductUpdateAction

Assigns the specified Product Variant to the masterVariant and removes the same from variants at the same time. The current Master Variant becomes part of the variants array. Either variantId or sku is required.


Example to create an instance using the builder pattern

     ProductChangeMasterVariantAction productChangeMasterVariantAction = ProductChangeMasterVariantAction.builder()
             .build()
 
  • Field Details

    • CHANGE_MASTER_VARIANT

      static final String CHANGE_MASTER_VARIANT
      discriminator value for ProductChangeMasterVariantAction
      See Also:
  • Method Details

    • getVariantId

      Long getVariantId()

      The id of the ProductVariant to become the Master Variant.

      Returns:
      variantId
    • getSku

      String getSku()

      The sku of the ProductVariant to become the Master Variant.

      Returns:
      sku
    • getStaged

      Boolean getStaged()

      If true, only the staged Master Variant is changed. If false, both the current and staged Master Variant are changed.

      Returns:
      staged
    • setVariantId

      void setVariantId(Long variantId)

      The id of the ProductVariant to become the Master Variant.

      Parameters:
      variantId - value to be set
    • setSku

      void setSku(String sku)

      The sku of the ProductVariant to become the Master Variant.

      Parameters:
      sku - value to be set
    • setStaged

      void setStaged(Boolean staged)

      If true, only the staged Master Variant is changed. If false, both the current and staged Master Variant are changed.

      Parameters:
      staged - value to be set
    • of

      factory method
      Returns:
      instance of ProductChangeMasterVariantAction
    • of

      factory method to create a shallow copy ProductChangeMasterVariantAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      builder factory method for ProductChangeMasterVariantAction
      Returns:
      builder
    • builder

      create builder for ProductChangeMasterVariantAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductChangeMasterVariantAction

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