public static SetReturnPaymentState of(final String returnItemId, final ReturnPaymentState paymentState) { return new SetReturnPaymentState(returnItemId, paymentState); }
public static SetReturnPaymentState of(final ReturnItem returnItem, final ReturnPaymentState paymentState) { return of(returnItem.getId(), paymentState); } }
public static SetReturnPaymentState of(final ReturnItem returnItem, final ReturnPaymentState paymentState) { return of(returnItem.getId(), paymentState); } }
public static SetReturnPaymentState of(final ReturnItem returnItem, final ReturnPaymentState paymentState) { return of(returnItem.getId(), paymentState); } }
public static SetReturnPaymentState of(final String returnItemId, final ReturnPaymentState paymentState) { return new SetReturnPaymentState(returnItemId, paymentState); }
public static SetReturnPaymentState of(final ReturnItem returnItem, final ReturnPaymentState paymentState) { return of(returnItem.getId(), paymentState); } }
public static SetReturnPaymentState of(final String returnItemId, final ReturnPaymentState paymentState) { return new SetReturnPaymentState(returnItemId, paymentState); }
@Test public void setReturnPaymentState() throws Exception { withOrderAndReturnInfo(client(), (order, returnInfo) -> { final ReturnItem returnItem = returnInfo.getItems().get(0); final ReturnPaymentState newPaymentState = ReturnPaymentState.REFUNDED; assertThat(returnItem.getPaymentState()).isNotEqualTo(newPaymentState); final SetReturnPaymentState action = SetReturnPaymentState.of(returnItem, newPaymentState); final Order updatedOrder = client().executeBlocking(OrderUpdateCommand.of(order, action)); final ReturnPaymentState updatedPaymentState = updatedOrder.getReturnInfo().get(0).getItems().get(0).getPaymentState(); assertThat(updatedPaymentState).isEqualTo(newPaymentState); return updatedOrder; }); }
public static SetReturnPaymentState of(final String returnItemId, final ReturnPaymentState paymentState) { return new SetReturnPaymentState(returnItemId, paymentState); }