Interface StandalonePriceAddPriceTierAction
- All Superinterfaces:
ResourceUpdateAction<StandalonePriceUpdateAction>
,StandalonePriceUpdateAction
Adding a PriceTier to a StandalonePrice produces the Standalone Price Tier Added Message.
Example to create an instance using the builder pattern
StandalonePriceAddPriceTierAction standalonePriceAddPriceTierAction = StandalonePriceAddPriceTierAction.builder()
.tier(tierBuilder -> tierBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for StandalonePriceAddPriceTierAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for StandalonePriceAddPriceTierActionbuilder
(StandalonePriceAddPriceTierAction template) create builder for StandalonePriceAddPriceTierAction instancedeepCopy
(StandalonePriceAddPriceTierAction template) factory method to create a deep copy of StandalonePriceAddPriceTierAction@NotNull @Valid PriceTierDraft
getTier()
The PriceTier to be added to thetiers
field of the StandalonePrice.of()
factory methodof
(StandalonePriceAddPriceTierAction template) factory method to create a shallow copy StandalonePriceAddPriceTierActionvoid
setTier
(PriceTierDraft tier) The PriceTier to be added to thetiers
field of the StandalonePrice.static com.fasterxml.jackson.core.type.TypeReference<StandalonePriceAddPriceTierAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.standalone_price.StandalonePriceUpdateAction
getAction, withStandalonePriceUpdateAction
-
Field Details
-
ADD_PRICE_TIER
discriminator value for StandalonePriceAddPriceTierAction- See Also:
-
-
Method Details
-
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
-
setTier
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
- Trying to add a PriceTier with
-
of
factory method- Returns:
- instance of StandalonePriceAddPriceTierAction
-
of
factory method to create a shallow copy StandalonePriceAddPriceTierAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static StandalonePriceAddPriceTierAction deepCopy(@Nullable StandalonePriceAddPriceTierAction template) factory method to create a deep copy of StandalonePriceAddPriceTierAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StandalonePriceAddPriceTierAction- Returns:
- builder
-
builder
create builder for StandalonePriceAddPriceTierAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStandalonePriceAddPriceTierAction
default <T> T withStandalonePriceAddPriceTierAction(Function<StandalonePriceAddPriceTierAction, 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<StandalonePriceAddPriceTierAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-