Interface GraphQLUnauthorizedError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLUnauthorizedError extends GraphQLErrorObject

Returned when one of the following conditions occurs:

  • A Customer reference (for example, associates[*].customer or inheritedAssociates[*].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

     GraphQLUnauthorizedError graphQLUnauthorizedError = GraphQLUnauthorizedError.builder()
             .build()
 
  • Field Details

  • Method Details

    • getCode

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

      One of the error codes that is listed on the Errors page.

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

      List<String> getStoresWithoutPermission()

      Keys of Stores for which the required permission to modify is missing.

      This field is returned only for Cart Discounts.

      Returns:
      storesWithoutPermission
    • setStoresWithoutPermission

      void setStoresWithoutPermission(String... storesWithoutPermission)

      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

      void setStoresWithoutPermission(List<String> storesWithoutPermission)

      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 GraphQLUnauthorizedError
    • of

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

      Specified by:
      copyDeep in interface GraphQLErrorObject
    • deepCopy

      @Nullable static GraphQLUnauthorizedError deepCopy(@Nullable GraphQLUnauthorizedError template)
      factory method to create a deep copy of GraphQLUnauthorizedError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for GraphQLUnauthorizedError
      Returns:
      builder
    • builder

      create builder for GraphQLUnauthorizedError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLUnauthorizedError

      default <T> T withGraphQLUnauthorizedError(Function<GraphQLUnauthorizedError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<GraphQLUnauthorizedError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference