Interface CustomLineItemDraft
- All Superinterfaces:
Draft<CustomLineItemDraft>
Example to create an instance using the builder pattern
CustomLineItemDraft customLineItemDraft = CustomLineItemDraft.builder()
.name(nameBuilder -> nameBuilder)
.money(moneyBuilder -> moneyBuilder)
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.slug("{slug}")
.quantity(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomLineItemDraftBuilder
builder()
builder factory method for CustomLineItemDraftstatic CustomLineItemDraftBuilder
builder
(CustomLineItemDraft template) create builder for CustomLineItemDraft instancecopyDeep()
static CustomLineItemDraft
deepCopy
(CustomLineItemDraft template) factory method to create a deep copy of CustomLineItemDraft@Valid List<DiscountedLineItemPriceDraft>
Maps toCustomLineItem.discountedPricePerQuantity
.@Valid ExternalTaxRateDraft
External Tax Rate for the Custom Line Item if the Cart has theExternal
TaxMode.@NotNull @Valid TypedMoney
getMoney()
Maps toCustomLineItem.money
.@NotNull @Valid LocalizedString
getName()
Maps toCustomLineItem.name
.@NotNull Long
Maps toCustomLineItem.quantity
.@Valid ItemShippingDetailsDraft
Maps toCustomLineItem.shippingDetails
.@NotNull String
getSlug()
Maps toCustomLineItem.slug
.getState()
Maps toCustomLineItem.state
.@Valid TaxCategoryKeyReference
Maps toCustomLineItem.taxCategory
.@Valid CustomLineItemTaxedPrice
Maps toCustomLineItem.taxedPrice
.@Valid TaxRate
Maps toCustomLineItem.taxRate
.@NotNull @Valid TypedMoney
Maps toCustomLineItem.totalPrice
.static CustomLineItemDraft
of()
factory methodstatic CustomLineItemDraft
of
(CustomLineItemDraft template) factory method to create a shallow copy CustomLineItemDraftvoid
setDiscountedPricePerQuantity
(DiscountedLineItemPriceDraft... discountedPricePerQuantity) Maps toCustomLineItem.discountedPricePerQuantity
.void
setDiscountedPricePerQuantity
(List<DiscountedLineItemPriceDraft> discountedPricePerQuantity) Maps toCustomLineItem.discountedPricePerQuantity
.void
setExternalTaxRate
(ExternalTaxRateDraft externalTaxRate) External Tax Rate for the Custom Line Item if the Cart has theExternal
TaxMode.void
setMoney
(TypedMoney money) Maps toCustomLineItem.money
.void
setName
(LocalizedString name) Maps toCustomLineItem.name
.void
setQuantity
(Long quantity) Maps toCustomLineItem.quantity
.void
setShippingDetails
(ItemShippingDetailsDraft shippingDetails) Maps toCustomLineItem.shippingDetails
.void
Maps toCustomLineItem.slug
.void
Maps toCustomLineItem.state
.void
Maps toCustomLineItem.state
.void
setTaxCategory
(TaxCategoryKeyReference taxCategory) Maps toCustomLineItem.taxCategory
.void
setTaxedPrice
(CustomLineItemTaxedPrice taxedPrice) Maps toCustomLineItem.taxedPrice
.void
setTaxRate
(TaxRate taxRate) Maps toCustomLineItem.taxRate
.void
setTotalPrice
(TypedMoney totalPrice) Maps toCustomLineItem.totalPrice
.static com.fasterxml.jackson.core.type.TypeReference<CustomLineItemDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCustomLineItemDraft
(Function<CustomLineItemDraft, T> helper) accessor map function
-
Method Details
-
getName
Maps to
CustomLineItem.name
.- Returns:
- name
-
getMoney
Maps to
CustomLineItem.money
.- Returns:
- money
-
getTaxedPrice
Maps to
CustomLineItem.taxedPrice
.- Returns:
- taxedPrice
-
getTotalPrice
Maps to
CustomLineItem.totalPrice
.- Returns:
- totalPrice
-
getSlug
Maps to
CustomLineItem.slug
.- Returns:
- slug
-
getQuantity
Maps to
CustomLineItem.quantity
.- Returns:
- quantity
-
getState
Maps to
CustomLineItem.state
.- Returns:
- state
-
getTaxCategory
Maps to
CustomLineItem.taxCategory
. References a tax category by key. If the referenced TaxCategory does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced TaxCategory is created.- Returns:
- taxCategory
-
getTaxRate
Maps to
CustomLineItem.taxRate
.- Returns:
- taxRate
-
getExternalTaxRate
External Tax Rate for the Custom Line Item if the Cart has the
External
TaxMode.- Returns:
- externalTaxRate
-
getDiscountedPricePerQuantity
Maps to
CustomLineItem.discountedPricePerQuantity
.- Returns:
- discountedPricePerQuantity
-
getShippingDetails
Maps to
CustomLineItem.shippingDetails
.- Returns:
- shippingDetails
-
setName
Maps to
CustomLineItem.name
.- Parameters:
name
- value to be set
-
setMoney
Maps to
CustomLineItem.money
.- Parameters:
money
- value to be set
-
setTaxedPrice
Maps to
CustomLineItem.taxedPrice
.- Parameters:
taxedPrice
- value to be set
-
setTotalPrice
Maps to
CustomLineItem.totalPrice
.- Parameters:
totalPrice
- value to be set
-
setSlug
Maps to
CustomLineItem.slug
.- Parameters:
slug
- value to be set
-
setQuantity
Maps to
CustomLineItem.quantity
.- Parameters:
quantity
- value to be set
-
setState
Maps to
CustomLineItem.state
.- Parameters:
state
- values to be set
-
setState
Maps to
CustomLineItem.state
.- Parameters:
state
- values to be set
-
setTaxCategory
Maps to
CustomLineItem.taxCategory
. References a tax category by key. If the referenced TaxCategory does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced TaxCategory is created.- Parameters:
taxCategory
- value to be set
-
setTaxRate
Maps to
CustomLineItem.taxRate
.- Parameters:
taxRate
- value to be set
-
setExternalTaxRate
External Tax Rate for the Custom Line Item if the Cart has the
External
TaxMode.- Parameters:
externalTaxRate
- value to be set
-
setDiscountedPricePerQuantity
Maps to
CustomLineItem.discountedPricePerQuantity
.- Parameters:
discountedPricePerQuantity
- values to be set
-
setDiscountedPricePerQuantity
Maps to
CustomLineItem.discountedPricePerQuantity
.- Parameters:
discountedPricePerQuantity
- values to be set
-
setShippingDetails
Maps to
CustomLineItem.shippingDetails
.- Parameters:
shippingDetails
- value to be set
-
of
factory method- Returns:
- instance of CustomLineItemDraft
-
of
factory method to create a shallow copy CustomLineItemDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
CustomLineItemDraft copyDeep() -
deepCopy
factory method to create a deep copy of CustomLineItemDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomLineItemDraft- Returns:
- builder
-
builder
create builder for CustomLineItemDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCustomLineItemDraft
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
-