Interface RecurringOrderDraft
- All Superinterfaces:
Draft<RecurringOrderDraft>
Recurring Orders are automatically assigned the Store and/or Business Unit from the associated Cart.
Example to create an instance using the builder pattern
RecurringOrderDraft recurringOrderDraft = RecurringOrderDraft.builder()
.cart(cartBuilder -> cartBuilder)
.cartVersion(0.3)
.startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic RecurringOrderDraftBuilder
builder()
builder factory method for RecurringOrderDraftstatic RecurringOrderDraftBuilder
builder
(RecurringOrderDraft template) create builder for RecurringOrderDraft instancecopyDeep()
static RecurringOrderDraft
deepCopy
(RecurringOrderDraft template) factory method to create a deep copy of RecurringOrderDraft@NotNull @Valid CartResourceIdentifier
getCart()
ResourceIdentifier to the Cart from which the RecurringOrder is created.@NotNull Long
Current version of the referenced Cart.@Valid CustomFieldsDraft
Custom Fields for the RecurringOrder.Date and time (UTC) when the RecurringOrder will expire.getKey()
User-defined unique identifier of the RecurringOrder.@NotNull ZonedDateTime
Date and time (UTC) when the RecurringOrder will start.@Valid StateResourceIdentifier
getState()
State for the RecurringOrder in a custom workflow.static RecurringOrderDraft
of()
factory methodstatic RecurringOrderDraft
of
(RecurringOrderDraft template) factory method to create a shallow copy RecurringOrderDraftvoid
ResourceIdentifier to the Cart from which the RecurringOrder is created.void
setCartVersion
(Long cartVersion) Current version of the referenced Cart.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the RecurringOrder.void
setExpiresAt
(ZonedDateTime expiresAt) Date and time (UTC) when the RecurringOrder will expire.void
User-defined unique identifier of the RecurringOrder.void
setStartsAt
(ZonedDateTime startsAt) Date and time (UTC) when the RecurringOrder will start.void
setState
(StateResourceIdentifier state) State for the RecurringOrder in a custom workflow.static com.fasterxml.jackson.core.type.TypeReference<RecurringOrderDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withRecurringOrderDraft
(Function<RecurringOrderDraft, T> helper) accessor map function
-
Method Details
-
getKey
String getKey()User-defined unique identifier of the RecurringOrder.
- Returns:
- key
-
getCart
ResourceIdentifier to the Cart from which the RecurringOrder is created.
- Returns:
- cart
-
getCartVersion
Current version of the referenced Cart.
- Returns:
- cartVersion
-
getStartsAt
Date and time (UTC) when the RecurringOrder will start.
- Returns:
- startsAt
-
getExpiresAt
ZonedDateTime getExpiresAt()Date and time (UTC) when the RecurringOrder will expire.
- Returns:
- expiresAt
-
getState
State for the RecurringOrder in a custom workflow.
- Returns:
- state
-
getCustom
Custom Fields for the RecurringOrder.
- Returns:
- custom
-
setKey
User-defined unique identifier of the RecurringOrder.
- Parameters:
key
- value to be set
-
setCart
ResourceIdentifier to the Cart from which the RecurringOrder is created.
- Parameters:
cart
- value to be set
-
setCartVersion
Current version of the referenced Cart.
- Parameters:
cartVersion
- value to be set
-
setStartsAt
Date and time (UTC) when the RecurringOrder will start.
- Parameters:
startsAt
- value to be set
-
setExpiresAt
Date and time (UTC) when the RecurringOrder will expire.
- Parameters:
expiresAt
- value to be set
-
setState
State for the RecurringOrder in a custom workflow.
- Parameters:
state
- value to be set
-
setCustom
Custom Fields for the RecurringOrder.
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of RecurringOrderDraft
-
of
factory method to create a shallow copy RecurringOrderDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
RecurringOrderDraft copyDeep() -
deepCopy
factory method to create a deep copy of RecurringOrderDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for RecurringOrderDraft- Returns:
- builder
-
builder
create builder for RecurringOrderDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withRecurringOrderDraft
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
-