Interface AgentResponsesSuccess

All Known Subinterfaces:
AgentResponsesCartSuccess, AgentResponsesQuoteRequestSuccess

public interface AgentResponsesSuccess

Successful 201 response from a /responses request. Returns the created entity in commercetools REST representation, together with any non-fatal warnings.

The concrete type depends on entityType:


Example to create a subtype instance using the builder pattern

     AgentResponsesSuccess agentResponsesSuccess = AgentResponsesSuccess.cartBuilder()
             threadId("{threadId}")
             entity(entityBuilder -> entityBuilder)
             .build()
 
  • Method Details

    • getEntityType

      @NotNull @NotNull AgentResponsesOutputType getEntityType()

      The entity that was created. Determines the concrete response type.

      Returns:
      entityType
    • getWarnings

      @Valid @Valid List<WarningObject> getWarnings()

      Non-fatal issues encountered while processing the request. Present only when at least one warning is returned.

      Returns:
      warnings
    • getThreadId

      @NotNull @NotNull String getThreadId()

      Identifier of the workflow run that produced this response.

      Returns:
      threadId
    • setWarnings

      void setWarnings(WarningObject... warnings)

      Non-fatal issues encountered while processing the request. Present only when at least one warning is returned.

      Parameters:
      warnings - values to be set
    • setWarnings

      void setWarnings(List<WarningObject> warnings)

      Non-fatal issues encountered while processing the request. Present only when at least one warning is returned.

      Parameters:
      warnings - values to be set
    • setThreadId

      void setThreadId(String threadId)

      Identifier of the workflow run that produced this response.

      Parameters:
      threadId - value to be set
    • copyDeep

    • deepCopy

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

      static AgentResponsesCartSuccessBuilder cartBuilder()
      builder for cart subtype
      Returns:
      builder
    • quoteRequestBuilder

      static AgentResponsesQuoteRequestSuccessBuilder quoteRequestBuilder()
      builder for quoteRequest subtype
      Returns:
      builder
    • withAgentResponsesSuccess

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