Interface UnauthorizedError
- All Superinterfaces:
ErrorObject
Returned when one of the following conditions occurs:
- A Customer reference (for example,
associates[*].customerorinheritedAssociates[*].customer) is expanded on the My Business Unit endpoint. - A Cart Discount cannot be modified due to missing permissions for its assigned Stores.
Example to create an instance using the builder pattern
UnauthorizedError unauthorizedError = UnauthorizedError.builder()
.message("{message}")
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic UnauthorizedErrorBuilderbuilder()builder factory method for UnauthorizedErrorstatic UnauthorizedErrorBuilderbuilder(UnauthorizedError template) create builder for UnauthorizedError instancecopyDeep()static UnauthorizedErrordeepCopy(UnauthorizedError template) factory method to create a deep copy of UnauthorizedError@NotNull StringgetCode()Error identifier.@NotNull String"Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."Keys of Stores for which the required permission to modify is missing.static UnauthorizedErrorof()factory methodstatic UnauthorizedErrorof(UnauthorizedError template) factory method to create a shallow copy UnauthorizedErrorvoidsetMessage(String message) "Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."voidsetStoresWithoutPermission(String... storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.voidsetStoresWithoutPermission(List<String> storesWithoutPermission) Keys of Stores for which the required permission to modify is missing.static tools.jackson.core.type.TypeReference<UnauthorizedError>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithUnauthorizedError(Function<UnauthorizedError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
UNAUTHORIZED
discriminator value for UnauthorizedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
getStoresWithoutPermission
Keys of Stores for which the required permission to modify is missing.
This field is returned only for Cart Discounts.
- Returns:
- storesWithoutPermission
-
setMessage
"Customer reference expansion not permitted on my business unit"or"Not allowed to edit this CartDiscount."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setStoresWithoutPermission
Keys of Stores for which the required permission to modify is missing.
This field is returned only for Cart Discounts.
- Parameters:
storesWithoutPermission- values to be set
-
setStoresWithoutPermission
Keys of Stores for which the required permission to modify is missing.
This field is returned only for Cart Discounts.
- Parameters:
storesWithoutPermission- values to be set
-
of
factory method- Returns:
- instance of UnauthorizedError
-
of
factory method to create a shallow copy UnauthorizedError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
UnauthorizedError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
factory method to create a deep copy of UnauthorizedError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for UnauthorizedError- Returns:
- builder
-
builder
create builder for UnauthorizedError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withUnauthorizedError
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
-