Interface LockedFieldError

All Superinterfaces:
ErrorObject

public interface LockedFieldError extends ErrorObject

Returned when two Customers are simultaneously created or updated with the same email address.

To confirm if the operation was successful, repeat the request.


Example to create an instance using the builder pattern

     LockedFieldError lockedFieldError = LockedFieldError.builder()
             .message("{message}")
             .field("{field}")
             .build()
 
  • Field Details

  • Method Details

    • getField

      @NotNull @NotNull String getField()

      Field that is currently locked.

      Returns:
      field
    • 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()

      "'$field' is locked by another request. Please try again later."

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

      void setField(String field)

      Field that is currently locked.

      Parameters:
      field - value to be set
    • setMessage

      void setMessage(String message)

      "'$field' is locked by another request. Please try again later."

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

      static LockedFieldError of()
      factory method
      Returns:
      instance of LockedFieldError
    • of

      static LockedFieldError of(LockedFieldError template)
      factory method to create a shallow copy LockedFieldError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static LockedFieldErrorBuilder builder()
      builder factory method for LockedFieldError
      Returns:
      builder
    • builder

      static LockedFieldErrorBuilder builder(LockedFieldError template)
      create builder for LockedFieldError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withLockedFieldError

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