Class CustomLineItemBuilder
- All Implemented Interfaces:
Builder<CustomLineItem>
Example to create an instance using the builder pattern
CustomLineItem customLineItem = CustomLineItem.builder()
.id("{id}")
.name(nameBuilder -> nameBuilder)
.money(moneyBuilder -> moneyBuilder)
.plusTaxedPricePortions(taxedPricePortionsBuilder -> taxedPricePortionsBuilder)
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.slug("{slug}")
.quantity(0.3)
.plusState(stateBuilder -> stateBuilder)
.plusPerMethodTaxRate(perMethodTaxRateBuilder -> perMethodTaxRateBuilder)
.plusDiscountedPricePerQuantity(discountedPricePerQuantityBuilder -> discountedPricePerQuantityBuilder)
.priceMode(CustomLineItemPriceMode.STANDARD)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantity> builder) Discounted price of a single quantity of the Custom Line Item.Tax Rate per Shipping Method for a Cart withMultipleShippingMode.addState(Function<ItemStateBuilder, ItemState> builder) Tracks specific quantities of the Custom Line Item within a given State.Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.build()builds CustomLineItem with checking for non-null required valuesbuilds CustomLineItem without checking for non-null required valuescustom(CustomFields custom) Custom Fields of the Custom Line Item.custom(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the Custom Line Item.discountedPricePerQuantity(DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) Discounted price of a single quantity of the Custom Line Item.discountedPricePerQuantity(List<DiscountedLineItemPriceForQuantity> discountedPricePerQuantity) Discounted price of a single quantity of the Custom Line Item.Custom Fields of the Custom Line Item.Discounted price of a single quantity of the Custom Line Item.getId()Unique identifier of the Custom Line Item.getKey()User-defined unique identifier of the Custom Line Item.getMoney()Money value of the Custom Line Item.getName()Name of the Custom Line Item.Tax Rate per Shipping Method for a Cart withMultipleShippingMode.Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.Recurring Order and frequency data.Container for Custom Line Item-specific addresses.getSlug()User-defined identifier used in a deep-link URL for the Custom Line Item.getState()Tracks specific quantities of the Custom Line Item within a given State.Used to select a Tax Rate when a Cart has thePlatformTaxMode.Automatically set after thetaxRateis set.Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.For a Cart withPlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set.Total price of the Custom Line Item (moneymultiplied byquantity).Unique identifier of the Custom Line Item.User-defined unique identifier of the Custom Line Item.money(TypedMoney money) Money value of the Custom Line Item.money(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money value of the Custom Line Item.name(LocalizedString name) Name of the Custom Line Item.Name of the Custom Line Item.static CustomLineItemBuilderof()factory method for an instance of CustomLineItemBuilderstatic CustomLineItemBuilderof(CustomLineItem template) create builder for CustomLineItem instanceperMethodTaxRate(MethodTaxRate... perMethodTaxRate) Tax Rate per Shipping Method for a Cart withMultipleShippingMode.perMethodTaxRate(List<MethodTaxRate> perMethodTaxRate) Tax Rate per Shipping Method for a Cart withMultipleShippingMode.plusDiscountedPricePerQuantity(DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) Discounted price of a single quantity of the Custom Line Item.plusDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantityBuilder> builder) Discounted price of a single quantity of the Custom Line Item.plusPerMethodTaxRate(MethodTaxRate... perMethodTaxRate) Tax Rate per Shipping Method for a Cart withMultipleShippingMode.Tax Rate per Shipping Method for a Cart withMultipleShippingMode.Tracks specific quantities of the Custom Line Item within a given State.plusState(Function<ItemStateBuilder, ItemStateBuilder> builder) Tracks specific quantities of the Custom Line Item within a given State.plusTaxedPricePortions(MethodTaxedPrice... taxedPricePortions) Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.priceMode(CustomLineItemPriceMode priceMode) Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.recurrenceInfo(CustomLineItemRecurrenceInfo recurrenceInfo) Recurring Order and frequency data.recurrenceInfo(Function<CustomLineItemRecurrenceInfoBuilder, CustomLineItemRecurrenceInfoBuilder> builder) Recurring Order and frequency data.setDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantity> builder) Discounted price of a single quantity of the Custom Line Item.Tax Rate per Shipping Method for a Cart withMultipleShippingMode.setState(Function<ItemStateBuilder, ItemState> builder) Tracks specific quantities of the Custom Line Item within a given State.Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.shippingDetails(ItemShippingDetails shippingDetails) Container for Custom Line Item-specific addresses.Container for Custom Line Item-specific addresses.User-defined identifier used in a deep-link URL for the Custom Line Item.Tracks specific quantities of the Custom Line Item within a given State.Tracks specific quantities of the Custom Line Item within a given State.taxCategory(TaxCategoryReference taxCategory) Used to select a Tax Rate when a Cart has thePlatformTaxMode.Used to select a Tax Rate when a Cart has thePlatformTaxMode.taxedPrice(TaxedItemPrice taxedPrice) Automatically set after thetaxRateis set.Automatically set after thetaxRateis set.taxedPricePortions(MethodTaxedPrice... taxedPricePortions) Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.taxedPricePortions(List<MethodTaxedPrice> taxedPricePortions) Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.For a Cart withPlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set.taxRate(Function<TaxRateBuilder, TaxRateBuilder> builder) For a Cart withPlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set.totalPrice(CentPrecisionMoney totalPrice) Total price of the Custom Line Item (moneymultiplied byquantity).Total price of the Custom Line Item (moneymultiplied byquantity).withCustom(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the Custom Line Item.withDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantityBuilder> builder) Discounted price of a single quantity of the Custom Line Item.Name of the Custom Line Item.Tax Rate per Shipping Method for a Cart withMultipleShippingMode.withRecurrenceInfo(Function<CustomLineItemRecurrenceInfoBuilder, CustomLineItemRecurrenceInfo> builder) Recurring Order and frequency data.Container for Custom Line Item-specific addresses.withState(Function<ItemStateBuilder, ItemStateBuilder> builder) Tracks specific quantities of the Custom Line Item within a given State.Used to select a Tax Rate when a Cart has thePlatformTaxMode.Automatically set after thetaxRateis set.Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.withTaxRate(Function<TaxRateBuilder, TaxRate> builder) For a Cart withPlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set.Total price of the Custom Line Item (moneymultiplied byquantity).
-
Constructor Details
-
CustomLineItemBuilder
public CustomLineItemBuilder()
-
-
Method Details
-
id
Unique identifier of the Custom Line Item.
- Parameters:
id- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Custom Line Item.
- Parameters:
key- value to be set- Returns:
- Builder
-
name
Name of the Custom Line Item.
- Parameters:
builder- function to build the name value- Returns:
- Builder
-
withName
Name of the Custom Line Item.
- Parameters:
builder- function to build the name value- Returns:
- Builder
-
name
Name of the Custom Line Item.
- Parameters:
name- value to be set- Returns:
- Builder
-
money
Money value of the Custom Line Item.
- Parameters:
money- value to be set- Returns:
- Builder
-
money
public CustomLineItemBuilder money(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money value of the Custom Line Item.
- Parameters:
builder- function to build the money value- Returns:
- Builder
-
taxedPrice
public CustomLineItemBuilder taxedPrice(Function<TaxedItemPriceBuilder, TaxedItemPriceBuilder> builder) Automatically set after the
taxRateis set.- Parameters:
builder- function to build the taxedPrice value- Returns:
- Builder
-
withTaxedPrice
Automatically set after the
taxRateis set.- Parameters:
builder- function to build the taxedPrice value- Returns:
- Builder
-
taxedPrice
Automatically set after the
taxRateis set.- Parameters:
taxedPrice- value to be set- Returns:
- Builder
-
taxedPricePortions
Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Parameters:
taxedPricePortions- value to be set- Returns:
- Builder
-
taxedPricePortions
Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Parameters:
taxedPricePortions- value to be set- Returns:
- Builder
-
plusTaxedPricePortions
Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Parameters:
taxedPricePortions- value to be set- Returns:
- Builder
-
plusTaxedPricePortions
public CustomLineItemBuilder plusTaxedPricePortions(Function<MethodTaxedPriceBuilder, MethodTaxedPriceBuilder> builder) Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Parameters:
builder- function to build the taxedPricePortions value- Returns:
- Builder
-
withTaxedPricePortions
public CustomLineItemBuilder withTaxedPricePortions(Function<MethodTaxedPriceBuilder, MethodTaxedPriceBuilder> builder) Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Parameters:
builder- function to build the taxedPricePortions value- Returns:
- Builder
-
addTaxedPricePortions
public CustomLineItemBuilder addTaxedPricePortions(Function<MethodTaxedPriceBuilder, MethodTaxedPrice> builder) Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Parameters:
builder- function to build the taxedPricePortions value- Returns:
- Builder
-
setTaxedPricePortions
public CustomLineItemBuilder setTaxedPricePortions(Function<MethodTaxedPriceBuilder, MethodTaxedPrice> builder) Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Parameters:
builder- function to build the taxedPricePortions value- Returns:
- Builder
-
totalPrice
public CustomLineItemBuilder totalPrice(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Total price of the Custom Line Item (
moneymultiplied byquantity). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantitymultiplied byquantity.Includes taxes if the TaxRate
includedInPriceistrue.- Parameters:
builder- function to build the totalPrice value- Returns:
- Builder
-
withTotalPrice
public CustomLineItemBuilder withTotalPrice(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Total price of the Custom Line Item (
moneymultiplied byquantity). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantitymultiplied byquantity.Includes taxes if the TaxRate
includedInPriceistrue.- Parameters:
builder- function to build the totalPrice value- Returns:
- Builder
-
totalPrice
Total price of the Custom Line Item (
moneymultiplied byquantity). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantitymultiplied byquantity.Includes taxes if the TaxRate
includedInPriceistrue.- Parameters:
totalPrice- value to be set- Returns:
- Builder
-
slug
User-defined identifier used in a deep-link URL for the Custom Line Item. It matches the pattern
[a-zA-Z0-9_-]{2,256}.- Parameters:
slug- value to be set- Returns:
- Builder
-
quantity
- Parameters:
quantity- value to be set- Returns:
- Builder
-
state
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Parameters:
state- value to be set- Returns:
- Builder
-
state
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Parameters:
state- value to be set- Returns:
- Builder
-
plusState
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Parameters:
state- value to be set- Returns:
- Builder
-
plusState
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Parameters:
builder- function to build the state value- Returns:
- Builder
-
withState
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Parameters:
builder- function to build the state value- Returns:
- Builder
-
addState
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Parameters:
builder- function to build the state value- Returns:
- Builder
-
setState
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Parameters:
builder- function to build the state value- Returns:
- Builder
-
taxCategory
public CustomLineItemBuilder taxCategory(Function<TaxCategoryReferenceBuilder, TaxCategoryReferenceBuilder> builder) Used to select a Tax Rate when a Cart has the
PlatformTaxMode.- Parameters:
builder- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public CustomLineItemBuilder withTaxCategory(Function<TaxCategoryReferenceBuilder, TaxCategoryReference> builder) Used to select a Tax Rate when a Cart has the
PlatformTaxMode.- Parameters:
builder- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
Used to select a Tax Rate when a Cart has the
PlatformTaxMode.- Parameters:
taxCategory- value to be set- Returns:
- Builder
-
taxRate
- For a Cart with
PlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address. - For a Cart with
ExternalTaxMode, thetaxRateof Custom Line Items can be set using ExternalTaxRateDraft.
- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
- For a Cart with
-
withTaxRate
- For a Cart with
PlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address. - For a Cart with
ExternalTaxMode, thetaxRateof Custom Line Items can be set using ExternalTaxRateDraft.
- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
- For a Cart with
-
taxRate
- For a Cart with
PlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address. - For a Cart with
ExternalTaxMode, thetaxRateof Custom Line Items can be set using ExternalTaxRateDraft.
- Parameters:
taxRate- value to be set- Returns:
- Builder
- For a Cart with
-
perMethodTaxRate
Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Parameters:
perMethodTaxRate- value to be set- Returns:
- Builder
-
perMethodTaxRate
Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Parameters:
perMethodTaxRate- value to be set- Returns:
- Builder
-
plusPerMethodTaxRate
Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Parameters:
perMethodTaxRate- value to be set- Returns:
- Builder
-
plusPerMethodTaxRate
public CustomLineItemBuilder plusPerMethodTaxRate(Function<MethodTaxRateBuilder, MethodTaxRateBuilder> builder) Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Parameters:
builder- function to build the perMethodTaxRate value- Returns:
- Builder
-
withPerMethodTaxRate
public CustomLineItemBuilder withPerMethodTaxRate(Function<MethodTaxRateBuilder, MethodTaxRateBuilder> builder) Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Parameters:
builder- function to build the perMethodTaxRate value- Returns:
- Builder
-
addPerMethodTaxRate
public CustomLineItemBuilder addPerMethodTaxRate(Function<MethodTaxRateBuilder, MethodTaxRate> builder) Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Parameters:
builder- function to build the perMethodTaxRate value- Returns:
- Builder
-
setPerMethodTaxRate
public CustomLineItemBuilder setPerMethodTaxRate(Function<MethodTaxRateBuilder, MethodTaxRate> builder) Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Parameters:
builder- function to build the perMethodTaxRate value- Returns:
- Builder
-
discountedPricePerQuantity
public CustomLineItemBuilder discountedPricePerQuantity(DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) Discounted price of a single quantity of the Custom Line Item.
- Parameters:
discountedPricePerQuantity- value to be set- Returns:
- Builder
-
discountedPricePerQuantity
public CustomLineItemBuilder discountedPricePerQuantity(List<DiscountedLineItemPriceForQuantity> discountedPricePerQuantity) Discounted price of a single quantity of the Custom Line Item.
- Parameters:
discountedPricePerQuantity- value to be set- Returns:
- Builder
-
plusDiscountedPricePerQuantity
public CustomLineItemBuilder plusDiscountedPricePerQuantity(DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) Discounted price of a single quantity of the Custom Line Item.
- Parameters:
discountedPricePerQuantity- value to be set- Returns:
- Builder
-
plusDiscountedPricePerQuantity
public CustomLineItemBuilder plusDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantityBuilder> builder) Discounted price of a single quantity of the Custom Line Item.
- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
withDiscountedPricePerQuantity
public CustomLineItemBuilder withDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantityBuilder> builder) Discounted price of a single quantity of the Custom Line Item.
- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
addDiscountedPricePerQuantity
public CustomLineItemBuilder addDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantity> builder) Discounted price of a single quantity of the Custom Line Item.
- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
setDiscountedPricePerQuantity
public CustomLineItemBuilder setDiscountedPricePerQuantity(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantity> builder) Discounted price of a single quantity of the Custom Line Item.
- Parameters:
builder- function to build the discountedPricePerQuantity value- Returns:
- Builder
-
custom
Custom Fields of the Custom Line Item.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the Custom Line Item.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the Custom Line Item.
- Parameters:
custom- value to be set- Returns:
- Builder
-
shippingDetails
public CustomLineItemBuilder shippingDetails(Function<ItemShippingDetailsBuilder, ItemShippingDetailsBuilder> builder) Container for Custom Line Item-specific addresses.
- Parameters:
builder- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public CustomLineItemBuilder withShippingDetails(Function<ItemShippingDetailsBuilder, ItemShippingDetails> builder) Container for Custom Line Item-specific addresses.
- Parameters:
builder- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
Container for Custom Line Item-specific addresses.
- Parameters:
shippingDetails- value to be set- Returns:
- Builder
-
priceMode
Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.
- Parameters:
priceMode- value to be set- Returns:
- Builder
-
recurrenceInfo
public CustomLineItemBuilder recurrenceInfo(Function<CustomLineItemRecurrenceInfoBuilder, CustomLineItemRecurrenceInfoBuilder> builder) Recurring Order and frequency data.
- Parameters:
builder- function to build the recurrenceInfo value- Returns:
- Builder
-
withRecurrenceInfo
public CustomLineItemBuilder withRecurrenceInfo(Function<CustomLineItemRecurrenceInfoBuilder, CustomLineItemRecurrenceInfo> builder) Recurring Order and frequency data.
- Parameters:
builder- function to build the recurrenceInfo value- Returns:
- Builder
-
recurrenceInfo
Recurring Order and frequency data.
- Parameters:
recurrenceInfo- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Custom Line Item.
- Returns:
- id
-
getKey
User-defined unique identifier of the Custom Line Item.
- Returns:
- key
-
getName
Name of the Custom Line Item.
- Returns:
- name
-
getMoney
Money value of the Custom Line Item.
- Returns:
- money
-
getTaxedPrice
Automatically set after the
taxRateis set.- Returns:
- taxedPrice
-
getTaxedPricePortions
Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with
MultipleShippingMode. Automatically set afterperMethodTaxRateis set.- Returns:
- taxedPricePortions
-
getTotalPrice
Total price of the Custom Line Item (
moneymultiplied byquantity). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantitymultiplied byquantity.Includes taxes if the TaxRate
includedInPriceistrue.- Returns:
- totalPrice
-
getSlug
User-defined identifier used in a deep-link URL for the Custom Line Item. It matches the pattern
[a-zA-Z0-9_-]{2,256}.- Returns:
- slug
-
getQuantity
- Returns:
- quantity
-
getState
Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.
- Returns:
- state
-
getTaxCategory
Used to select a Tax Rate when a Cart has the
PlatformTaxMode.- Returns:
- taxCategory
-
getTaxRate
- For a Cart with
PlatformTaxMode, thetaxRateof Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address. - For a Cart with
ExternalTaxMode, thetaxRateof Custom Line Items can be set using ExternalTaxRateDraft.
- Returns:
- taxRate
- For a Cart with
-
getPerMethodTaxRate
Tax Rate per Shipping Method for a Cart with
MultipleShippingMode. For a Cart withPlatformTaxMode it is automatically set after the Shipping Method is added. For a Cart withExternalTaxMode, the Tax Rate must be set with ExternalTaxRateDraft.- Returns:
- perMethodTaxRate
-
getDiscountedPricePerQuantity
Discounted price of a single quantity of the Custom Line Item.
- Returns:
- discountedPricePerQuantity
-
getCustom
Custom Fields of the Custom Line Item.
- Returns:
- custom
-
getShippingDetails
Container for Custom Line Item-specific addresses.
- Returns:
- shippingDetails
-
getPriceMode
Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.
- Returns:
- priceMode
-
getRecurrenceInfo
Recurring Order and frequency data.
- Returns:
- recurrenceInfo
-
build
builds CustomLineItem with checking for non-null required values- Specified by:
buildin interfaceBuilder<CustomLineItem>- Returns:
- CustomLineItem
-
buildUnchecked
builds CustomLineItem without checking for non-null required values- Returns:
- CustomLineItem
-
of
factory method for an instance of CustomLineItemBuilder- Returns:
- builder
-
of
create builder for CustomLineItem instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-