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 ShoppingListBuilder
builder()
builder factory method for ShoppingListstatic ShoppingListBuilder
builder
(ShoppingList template) create builder for ShoppingList instancestatic ShoppingList
deepCopy
(ShoppingList template) factory method to create a deep copy of ShoppingListIdentifies ShoppingLists belonging to an anonymous session.@NotNull ZonedDateTime
Date and time (UTC) the ShoppingList was initially created.@Valid CreatedBy
IDs and references that created the ShoppingList.@Valid CustomFields
Custom Fields defined for the ShoppingList.@Valid CustomerReference
Reference to a Customer associated with the ShoppingList.Number of days after which the ShoppingList will be automatically deleted if it has not been modified.@Valid LocalizedString
Description of the ShoppingList.@NotNull String
getId()
Unique identifier of the ShoppingList.getKey()
User-defined unique identifier of the ShoppingList.@NotNull ZonedDateTime
Date and time (UTC) the ShoppingList was last updated.@Valid LastModifiedBy
IDs and references that last modified the ShoppingList.@NotNull @Valid List<ShoppingListLineItem>
Line Items (containing Products) of the ShoppingList.@NotNull @Valid LocalizedString
getName()
Name of the ShoppingList.@Valid LocalizedString
getSlug()
Human-readable identifiers usually used as deep-link URL to the related ShoppingList.@Valid StoreKeyReference
getStore()
Store to which the ShoppingList is assigned.@NotNull @Valid List<TextLineItem>
Line Items (containing text values) of the ShoppingList.@NotNull Long
Current version of the ShoppingList.static ShoppingList
of()
factory methodstatic ShoppingList
of
(ShoppingList template) factory method to create a shallow copy ShoppingListstatic ReferenceTypeId
void
setAnonymousId
(String anonymousId) Identifies ShoppingLists belonging to an anonymous session.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ShoppingList was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the ShoppingList.void
setCustom
(CustomFields custom) Custom Fields defined for the ShoppingList.void
setCustomer
(CustomerReference customer) Reference to a Customer associated with the ShoppingList.void
setDeleteDaysAfterLastModification
(Long deleteDaysAfterLastModification) Number of days after which the ShoppingList will be automatically deleted if it has not been modified.void
setDescription
(LocalizedString description) Description of the ShoppingList.void
Unique identifier of the ShoppingList.void
User-defined unique identifier of the ShoppingList.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the ShoppingList was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the ShoppingList.void
setLineItems
(ShoppingListLineItem... lineItems) Line Items (containing Products) of the ShoppingList.void
setLineItems
(List<ShoppingListLineItem> lineItems) Line Items (containing Products) of the ShoppingList.void
setName
(LocalizedString name) Name of the ShoppingList.void
setSlug
(LocalizedString slug) Human-readable identifiers usually used as deep-link URL to the related ShoppingList.void
setStore
(StoreKeyReference store) Store to which the ShoppingList is assigned.void
setTextLineItems
(TextLineItem... textLineItems) Line Items (containing text values) of the ShoppingList.void
setTextLineItems
(List<TextLineItem> textLineItems) Line Items (containing text values) of the ShoppingList.void
setVersion
(Long version) Current version of the ShoppingList.static com.fasterxml.jackson.core.type.TypeReference<ShoppingList>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withShoppingList
(Function<ShoppingList, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.shopping_list.ShoppingListMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the ShoppingList.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<ShoppingList>
- Specified by:
getId
in interfaceIdentifiable<ShoppingList>
- Specified by:
getId
in interfaceVersioned<ShoppingList>
- Returns:
- id
-
getVersion
Current version of the ShoppingList.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<ShoppingList>
- Specified by:
getVersion
in 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 15languages
set 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 which the ShoppingList will be automatically deleted if it has not been modified.
- Returns:
- deleteDaysAfterLastModification
-
getAnonymousId
String getAnonymousId()Identifies ShoppingLists belonging to an anonymous session.
- Returns:
- anonymousId
-
getStore
Store to which the ShoppingList is assigned.
- Returns:
- store
-
getCustom
Custom Fields defined for the ShoppingList.
- Specified by:
getCustom
in interfaceCustomizable<ShoppingList>
- Returns:
- custom
-
getCreatedAt
Date and time (UTC) the ShoppingList was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ShoppingList was last updated.
- Specified by:
getLastModifiedAt
in 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:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the ShoppingList.
- Specified by:
setVersion
in 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 15languages
set 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 which the ShoppingList will be automatically deleted if it has not been modified.
- 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
-
setCustom
Custom Fields defined for the ShoppingList.
- Specified by:
setCustom
in interfaceCustomizable<ShoppingList>
- Parameters:
custom
- value to be set
-
setCreatedAt
Date and time (UTC) the ShoppingList was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the ShoppingList was last updated.
- Specified by:
setLastModifiedAt
in 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
-
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
-