Class ByProjectKeyProductDiscountsMatchingPostString

java.lang.Object
io.vrap.rmf.base.client.ApiMethod<T,TResult>
io.vrap.rmf.base.client.BodyApiMethod<T,TResult,String>
io.vrap.rmf.base.client.StringBodyApiMethod<ByProjectKeyProductDiscountsMatchingPostString,ProductDiscount>
com.commercetools.api.client.ByProjectKeyProductDiscountsMatchingPostString
All Implemented Interfaces:
ErrorableTrait<ByProjectKeyProductDiscountsMatchingPostString>, io.vrap.rmf.base.client.ClientRequestCommand<ProductDiscount>, io.vrap.rmf.base.client.CreateHttpRequestCommand, io.vrap.rmf.base.client.RequestCommand<ProductDiscount>

public class ByProjectKeyProductDiscountsMatchingPostString extends io.vrap.rmf.base.client.StringBodyApiMethod<ByProjectKeyProductDiscountsMatchingPostString,ProductDiscount> implements ErrorableTrait<ByProjectKeyProductDiscountsMatchingPostString>

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("")
            .execute()