Class ShoppingListDraftBuilder
- All Implemented Interfaces:
Builder<ShoppingListDraft>
Example to create an instance using the builder pattern
ShoppingListDraft shoppingListDraft = ShoppingListDraft.builder()
.name(nameBuilder -> nameBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLine Items (containing Products) to add to the ShoppingList.Line Items (containing text values) to add to the ShoppingList.anonymousId
(String anonymousId) Identifies ShoppingLists belonging to an anonymous session.build()
builds ShoppingListDraft with checking for non-null required valuesbuilds ShoppingListDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields defined for the ShoppingList.Custom Fields defined for the ShoppingList.customer
(CustomerResourceIdentifier customer) The Customer the ShoppingList should be associated to.The Customer the ShoppingList should be associated to.deleteDaysAfterLastModification
(Long deleteDaysAfterLastModification) Number of days after which the ShoppingList will be automatically deleted if it has not been modified.description
(LocalizedString description) Description of the ShoppingList.Description of the ShoppingList.Identifies ShoppingLists belonging to an anonymous session.Custom Fields defined for the ShoppingList.The Customer the ShoppingList should be associated to.Number of days after which the ShoppingList will be automatically deleted if it has not been modified.Description of the ShoppingList.getKey()
User-defined unique identifier for the ShoppingList.Line Items (containing Products) to add to the ShoppingList.getName()
Name of the ShoppingList.getSlug()
Human-readable identifiers usually used as deep-link URL to the related ShoppingList.getStore()
Assigns the new ShoppingList to the Store.Line Items (containing text values) to add to the ShoppingList.User-defined unique identifier for the ShoppingList.lineItems
(ShoppingListLineItemDraft... lineItems) Line Items (containing Products) to add to the ShoppingList.lineItems
(List<ShoppingListLineItemDraft> lineItems) Line Items (containing Products) to add to the ShoppingList.name
(LocalizedString name) Name of the ShoppingList.Name of the ShoppingList.static ShoppingListDraftBuilder
of()
factory method for an instance of ShoppingListDraftBuilderstatic ShoppingListDraftBuilder
of
(ShoppingListDraft template) create builder for ShoppingListDraft instanceplusLineItems
(ShoppingListLineItemDraft... lineItems) Line Items (containing Products) to add to the ShoppingList.Line Items (containing Products) to add to the ShoppingList.plusTextLineItems
(TextLineItemDraft... textLineItems) Line Items (containing text values) to add to the ShoppingList.Line Items (containing text values) to add to the ShoppingList.Line Items (containing Products) to add to the ShoppingList.Line Items (containing text values) to add to the ShoppingList.slug
(LocalizedString slug) Human-readable identifiers usually used as deep-link URL to the related ShoppingList.Human-readable identifiers usually used as deep-link URL to the related ShoppingList.store
(StoreResourceIdentifier store) Assigns the new ShoppingList to the Store.Assigns the new ShoppingList to the Store.textLineItems
(TextLineItemDraft... textLineItems) Line Items (containing text values) to add to the ShoppingList.textLineItems
(List<TextLineItemDraft> textLineItems) Line Items (containing text values) to add to the ShoppingList.Custom Fields defined for the ShoppingList.The Customer the ShoppingList should be associated to.Description of the ShoppingList.Line Items (containing Products) to add to the ShoppingList.Name of the ShoppingList.Human-readable identifiers usually used as deep-link URL to the related ShoppingList.Assigns the new ShoppingList to the Store.Line Items (containing text values) to add to the ShoppingList.
-
Constructor Details
-
ShoppingListDraftBuilder
public ShoppingListDraftBuilder()
-
-
Method Details
-
name
public ShoppingListDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the ShoppingList.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the ShoppingList.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the ShoppingList.
- Parameters:
name
- value to be set- Returns:
- Builder
-
slug
public ShoppingListDraftBuilder slug(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Human-readable identifiers usually used as deep-link URL to the related ShoppingList. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. The slug must match the pattern
[a-zA-Z0-9_-]{2,256}
.- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
withSlug
Human-readable identifiers usually used as deep-link URL to the related ShoppingList. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. The slug must match the pattern
[a-zA-Z0-9_-]{2,256}
.- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
slug
Human-readable identifiers usually used as deep-link URL to the related ShoppingList. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. The slug must match the pattern
[a-zA-Z0-9_-]{2,256}
.- Parameters:
slug
- value to be set- Returns:
- Builder
-
customer
public ShoppingListDraftBuilder customer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifierBuilder> builder) The Customer the ShoppingList should be associated to.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public ShoppingListDraftBuilder withCustomer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifier> builder) The Customer the ShoppingList should be associated to.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
The Customer the ShoppingList should be associated to.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier for the ShoppingList.
- Parameters:
key
- value to be set- Returns:
- Builder
-
description
public ShoppingListDraftBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the ShoppingList.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public ShoppingListDraftBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the ShoppingList.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the ShoppingList.
- Parameters:
description
- value to be set- Returns:
- Builder
-
anonymousId
Identifies ShoppingLists belonging to an anonymous session.
- Parameters:
anonymousId
- value to be set- Returns:
- Builder
-
deleteDaysAfterLastModification
public ShoppingListDraftBuilder deleteDaysAfterLastModification(@Nullable Long deleteDaysAfterLastModification) Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.
- Parameters:
deleteDaysAfterLastModification
- value to be set- Returns:
- Builder
-
lineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
lineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
public ShoppingListDraftBuilder plusLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraftBuilder> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
withLineItems
public ShoppingListDraftBuilder withLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraftBuilder> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
addLineItems
public ShoppingListDraftBuilder addLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraft> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
setLineItems
public ShoppingListDraftBuilder setLineItems(Function<ShoppingListLineItemDraftBuilder, ShoppingListLineItemDraft> builder) Line Items (containing Products) to add to the ShoppingList.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
textLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems
- value to be set- Returns:
- Builder
-
textLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems
- value to be set- Returns:
- Builder
-
plusTextLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems
- value to be set- Returns:
- Builder
-
plusTextLineItems
public ShoppingListDraftBuilder plusTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraftBuilder> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
withTextLineItems
public ShoppingListDraftBuilder withTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraftBuilder> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
addTextLineItems
public ShoppingListDraftBuilder addTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraft> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
setTextLineItems
public ShoppingListDraftBuilder setTextLineItems(Function<TextLineItemDraftBuilder, TextLineItemDraft> builder) Line Items (containing text values) to add to the ShoppingList.
- Parameters:
builder
- function to build the textLineItems value- Returns:
- Builder
-
store
public ShoppingListDraftBuilder store(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Assigns the new ShoppingList to the Store.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
withStore
public ShoppingListDraftBuilder withStore(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Assigns the new ShoppingList to the Store.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
store
Assigns the new ShoppingList to the Store.
- Parameters:
store
- value to be set- Returns:
- Builder
-
custom
public ShoppingListDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields defined for the ShoppingList.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public ShoppingListDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields defined for the ShoppingList.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields defined for the ShoppingList.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getName
Name of the ShoppingList.
- Returns:
- name
-
getSlug
Human-readable identifiers usually used as deep-link URL to the related ShoppingList. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. The slug must match the pattern
[a-zA-Z0-9_-]{2,256}
.- Returns:
- slug
-
getCustomer
The Customer the ShoppingList should be associated to.
- Returns:
- customer
-
getKey
User-defined unique identifier for the ShoppingList.
- Returns:
- key
-
getDescription
Description of the ShoppingList.
- Returns:
- description
-
getAnonymousId
Identifies ShoppingLists belonging to an anonymous session.
- Returns:
- anonymousId
-
getDeleteDaysAfterLastModification
Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.
- Returns:
- deleteDaysAfterLastModification
-
getLineItems
Line Items (containing Products) to add to the ShoppingList.
- Returns:
- lineItems
-
getTextLineItems
Line Items (containing text values) to add to the ShoppingList.
- Returns:
- textLineItems
-
getStore
Assigns the new ShoppingList to the Store.
- Returns:
- store
-
getCustom
Custom Fields defined for the ShoppingList.
- Returns:
- custom
-
build
builds ShoppingListDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ShoppingListDraft>
- Returns:
- ShoppingListDraft
-
buildUnchecked
builds ShoppingListDraft without checking for non-null required values- Returns:
- ShoppingListDraft
-
of
factory method for an instance of ShoppingListDraftBuilder- Returns:
- builder
-
of
create builder for ShoppingListDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-