Class RecurringOrderDraftBuilder
- All Implemented Interfaces:
Builder<RecurringOrderDraft>
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()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds RecurringOrderDraft with checking for non-null required valuesbuilds RecurringOrderDraft without checking for non-null required valuescart
(CartResourceIdentifier cart) ResourceIdentifier to the Cart from which the RecurringOrder is created.ResourceIdentifier to the Cart from which the RecurringOrder is created.cartVersion
(Long cartVersion) Current version of the referenced Cart.custom
(CustomFieldsDraft custom) Custom Fields for the RecurringOrder.Custom Fields for the RecurringOrder.expiresAt
(ZonedDateTime expiresAt) Date and time (UTC) when the RecurringOrder will expire.getCart()
ResourceIdentifier to the Cart from which the RecurringOrder is created.Current version of the referenced Cart.Custom Fields for the RecurringOrder.Date and time (UTC) when the RecurringOrder will expire.getKey()
User-defined unique identifier of the RecurringOrder.Date and time (UTC) when the RecurringOrder will start.getState()
State for the RecurringOrder in a custom workflow.User-defined unique identifier of the RecurringOrder.static RecurringOrderDraftBuilder
of()
factory method for an instance of RecurringOrderDraftBuilderstatic RecurringOrderDraftBuilder
of
(RecurringOrderDraft template) create builder for RecurringOrderDraft instancestartsAt
(ZonedDateTime startsAt) Date and time (UTC) when the RecurringOrder will start.state
(StateResourceIdentifier state) State for the RecurringOrder in a custom workflow.State for the RecurringOrder in a custom workflow.ResourceIdentifier to the Cart from which the RecurringOrder is created.Custom Fields for the RecurringOrder.State for the RecurringOrder in a custom workflow.
-
Constructor Details
-
RecurringOrderDraftBuilder
public RecurringOrderDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier of the RecurringOrder.
- Parameters:
key
- value to be set- Returns:
- Builder
-
cart
public RecurringOrderDraftBuilder cart(Function<CartResourceIdentifierBuilder, CartResourceIdentifierBuilder> builder) ResourceIdentifier to the Cart from which the RecurringOrder is created.
- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
withCart
public RecurringOrderDraftBuilder withCart(Function<CartResourceIdentifierBuilder, CartResourceIdentifier> builder) ResourceIdentifier to the Cart from which the RecurringOrder is created.
- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
cart
ResourceIdentifier to the Cart from which the RecurringOrder is created.
- Parameters:
cart
- value to be set- Returns:
- Builder
-
cartVersion
Current version of the referenced Cart.
- Parameters:
cartVersion
- value to be set- Returns:
- Builder
-
startsAt
Date and time (UTC) when the RecurringOrder will start.
- Parameters:
startsAt
- value to be set- Returns:
- Builder
-
expiresAt
Date and time (UTC) when the RecurringOrder will expire.
- Parameters:
expiresAt
- value to be set- Returns:
- Builder
-
state
public RecurringOrderDraftBuilder state(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) State for the RecurringOrder in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public RecurringOrderDraftBuilder withState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) State for the RecurringOrder in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State for the RecurringOrder in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
custom
public RecurringOrderDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the RecurringOrder.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public RecurringOrderDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the RecurringOrder.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the RecurringOrder.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
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
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
-
build
builds RecurringOrderDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<RecurringOrderDraft>
- Returns:
- RecurringOrderDraft
-
buildUnchecked
builds RecurringOrderDraft without checking for non-null required values- Returns:
- RecurringOrderDraft
-
of
factory method for an instance of RecurringOrderDraftBuilder- Returns:
- builder
-
of
create builder for RecurringOrderDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-