Interface GraphQLMissingRoleOnChannelError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLMissingRoleOnChannelError extends GraphQLErrorObject

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

     GraphQLMissingRoleOnChannelError graphQLMissingRoleOnChannelError = GraphQLMissingRoleOnChannelError.builder()
             .missingRole(ChannelRoleEnum.INVENTORY_SUPPLY)
             .build()
 
  • Field Details

    • MISSING_ROLE_ON_CHANNEL

      static final String MISSING_ROLE_ON_CHANNEL
      discriminator value for GraphQLMissingRoleOnChannelError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: GraphQLErrorObject

      Error identifier.

      Specified by:
      getCode in interface GraphQLErrorObject
      Returns:
      code
    • getChannel

      @Valid @Valid ChannelResourceIdentifier getChannel()

      ResourceIdentifier to a given Channel.

      Returns:
      channel
    • getMissingRole

      @NotNull @NotNull ChannelRoleEnum 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
    • setChannel

      void setChannel(ChannelResourceIdentifier channel)

      ResourceIdentifier to a given Channel.

      Parameters:
      channel - value to be set
    • setMissingRole

      void setMissingRole(ChannelRoleEnum missingRole)
      • 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 GraphQLMissingRoleOnChannelError
    • of

      factory method to create a shallow copy GraphQLMissingRoleOnChannelError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of GraphQLMissingRoleOnChannelError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for GraphQLMissingRoleOnChannelError
      Returns:
      builder
    • builder

      create builder for GraphQLMissingRoleOnChannelError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLMissingRoleOnChannelError

      default <T> T withGraphQLMissingRoleOnChannelError(Function<GraphQLMissingRoleOnChannelError,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<GraphQLMissingRoleOnChannelError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference