Interface ShoppingList
- All Superinterfaces:
BaseResource,Customizable<ShoppingList>,DomainResource<ShoppingList>,Identifiable<ShoppingList>,Referencable<ShoppingList>,ResourceIdentifiable<ShoppingList>,ShoppingListMixin,Versioned<ShoppingList>,WithKey
Example to create an instance using the builder pattern
ShoppingList shoppingList = ShoppingList.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name(nameBuilder -> nameBuilder)
.plusLineItems(lineItemsBuilder -> lineItemsBuilder)
.plusTextLineItems(textLineItemsBuilder -> textLineItemsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShoppingListBuilderbuilder()builder factory method for ShoppingListstatic ShoppingListBuilderbuilder(ShoppingList template) create builder for ShoppingList instancecopyDeep()static ShoppingListdeepCopy(ShoppingList template) factory method to create a deep copy of ShoppingListIdentifies ShoppingLists belonging to an anonymous session.@Valid BusinessUnitKeyReferenceReference to the Business Unit the Shopping List belongs to.@NotNull ZonedDateTimeDate and time (UTC) the ShoppingList was initially created.@Valid CreatedByIDs and references that created the ShoppingList.@Valid CustomFieldsCustom Fields defined for the ShoppingList.@Valid CustomerReferenceReference to a Customer associated with the ShoppingList.Number of days after the last modification before a ShoppingList is deleted.@Valid LocalizedStringDescription of the ShoppingList.@NotNull StringgetId()Unique identifier of the ShoppingList.getKey()User-defined unique identifier of the ShoppingList.@NotNull ZonedDateTimeDate and time (UTC) the ShoppingList was last updated.@Valid LastModifiedByIDs and references that last modified the ShoppingList.@NotNull @Valid List<ShoppingListLineItem>Line Items (containing Products) of 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 StoreKeyReferencegetStore()Store to which the ShoppingList is assigned.@NotNull @Valid List<TextLineItem>Line Items (containing text values) of the ShoppingList.@NotNull LongCurrent version of the ShoppingList.static ShoppingListof()factory methodstatic ShoppingListof(ShoppingList template) factory method to create a shallow copy ShoppingListstatic ReferenceTypeIdvoidsetAnonymousId(String anonymousId) Identifies ShoppingLists belonging to an anonymous session.voidsetBusinessUnit(BusinessUnitKeyReference businessUnit) Reference to the Business Unit the Shopping List belongs to.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the ShoppingList was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the ShoppingList.voidsetCustom(CustomFields custom) Custom Fields defined for the ShoppingList.voidsetCustomer(CustomerReference customer) Reference to a Customer associated with the ShoppingList.voidsetDeleteDaysAfterLastModification(Long deleteDaysAfterLastModification) Number of days after the last modification before a ShoppingList is deleted.voidsetDescription(LocalizedString description) Description of the ShoppingList.voidUnique identifier of the ShoppingList.voidUser-defined unique identifier of the ShoppingList.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the ShoppingList was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the ShoppingList.voidsetLineItems(ShoppingListLineItem... lineItems) Line Items (containing Products) of the ShoppingList.voidsetLineItems(List<ShoppingListLineItem> lineItems) Line Items (containing Products) of 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(StoreKeyReference store) Store to which the ShoppingList is assigned.voidsetTextLineItems(TextLineItem... textLineItems) Line Items (containing text values) of the ShoppingList.voidsetTextLineItems(List<TextLineItem> textLineItems) Line Items (containing text values) of the ShoppingList.voidsetVersion(Long version) Current version of the ShoppingList.static com.fasterxml.jackson.core.type.TypeReference<ShoppingList>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithShoppingList(Function<ShoppingList, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.shopping_list.ShoppingListMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the ShoppingList.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<ShoppingList>- Specified by:
getIdin interfaceIdentifiable<ShoppingList>- Specified by:
getIdin interfaceVersioned<ShoppingList>- Returns:
- id
-
getVersion
Current version of the ShoppingList.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<ShoppingList>- Specified by:
getVersionin interfaceVersioned<ShoppingList>- Returns:
- version
-
getName
Name of the ShoppingList.
- Returns:
- name
-
getKey
String getKey()User-defined unique identifier of the ShoppingList.
-
getCustomer
Reference to a Customer associated with the ShoppingList.
- Returns:
- customer
-
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}. For good performance, indexes are provided for the first 15languagesset on the Project.- Returns:
- slug
-
getDescription
Description of the ShoppingList.
- Returns:
- description
-
getLineItems
Line Items (containing Products) of the ShoppingList.
- Returns:
- lineItems
-
getTextLineItems
Line Items (containing text values) of the ShoppingList.
- Returns:
- textLineItems
-
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
-
getAnonymousId
String getAnonymousId()Identifies ShoppingLists belonging to an anonymous session.
- Returns:
- anonymousId
-
getStore
Store to which the ShoppingList is assigned.
- Returns:
- store
-
getBusinessUnit
Reference to the Business Unit the Shopping List belongs to. Only available for B2B-enabled Projects.
- Returns:
- businessUnit
-
getCustom
Custom Fields defined for the ShoppingList.
- Specified by:
getCustomin interfaceCustomizable<ShoppingList>- Returns:
- custom
-
getCreatedAt
Date and time (UTC) the ShoppingList was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ShoppingList was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the ShoppingList.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the ShoppingList.
- Returns:
- createdBy
-
setId
Unique identifier of the ShoppingList.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the ShoppingList.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setName
Name of the ShoppingList.
- Parameters:
name- value to be set
-
setKey
User-defined unique identifier of the ShoppingList.
- Parameters:
key- value to be set
-
setCustomer
Reference to a Customer associated with the ShoppingList.
- Parameters:
customer- 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}. For good performance, indexes are provided for the first 15languagesset on the Project.- Parameters:
slug- value to be set
-
setDescription
Description of the ShoppingList.
- Parameters:
description- value to be set
-
setLineItems
Line Items (containing Products) of the ShoppingList.
- Parameters:
lineItems- values to be set
-
setLineItems
Line Items (containing Products) of the ShoppingList.
- Parameters:
lineItems- values to be set
-
setTextLineItems
Line Items (containing text values) of the ShoppingList.
- Parameters:
textLineItems- values to be set
-
setTextLineItems
Line Items (containing text values) of the ShoppingList.
- Parameters:
textLineItems- values 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
-
setAnonymousId
Identifies ShoppingLists belonging to an anonymous session.
- Parameters:
anonymousId- value to be set
-
setStore
Store to which the ShoppingList is assigned.
- Parameters:
store- value to be set
-
setBusinessUnit
Reference to the Business Unit the Shopping List belongs to. Only available for B2B-enabled Projects.
- Parameters:
businessUnit- value to be set
-
setCustom
Custom Fields defined for the ShoppingList.
- Specified by:
setCustomin interfaceCustomizable<ShoppingList>- Parameters:
custom- value to be set
-
setCreatedAt
Date and time (UTC) the ShoppingList was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the ShoppingList was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the ShoppingList.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the ShoppingList.
- Parameters:
createdBy- value to be set
-
of
factory method- Returns:
- instance of ShoppingList
-
of
factory method to create a shallow copy ShoppingList- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ShoppingList copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of ShoppingList- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShoppingList- Returns:
- builder
-
builder
create builder for ShoppingList instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withShoppingList
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-