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
ConstructorDescriptionByProjectKeyProductDiscountsMatchingPost
(ApiHttpClient apiHttpClient, String projectKey, ProductDiscountMatchQuery productDiscountMatchQuery) -
Method Summary
Modifier and TypeMethodDescriptionboolean
execute
(ApiHttpClient client) executeBlocking
(ApiHttpClient client, Duration timeout) getBody()
int
hashCode()
int
com.fasterxml.jackson.core.type.TypeReference<ProductDiscount>
void
setProjectKey
(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, withQueryParams
Methods inherited from interface io.vrap.rmf.base.client.ClientRequestCommand
executeBlocking
Methods inherited from interface io.vrap.rmf.base.client.CreateHttpRequestCommand
createHttpRequest
Methods inherited from interface com.commercetools.api.client.ErrorableTrait
asErrorableTrait, asErrorableTraitToBaseType
Methods 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:
resultType
in interfaceHttpRequestCommand<ProductDiscount>
-
executeBlocking
- Specified by:
executeBlocking
in interfaceClientRequestCommand<ProductDiscount>
- Specified by:
executeBlocking
in classApiMethod<ByProjectKeyProductDiscountsMatchingPost,
ProductDiscount>
-
execute
- Specified by:
execute
in interfaceClientRequestCommand<ProductDiscount>
- Specified by:
execute
in classApiMethod<ByProjectKeyProductDiscountsMatchingPost,
ProductDiscount>
-
getProjectKey
-
setProjectKey
-
getBody
-
withBody
public ByProjectKeyProductDiscountsMatchingPost withBody(ProductDiscountMatchQuery productDiscountMatchQuery) -
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-