Interface StandalonePriceSetValidFromAndUntilAction
- All Superinterfaces:
ResourceUpdateAction<StandalonePriceUpdateAction>
,StandalonePriceUpdateAction
Updating the validFrom
and validUntil
values generates the StandalonePriceValidFromAndUntilSet Message.
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
Example to create an instance using the builder pattern
StandalonePriceSetValidFromAndUntilAction standalonePriceSetValidFromAndUntilAction = StandalonePriceSetValidFromAndUntilAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for StandalonePriceSetValidFromAndUntilAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for StandalonePriceSetValidFromAndUntilActioncreate builder for StandalonePriceSetValidFromAndUntilAction instancefactory method to create a deep copy of StandalonePriceSetValidFromAndUntilActionValue to set.Value to set.of()
factory methodof
(StandalonePriceSetValidFromAndUntilAction template) factory method to create a shallow copy StandalonePriceSetValidFromAndUntilActionvoid
setValidFrom
(ZonedDateTime validFrom) Value to set.void
setValidUntil
(ZonedDateTime validUntil) Value to set.static com.fasterxml.jackson.core.type.TypeReference<StandalonePriceSetValidFromAndUntilAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStandalonePriceSetValidFromAndUntilAction
(Function<StandalonePriceSetValidFromAndUntilAction, T> helper) 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
-
SET_VALID_FROM_AND_UNTIL
discriminator value for StandalonePriceSetValidFromAndUntilAction- See Also:
-
-
Method Details
-
getValidFrom
ZonedDateTime getValidFrom()Value to set. If empty, any existing value is removed.
- Returns:
- validFrom
-
getValidUntil
ZonedDateTime getValidUntil()Value to set. If empty, any existing value is removed.
- Returns:
- validUntil
-
setValidFrom
Value to set. If empty, any existing value is removed.
- Parameters:
validFrom
- value to be set
-
setValidUntil
Value to set. If empty, any existing value is removed.
- Parameters:
validUntil
- value to be set
-
of
factory method- Returns:
- instance of StandalonePriceSetValidFromAndUntilAction
-
of
static StandalonePriceSetValidFromAndUntilAction of(StandalonePriceSetValidFromAndUntilAction template) factory method to create a shallow copy StandalonePriceSetValidFromAndUntilAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static StandalonePriceSetValidFromAndUntilAction deepCopy(@Nullable StandalonePriceSetValidFromAndUntilAction template) factory method to create a deep copy of StandalonePriceSetValidFromAndUntilAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StandalonePriceSetValidFromAndUntilAction- Returns:
- builder
-
builder
static StandalonePriceSetValidFromAndUntilActionBuilder builder(StandalonePriceSetValidFromAndUntilAction template) create builder for StandalonePriceSetValidFromAndUntilAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStandalonePriceSetValidFromAndUntilAction
default <T> T withStandalonePriceSetValidFromAndUntilAction(Function<StandalonePriceSetValidFromAndUntilAction, 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<StandalonePriceSetValidFromAndUntilAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-