Class ProductChangeMasterVariantActionImpl
java.lang.Object
com.commercetools.api.models.product.ProductChangeMasterVariantActionImpl
- All Implemented Interfaces:
ProductChangeMasterVariantAction
,ProductUpdateAction
,ResourceUpdateAction<ProductUpdateAction>
,io.vrap.rmf.base.client.ModelBase
public class ProductChangeMasterVariantActionImpl
extends Object
implements ProductChangeMasterVariantAction, io.vrap.rmf.base.client.ModelBase
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.product.ProductChangeMasterVariantAction
CHANGE_MASTER_VARIANT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getSku()
Thesku
of the ProductVariant to become the Master Variant.Iftrue
, only the staged Master Variant is changed.Theid
of the ProductVariant to become the Master Variant.int
hashCode()
void
Thesku
of the ProductVariant to become the Master Variant.void
Iftrue
, only the staged Master Variant is changed.void
setVariantId
(Long variantId) Theid
of the ProductVariant to become the Master Variant.toString()
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.product.ProductChangeMasterVariantAction
withProductChangeMasterVariantAction
Methods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
withProductUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Constructor Details
-
ProductChangeMasterVariantActionImpl
public ProductChangeMasterVariantActionImpl()create empty instance
-
-
Method Details
-
getAction
- Specified by:
getAction
in interfaceProductUpdateAction
- Specified by:
getAction
in interfaceResourceUpdateAction<ProductUpdateAction>
- Returns:
- action
-
getVariantId
The
id
of the ProductVariant to become the Master Variant.- Specified by:
getVariantId
in interfaceProductChangeMasterVariantAction
- Returns:
- variantId
-
getSku
The
sku
of the ProductVariant to become the Master Variant.- Specified by:
getSku
in interfaceProductChangeMasterVariantAction
- Returns:
- sku
-
getStaged
If
true
, only the staged Master Variant is changed. Iffalse
, both the current and staged Master Variant are changed.- Specified by:
getStaged
in interfaceProductChangeMasterVariantAction
- Returns:
- staged
-
setVariantId
Description copied from interface:ProductChangeMasterVariantAction
The
id
of the ProductVariant to become the Master Variant.- Specified by:
setVariantId
in interfaceProductChangeMasterVariantAction
- Parameters:
variantId
- value to be set
-
setSku
Description copied from interface:ProductChangeMasterVariantAction
The
sku
of the ProductVariant to become the Master Variant.- Specified by:
setSku
in interfaceProductChangeMasterVariantAction
- Parameters:
sku
- value to be set
-
setStaged
Description copied from interface:ProductChangeMasterVariantAction
If
true
, only the staged Master Variant is changed. Iffalse
, both the current and staged Master Variant are changed.- Specified by:
setStaged
in interfaceProductChangeMasterVariantAction
- Parameters:
staged
- value to be set
-
equals
-
hashCode
public int hashCode() -
toString
-