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 StandardScheduleBuilderbuilder()builder factory method for StandardSchedulestatic StandardScheduleBuilderbuilder(StandardSchedule template) create builder for StandardSchedule instancecopyDeep()static StandardScheduledeepCopy(StandardSchedule template) factory method to create a deep copy of StandardSchedule@NotNull IntervalUnitInterval of this schedule.@NotNull LonggetValue()Number of intervals between orders.static StandardScheduleof()factory methodstatic StandardScheduleof(StandardSchedule template) factory method to create a shallow copy StandardSchedulevoidsetIntervalUnit(IntervalUnit intervalUnit) Interval of this schedule.voidNumber of intervals between orders.static com.fasterxml.jackson.core.type.TypeReference<StandardSchedule>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithStandardSchedule(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:
copyDeepin 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
-