Interface MissingRoleOnChannelError
- All Superinterfaces:
ErrorObject
Returned when one of the following states occur:
- Channel is added or set on a Store with missing Channel
roles
. - Standalone Price references a Channel that does not contain the
ProductDistribution
role.
The error is returned as a failed response to:
- Add Distribution Channel, Set Distribution Channel, Add Supply Channel, and Set Supply Channel update actions.
- Create StandalonePrice request.
Example to create an instance using the builder pattern
MissingRoleOnChannelError missingRoleOnChannelError = MissingRoleOnChannelError.builder()
.message("{message}")
.missingRole(ChannelRoleEnum.INVENTORY_SUPPLY)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for MissingRoleOnChannelError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MissingRoleOnChannelErrorbuilder
(MissingRoleOnChannelError template) create builder for MissingRoleOnChannelError instancestatic MissingRoleOnChannelError
deepCopy
(MissingRoleOnChannelError template) factory method to create a deep copy of MissingRoleOnChannelError@Valid ChannelResourceIdentifier
ResourceIdentifier to a given Channel.@NotNull String
getCode()
Error identifier.@NotNull String
"Given channel with $idOrKeyOfChannel does not have the required role $role."
@NotNull ChannelRoleEnum
ProductDistribution
for Product Distribution Channels allowed for the Store.static MissingRoleOnChannelError
of()
factory methodstatic MissingRoleOnChannelError
of
(MissingRoleOnChannelError template) factory method to create a shallow copy MissingRoleOnChannelErrorvoid
setChannel
(ChannelResourceIdentifier channel) ResourceIdentifier to a given Channel.void
setMessage
(String message) "Given channel with $idOrKeyOfChannel does not have the required role $role."
void
setMissingRole
(ChannelRoleEnum missingRole) ProductDistribution
for Product Distribution Channels allowed for the Store.static com.fasterxml.jackson.core.type.TypeReference<MissingRoleOnChannelError>
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
-
MISSING_ROLE_ON_CHANNEL
discriminator value for MissingRoleOnChannelError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Given channel with $idOrKeyOfChannel does not have the required role $role."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getChannel
ResourceIdentifier to a given Channel.
- Returns:
- channel
-
getMissingRole
ProductDistribution
for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupply
for Inventory Supply Channels allowed for the Store.
- Returns:
- missingRole
-
setMessage
"Given channel with $idOrKeyOfChannel does not have the required role $role."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setChannel
ResourceIdentifier to a given Channel.
- Parameters:
channel
- value to be set
-
setMissingRole
ProductDistribution
for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupply
for Inventory Supply Channels allowed for the Store.
- Parameters:
missingRole
- value to be set
-
of
factory method- Returns:
- instance of MissingRoleOnChannelError
-
of
factory method to create a shallow copy MissingRoleOnChannelError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MissingRoleOnChannelError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MissingRoleOnChannelError- Returns:
- builder
-
builder
create builder for MissingRoleOnChannelError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMissingRoleOnChannelError
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
-