Class ByProjectKeyAgentsIntakeV1ResponsesPostString
- All Implemented Interfaces:
ClientRequestCommand<AgentResponsesSuccess>,CreateHttpRequestCommand,HttpRequestCommand<AgentResponsesSuccess>,RequestCommand<AgentResponsesSuccess>
Turns a natural-language prompt, optionally with supporting files, into a created Cart, QuoteRequest, or ShoppingList, returned in commercetools REST representation. The entity to create is set by outputType and is never inferred from the input.
A ShoppingList additionally requires a name for the list in the input. The Intake Agent never invents one. Unlike a Cart or Quote Request, a Shopping List does not require a country.
Non-fatal issues, such as requested Products that could not be matched to the catalog or a file that failed to parse, are reported as warnings alongside a successful 201 response rather than failing the request.
Accepts either an application/json body or a multipart/form-data request. An application/json body requires prompt. A multipart/form-data request requires prompt, an uploaded file, or both. See Multipart form data for the file upload format.
If the Intake Agent is not enabled for the Project, a FeatureDisabled error is returned.
For a list of possible errors returned by the Intake Agent, see Intake Agent Errors type.
CompletableFuture<ApiHttpResponse<com.commercetools.api.models.agent.AgentResponsesSuccess>> result = apiRoot
.withProjectKey("{projectKey}")
.agents()
.intake()
.v1()
.responses()
.post("")
.execute()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyAgentsIntakeV1ResponsesPostString(ApiHttpClient apiHttpClient, String projectKey, String agentResponsesRequest) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(ApiHttpClient client) executeBlocking(ApiHttpClient client, Duration timeout) getBody()inthashCode()inttools.jackson.core.type.TypeReference<AgentResponsesSuccess>voidsetProjectKey(String projectKey) toString()Methods inherited from class io.vrap.rmf.base.client.ApiMethod
addHeader, addQueryParam, addQueryParams, contentType, createHttpRequest, execute, execute, execute, execute, execute, execute, execute, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, getQueryParamUriString, getQueryParamUriStrings, send, sendBlocking, sendBlocking, with, with, withHeader, withHeaders, withHttpRequest, withoutHeader, withoutQueryParam, withQueryParam, withQueryParamsMethods inherited from interface io.vrap.rmf.base.client.ClientRequestCommand
executeBlockingMethods inherited from interface io.vrap.rmf.base.client.CreateHttpRequestCommand
createHttpRequestMethods inherited from interface io.vrap.rmf.base.client.RequestCommand
executeBlocking
-
Constructor Details
-
ByProjectKeyAgentsIntakeV1ResponsesPostString
public ByProjectKeyAgentsIntakeV1ResponsesPostString(ApiHttpClient apiHttpClient, String projectKey, String agentResponsesRequest) -
ByProjectKeyAgentsIntakeV1ResponsesPostString
public ByProjectKeyAgentsIntakeV1ResponsesPostString(ByProjectKeyAgentsIntakeV1ResponsesPostString t)
-
-
Method Details
-
resultType
-
executeBlocking
public ApiHttpResponse<AgentResponsesSuccess> executeBlocking(ApiHttpClient client, Duration timeout) - Specified by:
executeBlockingin interfaceClientRequestCommand<AgentResponsesSuccess>- Specified by:
executeBlockingin classApiMethod<ByProjectKeyAgentsIntakeV1ResponsesPostString,AgentResponsesSuccess>
-
execute
- Specified by:
executein interfaceClientRequestCommand<AgentResponsesSuccess>- Specified by:
executein classApiMethod<ByProjectKeyAgentsIntakeV1ResponsesPostString,AgentResponsesSuccess>
-
getProjectKey
-
setProjectKey
-
getBody
- Overrides:
getBodyin classStringBodyApiMethod<ByProjectKeyAgentsIntakeV1ResponsesPostString,AgentResponsesSuccess>
-
withBody
- Overrides:
withBodyin classStringBodyApiMethod<ByProjectKeyAgentsIntakeV1ResponsesPostString,AgentResponsesSuccess>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-