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 CustomLineItemBuilderbuilder()builder factory method for CustomLineItemstatic CustomLineItemBuilderbuilder(CustomLineItem template) create builder for CustomLineItem instancecopyDeep()static CustomLineItemdeepCopy(CustomLineItem template) factory method to create a deep copy of CustomLineItem@NotNull StringgetId()The unique ID of this CustomLineItem.@NotNull @Valid MoneygetMoney()@NotNull @Valid LocalizedStringgetName()@NotNull IntegerThe amount of a CustomLineItem in the cart.@NotNull StringgetSlug()A unique String in the cart to identify this CustomLineItem.@NotNull @Valid TaxedItemPrice@NotNull @Valid Moneystatic CustomLineItemof()factory methodstatic CustomLineItemof(CustomLineItem template) factory method to create a shallow copy CustomLineItemvoidThe unique ID of this CustomLineItem.voidset moneyvoidsetName(LocalizedString name) set namevoidsetQuantity(Integer quantity) The amount of a CustomLineItem in the cart.voidA unique String in the cart to identify this CustomLineItem.voidsetTaxedPrice(TaxedItemPrice taxedPrice) set taxedPricevoidsetTotalPrice(Money totalPrice) set totalPricestatic com.fasterxml.jackson.core.type.TypeReference<CustomLineItem>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCustomLineItem(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
-
copyDeep
CustomLineItem copyDeep() -
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
-