Interface TextLineItem
- All Superinterfaces:
Customizable<TextLineItem>
TextLineItems are Line Items that use text values instead of references to Products.
Example to create an instance using the builder pattern
TextLineItem textLineItem = TextLineItem.builder()
.addedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.id("{id}")
.name(nameBuilder -> nameBuilder)
.quantity(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TextLineItemBuilderbuilder()builder factory method for TextLineItemstatic TextLineItemBuilderbuilder(TextLineItem template) create builder for TextLineItem instancecopyDeep()static TextLineItemdeepCopy(TextLineItem template) factory method to create a deep copy of TextLineItem@NotNull ZonedDateTimeDate and time (UTC) the TextLineItem was added to the ShoppingList.@Valid CustomFieldsCustom Fields of the TextLineItem.@Valid LocalizedStringDescription of the TextLineItem.@NotNull StringgetId()Unique identifier of the TextLineItem.getKey()User-defined identifier of the TextLineItem.@NotNull @Valid LocalizedStringgetName()Name of the TextLineItem.@NotNull LongNumber of entries in the TextLineItem.static TextLineItemof()factory methodstatic TextLineItemof(TextLineItem template) factory method to create a shallow copy TextLineItemvoidsetAddedAt(ZonedDateTime addedAt) Date and time (UTC) the TextLineItem was added to the ShoppingList.voidsetCustom(CustomFields custom) Custom Fields of the TextLineItem.voidsetDescription(LocalizedString description) Description of the TextLineItem.voidUnique identifier of the TextLineItem.voidUser-defined identifier of the TextLineItem.voidsetName(LocalizedString name) Name of the TextLineItem.voidsetQuantity(Long quantity) Number of entries in the TextLineItem.static com.fasterxml.jackson.core.type.TypeReference<TextLineItem>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithTextLineItem(Function<TextLineItem, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
-
Method Details
-
getAddedAt
Date and time (UTC) the TextLineItem was added to the ShoppingList.
- Returns:
- addedAt
-
getCustom
Custom Fields of the TextLineItem.
- Specified by:
getCustomin interfaceCustomizable<TextLineItem>- Returns:
- custom
-
getDescription
Description of the TextLineItem.
- Returns:
- description
-
getId
Unique identifier of the TextLineItem.
- Returns:
- id
-
getKey
String getKey()User-defined identifier of the TextLineItem. It is unique per ShoppingList.
- Returns:
- key
-
getName
Name of the TextLineItem.
- Returns:
- name
-
getQuantity
Number of entries in the TextLineItem.
- Returns:
- quantity
-
setAddedAt
Date and time (UTC) the TextLineItem was added to the ShoppingList.
- Parameters:
addedAt- value to be set
-
setCustom
Custom Fields of the TextLineItem.
- Specified by:
setCustomin interfaceCustomizable<TextLineItem>- Parameters:
custom- value to be set
-
setDescription
Description of the TextLineItem.
- Parameters:
description- value to be set
-
setId
Unique identifier of the TextLineItem.
- Parameters:
id- value to be set
-
setKey
User-defined identifier of the TextLineItem. It is unique per ShoppingList.
- Parameters:
key- value to be set
-
setName
Name of the TextLineItem.
- Parameters:
name- value to be set
-
setQuantity
Number of entries in the TextLineItem.
- Parameters:
quantity- value to be set
-
of
factory method- Returns:
- instance of TextLineItem
-
of
factory method to create a shallow copy TextLineItem- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
TextLineItem copyDeep() -
deepCopy
factory method to create a deep copy of TextLineItem- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TextLineItem- Returns:
- builder
-
builder
create builder for TextLineItem instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withTextLineItem
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
-