Class StandalonePriceAddPriceTierActionBuilder
java.lang.Object
com.commercetools.api.models.standalone_price.StandalonePriceAddPriceTierActionBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<StandalonePriceAddPriceTierAction>
public class StandalonePriceAddPriceTierActionBuilder
extends Object
implements io.vrap.rmf.base.client.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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StandalonePriceAddPriceTierAction with checking for non-null required valuesbuilds StandalonePriceAddPriceTierAction without checking for non-null required valuesgetTier()
The PriceTier to be added to thetiers
field of the StandalonePrice.of()
factory method for an instance of StandalonePriceAddPriceTierActionBuilderof
(StandalonePriceAddPriceTierAction template) create builder for StandalonePriceAddPriceTierAction instancetier
(PriceTierDraft tier) The PriceTier to be added to thetiers
field of the StandalonePrice.The PriceTier to be added to thetiers
field of the StandalonePrice.withTier
(Function<PriceTierDraftBuilder, PriceTierDraft> builder) The PriceTier to be added to thetiers
field of the StandalonePrice.
-
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 interfaceio.vrap.rmf.base.client.Builder<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
-