public final class AbsoluteProductDiscountValue extends Base implements ProductDiscountValue
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.
ProductDiscount
,
ProductDiscount.getValue()
,
ChangeValue
Modifier and Type | Method and Description |
---|---|
List<javax.money.MonetaryAmount> |
getMoney()
The array contains money values in different currencies.
|
static AbsoluteProductDiscountValue |
of(List<javax.money.MonetaryAmount> money) |
static AbsoluteProductDiscountValue |
of(javax.money.MonetaryAmount money) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ofAbsolute, ofAbsolute, ofExternal, ofRelative
public List<javax.money.MonetaryAmount> getMoney()
public static AbsoluteProductDiscountValue of(List<javax.money.MonetaryAmount> money)
public static AbsoluteProductDiscountValue of(javax.money.MonetaryAmount money)