Class ByProjectKeyProductDiscountsMatchingPost

All Implemented Interfaces:
ErrorableTrait<ByProjectKeyProductDiscountsMatchingPost>, ClientRequestCommand<ProductDiscount>, CreateHttpRequestCommand, HttpRequestCommand<ProductDiscount>, 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()