Class ProductPriceExternalDiscountSetMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductPriceExternalDiscountSetMessagePayload>
Example to create an instance using the builder pattern
ProductPriceExternalDiscountSetMessagePayload productPriceExternalDiscountSetMessagePayload = ProductPriceExternalDiscountSetMessagePayload.builder()
.variantId(1)
.priceId("{priceId}")
.staged(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductPriceExternalDiscountSetMessagePayload with checking for non-null required valuesbuilds ProductPriceExternalDiscountSetMessagePayload without checking for non-null required valuesdiscounted
(DiscountedPrice discounted) Discounted Price for the Product Variant for which Discount was set.Discounted Price for the Product Variant for which Discount was set.Discounted Price for the Product Variant for which Discount was set.Unique identifier of the Price.getSku()
SKU of the Product Variant for which Discount was set.Whether the update was only applied to the staged Product Projection.Unique identifier of the Product Variant for which the Discount was set.Key of the Product Variant for which the Discount was set.of()
factory method for an instance of ProductPriceExternalDiscountSetMessagePayloadBuildercreate builder for ProductPriceExternalDiscountSetMessagePayload instanceUnique identifier of the Price.SKU of the Product Variant for which Discount was set.Whether the update was only applied to the staged Product Projection.Unique identifier of the Product Variant for which the Discount was set.variantKey
(String variantKey) Key of the Product Variant for which the Discount was set.Discounted Price for the Product Variant for which Discount was set.
-
Constructor Details
-
ProductPriceExternalDiscountSetMessagePayloadBuilder
public ProductPriceExternalDiscountSetMessagePayloadBuilder()
-
-
Method Details
-
variantId
Unique identifier of the Product Variant for which the Discount was set.
- Parameters:
variantId
- value to be set- Returns:
- Builder
-
variantKey
Key of the Product Variant for which the Discount was set.
- Parameters:
variantKey
- value to be set- Returns:
- Builder
-
sku
SKU of the Product Variant for which Discount was set.
- Parameters:
sku
- value to be set- Returns:
- Builder
-
priceId
Unique identifier of the Price.
- Parameters:
priceId
- value to be set- Returns:
- Builder
-
discounted
public ProductPriceExternalDiscountSetMessagePayloadBuilder discounted(Function<DiscountedPriceBuilder, DiscountedPriceBuilder> builder) Discounted Price for the Product Variant for which Discount was set.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public ProductPriceExternalDiscountSetMessagePayloadBuilder withDiscounted(Function<DiscountedPriceBuilder, DiscountedPrice> builder) Discounted Price for the Product Variant for which Discount was set.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
public ProductPriceExternalDiscountSetMessagePayloadBuilder discounted(@Nullable DiscountedPrice discounted) Discounted Price for the Product Variant for which Discount was set.
- Parameters:
discounted
- value to be set- Returns:
- Builder
-
staged
Whether the update was only applied to the staged Product Projection.
- Parameters:
staged
- value to be set- Returns:
- Builder
-
getVariantId
Unique identifier of the Product Variant for which the Discount was set.
- Returns:
- variantId
-
getVariantKey
Key of the Product Variant for which the Discount was set.
- Returns:
- variantKey
-
getSku
SKU of the Product Variant for which Discount was set.
- Returns:
- sku
-
getPriceId
Unique identifier of the Price.
- Returns:
- priceId
-
getDiscounted
Discounted Price for the Product Variant for which Discount was set.
- Returns:
- discounted
-
getStaged
Whether the update was only applied to the staged Product Projection.
- Returns:
- staged
-
build
builds ProductPriceExternalDiscountSetMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductPriceExternalDiscountSetMessagePayload>
- Returns:
- ProductPriceExternalDiscountSetMessagePayload
-
buildUnchecked
builds ProductPriceExternalDiscountSetMessagePayload without checking for non-null required values- Returns:
- ProductPriceExternalDiscountSetMessagePayload
-
of
factory method for an instance of ProductPriceExternalDiscountSetMessagePayloadBuilder- Returns:
- builder
-
of
public static ProductPriceExternalDiscountSetMessagePayloadBuilder of(ProductPriceExternalDiscountSetMessagePayload template) create builder for ProductPriceExternalDiscountSetMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-