Package com.commercetools.api.client
Class ByProjectKeyLoginPostString
java.lang.Object
io.vrap.rmf.base.client.ApiMethod<T,TResult>
io.vrap.rmf.base.client.BodyApiMethod<T,TResult,TBody>
io.vrap.rmf.base.client.TypeBodyApiMethod<T,TResult,String>
io.vrap.rmf.base.client.StringBodyApiMethod<ByProjectKeyLoginPostString,CustomerSignInResult>
com.commercetools.api.client.ByProjectKeyLoginPostString
- All Implemented Interfaces:
ErrorableTrait<ByProjectKeyLoginPostString>,ClientRequestCommand<CustomerSignInResult>,CreateHttpRequestCommand,HttpRequestCommand<CustomerSignInResult>,RequestCommand<CustomerSignInResult>
public class ByProjectKeyLoginPostString
extends StringBodyApiMethod<ByProjectKeyLoginPostString,CustomerSignInResult>
implements ErrorableTrait<ByProjectKeyLoginPostString>
Authenticates a global Customer.
Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.
The anonymous Cart is not merged in any of the following cases:
- The referenced Shipping Method is not active.
- The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
- The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
If an account with the given credentials is not found, an InvalidCredentials error is returned.
CompletableFuture<ApiHttpResponse<com.commercetools.api.models.customer.CustomerSignInResult>> result = apiRoot
.withProjectKey("{projectKey}")
.login()
.post("")
.execute()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyLoginPostString(ApiHttpClient apiHttpClient, String projectKey, String customerSignin) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(ApiHttpClient client) executeBlocking(ApiHttpClient client, Duration timeout) getBody()inthashCode()inttools.jackson.core.type.TypeReference<CustomerSignInResult>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 com.commercetools.api.client.ErrorableTrait
asErrorableTrait, asErrorableTraitToBaseTypeMethods inherited from interface io.vrap.rmf.base.client.RequestCommand
executeBlocking
-
Constructor Details
-
ByProjectKeyLoginPostString
public ByProjectKeyLoginPostString(ApiHttpClient apiHttpClient, String projectKey, String customerSignin) -
ByProjectKeyLoginPostString
-
-
Method Details
-
resultType
- Specified by:
resultTypein interfaceHttpRequestCommand<CustomerSignInResult>
-
executeBlocking
public ApiHttpResponse<CustomerSignInResult> executeBlocking(ApiHttpClient client, Duration timeout) - Specified by:
executeBlockingin interfaceClientRequestCommand<CustomerSignInResult>- Specified by:
executeBlockingin classApiMethod<ByProjectKeyLoginPostString,CustomerSignInResult>
-
execute
- Specified by:
executein interfaceClientRequestCommand<CustomerSignInResult>- Specified by:
executein classApiMethod<ByProjectKeyLoginPostString,CustomerSignInResult>
-
getProjectKey
-
setProjectKey
-
getBody
- Overrides:
getBodyin classStringBodyApiMethod<ByProjectKeyLoginPostString,CustomerSignInResult>
-
withBody
- Overrides:
withBodyin classStringBodyApiMethod<ByProjectKeyLoginPostString,CustomerSignInResult>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-