public final class ChangeName extends UpdateActionImpl<ProductDiscount>
See also ProductDiscountUpdateCommand.
withUpdateableProductDiscount(client(), discount -> {
final LocalizedString newName = randomSlug();
final ProductDiscount updatedDiscount = client().executeBlocking(ProductDiscountUpdateCommand.of(discount, ChangeName.of(newName)));
assertThat(updatedDiscount.getName()).isEqualTo(newName);
return updatedDiscount;
});
See the test code.
Modifier and Type | Method and Description |
---|---|
LocalizedString |
getName() |
static ChangeName |
of(LocalizedString name) |
getAction
public static ChangeName of(LocalizedString name)
public LocalizedString getName()