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