public final class SetCustomer extends UpdateActionImpl<Review>
See also ReviewUpdateCommand.
withCustomer(client(), (Customer customer) -> { withUpdateableReview(client(), (Review review) -> { final Review updatedReview = client().executeBlocking(ReviewUpdateCommand.of(review, SetCustomer.of(customer))); assertThat(updatedReview.getCustomer()).isEqualTo(customer.toReference()); return updatedReview; }); });
See the test code.
Modifier and Type | Method and Description |
---|---|
ResourceIdentifier<Customer> |
getCustomer() |
static SetCustomer |
of(ResourceIdentifiable<Customer> customer) |
static SetCustomer |
ofUnset() |
getAction
public static SetCustomer of(ResourceIdentifiable<Customer> customer)
public static SetCustomer ofUnset()
@Nullable public ResourceIdentifier<Customer> getCustomer()