Interface ShoppingListDraft
- All Superinterfaces:
CustomizableDraft<ShoppingListDraft>,Draft<ShoppingListDraft>,WithKey
Example to create an instance using the builder pattern
ShoppingListDraft shoppingListDraft = ShoppingListDraft.builder()
.name(nameBuilder -> nameBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShoppingListDraftBuilderbuilder()builder factory method for ShoppingListDraftstatic ShoppingListDraftBuilderbuilder(ShoppingListDraft template) create builder for ShoppingListDraft instancecopyDeep()static ShoppingListDraftdeepCopy(ShoppingListDraft template) factory method to create a deep copy of ShoppingListDraftIdentifies ShoppingLists belonging to an anonymous session.ResourceIdentifier of the Business Unit the Shopping List should belong to.@Valid CustomFieldsDraftCustom Fields defined for the ShoppingList.@Valid CustomerResourceIdentifierThe Customer the ShoppingList should be associated to.Number of days after the last modification before a ShoppingList is deleted.@Valid LocalizedStringDescription of the ShoppingList.getKey()User-defined unique identifier for the ShoppingList.@Valid List<ShoppingListLineItemDraft>Line Items (containing Products) to add to the ShoppingList.@NotNull @Valid LocalizedStringgetName()Name of the ShoppingList.@Valid LocalizedStringgetSlug()Human-readable identifiers usually used as deep-link URL to the related ShoppingList.@Valid StoreResourceIdentifiergetStore()Assigns the new ShoppingList to the Store.@Valid List<TextLineItemDraft>Line Items (containing text values) to add to the ShoppingList.static ShoppingListDraftof()factory methodstatic ShoppingListDraftof(ShoppingListDraft template) factory method to create a shallow copy ShoppingListDraftvoidsetAnonymousId(String anonymousId) Identifies ShoppingLists belonging to an anonymous session.voidsetBusinessUnit(BusinessUnitResourceIdentifier businessUnit) ResourceIdentifier of the Business Unit the Shopping List should belong to.voidsetCustom(CustomFieldsDraft custom) Custom Fields defined for the ShoppingList.voidsetCustomer(CustomerResourceIdentifier customer) The Customer the ShoppingList should be associated to.voidsetDeleteDaysAfterLastModification(Long deleteDaysAfterLastModification) Number of days after the last modification before a ShoppingList is deleted.voidsetDescription(LocalizedString description) Description of the ShoppingList.voidUser-defined unique identifier for the ShoppingList.voidsetLineItems(ShoppingListLineItemDraft... lineItems) Line Items (containing Products) to add to the ShoppingList.voidsetLineItems(List<ShoppingListLineItemDraft> lineItems) Line Items (containing Products) to add to the ShoppingList.voidsetName(LocalizedString name) Name of the ShoppingList.voidsetSlug(LocalizedString slug) Human-readable identifiers usually used as deep-link URL to the related ShoppingList.voidsetStore(StoreResourceIdentifier store) Assigns the new ShoppingList to the Store.voidsetTextLineItems(TextLineItemDraft... textLineItems) Line Items (containing text values) to add to the ShoppingList.voidsetTextLineItems(List<TextLineItemDraft> textLineItems) Line Items (containing text values) to add to the ShoppingList.static com.fasterxml.jackson.core.type.TypeReference<ShoppingListDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithShoppingListDraft(Function<ShoppingListDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
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
String getKey()User-defined unique identifier for the ShoppingList.
-
getDescription
Description of the ShoppingList.
- Returns:
- description
-
getAnonymousId
String getAnonymousId()Identifies ShoppingLists belonging to an anonymous session.
- Returns:
- anonymousId
-
getDeleteDaysAfterLastModification
Long getDeleteDaysAfterLastModification()Number of days after the last modification before a ShoppingList is deleted. 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
-
getBusinessUnit
ResourceIdentifier of the Business Unit the Shopping List should belong to. When the
customerof the Shopping List is set, the Customer must be an Associate of the Business Unit. Only available for B2B-enabled Projects.- Returns:
- businessUnit
-
getCustom
Custom Fields defined for the ShoppingList.
- Specified by:
getCustomin interfaceCustomizableDraft<ShoppingListDraft>- Returns:
- custom
-
setName
Name of the ShoppingList.
- Parameters:
name- value to be set
-
setSlug
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
-
setCustomer
The Customer the ShoppingList should be associated to.
- Parameters:
customer- value to be set
-
setKey
User-defined unique identifier for the ShoppingList.
- Parameters:
key- value to be set
-
setDescription
Description of the ShoppingList.
- Parameters:
description- value to be set
-
setAnonymousId
Identifies ShoppingLists belonging to an anonymous session.
- Parameters:
anonymousId- value to be set
-
setDeleteDaysAfterLastModification
Number of days after the last modification before a ShoppingList is deleted. If not set, the default value configured in the Project is used.
- Parameters:
deleteDaysAfterLastModification- value to be set
-
setLineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems- values to be set
-
setLineItems
Line Items (containing Products) to add to the ShoppingList.
- Parameters:
lineItems- values to be set
-
setTextLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems- values to be set
-
setTextLineItems
Line Items (containing text values) to add to the ShoppingList.
- Parameters:
textLineItems- values to be set
-
setStore
Assigns the new ShoppingList to the Store.
- Parameters:
store- value to be set
-
setBusinessUnit
ResourceIdentifier of the Business Unit the Shopping List should belong to. When the
customerof the Shopping List is set, the Customer must be an Associate of the Business Unit. Only available for B2B-enabled Projects.- Parameters:
businessUnit- value to be set
-
setCustom
Custom Fields defined for the ShoppingList.
- Specified by:
setCustomin interfaceCustomizableDraft<ShoppingListDraft>- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of ShoppingListDraft
-
of
factory method to create a shallow copy ShoppingListDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ShoppingListDraft copyDeep() -
deepCopy
factory method to create a deep copy of ShoppingListDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShoppingListDraft- Returns:
- builder
-
builder
create builder for ShoppingListDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withShoppingListDraft
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
-