public final class ChangePredicate extends UpdateActionImpl<ProductDiscount>
See also ProductDiscountUpdateCommand.
withUpdateableProductDiscount(client(), discount -> { final String predicateAsString = "sku = \"AB-12\""; final ProductDiscountPredicate predicate = ProductDiscountPredicate .of(predicateAsString); final ProductDiscount updatedDiscount = client().executeBlocking(ProductDiscountUpdateCommand.of(discount, ChangePredicate.of(predicate))); final String updatedPredicate = updatedDiscount.getPredicate(); assertThat(updatedPredicate).isEqualTo(predicateAsString); return updatedDiscount; });See the test code.
| Modifier and Type | Method and Description |
|---|---|
String |
getPredicate() |
static ChangePredicate |
of(ProductDiscountPredicate predicate) |
getActionpublic static ChangePredicate of(ProductDiscountPredicate predicate)
public String getPredicate()