Class TextLineItemCustomActionBuilder
- java.lang.Object
-
- com.commercetools.sync.shoppinglists.utils.TextLineItemCustomActionBuilder
-
- All Implemented Interfaces:
GenericCustomActionBuilder<io.sphere.sdk.shoppinglists.ShoppingList>
public final class TextLineItemCustomActionBuilder extends java.lang.Object implements GenericCustomActionBuilder<io.sphere.sdk.shoppinglists.ShoppingList>
-
-
Constructor Summary
Constructors Constructor Description TextLineItemCustomActionBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList>
buildRemoveCustomTypeAction(java.lang.Integer variantId, java.lang.String textLineItemId)
Creates a CTP "setCustomType" update action on the given resourceT
that removes the custom type set on the given resourceT
.io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList>
buildSetCustomFieldAction(java.lang.Integer variantId, java.lang.String textLineItemId, java.lang.String customFieldName, com.fasterxml.jackson.databind.JsonNode customFieldValue)
Creates a CTP "setCustomField" update action on the given resourceT
that updates a custom field withcustomFieldName
and acustomFieldValue
on the given resourceT
.io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList>
buildSetCustomTypeAction(java.lang.Integer variantId, java.lang.String textLineItemId, java.lang.String customTypeId, java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> customFieldsJsonMap)
Creates a CTP "setCustomType" update action on the given resourceT
.
-
-
-
Method Detail
-
buildRemoveCustomTypeAction
@Nonnull public io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList> buildRemoveCustomTypeAction(@Nullable java.lang.Integer variantId, @Nullable java.lang.String textLineItemId)
Description copied from interface:GenericCustomActionBuilder
Creates a CTP "setCustomType" update action on the given resourceT
that removes the custom type set on the given resourceT
. If the resource that has the custom fields is a secondary resource (e.g. price or asset) and not a primary resource (e.g Category, Product, Channel, etc..), thevariantId
and theobjectId
will be used to identify this secondary resource within its container.- Specified by:
buildRemoveCustomTypeAction
in interfaceGenericCustomActionBuilder<io.sphere.sdk.shoppinglists.ShoppingList>
- Parameters:
variantId
- an optional field which could be used to identify the variant that holds the a resource (e.g. asset) which has the custom fields.textLineItemId
- an optional field which could be used to identify the id of the resource (e.g. asset, price, etc..) which has the custom fields.- Returns:
- a setCustomType update action that removes the custom type from the resource it's requested on.
-
buildSetCustomTypeAction
@Nonnull public io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList> buildSetCustomTypeAction(@Nullable java.lang.Integer variantId, @Nullable java.lang.String textLineItemId, @Nonnull java.lang.String customTypeId, @Nullable java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> customFieldsJsonMap)
Description copied from interface:GenericCustomActionBuilder
Creates a CTP "setCustomType" update action on the given resourceT
. If the resource that has the custom fields is a secondary resource (e.g. Price or asset) and not a primary resource (e.g Category, Product, Channel, etc..), thevariantId
and theobjectId
will be used to identify this secondary resource within its container.- Specified by:
buildSetCustomTypeAction
in interfaceGenericCustomActionBuilder<io.sphere.sdk.shoppinglists.ShoppingList>
- Parameters:
variantId
- an optional field which could be used to identify the variant that holds the a resource (e.g. asset) which has the custom fields.textLineItemId
- an optional field which could be used to identify the id of the resource (e.g. asset, price, etc..) which has the custom fields.customTypeId
- the id of the new custom type.customFieldsJsonMap
- the custom fields map of JSON values.- Returns:
- a setCustomType update action of the type of the resource it's requested on.
-
buildSetCustomFieldAction
@Nonnull public io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.shoppinglists.ShoppingList> buildSetCustomFieldAction(@Nullable java.lang.Integer variantId, @Nullable java.lang.String textLineItemId, @Nullable java.lang.String customFieldName, @Nullable com.fasterxml.jackson.databind.JsonNode customFieldValue)
Description copied from interface:GenericCustomActionBuilder
Creates a CTP "setCustomField" update action on the given resourceT
that updates a custom field withcustomFieldName
and acustomFieldValue
on the given resourceT
. If the resource that has the custom fields is a secondary resource (e.g. Price or asset) and not a primary resource (e.g Category, Product, Channel, etc..), thevariantId
and theobjectId
will be used to identify this secondary resource within its container.- Specified by:
buildSetCustomFieldAction
in interfaceGenericCustomActionBuilder<io.sphere.sdk.shoppinglists.ShoppingList>
- Parameters:
variantId
- an optional field which could be used to identify the variant that holds the a resource (e.g. asset) which has the custom fields.textLineItemId
- an optional field which could be used to identify the id of the resource (e.g. asset, price, etc..) which has the custom fields.customFieldName
- the name of the custom field to update.customFieldValue
- the new JSON value of the custom field.- Returns:
- a setCustomField update action on the provided field name, with the provided value on the resource it's requested on.
-
-