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 CustomLineItemDraftBuilderbuilder()builder factory method for CustomLineItemDraftstatic CustomLineItemDraftBuilderbuilder(CustomLineItemDraft template) create builder for CustomLineItemDraft instancecopyDeep()static CustomLineItemDraftdeepCopy(CustomLineItemDraft template) factory method to create a deep copy of CustomLineItemDraft@Valid List<DiscountedLineItemPriceDraft>Maps toCustomLineItem.discountedPricePerQuantity.@Valid ExternalTaxRateDraftExternal Tax Rate for the Custom Line Item if the Cart has theExternalTaxMode.@NotNull @Valid TypedMoneygetMoney()Maps toCustomLineItem.money.@NotNull @Valid LocalizedStringgetName()Maps toCustomLineItem.name.@NotNull LongMaps toCustomLineItem.quantity.@Valid ItemShippingDetailsDraftMaps toCustomLineItem.shippingDetails.@NotNull StringgetSlug()Maps toCustomLineItem.slug.getState()Maps toCustomLineItem.state.@Valid TaxCategoryKeyReferenceMaps toCustomLineItem.taxCategory.@Valid CustomLineItemTaxedPriceMaps toCustomLineItem.taxedPrice.@Valid TaxRateMaps toCustomLineItem.taxRate.@NotNull @Valid TypedMoneyMaps toCustomLineItem.totalPrice.static CustomLineItemDraftof()factory methodstatic CustomLineItemDraftof(CustomLineItemDraft template) factory method to create a shallow copy CustomLineItemDraftvoidsetDiscountedPricePerQuantity(DiscountedLineItemPriceDraft... discountedPricePerQuantity) Maps toCustomLineItem.discountedPricePerQuantity.voidsetDiscountedPricePerQuantity(List<DiscountedLineItemPriceDraft> discountedPricePerQuantity) Maps toCustomLineItem.discountedPricePerQuantity.voidsetExternalTaxRate(ExternalTaxRateDraft externalTaxRate) External Tax Rate for the Custom Line Item if the Cart has theExternalTaxMode.voidsetMoney(TypedMoney money) Maps toCustomLineItem.money.voidsetName(LocalizedString name) Maps toCustomLineItem.name.voidsetQuantity(Long quantity) Maps toCustomLineItem.quantity.voidsetShippingDetails(ItemShippingDetailsDraft shippingDetails) Maps toCustomLineItem.shippingDetails.voidMaps toCustomLineItem.slug.voidMaps toCustomLineItem.state.voidMaps toCustomLineItem.state.voidsetTaxCategory(TaxCategoryKeyReference taxCategory) Maps toCustomLineItem.taxCategory.voidsetTaxedPrice(CustomLineItemTaxedPrice taxedPrice) Maps toCustomLineItem.taxedPrice.voidsetTaxRate(TaxRate taxRate) Maps toCustomLineItem.taxRate.voidsetTotalPrice(TypedMoney totalPrice) Maps toCustomLineItem.totalPrice.static com.fasterxml.jackson.core.type.TypeReference<CustomLineItemDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCustomLineItemDraft(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, thestateof the ImportOperation will be set tounresolveduntil 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
ExternalTaxMode.- 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, thestateof the ImportOperation will be set tounresolveduntil 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
ExternalTaxMode.- 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
-