Interface ReferencedResourceNotFoundError

All Superinterfaces:
ErrorObject

public interface ReferencedResourceNotFoundError extends ErrorObject

Returned when a resource referenced by a Reference or a ResourceIdentifier could not be found.


Example to create an instance using the builder pattern

     ReferencedResourceNotFoundError referencedResourceNotFoundError = ReferencedResourceNotFoundError.builder()
             .message("{message}")
             .typeId(ReferenceTypeId.APPROVAL_FLOW)
             .build()
 
  • Field Details

    • REFERENCED_RESOURCE_NOT_FOUND

      static final String REFERENCED_RESOURCE_NOT_FOUND
      discriminator value for ReferencedResourceNotFoundError
      See Also:
  • Method Details

    • getCode

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

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • getTypeId

      @NotNull @NotNull ReferenceTypeId getTypeId()

      Type of referenced resource.

      Returns:
      typeId
    • getId

      String getId()

      Unique identifier of the referenced resource, if known.

      Returns:
      id
    • getKey

      String getKey()

      User-defined unique identifier of the referenced resource, if known.

      Returns:
      key
    • setMessage

      void setMessage(String message)

      "The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • setTypeId

      void setTypeId(ReferenceTypeId typeId)

      Type of referenced resource.

      Parameters:
      typeId - value to be set
    • setId

      void setId(String id)

      Unique identifier of the referenced resource, if known.

      Parameters:
      id - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the referenced resource, if known.

      Parameters:
      key - value to be set
    • of

      factory method
      Returns:
      instance of ReferencedResourceNotFoundError
    • of

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

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

      builder factory method for ReferencedResourceNotFoundError
      Returns:
      builder
    • builder

      create builder for ReferencedResourceNotFoundError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withReferencedResourceNotFoundError

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