public final class SetName extends UpdateActionImpl<DiscountCode>
See also DiscountCodeUpdateCommand.
withPersistentDiscountCode(client(), discountCode -> { final LocalizedString newName = randomSlug(); final DiscountCode updatedDiscountCode = client().executeBlocking(DiscountCodeUpdateCommand.of(discountCode, SetName.of(newName))); assertThat(updatedDiscountCode.getName()).isEqualTo(newName); });
See the test code.
Modifier and Type | Method and Description |
---|---|
LocalizedString |
getName() |
static SetName |
of(LocalizedString name) |
getAction
public static SetName of(@Nullable LocalizedString name)
@Nullable public LocalizedString getName()