Interface CustomLineItem
public interface CustomLineItem
CustomLineItem
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomLineItem customLineItem = CustomLineItem.builder()
.id("{id}")
.name(nameBuilder -> nameBuilder)
.money(moneyBuilder -> moneyBuilder)
.taxedPrice(taxedPriceBuilder -> taxedPriceBuilder)
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.slug("{slug}")
.quantity(1)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomLineItemBuilder
builder()
builder factory method for CustomLineItemstatic CustomLineItemBuilder
builder
(CustomLineItem template) create builder for CustomLineItem instancestatic CustomLineItem
deepCopy
(CustomLineItem template) factory method to create a deep copy of CustomLineItem@NotNull String
getId()
The unique ID of this CustomLineItem.@NotNull @Valid Money
getMoney()
@NotNull @Valid LocalizedString
getName()
@NotNull Integer
The amount of a CustomLineItem in the cart.@NotNull String
getSlug()
A unique String in the cart to identify this CustomLineItem.@NotNull @Valid TaxedItemPrice
@NotNull @Valid Money
static CustomLineItem
of()
factory methodstatic CustomLineItem
of
(CustomLineItem template) factory method to create a shallow copy CustomLineItemvoid
The unique ID of this CustomLineItem.void
set moneyvoid
setName
(LocalizedString name) set namevoid
setQuantity
(Integer quantity) The amount of a CustomLineItem in the cart.void
A unique String in the cart to identify this CustomLineItem.void
setTaxedPrice
(TaxedItemPrice taxedPrice) set taxedPricevoid
setTotalPrice
(Money totalPrice) set totalPricestatic com.fasterxml.jackson.core.type.TypeReference<CustomLineItem>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCustomLineItem
(Function<CustomLineItem, T> helper) accessor map function
-
Method Details
-
getId
The unique ID of this CustomLineItem.
- Returns:
- id
-
getName
- Returns:
- name
-
getMoney
- Returns:
- money
-
getTaxedPrice
- Returns:
- taxedPrice
-
getTotalPrice
- Returns:
- totalPrice
-
getSlug
A unique String in the cart to identify this CustomLineItem.
- Returns:
- slug
-
getQuantity
The amount of a CustomLineItem in the cart. Must be a positive integer.
- Returns:
- quantity
-
setId
The unique ID of this CustomLineItem.
- Parameters:
id
- value to be set
-
setName
set name- Parameters:
name
- value to be set
-
setMoney
set money- Parameters:
money
- value to be set
-
setTaxedPrice
set taxedPrice- Parameters:
taxedPrice
- value to be set
-
setTotalPrice
set totalPrice- Parameters:
totalPrice
- value to be set
-
setSlug
A unique String in the cart to identify this CustomLineItem.
- Parameters:
slug
- value to be set
-
setQuantity
The amount of a CustomLineItem in the cart. Must be a positive integer.
- Parameters:
quantity
- value to be set
-
of
factory method- Returns:
- instance of CustomLineItem
-
of
factory method to create a shallow copy CustomLineItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CustomLineItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomLineItem- Returns:
- builder
-
builder
create builder for CustomLineItem instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCustomLineItem
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
-