Interface StandardScheduleDraft
- All Superinterfaces:
Draft<StandardScheduleDraft>
,RecurrencePolicyScheduleDraft
public interface StandardScheduleDraft
extends RecurrencePolicyScheduleDraft, Draft<StandardScheduleDraft>
Determines the schedule for a Recurring Order to occur at a fixed interval—for example, every two weeks or every month.
Example to create an instance using the builder pattern
StandardScheduleDraft standardScheduleDraft = StandardScheduleDraft.builder()
.value(0.3)
.intervalUnit(IntervalUnit.DAYS)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StandardScheduleDraftBuilder
builder()
builder factory method for StandardScheduleDraftstatic StandardScheduleDraftBuilder
builder
(StandardScheduleDraft template) create builder for StandardScheduleDraft instancecopyDeep()
static StandardScheduleDraft
deepCopy
(StandardScheduleDraft template) factory method to create a deep copy of StandardScheduleDraft@NotNull IntervalUnit
Interval for this schedule.@NotNull Long
getValue()
Number of intervals between orders.static StandardScheduleDraft
of()
factory methodstatic StandardScheduleDraft
of
(StandardScheduleDraft template) factory method to create a shallow copy StandardScheduleDraftvoid
setIntervalUnit
(IntervalUnit intervalUnit) Interval for this schedule.void
Number of intervals between orders.static com.fasterxml.jackson.core.type.TypeReference<StandardScheduleDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft
getType, withRecurrencePolicyScheduleDraft
-
Field Details
-
STANDARD
discriminator value for StandardScheduleDraft- See Also:
-
-
Method Details
-
getValue
Number of intervals between orders.
- Returns:
- value
-
getIntervalUnit
Interval for this schedule.
- Returns:
- intervalUnit
-
setValue
Number of intervals between orders.
- Parameters:
value
- value to be set
-
setIntervalUnit
Interval for this schedule.
- Parameters:
intervalUnit
- value to be set
-
of
factory method- Returns:
- instance of StandardScheduleDraft
-
of
factory method to create a shallow copy StandardScheduleDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
StandardScheduleDraft copyDeep()- Specified by:
copyDeep
in interfaceRecurrencePolicyScheduleDraft
-
deepCopy
factory method to create a deep copy of StandardScheduleDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StandardScheduleDraft- Returns:
- builder
-
builder
create builder for StandardScheduleDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStandardScheduleDraft
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-