Class StandalonePriceAddPriceTierActionBuilder
java.lang.Object
com.commercetools.api.models.standalone_price.StandalonePriceAddPriceTierActionBuilder
- All Implemented Interfaces:
Builder<StandalonePriceAddPriceTierAction>
public class StandalonePriceAddPriceTierActionBuilder
extends Object
implements Builder<StandalonePriceAddPriceTierAction>
StandalonePriceAddPriceTierActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
StandalonePriceAddPriceTierAction standalonePriceAddPriceTierAction = StandalonePriceAddPriceTierAction.builder()
.tier(tierBuilder -> tierBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StandalonePriceAddPriceTierAction with checking for non-null required valuesbuilds StandalonePriceAddPriceTierAction without checking for non-null required valuesgetTier()
of()
factory method for an instance of StandalonePriceAddPriceTierActionBuilderof
(StandalonePriceAddPriceTierAction template) create builder for StandalonePriceAddPriceTierAction instancetier
(PriceTierDraft tier) withTier
(Function<PriceTierDraftBuilder, PriceTierDraft> builder)
-
Constructor Details
-
StandalonePriceAddPriceTierActionBuilder
public StandalonePriceAddPriceTierActionBuilder()
-
-
Method Details
-
tier
public StandalonePriceAddPriceTierActionBuilder tier(Function<PriceTierDraftBuilder, PriceTierDraftBuilder> builder) The PriceTier to be added to the
tiers
field of the StandalonePrice. The action returns an InvalidField error in the following cases:- Trying to add a PriceTier with
minimumQuantity
<2
. - Trying to add a PriceTier with
minimumQuantity
that already exists for the StandalonePrice.
- Parameters:
builder
- function to build the tier value- Returns:
- Builder
- Trying to add a PriceTier with
-
withTier
public StandalonePriceAddPriceTierActionBuilder withTier(Function<PriceTierDraftBuilder, PriceTierDraft> builder) The PriceTier to be added to the
tiers
field of the StandalonePrice. The action returns an InvalidField error in the following cases:- Trying to add a PriceTier with
minimumQuantity
<2
. - Trying to add a PriceTier with
minimumQuantity
that already exists for the StandalonePrice.
- Parameters:
builder
- function to build the tier value- Returns:
- Builder
- Trying to add a PriceTier with
-
tier
The PriceTier to be added to the
tiers
field of the StandalonePrice. The action returns an InvalidField error in the following cases:- Trying to add a PriceTier with
minimumQuantity
<2
. - Trying to add a PriceTier with
minimumQuantity
that already exists for the StandalonePrice.
- Parameters:
tier
- value to be set- Returns:
- Builder
- Trying to add a PriceTier with
-
getTier
The PriceTier to be added to the
tiers
field of the StandalonePrice. The action returns an InvalidField error in the following cases:- Trying to add a PriceTier with
minimumQuantity
<2
. - Trying to add a PriceTier with
minimumQuantity
that already exists for the StandalonePrice.
- Returns:
- tier
- Trying to add a PriceTier with
-
build
builds StandalonePriceAddPriceTierAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StandalonePriceAddPriceTierAction>
- Returns:
- StandalonePriceAddPriceTierAction
-
buildUnchecked
builds StandalonePriceAddPriceTierAction without checking for non-null required values- Returns:
- StandalonePriceAddPriceTierAction
-
of
factory method for an instance of StandalonePriceAddPriceTierActionBuilder- Returns:
- builder
-
of
public static StandalonePriceAddPriceTierActionBuilder of(StandalonePriceAddPriceTierAction template) create builder for StandalonePriceAddPriceTierAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-