Interface CountryNotConfiguredInStoreError
- All Superinterfaces:
ErrorObject
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 and Create Order from Quote requests on Orders.
- Create Order in Store from Cart and Create Order from Quote requests on My Orders.
- Create Order by Import request on Order Import.
- Set Country update action 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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CountryNotConfiguredInStoreError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CountryNotConfiguredInStoreErrorbuilder(CountryNotConfiguredInStoreError template) create builder for CountryNotConfiguredInStoreError instancecopyDeep()deepCopy(CountryNotConfiguredInStoreError template) factory method to create a deep copy of CountryNotConfiguredInStoreError@NotNull StringgetCode()Error identifier.@NotNull StringThe 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 CountryNotConfiguredInStoreErrorvoidsetCountry(String country) The country that is not configured for the Store but referenced on the Cart or Order.voidsetMessage(String message) "The country $country is not configured for the store $store."voidsetStoreCountries(String... storeCountries) Countries configured for the Store.voidsetStoreCountries(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> Taccessor 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:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"The country $country is not configured for the store $store."- Specified by:
getMessagein 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:
setMessagein 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
-
copyDeep
CountryNotConfiguredInStoreError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-