Interface CartSetCountryAction
- All Superinterfaces:
CartUpdateAction,ResourceUpdateAction<CartUpdateAction>
Setting the country can lead to changes in the LineItem prices.
Example to create an instance using the builder pattern
CartSetCountryAction cartSetCountryAction = CartSetCountryAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartSetCountryAction -
Method Summary
Modifier and TypeMethodDescriptionstatic CartSetCountryActionBuilderbuilder()builder factory method for CartSetCountryActionstatic CartSetCountryActionBuilderbuilder(CartSetCountryAction template) create builder for CartSetCountryAction instancecopyDeep()static CartSetCountryActiondeepCopy(CartSetCountryAction template) factory method to create a deep copy of CartSetCountryActionValue to set.static CartSetCountryActionof()factory methodstatic CartSetCountryActionof(CartSetCountryAction template) factory method to create a shallow copy CartSetCountryActionvoidsetCountry(String country) Value to set.static com.fasterxml.jackson.core.type.TypeReference<CartSetCountryAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCartSetCountryAction(Function<CartSetCountryAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_COUNTRY
discriminator value for CartSetCountryAction- See Also:
-
-
Method Details
-
getCountry
String getCountry()Value to set. If empty, any existing value is removed.
If the Cart is bound to a
store, the provided value must be included in the Store'scountries. Otherwise a CountryNotConfiguredInStore error is returned.- Returns:
- country
-
setCountry
Value to set. If empty, any existing value is removed.
If the Cart is bound to a
store, the provided value must be included in the Store'scountries. Otherwise a CountryNotConfiguredInStore error is returned.- Parameters:
country- value to be set
-
of
factory method- Returns:
- instance of CartSetCountryAction
-
of
factory method to create a shallow copy CartSetCountryAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartSetCountryAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
deepCopy
factory method to create a deep copy of CartSetCountryAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetCountryAction- Returns:
- builder
-
builder
create builder for CartSetCountryAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetCountryAction
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-