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
ProductDistributionrole.
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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for MissingRoleOnChannelError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for MissingRoleOnChannelErrorbuilder(MissingRoleOnChannelError template) create builder for MissingRoleOnChannelError instancecopyDeep()static MissingRoleOnChannelErrordeepCopy(MissingRoleOnChannelError template) factory method to create a deep copy of MissingRoleOnChannelError@Valid ChannelResourceIdentifierResourceIdentifier to a given Channel.@NotNull StringgetCode()Error identifier.@NotNull String"Given channel with $idOrKeyOfChannel does not have the required role $role."@NotNull ChannelRoleEnumProductDistributionfor Product Distribution Channels allowed for the Store.static MissingRoleOnChannelErrorof()factory methodstatic MissingRoleOnChannelErrorof(MissingRoleOnChannelError template) factory method to create a shallow copy MissingRoleOnChannelErrorvoidsetChannel(ChannelResourceIdentifier channel) ResourceIdentifier to a given Channel.voidsetMessage(String message) "Given channel with $idOrKeyOfChannel does not have the required role $role."voidsetMissingRole(ChannelRoleEnum missingRole) ProductDistributionfor Product Distribution Channels allowed for the Store.static com.fasterxml.jackson.core.type.TypeReference<MissingRoleOnChannelError>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_ROLE_ON_CHANNEL
discriminator value for MissingRoleOnChannelError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Given channel with $idOrKeyOfChannel does not have the required role $role."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
getChannel
ResourceIdentifier to a given Channel.
- Returns:
- channel
-
getMissingRole
ProductDistributionfor Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupplyfor Inventory Supply Channels allowed for the Store.
- Returns:
- missingRole
-
setMessage
"Given channel with $idOrKeyOfChannel does not have the required role $role."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setChannel
ResourceIdentifier to a given Channel.
- Parameters:
channel- value to be set
-
setMissingRole
ProductDistributionfor Product Distribution Channels allowed for the Store. Also required for Standalone Prices.InventorySupplyfor 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
-
copyDeep
MissingRoleOnChannelError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-