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.CreateHttpRequestCommand, io.vrap.rmf.base.client.RequestCommand<ProductDiscount>

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()