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
-
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 withMultiple
ShippingMode.addState
(Function<ItemStateBuilder, ItemState> builder) State of the Custom Line Item in the Cart or Order.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 withMultiple
ShippingMode.Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.Number of Custom Line Items in the Cart or Order.Container for Custom Line Item-specific addresses.getSlug()
User-defined identifier used in a deep-link URL for the Custom Line Item.getState()
State of the Custom Line Item in the Cart or Order.Used to select a Tax Rate when a Cart has thePlatform
TaxMode.Automatically set after thetaxRate
is set.Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method.For a Cart withPlatform
TaxMode, thetaxRate
of Custom Line Items is set automatically once a shipping address is set.Total price of the Custom Line Item (money
multiplied 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 CustomLineItemBuilder
of()
factory method for an instance of CustomLineItemBuilderstatic CustomLineItemBuilder
of
(CustomLineItem template) create builder for CustomLineItem instanceperMethodTaxRate
(MethodTaxRate... perMethodTaxRate) Tax Rate per Shipping Method for a Cart withMultiple
ShippingMode.perMethodTaxRate
(List<MethodTaxRate> perMethodTaxRate) Tax Rate per Shipping Method for a Cart withMultiple
ShippingMode.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 withMultiple
ShippingMode.Tax Rate per Shipping Method for a Cart withMultiple
ShippingMode.State of the Custom Line Item in the Cart or Order.plusState
(Function<ItemStateBuilder, ItemStateBuilder> builder) State of the Custom Line Item in the Cart or Order.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.Number of Custom Line Items in the Cart or Order.setDiscountedPricePerQuantity
(Function<DiscountedLineItemPriceForQuantityBuilder, DiscountedLineItemPriceForQuantity> builder) Discounted price of a single quantity of the Custom Line Item.Tax Rate per Shipping Method for a Cart withMultiple
ShippingMode.setState
(Function<ItemStateBuilder, ItemState> builder) State of the Custom Line Item in the Cart or Order.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.State of the Custom Line Item in the Cart or Order.State of the Custom Line Item in the Cart or Order.taxCategory
(TaxCategoryReference taxCategory) Used to select a Tax Rate when a Cart has thePlatform
TaxMode.Used to select a Tax Rate when a Cart has thePlatform
TaxMode.taxedPrice
(TaxedItemPrice taxedPrice) Automatically set after thetaxRate
is set.Automatically set after thetaxRate
is 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 withPlatform
TaxMode, thetaxRate
of Custom Line Items is set automatically once a shipping address is set.taxRate
(Function<TaxRateBuilder, TaxRateBuilder> builder) For a Cart withPlatform
TaxMode, thetaxRate
of Custom Line Items is set automatically once a shipping address is set.totalPrice
(CentPrecisionMoney totalPrice) Total price of the Custom Line Item (money
multiplied byquantity
).Total price of the Custom Line Item (money
multiplied 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 withMultiple
ShippingMode.Container for Custom Line Item-specific addresses.withState
(Function<ItemStateBuilder, ItemStateBuilder> builder) State of the Custom Line Item in the Cart or Order.Used to select a Tax Rate when a Cart has thePlatform
TaxMode.Automatically set after thetaxRate
is 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 withPlatform
TaxMode, thetaxRate
of Custom Line Items is set automatically once a shipping address is set.Total price of the Custom Line Item (money
multiplied 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
taxRate
is set.- Parameters:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
withTaxedPrice
Automatically set after the
taxRate
is set.- Parameters:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
taxedPrice
Automatically set after the
taxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is 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 (
money
multiplied byquantity
). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantity
multiplied byquantity
.Includes taxes if the TaxRate
includedInPrice
istrue
.- 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 (
money
multiplied byquantity
). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantity
multiplied byquantity
.Includes taxes if the TaxRate
includedInPrice
istrue
.- Parameters:
builder
- function to build the totalPrice value- Returns:
- Builder
-
totalPrice
Total price of the Custom Line Item (
money
multiplied byquantity
). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantity
multiplied byquantity
.Includes taxes if the TaxRate
includedInPrice
istrue
.- 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
Number of Custom Line Items in the Cart or Order.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
state
State of the Custom Line Item in the Cart or Order.
- Parameters:
state
- value to be set- Returns:
- Builder
-
state
State of the Custom Line Item in the Cart or Order.
- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
State of the Custom Line Item in the Cart or Order.
- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
State of the Custom Line Item in the Cart or Order.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
State of the Custom Line Item in the Cart or Order.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
addState
State of the Custom Line Item in the Cart or Order.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
setState
State of the Custom Line Item in the Cart or 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
Platform
TaxMode.- 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
Platform
TaxMode.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
Used to select a Tax Rate when a Cart has the
Platform
TaxMode.- Parameters:
taxCategory
- value to be set- Returns:
- Builder
-
taxRate
- For a Cart with
Platform
TaxMode, thetaxRate
of 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
External
TaxMode, thetaxRate
of 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
Platform
TaxMode, thetaxRate
of 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
External
TaxMode, thetaxRate
of 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
Platform
TaxMode, thetaxRate
of 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
External
TaxMode, thetaxRate
of 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
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
-
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
taxRate
is 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
Multiple
ShippingMode. Automatically set afterperMethodTaxRate
is set.- Returns:
- taxedPricePortions
-
getTotalPrice
Total price of the Custom Line Item (
money
multiplied byquantity
). If the Custom Line Item is discounted, the total price isdiscountedPricePerQuantity
multiplied byquantity
.Includes taxes if the TaxRate
includedInPrice
istrue
.- 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
Number of Custom Line Items in the Cart or Order.
- Returns:
- quantity
-
getState
State of the Custom Line Item in the Cart or Order.
- Returns:
- state
-
getTaxCategory
Used to select a Tax Rate when a Cart has the
Platform
TaxMode.- Returns:
- taxCategory
-
getTaxRate
- For a Cart with
Platform
TaxMode, thetaxRate
of 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
External
TaxMode, thetaxRate
of Custom Line Items can be set using ExternalTaxRateDraft.
- Returns:
- taxRate
- For a Cart with
-
getPerMethodTaxRate
Tax Rate per Shipping Method for a Cart with
Multiple
ShippingMode. For a Cart withPlatform
TaxMode it is automatically set after the Shipping Method is added. For a Cart withExternal
TaxMode, 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
-
build
builds CustomLineItem with checking for non-null required values- Specified by:
build
in 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
-