Interface CartSetShippingCustomTypeAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
This action sets, overwrites, or removes any existing Custom Type and Custom Fields for the Cart's shippingMethod
or shipping
.
Example to create an instance using the builder pattern
CartSetShippingCustomTypeAction cartSetShippingCustomTypeAction = CartSetShippingCustomTypeAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartSetShippingCustomTypeAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartSetShippingCustomTypeActionbuilder
(CartSetShippingCustomTypeAction template) create builder for CartSetShippingCustomTypeAction instancedeepCopy
(CartSetShippingCustomTypeAction template) factory method to create a deep copy of CartSetShippingCustomTypeAction@Valid FieldContainer
Sets the Custom Fields fields for theshippingMethod
.TheshippingKey
of the Shipping to customize.@Valid TypeResourceIdentifier
getType()
Defines the Type that extends the specified ShippingMethod with Custom Fields.of()
factory methodof
(CartSetShippingCustomTypeAction template) factory method to create a shallow copy CartSetShippingCustomTypeActionvoid
setFields
(FieldContainer fields) Sets the Custom Fields fields for theshippingMethod
.void
setShippingKey
(String shippingKey) TheshippingKey
of the Shipping to customize.void
Defines the Type that extends the specified ShippingMethod with Custom Fields.static com.fasterxml.jackson.core.type.TypeReference<CartSetShippingCustomTypeAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_SHIPPING_CUSTOM_TYPE
discriminator value for CartSetShippingCustomTypeAction- See Also:
-
-
Method Details
-
getShippingKey
String getShippingKey()The
shippingKey
of the Shipping to customize. Used to specify which Shipping Method to customize on a Cart withMultiple
ShippingMode. Leave this empty to customize the one and only ShippingMethod on aSingle
ShippingMode Cart.- Returns:
- shippingKey
-
getType
Defines the Type that extends the specified ShippingMethod with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ShippingMethod.
- Returns:
- type
-
getFields
Sets the Custom Fields fields for the
shippingMethod
.- Returns:
- fields
-
setShippingKey
The
shippingKey
of the Shipping to customize. Used to specify which Shipping Method to customize on a Cart withMultiple
ShippingMode. Leave this empty to customize the one and only ShippingMethod on aSingle
ShippingMode Cart.- Parameters:
shippingKey
- value to be set
-
setType
Defines the Type that extends the specified ShippingMethod with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ShippingMethod.
- Parameters:
type
- value to be set
-
setFields
Sets the Custom Fields fields for the
shippingMethod
.- Parameters:
fields
- value to be set
-
of
factory method- Returns:
- instance of CartSetShippingCustomTypeAction
-
of
factory method to create a shallow copy CartSetShippingCustomTypeAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CartSetShippingCustomTypeAction deepCopy(@Nullable CartSetShippingCustomTypeAction template) factory method to create a deep copy of CartSetShippingCustomTypeAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetShippingCustomTypeAction- Returns:
- builder
-
builder
create builder for CartSetShippingCustomTypeAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetShippingCustomTypeAction
default <T> T withCartSetShippingCustomTypeAction(Function<CartSetShippingCustomTypeAction, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<CartSetShippingCustomTypeAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-