public final class SetMaxApplications extends UpdateActionImpl<DiscountCode>
See also DiscountCodeUpdateCommand.
withPersistentDiscountCode(client(), discountCode -> { final long maxApplications = randomLong(); final DiscountCode updatedDiscountCode = client().executeBlocking(DiscountCodeUpdateCommand.of(discountCode, SetMaxApplications.of(maxApplications))); assertThat(updatedDiscountCode.getMaxApplications()).isEqualTo(maxApplications); });See the test code.
| Modifier and Type | Method and Description |
|---|---|
Long |
getMaxApplications() |
static SetMaxApplications |
of(Long maxApplications) |
getActionpublic static SetMaxApplications of(@Nullable Long maxApplications)