Package com.commercetools.api.client
Class ByProjectKeyProductDiscountsMatchingPost
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<ByProjectKeyProductDiscountsMatchingPost,ProductDiscount,ProductDiscountMatchQuery>
com.commercetools.api.client.ByProjectKeyProductDiscountsMatchingPost
- All Implemented Interfaces:
ErrorableTrait<ByProjectKeyProductDiscountsMatchingPost>,ClientRequestCommand<ProductDiscount>,CreateHttpRequestCommand,HttpRequestCommand<ProductDiscount>,RequestCommand<ProductDiscount>
public class ByProjectKeyProductDiscountsMatchingPost
extends TypeBodyApiMethod<ByProjectKeyProductDiscountsMatchingPost,ProductDiscount,ProductDiscountMatchQuery>
implements ErrorableTrait<ByProjectKeyProductDiscountsMatchingPost>
This endpoint can be used to simulate which Product Discounts would be applied if a specified Product Variant had a specified Price. Given Product and Product Variant IDs and a Price, this endpoint will return the ProductDiscount that would have been applied to that Price.
If a Product Discount could not be found that could be applied to the Price of a Product Variant, a NoMatchingProductDiscountFound error is returned.
CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_discount.ProductDiscount>> result = apiRoot
.withProjectKey("{projectKey}")
.productDiscounts()
.matching()
.post(null)
.execute()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyProductDiscountsMatchingPost(ApiHttpClient apiHttpClient, String projectKey, ProductDiscountMatchQuery productDiscountMatchQuery) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(ApiHttpClient client) executeBlocking(ApiHttpClient client, Duration timeout) getBody()inthashCode()intcom.fasterxml.jackson.core.type.TypeReference<ProductDiscount>voidsetProjectKey(String projectKey) toString()withBody(ProductDiscountMatchQuery productDiscountMatchQuery) 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
-
ByProjectKeyProductDiscountsMatchingPost
public ByProjectKeyProductDiscountsMatchingPost(ApiHttpClient apiHttpClient, String projectKey, ProductDiscountMatchQuery productDiscountMatchQuery) -
ByProjectKeyProductDiscountsMatchingPost
-
-
Method Details
-
resultType
- Specified by:
resultTypein interfaceHttpRequestCommand<ProductDiscount>
-
executeBlocking
- Specified by:
executeBlockingin interfaceClientRequestCommand<ProductDiscount>- Specified by:
executeBlockingin classApiMethod<ByProjectKeyProductDiscountsMatchingPost,ProductDiscount>
-
execute
- Specified by:
executein interfaceClientRequestCommand<ProductDiscount>- Specified by:
executein classApiMethod<ByProjectKeyProductDiscountsMatchingPost,ProductDiscount>
-
getProjectKey
-
setProjectKey
-
getBody
-
withBody
public ByProjectKeyProductDiscountsMatchingPost withBody(ProductDiscountMatchQuery productDiscountMatchQuery) -
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-