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:
- AgentResponsesCartSuccess when a Cart was created
- AgentResponsesQuoteRequestSuccess when a QuoteRequest was created
Example to create a subtype instance using the builder pattern
AgentResponsesSuccess agentResponsesSuccess = AgentResponsesSuccess.cartBuilder()
threadId("{threadId}")
entity(entityBuilder -> entityBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for cart subtypecopyDeep()static AgentResponsesSuccessdeepCopy(AgentResponsesSuccess template) factory method to create a deep copy of AgentResponsesSuccess@NotNull AgentResponsesOutputTypeThe entity that was created.@NotNull StringIdentifier of the workflow run that produced this response.@Valid List<WarningObject>Non-fatal issues encountered while processing the request.builder for quoteRequest subtypevoidsetThreadId(String threadId) Identifier of the workflow run that produced this response.voidsetWarnings(WarningObject... warnings) Non-fatal issues encountered while processing the request.voidsetWarnings(List<WarningObject> warnings) Non-fatal issues encountered while processing the request.static tools.jackson.core.type.TypeReference<AgentResponsesSuccess>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map function
-
Method Details
-
getEntityType
The entity that was created. Determines the concrete response type.
- Returns:
- entityType
-
getWarnings
Non-fatal issues encountered while processing the request. Present only when at least one warning is returned.
- Returns:
- warnings
-
getThreadId
Identifier of the workflow run that produced this response.
- Returns:
- threadId
-
setWarnings
Non-fatal issues encountered while processing the request. Present only when at least one warning is returned.
- Parameters:
warnings- values to be set
-
setWarnings
Non-fatal issues encountered while processing the request. Present only when at least one warning is returned.
- Parameters:
warnings- values to be set
-
setThreadId
Identifier of the workflow run that produced this response.
- Parameters:
threadId- value to be set
-
copyDeep
AgentResponsesSuccess copyDeep() -
deepCopy
factory method to create a deep copy of AgentResponsesSuccess- Parameters:
template- instance to be copied- Returns:
- copy instance
-
cartBuilder
builder for cart subtype- Returns:
- builder
-
quoteRequestBuilder
builder for quoteRequest subtype- Returns:
- builder
-
withAgentResponsesSuccess
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-