Package com.commercetools.api.client
Class ByProjectKeyProductDiscountsMatchingPost
java.lang.Object
io.vrap.rmf.base.client.ApiMethod<T,TResult>
io.vrap.rmf.base.client.BodyApiMethod<ByProjectKeyProductDiscountsMatchingPost,ProductDiscount,ProductDiscountMatchQuery>
com.commercetools.api.client.ByProjectKeyProductDiscountsMatchingPost
- All Implemented Interfaces:
ErrorableTrait<ByProjectKeyProductDiscountsMatchingPost>
,io.vrap.rmf.base.client.ClientRequestCommand<ProductDiscount>
,io.vrap.rmf.base.client.RequestCommand<ProductDiscount>
public class ByProjectKeyProductDiscountsMatchingPost
extends io.vrap.rmf.base.client.BodyApiMethod<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
-
Constructor Summary
ConstructorDescriptionByProjectKeyProductDiscountsMatchingPost
(io.vrap.rmf.base.client.ApiHttpClient apiHttpClient, String projectKey, ProductDiscountMatchQuery productDiscountMatchQuery) -
Method Summary
Modifier and TypeMethodDescriptionboolean
CompletableFuture<io.vrap.rmf.base.client.ApiHttpResponse<ProductDiscount>>
execute
(io.vrap.rmf.base.client.ApiHttpClient client) io.vrap.rmf.base.client.ApiHttpResponse<ProductDiscount>
executeBlocking
(io.vrap.rmf.base.client.ApiHttpClient client, Duration timeout) getBody()
int
hashCode()
int
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, executeBlocking, executeBlocking, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, getQueryParamUriString, getQueryParamUriStrings, send, sendBlocking, sendBlocking, with, with, withHeader, withHeaders, withHttpRequest, withoutHeader, withoutQueryParam, withQueryParam, withQueryParams
Methods inherited from interface com.commercetools.api.client.ErrorableTrait
asErrorableTrait, asErrorableTraitToBaseType
-
Constructor Details
-
ByProjectKeyProductDiscountsMatchingPost
public ByProjectKeyProductDiscountsMatchingPost(io.vrap.rmf.base.client.ApiHttpClient apiHttpClient, String projectKey, ProductDiscountMatchQuery productDiscountMatchQuery) -
ByProjectKeyProductDiscountsMatchingPost
-
-
Method Details
-
executeBlocking
public io.vrap.rmf.base.client.ApiHttpResponse<ProductDiscount> executeBlocking(io.vrap.rmf.base.client.ApiHttpClient client, Duration timeout) - Specified by:
executeBlocking
in interfaceio.vrap.rmf.base.client.ClientRequestCommand<ProductDiscount>
- Specified by:
executeBlocking
in classio.vrap.rmf.base.client.ApiMethod<ByProjectKeyProductDiscountsMatchingPost,
ProductDiscount>
-
execute
public CompletableFuture<io.vrap.rmf.base.client.ApiHttpResponse<ProductDiscount>> execute(io.vrap.rmf.base.client.ApiHttpClient client) - Specified by:
execute
in interfaceio.vrap.rmf.base.client.ClientRequestCommand<ProductDiscount>
- Specified by:
execute
in classio.vrap.rmf.base.client.ApiMethod<ByProjectKeyProductDiscountsMatchingPost,
ProductDiscount>
-
getProjectKey
-
setProjectKey
-
getBody
- Overrides:
getBody
in classio.vrap.rmf.base.client.BodyApiMethod<ByProjectKeyProductDiscountsMatchingPost,
ProductDiscount, ProductDiscountMatchQuery>
-
withBody
public ByProjectKeyProductDiscountsMatchingPost withBody(ProductDiscountMatchQuery productDiscountMatchQuery) - Overrides:
withBody
in classio.vrap.rmf.base.client.BodyApiMethod<ByProjectKeyProductDiscountsMatchingPost,
ProductDiscount, ProductDiscountMatchQuery>
-
equals
-
hashCode
-
toString
-
reflectionHashCode
public int reflectionHashCode()
-