Interface CountryNotConfiguredInStoreError
- All Superinterfaces:
ErrorObject
- All Known Implementing Classes:
CountryNotConfiguredInStoreErrorImpl
Returned when a Cart or an Order in a Store references a country that is not included in the countries configured for the Store.
The error is returned as a failed response to:
- Create Cart in Store request and Set Country update action on Carts.
- Create Cart in Store request and Set Country update action on My Carts.
- Create Order in Store from Cart requests on Orders.
- Create Order in Store from Cart requests on My Orders.
- Create Order from Quote requests on Orders.
- Create Order from Quote requests on My Orders.
- Create Order by Import request on Order Import.
- Set Country on Order Edits.
Example to create an instance using the builder pattern
CountryNotConfiguredInStoreError countryNotConfiguredInStoreError = CountryNotConfiguredInStoreError.builder()
.message("{message}")
.plusStoreCountries(storeCountriesBuilder -> storeCountriesBuilder)
.country("{country}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CountryNotConfiguredInStoreError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CountryNotConfiguredInStoreErrorbuilder
(CountryNotConfiguredInStoreError template) create builder for CountryNotConfiguredInStoreError instancedeepCopy
(CountryNotConfiguredInStoreError template) factory method to create a deep copy of CountryNotConfiguredInStoreError@NotNull String
getCode()
Error identifier.@NotNull String
The country that is not configured for the Store but referenced on the Cart or Order.@NotNull String
"The country $country is not configured for the store $store."
Countries configured for the Store.of()
factory methodof
(CountryNotConfiguredInStoreError template) factory method to create a shallow copy CountryNotConfiguredInStoreErrorvoid
setCountry
(String country) The country that is not configured for the Store but referenced on the Cart or Order.void
setMessage
(String message) "The country $country is not configured for the store $store."
void
setStoreCountries
(String... storeCountries) Countries configured for the Store.void
setStoreCountries
(List<String> storeCountries) Countries configured for the Store.static com.fasterxml.jackson.core.type.TypeReference<CountryNotConfiguredInStoreError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
COUNTRY_NOT_CONFIGURED_IN_STORE
discriminator value for CountryNotConfiguredInStoreError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The country $country is not configured for the store $store."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getStoreCountries
Countries configured for the Store.
- Returns:
- storeCountries
-
getCountry
The country that is not configured for the Store but referenced on the Cart or Order.
- Returns:
- country
-
setMessage
"The country $country is not configured for the store $store."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setStoreCountries
Countries configured for the Store.
- Parameters:
storeCountries
- values to be set
-
setStoreCountries
Countries configured for the Store.
- Parameters:
storeCountries
- values to be set
-
setCountry
The country that is not configured for the Store but referenced on the Cart or Order.
- Parameters:
country
- value to be set
-
of
factory method- Returns:
- instance of CountryNotConfiguredInStoreError
-
of
factory method to create a shallow copy CountryNotConfiguredInStoreError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CountryNotConfiguredInStoreError deepCopy(@Nullable CountryNotConfiguredInStoreError template) factory method to create a deep copy of CountryNotConfiguredInStoreError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CountryNotConfiguredInStoreError- Returns:
- builder
-
builder
create builder for CountryNotConfiguredInStoreError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCountryNotConfiguredInStoreError
default <T> T withCountryNotConfiguredInStoreError(Function<CountryNotConfiguredInStoreError, 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<CountryNotConfiguredInStoreError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-