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
ConstructorDescriptionByProjectKeyProductDiscountsMatchingPostString
(ApiHttpClient apiHttpClient, String projectKey, String productDiscountMatchQuery) -
Method Summary
Modifier and TypeMethodDescriptionboolean
execute
(ApiHttpClient client) executeBlocking
(ApiHttpClient client, Duration timeout) getBody()
int
hashCode()
int
com.fasterxml.jackson.core.type.TypeReference<ProductDiscount>
void
setProjectKey
(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, withQueryParams
Methods inherited from interface io.vrap.rmf.base.client.ClientRequestCommand
executeBlocking
Methods inherited from interface io.vrap.rmf.base.client.CreateHttpRequestCommand
createHttpRequest
Methods inherited from interface com.commercetools.api.client.ErrorableTrait
asErrorableTrait, asErrorableTraitToBaseType
Methods 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:
resultType
in interfaceHttpRequestCommand<ProductDiscount>
-
executeBlocking
- Specified by:
executeBlocking
in interfaceClientRequestCommand<ProductDiscount>
- Specified by:
executeBlocking
in classApiMethod<ByProjectKeyProductDiscountsMatchingPostString,
ProductDiscount>
-
execute
- Specified by:
execute
in interfaceClientRequestCommand<ProductDiscount>
- Specified by:
execute
in classApiMethod<ByProjectKeyProductDiscountsMatchingPostString,
ProductDiscount>
-
getProjectKey
-
setProjectKey
-
getBody
- Overrides:
getBody
in classStringBodyApiMethod<ByProjectKeyProductDiscountsMatchingPostString,
ProductDiscount>
-
withBody
- Overrides:
withBody
in classStringBodyApiMethod<ByProjectKeyProductDiscountsMatchingPostString,
ProductDiscount>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-