public final class CartDiscountUpdateActionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeCartPredicateUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the cartPredicates of a
CartDiscount and a CartDiscountDraft and
returns an UpdateAction<CartDiscount> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeIsActiveUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
Boolean isActive values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeNameUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
LocalizedString names of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeRequiresDiscountCodeUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
Boolean requiresDiscountCode values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeSortOrderUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the sortOrder values of a
CartDiscount and a CartDiscountDraft and
returns an UpdateAction<CartDiscount> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeStackingModeUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
StackingMode stacking modes of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeTargetUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the cart discount target values of a
CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildChangeValueUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the cart discount values of a
CartDiscount and a CartDiscountDraft and
returns an UpdateAction<CartDiscount> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildSetDescriptionUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
LocalizedString descriptions of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildSetValidDatesUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
ZonedDateTime validFrom and ZonedDateTime validUntil values of a
CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildSetValidFromUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
ZonedDateTime validFrom values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> |
buildSetValidUntilUpdateAction(io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Compares the
ZonedDateTime validUntil values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. |
@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeValueUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
CartDiscount and a CartDiscountDraft and
returns an UpdateAction<CartDiscount> as a result in an Optional.
If both the CartDiscount and the CartDiscountDraft have the same cart discount
value, then no update action is needed and hence an empty Optional is returned.
Note: Order is not significant when comparing AbsoluteCartDiscountValues
oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new cart discount value.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeCartPredicateUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
CartDiscount and a CartDiscountDraft and
returns an UpdateAction<CartDiscount> as a result in an Optional.
If both the CartDiscount and the CartDiscountDraft have the same cartPredicate,
then no update action is needed and hence an empty Optional is returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new cartPredicate.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeTargetUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same cart discount target, then no update action is needed and hence an empty Optional is returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new cart discount target.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeIsActiveUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Boolean isActive values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same 'isActive' value, then no update action is needed and hence an empty Optional
is returned.
Note: A null isActive value in the CartDiscount is treated as a
true value which is the default value of CTP.
oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new isActive.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeNameUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
LocalizedString names of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same name, then no update action is needed and hence an empty Optional is returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new name.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildSetDescriptionUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
LocalizedString descriptions of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same description, then no update action is needed and hence an empty Optional is
returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new description.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeSortOrderUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
CartDiscount and a CartDiscountDraft and
returns an UpdateAction<CartDiscount> as a result in an Optional.
If both the CartDiscount and the CartDiscountDraft have the same sortOrder,
then no update action is needed and hence an empty Optional is returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new sortOrder.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeRequiresDiscountCodeUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
Boolean requiresDiscountCode values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same requiresDiscountCode value, then no update action is needed and hence an empty Optional is returned.
Note: A null requiresDiscountCode value in the CartDiscount is
treated as a false value which is the default value of CTP.
oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new 'requiresDiscountCode'.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildSetValidFromUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
ZonedDateTime validFrom values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same validFrom, then no update action is needed and hence an empty Optional is
returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new validFrom.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildSetValidUntilUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
ZonedDateTime validUntil values of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same validUntil, then no update action is needed and hence an empty Optional is
returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new validUntil.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildSetValidDatesUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
ZonedDateTime validFrom and ZonedDateTime validUntil values of a
CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result in an Optional. - If both the
CartDiscount and the CartDiscountDraft have different validFrom and same
validUntil values, then 'setValidFrom' update action returned. - If both the CartDiscount and the CartDiscountDraft have the same validFrom and different
validUntil values, then 'setValidUntil' update action returned. - If both the CartDiscount and the CartDiscountDraft have different validFrom and different
validUntil values, then 'setValidFromAndUntil' update action returned. - If both the CartDiscount and the CartDiscountDraft have same validFrom and validUntil values, then
no update action is needed and hence an empty Optional is returned.oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new validFrom and validUntil.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.cartdiscounts.CartDiscount>> buildChangeStackingModeUpdateAction(@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscount oldCartDiscount,
@Nonnull
io.sphere.sdk.cartdiscounts.CartDiscountDraft newCartDiscount)
StackingMode stacking modes of a CartDiscount and a CartDiscountDraft and returns an UpdateAction<CartDiscount> as a result
in an Optional. If both the CartDiscount and the CartDiscountDraft have
the same stacking mode, then no update action is needed and hence an empty Optional is
returned.
Note: A null stackingMode value in the CartDiscount is treated as a
StackingMode.STACKING value which is the default value of CTP.
oldCartDiscount - the cart discount which should be updated.newCartDiscount - the cart discount draft where we get the new stacking mode.