public final class FixedCartDiscountValue extends Base implements CartDiscountValue
withPersistentCartDiscount(client(), cartDiscount -> { final CartDiscountValue newValue = CartDiscountValue.ofAbsolute(MoneyImpl.of(randomInt(), EUR)); assertThat(cartDiscount.getValue()).isNotEqualTo(newValue); final CartDiscount updatedDiscount = client().executeBlocking(CartDiscountUpdateCommand.of(cartDiscount, ChangeValue.of(newValue))); assertThat(updatedDiscount.getValue()).isEqualTo(newValue); });See the test code.
CartDiscountValue,
CartDiscount.getValue(),
ChangeValue| Modifier and Type | Method and Description |
|---|---|
List<javax.money.MonetaryAmount> |
getMoney() |
static FixedCartDiscountValue |
of(List<javax.money.MonetaryAmount> money) |
static FixedCartDiscountValue |
of(javax.money.MonetaryAmount money) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitofAbsolute, ofAbsolute, ofFixed, ofGiftLineItem, ofGiftLineItem, ofRelativepublic List<javax.money.MonetaryAmount> getMoney()
public static FixedCartDiscountValue of(javax.money.MonetaryAmount money)
public static FixedCartDiscountValue of(List<javax.money.MonetaryAmount> money)