public final class ChangeValue extends UpdateActionImpl<ProductDiscount>
See also ProductDiscountUpdateCommand.
withUpdateableProductDiscount(client(), discount -> { final ProductDiscountValue productDiscountValue = AbsoluteProductDiscountValue.of(EURO_30); final ProductDiscount updatedDiscount = client().executeBlocking(ProductDiscountUpdateCommand.of(discount, ChangeValue.of(productDiscountValue))); assertThat(updatedDiscount.getValue()).isEqualTo(productDiscountValue); return updatedDiscount; });
See the test code.
Modifier and Type | Method and Description |
---|---|
ProductDiscountValue |
getValue() |
static ChangeValue |
of(ProductDiscountValue value) |
getAction
public static ChangeValue of(ProductDiscountValue value)
public ProductDiscountValue getValue()