Interface LineItem
public interface LineItem
LineItem
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
LineItem lineItem = LineItem.builder()
.addedAt("{addedAt}")
.custom(customBuilder -> customBuilder)
.id("{id}")
.name(nameBuilder -> nameBuilder)
.productId("{productId}")
.productSlug(productSlugBuilder -> productSlugBuilder)
.productType(productTypeBuilder -> productTypeBuilder)
.quantity(1)
.variant(variantBuilder -> variantBuilder)
.variantId(1)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic LineItemBuilder
builder()
builder factory method for LineItemstatic LineItemBuilder
create builder for LineItem instancestatic LineItem
factory method to create a deep copy of LineItem@NotNull String
@NotNull @Valid CustomFields
@NotNull String
getId()
@NotNull @Valid LocalizedString
getName()
@NotNull String
@NotNull @Valid LocalizedString
@NotNull @Valid Reference
@NotNull Integer
@NotNull @Valid Variant
@NotNull Integer
static LineItem
of()
factory methodstatic LineItem
factory method to create a shallow copy LineItemvoid
setAddedAt
(String addedAt) set addedAtvoid
setCustom
(CustomFields custom) set customvoid
set idvoid
setName
(LocalizedString name) set namevoid
setProductId
(String productId) set productIdvoid
setProductSlug
(LocalizedString productSlug) set productSlugvoid
setProductType
(Reference productType) set productTypevoid
setQuantity
(Integer quantity) set quantityvoid
setVariant
(Variant variant) set variantvoid
setVariantId
(Integer variantId) set variantIdstatic com.fasterxml.jackson.core.type.TypeReference<LineItem>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withLineItem
(Function<LineItem, T> helper) accessor map function
-
Method Details
-
getAddedAt
- Returns:
- addedAt
-
getCustom
- Returns:
- custom
-
getId
- Returns:
- id
-
getName
- Returns:
- name
-
getProductId
- Returns:
- productId
-
getProductSlug
- Returns:
- productSlug
-
getProductType
- Returns:
- productType
-
getQuantity
- Returns:
- quantity
-
getVariant
- Returns:
- variant
-
getVariantId
- Returns:
- variantId
-
setAddedAt
set addedAt- Parameters:
addedAt
- value to be set
-
setCustom
set custom- Parameters:
custom
- value to be set
-
setId
set id- Parameters:
id
- value to be set
-
setName
set name- Parameters:
name
- value to be set
-
setProductId
set productId- Parameters:
productId
- value to be set
-
setProductSlug
set productSlug- Parameters:
productSlug
- value to be set
-
setProductType
set productType- Parameters:
productType
- value to be set
-
setQuantity
set quantity- Parameters:
quantity
- value to be set
-
setVariant
set variant- Parameters:
variant
- value to be set
-
setVariantId
set variantId- Parameters:
variantId
- value to be set
-
of
factory method- Returns:
- instance of LineItem
-
of
factory method to create a shallow copy LineItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of LineItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for LineItem- Returns:
- builder
-
builder
create builder for LineItem instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withLineItem
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
-