Interface StandardSchedule
- All Superinterfaces:
RecurrencePolicySchedule
Schedule of a RecurringOrder that occurs at a fixed interval—for example, every two weeks or every month.
Example to create an instance using the builder pattern
StandardSchedule standardSchedule = StandardSchedule.builder()
.value(0.3)
.intervalUnit(IntervalUnit.DAYS)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StandardScheduleBuilder
builder()
builder factory method for StandardSchedulestatic StandardScheduleBuilder
builder
(StandardSchedule template) create builder for StandardSchedule instancecopyDeep()
static StandardSchedule
deepCopy
(StandardSchedule template) factory method to create a deep copy of StandardSchedule@NotNull IntervalUnit
Interval of this schedule.@NotNull Long
getValue()
Number of intervals between orders.static StandardSchedule
of()
factory methodstatic StandardSchedule
of
(StandardSchedule template) factory method to create a shallow copy StandardSchedulevoid
setIntervalUnit
(IntervalUnit intervalUnit) Interval of this schedule.void
Number of intervals between orders.static com.fasterxml.jackson.core.type.TypeReference<StandardSchedule>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStandardSchedule
(Function<StandardSchedule, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule
getType, withRecurrencePolicySchedule
-
Field Details
-
STANDARD
discriminator value for StandardSchedule- See Also:
-
-
Method Details
-
getValue
Number of intervals between orders.
- Returns:
- value
-
getIntervalUnit
Interval of this schedule.
- Returns:
- intervalUnit
-
setValue
Number of intervals between orders.
- Parameters:
value
- value to be set
-
setIntervalUnit
Interval of this schedule.
- Parameters:
intervalUnit
- value to be set
-
of
factory method- Returns:
- instance of StandardSchedule
-
of
factory method to create a shallow copy StandardSchedule- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
StandardSchedule copyDeep()- Specified by:
copyDeep
in interfaceRecurrencePolicySchedule
-
deepCopy
factory method to create a deep copy of StandardSchedule- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StandardSchedule- Returns:
- builder
-
builder
create builder for StandardSchedule instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStandardSchedule
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
-