Package com.commercetools.api.client
Class ByProjectKeyProductDiscountsMatchingPostString
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<T,TResult,String>
io.vrap.rmf.base.client.StringBodyApiMethod<ByProjectKeyProductDiscountsMatchingPostString,ProductDiscount>
com.commercetools.api.client.ByProjectKeyProductDiscountsMatchingPostString
- All Implemented Interfaces:
ErrorableTrait<ByProjectKeyProductDiscountsMatchingPostString>,ClientRequestCommand<ProductDiscount>,CreateHttpRequestCommand,HttpRequestCommand<ProductDiscount>,RequestCommand<ProductDiscount>
public class ByProjectKeyProductDiscountsMatchingPostString
extends 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()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyProductDiscountsMatchingPostString(ApiHttpClient apiHttpClient, String projectKey, String productDiscountMatchQuery) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(ApiHttpClient client) executeBlocking(ApiHttpClient client, Duration timeout) getBody()inthashCode()intcom.fasterxml.jackson.core.type.TypeReference<ProductDiscount>voidsetProjectKey(String projectKey) toString()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, withQueryParamsMethods inherited from interface io.vrap.rmf.base.client.ClientRequestCommand
executeBlockingMethods inherited from interface io.vrap.rmf.base.client.CreateHttpRequestCommand
createHttpRequestMethods inherited from interface com.commercetools.api.client.ErrorableTrait
asErrorableTrait, asErrorableTraitToBaseTypeMethods inherited from interface io.vrap.rmf.base.client.RequestCommand
executeBlocking
-
Constructor Details
-
ByProjectKeyProductDiscountsMatchingPostString
public ByProjectKeyProductDiscountsMatchingPostString(ApiHttpClient apiHttpClient, String projectKey, String productDiscountMatchQuery) -
ByProjectKeyProductDiscountsMatchingPostString
public ByProjectKeyProductDiscountsMatchingPostString(ByProjectKeyProductDiscountsMatchingPostString t)
-
-
Method Details
-
resultType
- Specified by:
resultTypein interfaceHttpRequestCommand<ProductDiscount>
-
executeBlocking
- Specified by:
executeBlockingin interfaceClientRequestCommand<ProductDiscount>- Specified by:
executeBlockingin classApiMethod<ByProjectKeyProductDiscountsMatchingPostString,ProductDiscount>
-
execute
- Specified by:
executein interfaceClientRequestCommand<ProductDiscount>- Specified by:
executein classApiMethod<ByProjectKeyProductDiscountsMatchingPostString,ProductDiscount>
-
getProjectKey
-
setProjectKey
-
getBody
- Overrides:
getBodyin classStringBodyApiMethod<ByProjectKeyProductDiscountsMatchingPostString,ProductDiscount>
-
withBody
- Overrides:
withBodyin classStringBodyApiMethod<ByProjectKeyProductDiscountsMatchingPostString,ProductDiscount>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-