/** * Action to add/change a custom attribute. * * @param setter the serializer of the attribute * @param value the value to set * @param <T> type of the attribute * @return update action */ public static <T> SetAttributeInAllVariants of(final NamedAttributeAccess<T> setter, final T value) { return of(setter, value, null); }
/** * Creates a copied update action initialized with the given parameter, the rest of the parameters are copied from the original object. * @param label The image label. * @return new object initialized with the copied values from the original object */ public SetImageLabel withLabel(final String label) { return new SetImageLabel(getVariantId(), getImageUrl(), label, isStaged()); }
/** * Action to remove a custom attribute. * * @param variantId the variant the attribute value should be unset * @param NamedAttributeAccess object containing the name of the attribute * @param <T> type of the attribute * @return update action */ public static <T> SetAttribute ofUnsetAttributeForVariantId(final Integer variantId, final NamedAttributeAccess<T> NamedAttributeAccess) { return ofUnsetAttributeForVariantId(variantId, NamedAttributeAccess, null); }
/** * Action to add/change a custom attribute. * * @param variantId the variant the attribute value should be set or unset * @param attribute the name and the value of the attribute to update * @return update action */ public static SetAttribute of(final Integer variantId, final AttributeDraft attribute) { return of(variantId, attribute, null); }
/** * Action to add/remove/change a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @param value embedded in an optional the new value of the attribute or an empty Optional to remove the value from the attribute * @param productUpdateScope the scope where the attribute should be updated * @return update action */ public static SetAttributeInAllVariants of(final String name, final Optional<JsonNode> value, final ProductUpdateScope productUpdateScope) { return new SetAttributeInAllVariants(name, value, productUpdateScope); }
/** * Action to remove a price * * @param price the price to remove including an ID * @return action */ public static RemovePrice of(final Price price) { return of(price, null); }
/** * Action to add/remove/change a custom attribute. * * @param variantId the variant the attribute value should be set or unset * @param name the name of the attribute, consult the product type to find the name * @param value embedded in an optional the new value of the attribute or an empty Optional to remove the value from the attribute * @param productUpdateScope the scope where the attribute should be updated * @return update action */ public static SetAttribute of(final int variantId, final String name, final Optional<JsonNode> value, final ProductUpdateScope productUpdateScope) { return new SetAttribute(variantId, name, value, productUpdateScope); }
/** * Action to remove a custom attribute. * * @param variantId the variant the attribute value should be unset * @param NamedAttributeAccess object containing the name of the attribute * @param <T> type of the attribute * @return update action */ public static <T> SetAttribute ofUnsetAttribute(final Integer variantId, final NamedAttributeAccess<T> NamedAttributeAccess) { return ofUnsetAttribute(variantId, NamedAttributeAccess, null); }
/** * Action to remove a custom attribute. * * @param NamedAttributeAccess object containing the name of the attribute * @param <T> type of the attribute * @return update action */ public static <T> SetAttributeInAllVariants ofUnsetAttribute(final NamedAttributeAccess<T> NamedAttributeAccess) { return ofUnsetAttribute(NamedAttributeAccess, null); }
/** * Action to add/change a custom attribute. * * @param variantId the variant the attribute value should be set or unset * @param attribute the name and the value of the attribute to update * @return update action */ public static SetAttribute ofVariantId(final Integer variantId, final AttributeDraft attribute) { return ofVariantId(variantId, attribute, null); }
/** * Action to add/change a custom attribute. * * @param sku * @param setter the serializer of the attribute * @param value the value to set * @param <T> type of the attribute * @return update action */ public static <T> SetAttribute ofSku(final String sku, final NamedAttributeAccess<T> setter, final T value) { return ofSku(sku, setter, value, null); }
/** * Action to remove a custom attribute. * @param sku * @param name the name of the attribute, consult the product type to find the name * @return update action */ public static SetAttribute ofUnsetAttributeForSku(final String sku, final String name) { return ofUnsetAttributeForSku(sku, name, null); }
/** * Action to add/remove/change a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @param value embedded in an optional the new value of the attribute or an empty Optional to remove the value from the attribute * @return update action */ public static SetAttributeInAllVariants of(final String name, final JsonNode value) { return of(name, value, null); }
/** * Action to add/change a custom attribute. * * @param variantId the variant the attribute value should be set or unset * @param setter the serializer of the attribute * @param value the value to set * @param <T> type of the attribute * @return update action */ public static <T> SetAttribute of(final Integer variantId, final NamedAttributeAccess<T> setter, final T value) { return of(variantId, setter, value, null); }
/** * Action to add/remove/change a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @param value embedded in an optional the new value of the attribute or an empty Optional to remove the value from the attribute * @return update action */ public static SetAttributeInAllVariants of(final String name, final JsonNode value) { return new SetAttributeInAllVariants(name, value); }
/** * Action to remove a custom attribute. * @param variantId the variant the attribute value should be unset * @param name the name of the attribute, consult the product type to find the name * @return update action */ public static SetAttribute ofUnsetAttributeForVariantId(final Integer variantId, final String name) { return ofUnsetAttributeForVariantId(variantId, name, null); }
/** * Action to remove a custom attribute. * @param variantId the variant the attribute value should be unset * @param name the name of the attribute, consult the product type to find the name * @return update action */ public static SetAttribute ofUnsetAttribute(final Integer variantId, final String name) { return ofUnsetAttribute(variantId, name, null); }
/** * Action to remove a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @return update action */ public static SetAttributeInAllVariants ofUnsetAttribute(final String name) { return ofUnsetAttribute(name, null); }
/** * Action to remove a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @return update action */ public static SetAttributeInAllVariants ofUnsetAttribute(final String name) { return of(name, null); }
/** * Action to remove a custom attribute. * @param variantId the variant the attribute value should be unset * @param name the name of the attribute, consult the product type to find the name * @return update action */ public static SetAttribute ofUnsetAttributeForVariantId(final Integer variantId, final String name) { return ofUnsetAttributeForVariantId(variantId, name, null); }