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 TextLineItemBuilder
builder()
builder factory method for TextLineItemstatic TextLineItemBuilder
builder
(TextLineItem template) create builder for TextLineItem instancestatic TextLineItem
deepCopy
(TextLineItem template) factory method to create a deep copy of TextLineItem@NotNull ZonedDateTime
Date and time (UTC) the TextLineItem was added to the ShoppingList.@Valid CustomFields
Custom Fields of the TextLineItem.@Valid LocalizedString
Description of the TextLineItem.@NotNull String
getId()
Unique identifier of the TextLineItem.getKey()
User-defined identifier of the TextLineItem.@NotNull @Valid LocalizedString
getName()
Name of the TextLineItem.@NotNull Long
Number of entries in the TextLineItem.static TextLineItem
of()
factory methodstatic TextLineItem
of
(TextLineItem template) factory method to create a shallow copy TextLineItemvoid
setAddedAt
(ZonedDateTime addedAt) Date and time (UTC) the TextLineItem was added to the ShoppingList.void
setCustom
(CustomFields custom) Custom Fields of the TextLineItem.void
setDescription
(LocalizedString description) Description of the TextLineItem.void
Unique identifier of the TextLineItem.void
User-defined identifier of the TextLineItem.void
setName
(LocalizedString name) Name of the TextLineItem.void
setQuantity
(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> T
withTextLineItem
(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:
getCustom
in 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:
setCustom
in 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
-
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
-