public final class ChangePaymentState extends UpdateActionImpl<Order>
See also OrderUpdateCommand.
withOrder(client(), order -> { final PaymentState newState = PaymentState.PAID; assertThat(order.getPaymentState()).isNotEqualTo(newState); final Order updatedOrder = client().executeBlocking(OrderUpdateCommand.of(order, ChangePaymentState.of(newState))); assertThat(updatedOrder.getPaymentState()).isEqualTo(newState); return updatedOrder; });
See the test code.
Modifier and Type | Method and Description |
---|---|
PaymentState |
getPaymentState() |
static ChangePaymentState |
of(PaymentState paymentState) |
getAction
public static ChangePaymentState of(PaymentState paymentState)
public PaymentState getPaymentState()