public final class SetCustomer extends UpdateActionImpl<Payment>
See also PaymentUpdateCommand.
withCustomer(client(), customer -> { withPayment(client(), payment -> { assertThat(payment.getCustomer()).isNotEqualTo(customer.toReference()); final Payment updatedPayment = client().executeBlocking(PaymentUpdateCommand.of(payment, SetCustomer.of(customer))); assertThat(updatedPayment.getCustomer()).isEqualTo(customer.toReference()); return updatedPayment; }); });
See the test code.
Payment
Modifier and Type | Method and Description |
---|---|
Reference<Customer> |
getCustomer() |
static SetCustomer |
of(Referenceable<Customer> customer) |
getAction
public static SetCustomer of(@Nullable Referenceable<Customer> customer)