public final class TaxCategoryUpdateActionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.taxcategories.TaxCategory>> |
buildChangeNameAction(io.sphere.sdk.taxcategories.TaxCategory oldTaxCategory,
io.sphere.sdk.taxcategories.TaxCategoryDraft newTaxCategory)
Compares the
name values of a TaxCategory and a TaxCategoryDraft
and returns an Optional of update action, which would contain the "changeName"
UpdateAction. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.taxcategories.TaxCategory>> |
buildSetDescriptionAction(io.sphere.sdk.taxcategories.TaxCategory oldTaxCategory,
io.sphere.sdk.taxcategories.TaxCategoryDraft newTaxCategory)
Compares the
description values of a TaxCategory and a TaxCategoryDraft
and returns an Optional of update action, which would contain the "setDescription"
UpdateAction. |
static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.taxcategories.TaxCategory>> |
buildTaxRateUpdateActions(io.sphere.sdk.taxcategories.TaxCategory oldTaxCategory,
io.sphere.sdk.taxcategories.TaxCategoryDraft newTaxCategory)
Compares the tax rates of a
TaxCategory and a TaxCategoryDraft and returns a list of
UpdateAction<TaxCategory> as a result. |
@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.taxcategories.TaxCategory>> buildChangeNameAction(@Nonnull
io.sphere.sdk.taxcategories.TaxCategory oldTaxCategory,
@Nonnull
io.sphere.sdk.taxcategories.TaxCategoryDraft newTaxCategory)
name values of a TaxCategory and a TaxCategoryDraft
and returns an Optional of update action, which would contain the "changeName"
UpdateAction. If both TaxCategory and TaxCategoryDraft have the same
name values, then no update action is needed and empty optional will be returned.oldTaxCategory - the tax category that should be updated.newTaxCategory - the tax category draft which contains the new name.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.taxcategories.TaxCategory>> buildSetDescriptionAction(@Nonnull
io.sphere.sdk.taxcategories.TaxCategory oldTaxCategory,
@Nonnull
io.sphere.sdk.taxcategories.TaxCategoryDraft newTaxCategory)
description values of a TaxCategory and a TaxCategoryDraft
and returns an Optional of update action, which would contain the "setDescription"
UpdateAction. If both TaxCategory and TaxCategoryDraft have the same
description values, then no update action is needed and empty optional will be returned.oldTaxCategory - the tax category that should be updated.newTaxCategory - the tax category draft which contains the new description.@Nonnull
public static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.taxcategories.TaxCategory>> buildTaxRateUpdateActions(@Nonnull
io.sphere.sdk.taxcategories.TaxCategory oldTaxCategory,
@Nonnull
io.sphere.sdk.taxcategories.TaxCategoryDraft newTaxCategory)
TaxCategory and a TaxCategoryDraft and returns a list of
UpdateAction<TaxCategory> as a result. If both the TaxCategory and
the TaxCategoryDraft have identical tax rates, then no update action is needed and hence an empty
List is returned.oldTaxCategory - the tax category which should be updated.newTaxCategory - the tax category draft where we get the key.