Class CustomLineItemDraftBuilder
- All Implemented Interfaces:
Builder<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()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraft> builder) Maps toCustomLineItem.discountedPricePerQuantity.addState(Function<ItemStateBuilder, ItemState> builder) Maps toCustomLineItem.state.build()builds CustomLineItemDraft with checking for non-null required valuesbuilds CustomLineItemDraft without checking for non-null required valuesdiscountedPricePerQuantity(DiscountedLineItemPriceDraft... discountedPricePerQuantity) Maps toCustomLineItem.discountedPricePerQuantity.discountedPricePerQuantity(List<DiscountedLineItemPriceDraft> discountedPricePerQuantity) Maps toCustomLineItem.discountedPricePerQuantity.externalTaxRate(ExternalTaxRateDraft externalTaxRate) External Tax Rate for the Custom Line Item if the Cart has theExternalTaxMode.External Tax Rate for the Custom Line Item if the Cart has theExternalTaxMode.Maps toCustomLineItem.discountedPricePerQuantity.External Tax Rate for the Custom Line Item if the Cart has theExternalTaxMode.getMoney()Maps toCustomLineItem.money.getName()Maps toCustomLineItem.name.Maps toCustomLineItem.quantity.Maps toCustomLineItem.shippingDetails.getSlug()Maps toCustomLineItem.slug.getState()Maps toCustomLineItem.state.Maps toCustomLineItem.taxCategory.Maps toCustomLineItem.taxedPrice.Maps toCustomLineItem.taxRate.Maps toCustomLineItem.totalPrice.money(TypedMoney money) Maps toCustomLineItem.money.money(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps toCustomLineItem.money.name(LocalizedString name) Maps toCustomLineItem.name.Maps toCustomLineItem.name.static CustomLineItemDraftBuilderof()factory method for an instance of CustomLineItemDraftBuilderstatic CustomLineItemDraftBuilderof(CustomLineItemDraft template) create builder for CustomLineItemDraft instanceplusDiscountedPricePerQuantity(DiscountedLineItemPriceDraft... discountedPricePerQuantity) Maps toCustomLineItem.discountedPricePerQuantity.plusDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraftBuilder> builder) Maps toCustomLineItem.discountedPricePerQuantity.Maps toCustomLineItem.state.plusState(Function<ItemStateBuilder, ItemStateBuilder> builder) Maps toCustomLineItem.state.Maps toCustomLineItem.quantity.setDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraft> builder) Maps toCustomLineItem.discountedPricePerQuantity.setState(Function<ItemStateBuilder, ItemState> builder) Maps toCustomLineItem.state.shippingDetails(ItemShippingDetailsDraft shippingDetails) Maps toCustomLineItem.shippingDetails.Maps toCustomLineItem.shippingDetails.Maps toCustomLineItem.slug.Maps toCustomLineItem.state.Maps toCustomLineItem.state.taxCategory(TaxCategoryKeyReference taxCategory) Maps toCustomLineItem.taxCategory.Maps toCustomLineItem.taxCategory.taxedPrice(CustomLineItemTaxedPrice taxedPrice) Maps toCustomLineItem.taxedPrice.Maps toCustomLineItem.taxedPrice.Maps toCustomLineItem.taxRate.taxRate(Function<TaxRateBuilder, TaxRateBuilder> builder) Maps toCustomLineItem.taxRate.totalPrice(TypedMoney totalPrice) Maps toCustomLineItem.totalPrice.totalPrice(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps toCustomLineItem.totalPrice.withDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraftBuilder> builder) Maps toCustomLineItem.discountedPricePerQuantity.External Tax Rate for the Custom Line Item if the Cart has theExternalTaxMode.Maps toCustomLineItem.name.Maps toCustomLineItem.shippingDetails.withState(Function<ItemStateBuilder, ItemStateBuilder> builder) Maps toCustomLineItem.state.Maps toCustomLineItem.taxCategory.Maps toCustomLineItem.taxedPrice.withTaxRate(Function<TaxRateBuilder, TaxRate> builder) Maps toCustomLineItem.taxRate.
-
Constructor Details
-
CustomLineItemDraftBuilder
public CustomLineItemDraftBuilder()
-
-
Method Details
-
name
public CustomLineItemDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
CustomLineItem.name.- Parameters:
builder- function to build the name value- Returns:
- Builder
-
withName
public CustomLineItemDraftBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Maps to
CustomLineItem.name.- Parameters:
builder- function to build the name value- Returns:
- Builder
-
name
Maps to
CustomLineItem.name.- Parameters:
name- value to be set- Returns:
- Builder
-
money
Maps to
CustomLineItem.money.- Parameters:
money- value to be set- Returns:
- Builder
-
money
public CustomLineItemDraftBuilder money(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps to
CustomLineItem.money.- Parameters:
builder- function to build the money value- Returns:
- Builder
-
taxedPrice
public CustomLineItemDraftBuilder taxedPrice(Function<CustomLineItemTaxedPriceBuilder, CustomLineItemTaxedPriceBuilder> builder) Maps to
CustomLineItem.taxedPrice.- Parameters:
builder- function to build the taxedPrice value- Returns:
- Builder
-
withTaxedPrice
public CustomLineItemDraftBuilder withTaxedPrice(Function<CustomLineItemTaxedPriceBuilder, CustomLineItemTaxedPrice> builder) Maps to
CustomLineItem.taxedPrice.- Parameters:
builder- function to build the taxedPrice value- Returns:
- Builder
-
taxedPrice
Maps to
CustomLineItem.taxedPrice.- Parameters:
taxedPrice- value to be set- Returns:
- Builder
-
totalPrice
Maps to
CustomLineItem.totalPrice.- Parameters:
totalPrice- value to be set- Returns:
- Builder
-
totalPrice
public CustomLineItemDraftBuilder totalPrice(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps to
CustomLineItem.totalPrice.- Parameters:
builder- function to build the totalPrice value- Returns:
- Builder
-
slug
Maps to
CustomLineItem.slug.- Parameters:
slug- value to be set- Returns:
- Builder
-
quantity
Maps to
CustomLineItem.quantity.- Parameters:
quantity- value to be set- Returns:
- Builder
-
state
Maps to
CustomLineItem.state.- Parameters:
state- value to be set- Returns:
- Builder
-
state
Maps to
CustomLineItem.state.- Parameters:
state- value to be set- Returns:
- Builder
-
plusState
Maps to
CustomLineItem.state.- Parameters:
state- value to be set- Returns:
- Builder
-
plusState
Maps to
CustomLineItem.state.- Parameters:
builder- function to build the state value- Returns:
- Builder
-
withState
Maps to
CustomLineItem.state.- Parameters:
builder- function to build the state value- Returns:
- Builder
-
addState
Maps to
CustomLineItem.state.- Parameters:
builder- function to build the state value- Returns:
- Builder
-
setState
Maps to
CustomLineItem.state.- Parameters:
builder- function to build the state value- Returns:
- Builder
-
taxCategory
public CustomLineItemDraftBuilder taxCategory(Function<TaxCategoryKeyReferenceBuilder, TaxCategoryKeyReferenceBuilder> builder) 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:
builder- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public CustomLineItemDraftBuilder withTaxCategory(Function<TaxCategoryKeyReferenceBuilder, TaxCategoryKeyReference> builder) 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:
builder- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
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- Returns:
- Builder
-
taxRate
Maps to
CustomLineItem.taxRate.- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
-
withTaxRate
Maps to
CustomLineItem.taxRate.- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
-
taxRate
Maps to
CustomLineItem.taxRate.- Parameters:
taxRate- value to be set- Returns:
- Builder
-
externalTaxRate
public CustomLineItemDraftBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) External Tax Rate for the Custom Line Item if the Cart has the
ExternalTaxMode.- Parameters:
builder- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public CustomLineItemDraftBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) External Tax Rate for the Custom Line Item if the Cart has the
ExternalTaxMode.- Parameters:
builder- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
External Tax Rate for the Custom Line Item if the Cart has the
ExternalTaxMode.- Parameters:
externalTaxRate- value to be set- Returns:
- Builder
-
discountedPricePerQuantity
public CustomLineItemDraftBuilder discountedPricePerQuantity(@Nullable DiscountedLineItemPriceDraft... discountedPricePerQuantity) Maps to
CustomLineItem.discountedPricePerQuantity.- Parameters:
discountedPricePerQuantity- value to be set- Returns:
- Builder
-
discountedPricePerQuantity
public CustomLineItemDraftBuilder discountedPricePerQuantity(@Nullable List<DiscountedLineItemPriceDraft> discountedPricePerQuantity) Maps to
CustomLineItem.discountedPricePerQuantity.- Parameters:
discountedPricePerQuantity- value to be set- Returns:
- Builder
-
plusDiscountedPricePerQuantity
public CustomLineItemDraftBuilder plusDiscountedPricePerQuantity(@Nullable DiscountedLineItemPriceDraft... discountedPricePerQuantity) Maps to
CustomLineItem.discountedPricePerQuantity.- Parameters:
discountedPricePerQuantity- value to be set- Returns:
- Builder
-
plusDiscountedPricePerQuantity
public CustomLineItemDraftBuilder plusDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraftBuilder> builder) Maps to
CustomLineItem.discountedPricePerQuantity.- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
withDiscountedPricePerQuantity
public CustomLineItemDraftBuilder withDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraftBuilder> builder) Maps to
CustomLineItem.discountedPricePerQuantity.- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
addDiscountedPricePerQuantity
public CustomLineItemDraftBuilder addDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraft> builder) Maps to
CustomLineItem.discountedPricePerQuantity.- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
setDiscountedPricePerQuantity
public CustomLineItemDraftBuilder setDiscountedPricePerQuantity(Function<DiscountedLineItemPriceDraftBuilder, DiscountedLineItemPriceDraft> builder) Maps to
CustomLineItem.discountedPricePerQuantity.- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
shippingDetails
public CustomLineItemDraftBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Maps to
CustomLineItem.shippingDetails.- Parameters:
builder- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public CustomLineItemDraftBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Maps to
CustomLineItem.shippingDetails.- Parameters:
builder- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public CustomLineItemDraftBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Maps to
CustomLineItem.shippingDetails.- Parameters:
shippingDetails- value to be set- Returns:
- Builder
-
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
-
build
builds CustomLineItemDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<CustomLineItemDraft>- Returns:
- CustomLineItemDraft
-
buildUnchecked
builds CustomLineItemDraft without checking for non-null required values- Returns:
- CustomLineItemDraft
-
of
factory method for an instance of CustomLineItemDraftBuilder- Returns:
- builder
-
of
create builder for CustomLineItemDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-