Class RecurringOrderBuilder
- All Implemented Interfaces:
Builder<RecurringOrder>
Example to create an instance using the builder pattern
RecurringOrder recurringOrder = RecurringOrder.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.cart(cartBuilder -> cartBuilder)
.originOrder(originOrderBuilder -> originOrderBuilder)
.startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.recurringOrderState(RecurringOrderState.ACTIVE)
.schedule(scheduleBuilder -> scheduleBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds RecurringOrder with checking for non-null required valuesbuilds RecurringOrder without checking for non-null required valuesbusinessUnit
(BusinessUnitKeyReference businessUnit) Reference to the Business Unit that the RecurringOrder belongs to.Reference to the Business Unit that the RecurringOrder belongs to.cart
(CartReference cart) Reference to the Cart for a RecurringOrder.cart
(Function<CartReferenceBuilder, CartReferenceBuilder> builder) Reference to the Cart for a RecurringOrder.createdAt
(ZonedDateTime createdAt) Date and time (UTC) when the RecurringOrder was created.IDs and references that created the RecurringOrder.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the RecurringOrder.custom
(CustomFields custom) Custom Fields of the RecurringOrder.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the RecurringOrder.customer
(CustomerReference customer) The Customer that the RecurringOrder belongs to.The Customer that the RecurringOrder belongs to.customerEmail
(String customerEmail) Email address of the Customer that the RecurringOrder belongs to.expiresAt
(ZonedDateTime expiresAt) Date and time (UTC) when the RecurringOrder expires.Reference to the Business Unit that the RecurringOrder belongs to.getCart()
Reference to the Cart for a RecurringOrder.Date and time (UTC) when the RecurringOrder was created.IDs and references that created the RecurringOrder.Custom Fields of the RecurringOrder.The Customer that the RecurringOrder belongs to.Email address of the Customer that the RecurringOrder belongs to.Date and time (UTC) when the RecurringOrder expires.getId()
Unique identifier of the RecurringOrder.getKey()
User-defined unique identifier of the RecurringOrder.Date and time (UTC) when the RecurringOrder was last updated.IDs and references that last modified the RecurringOrder.Date and time (UTC) when the last Order was created from this RecurringOrder.Date and time (UTC) when the next Order will be created from this RecurringOrder.Current state of the RecurringOrder.Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.Schedule of the RecurringOrder.Information about current and future skips for this RecurringOrder.Date and time (UTC) when the RecurringOrder starts creating new Orders.getState()
State of the RecurringOrder in a custom workflow.getStore()
Reference to a Store.Current version of the RecurringOrder.Unique identifier of the RecurringOrder.User-defined unique identifier of the RecurringOrder.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) when the RecurringOrder was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the RecurringOrder.IDs and references that last modified the RecurringOrder.lastOrderAt
(ZonedDateTime lastOrderAt) Date and time (UTC) when the last Order was created from this RecurringOrder.nextOrderAt
(ZonedDateTime nextOrderAt) Date and time (UTC) when the next Order will be created from this RecurringOrder.static RecurringOrderBuilder
of()
factory method for an instance of RecurringOrderBuilderstatic RecurringOrderBuilder
of
(RecurringOrder template) create builder for RecurringOrder instanceoriginOrder
(OrderReference originOrder) recurringOrderState
(RecurringOrderState recurringOrderState) Current state of the RecurringOrder.resumesAt
(ZonedDateTime resumesAt) Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.schedule
(RecurrencePolicySchedule schedule) Schedule of the RecurringOrder.schedule
(Function<RecurrencePolicyScheduleBuilder, Builder<? extends RecurrencePolicySchedule>> builder) Schedule of the RecurringOrder.skipConfiguration
(SkipConfiguration skipConfiguration) Information about current and future skips for this RecurringOrder.skipConfiguration
(Function<SkipConfigurationBuilder, Builder<? extends SkipConfiguration>> builder) Information about current and future skips for this RecurringOrder.startsAt
(ZonedDateTime startsAt) Date and time (UTC) when the RecurringOrder starts creating new Orders.state
(StateReference state) State of the RecurringOrder in a custom workflow.State of the RecurringOrder in a custom workflow.store
(StoreKeyReference store) Reference to a Store.Reference to a Store.Current version of the RecurringOrder.Reference to the Business Unit that the RecurringOrder belongs to.withCart
(Function<CartReferenceBuilder, CartReference> builder) Reference to the Cart for a RecurringOrder.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the RecurringOrder.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the RecurringOrder.The Customer that the RecurringOrder belongs to.IDs and references that last modified the RecurringOrder.withState
(Function<StateReferenceBuilder, StateReference> builder) State of the RecurringOrder in a custom workflow.Reference to a Store.
-
Constructor Details
-
RecurringOrderBuilder
public RecurringOrderBuilder()
-
-
Method Details
-
id
Unique identifier of the RecurringOrder.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the RecurringOrder.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) when the RecurringOrder was created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) when the RecurringOrder was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the RecurringOrder.
- Parameters:
key
- value to be set- Returns:
- Builder
-
cart
Reference to the Cart for a RecurringOrder. The referenced Cart will have the
RecurringOrder
CartOrigin.- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
withCart
Reference to the Cart for a RecurringOrder. The referenced Cart will have the
RecurringOrder
CartOrigin.- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
cart
Reference to the Cart for a RecurringOrder. The referenced Cart will have the
RecurringOrder
CartOrigin.- Parameters:
cart
- value to be set- Returns:
- Builder
-
originOrder
public RecurringOrderBuilder originOrder(Function<OrderReferenceBuilder, OrderReferenceBuilder> builder) - Parameters:
builder
- function to build the originOrder value- Returns:
- Builder
-
withOriginOrder
public RecurringOrderBuilder withOriginOrder(Function<OrderReferenceBuilder, OrderReference> builder) - Parameters:
builder
- function to build the originOrder value- Returns:
- Builder
-
originOrder
- Parameters:
originOrder
- value to be set- Returns:
- Builder
-
startsAt
Date and time (UTC) when the RecurringOrder starts creating new Orders.
- Parameters:
startsAt
- value to be set- Returns:
- Builder
-
resumesAt
Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.
- Parameters:
resumesAt
- value to be set- Returns:
- Builder
-
expiresAt
Date and time (UTC) when the RecurringOrder expires.
- Parameters:
expiresAt
- value to be set- Returns:
- Builder
-
lastOrderAt
Date and time (UTC) when the last Order was created from this RecurringOrder.
- Parameters:
lastOrderAt
- value to be set- Returns:
- Builder
-
nextOrderAt
Date and time (UTC) when the next Order will be created from this RecurringOrder.
- Parameters:
nextOrderAt
- value to be set- Returns:
- Builder
-
skipConfiguration
Information about current and future skips for this RecurringOrder.
- Parameters:
skipConfiguration
- value to be set- Returns:
- Builder
-
skipConfiguration
public RecurringOrderBuilder skipConfiguration(Function<SkipConfigurationBuilder, Builder<? extends SkipConfiguration>> builder) Information about current and future skips for this RecurringOrder.
- Parameters:
builder
- function to build the skipConfiguration value- Returns:
- Builder
-
store
public RecurringOrderBuilder store(Function<StoreKeyReferenceBuilder, StoreKeyReferenceBuilder> builder) Reference to a Store.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
withStore
public RecurringOrderBuilder withStore(Function<StoreKeyReferenceBuilder, StoreKeyReference> builder) Reference to a Store.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
store
Reference to a Store.
- Parameters:
store
- value to be set- Returns:
- Builder
-
businessUnit
public RecurringOrderBuilder businessUnit(Function<BusinessUnitKeyReferenceBuilder, BusinessUnitKeyReferenceBuilder> builder) Reference to the Business Unit that the RecurringOrder belongs to.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public RecurringOrderBuilder withBusinessUnit(Function<BusinessUnitKeyReferenceBuilder, BusinessUnitKeyReference> builder) Reference to the Business Unit that the RecurringOrder belongs to.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
Reference to the Business Unit that the RecurringOrder belongs to.
- Parameters:
businessUnit
- value to be set- Returns:
- Builder
-
state
State of the RecurringOrder in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
State of the RecurringOrder in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State of the RecurringOrder in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
recurringOrderState
Current state of the RecurringOrder.
- Parameters:
recurringOrderState
- value to be set- Returns:
- Builder
-
schedule
Schedule of the RecurringOrder.
- Parameters:
schedule
- value to be set- Returns:
- Builder
-
schedule
public RecurringOrderBuilder schedule(Function<RecurrencePolicyScheduleBuilder, Builder<? extends RecurrencePolicySchedule>> builder) Schedule of the RecurringOrder.
- Parameters:
builder
- function to build the schedule value- Returns:
- Builder
-
customer
public RecurringOrderBuilder customer(Function<CustomerReferenceBuilder, CustomerReferenceBuilder> builder) The Customer that the RecurringOrder belongs to.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public RecurringOrderBuilder withCustomer(Function<CustomerReferenceBuilder, CustomerReference> builder) The Customer that the RecurringOrder belongs to.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
The Customer that the RecurringOrder belongs to.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
customerEmail
Email address of the Customer that the RecurringOrder belongs to.
- Parameters:
customerEmail
- value to be set- Returns:
- Builder
-
custom
Custom Fields of the RecurringOrder.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the RecurringOrder.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the RecurringOrder.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
lastModifiedBy
public RecurringOrderBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the RecurringOrder.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public RecurringOrderBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the RecurringOrder.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the RecurringOrder.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the RecurringOrder.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the RecurringOrder.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the RecurringOrder.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the RecurringOrder.
- Returns:
- id
-
getVersion
Current version of the RecurringOrder.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) when the RecurringOrder was created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) when the RecurringOrder was last updated.
- Returns:
- lastModifiedAt
-
getKey
User-defined unique identifier of the RecurringOrder.
- Returns:
- key
-
getCart
Reference to the Cart for a RecurringOrder. The referenced Cart will have the
RecurringOrder
CartOrigin.- Returns:
- cart
-
getOriginOrder
- Returns:
- originOrder
-
getStartsAt
Date and time (UTC) when the RecurringOrder starts creating new Orders.
- Returns:
- startsAt
-
getResumesAt
Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.
- Returns:
- resumesAt
-
getExpiresAt
Date and time (UTC) when the RecurringOrder expires.
- Returns:
- expiresAt
-
getLastOrderAt
Date and time (UTC) when the last Order was created from this RecurringOrder.
- Returns:
- lastOrderAt
-
getNextOrderAt
Date and time (UTC) when the next Order will be created from this RecurringOrder.
- Returns:
- nextOrderAt
-
getSkipConfiguration
Information about current and future skips for this RecurringOrder.
- Returns:
- skipConfiguration
-
getStore
Reference to a Store.
- Returns:
- store
-
getBusinessUnit
Reference to the Business Unit that the RecurringOrder belongs to.
- Returns:
- businessUnit
-
getState
State of the RecurringOrder in a custom workflow.
- Returns:
- state
-
getRecurringOrderState
Current state of the RecurringOrder.
- Returns:
- recurringOrderState
-
getSchedule
Schedule of the RecurringOrder.
- Returns:
- schedule
-
getCustomer
The Customer that the RecurringOrder belongs to.
- Returns:
- customer
-
getCustomerEmail
Email address of the Customer that the RecurringOrder belongs to.
- Returns:
- customerEmail
-
getCustom
Custom Fields of the RecurringOrder.
- Returns:
- custom
-
getLastModifiedBy
IDs and references that last modified the RecurringOrder.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the RecurringOrder.
- Returns:
- createdBy
-
build
builds RecurringOrder with checking for non-null required values- Specified by:
build
in interfaceBuilder<RecurringOrder>
- Returns:
- RecurringOrder
-
buildUnchecked
builds RecurringOrder without checking for non-null required values- Returns:
- RecurringOrder
-
of
factory method for an instance of RecurringOrderBuilder- Returns:
- builder
-
of
create builder for RecurringOrder instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-