Interface MissingTaxRateForCountryError
- All Superinterfaces:
ErrorObject
Returned when the Tax Category of at least one of the lineItems, customLineItems, or shippingInfo in the Cart is missing the TaxRate matching country and state given in the shippingAddress of that Cart.
The error can be returned as a failed response to all update actions on Carts and Staged Orders.
The error is also returned as a failed response to:
- Authenticate (sign in) Customer and Authenticate (sign in) Customer in Store requests and Set CustomerGroup update action on Customers.
- Authenticate (sign in) Customer and Authenticate (sign in) Customer in Store on My Customer Profile.
- Create Cart, Create Cart in Store, Replicate Cart, and Replicate Cart in Store requests on Carts.
- Create Cart and Create Cart in Store and Replicate My Cart requests on My Carts.
- Create Cart in BusinessUnit and Replicate Cart in Business Unit requests on Associate Carts.
- Create Order from Cart and Create Order in Store from Cart requests on Orders.
- Create Order from Cart and Create Order in Store from Cart requests on My Orders.
- Create Order from Cart in BusinessUnit requests on Associate Orders.
Example to create an instance using the builder pattern
MissingTaxRateForCountryError missingTaxRateForCountryError = MissingTaxRateForCountryError.builder()
.message("{message}")
.taxCategoryId("{taxCategoryId}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for MissingTaxRateForCountryError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for MissingTaxRateForCountryErrorbuilder(MissingTaxRateForCountryError template) create builder for MissingTaxRateForCountryError instancecopyDeep()deepCopy(MissingTaxRateForCountryError template) factory method to create a deep copy of MissingTaxRateForCountryError@NotNull StringgetCode()Error identifier.Country code of the geographic location.@NotNull String"Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."getState()State within the country, such as Texas in the United States.@NotNull StringUnique identifier of the TaxCategory.of()factory methodof(MissingTaxRateForCountryError template) factory method to create a shallow copy MissingTaxRateForCountryErrorvoidsetCountry(String country) Country code of the geographic location.voidsetMessage(String message) "Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."voidState within the country, such as Texas in the United States.voidsetTaxCategoryId(String taxCategoryId) Unique identifier of the TaxCategory.static com.fasterxml.jackson.core.type.TypeReference<MissingTaxRateForCountryError>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
-
MISSING_TAX_RATE_FOR_COUNTRY
discriminator value for MissingTaxRateForCountryError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
getTaxCategoryId
Unique identifier of the TaxCategory.
- Returns:
- taxCategoryId
-
getCountry
String getCountry()Country code of the geographic location.
- Returns:
- country
-
getState
String getState()State within the country, such as Texas in the United States.
- Returns:
- state
-
setMessage
"Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setTaxCategoryId
Unique identifier of the TaxCategory.
- Parameters:
taxCategoryId- value to be set
-
setCountry
Country code of the geographic location.
- Parameters:
country- value to be set
-
setState
State within the country, such as Texas in the United States.
- Parameters:
state- value to be set
-
of
factory method- Returns:
- instance of MissingTaxRateForCountryError
-
of
factory method to create a shallow copy MissingTaxRateForCountryError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
MissingTaxRateForCountryError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
@Nullable static MissingTaxRateForCountryError deepCopy(@Nullable MissingTaxRateForCountryError template) factory method to create a deep copy of MissingTaxRateForCountryError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MissingTaxRateForCountryError- Returns:
- builder
-
builder
create builder for MissingTaxRateForCountryError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withMissingTaxRateForCountryError
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
-