/** * 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 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 * @return update action */ public static SetAttribute of(final Integer variantId, final String name, @Nullable final JsonNode value) { return new SetAttribute(variantId, name, value); }
public static SetAttribute ofSku(final String sku, final String name, @Nullable final JsonNode value, @Nullable final Boolean staged) { return new SetAttribute(null, sku, name, value, staged); }
public static SetAttribute ofVariantId(final Integer variantId, final String name, @Nullable final JsonNode value, @Nullable final Boolean staged) { return new SetAttribute(variantId, null, name, value, staged); }
public static SetAttribute ofVariantId(final Integer variantId, final String name, @Nullable final JsonNode value, @Nullable final Boolean staged) { return new SetAttribute(variantId, null, name, value, staged); }
public static SetAttribute ofSku(final String sku, final String name, @Nullable final JsonNode value, @Nullable final Boolean staged) { return new SetAttribute(null, sku, name, value, staged); }
public static SetAttribute ofVariantId(final Integer variantId, final String name, @Nullable final Object value, @Nullable final Boolean staged) { return new SetAttribute(variantId, null, name, SphereJsonUtils.toJsonNode(value), staged); }
public static SetAttribute ofSku(final String sku, final String name, @Nullable final Object value, @Nullable final Boolean staged) { return new SetAttribute(null, sku, name, SphereJsonUtils.toJsonNode(value), staged); }
public static SetAttribute ofVariantId(final Integer variantId, final String name, @Nullable final Object value, @Nullable final Boolean staged) { return new SetAttribute(variantId, null, name, SphereJsonUtils.toJsonNode(value), staged); }
public static SetAttribute ofSku(final String sku, final String name, @Nullable final Object value, @Nullable final Boolean staged) { return new SetAttribute(null, sku, name, SphereJsonUtils.toJsonNode(value), staged); }