Class StagedOrderAddCustomLineItemActionBuilder
- All Implemented Interfaces:
Builder<StagedOrderAddCustomLineItemAction>
Example to create an instance using the builder pattern
StagedOrderAddCustomLineItemAction stagedOrderAddCustomLineItemAction = StagedOrderAddCustomLineItemAction.builder()
.money(moneyBuilder -> moneyBuilder)
.name(nameBuilder -> nameBuilder)
.slug("{slug}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StagedOrderAddCustomLineItemAction with checking for non-null required valuesbuilds StagedOrderAddCustomLineItemAction without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the Custom Line Item.Custom Fields for the Custom Line Item.externalTaxRate
(ExternalTaxRateDraft externalTaxRate) An external Tax Rate can be set if the Cart has theExternal
TaxMode.An external Tax Rate can be set if the Cart has theExternal
TaxMode.Custom Fields for the Custom Line Item.An external Tax Rate can be set if the Cart has theExternal
TaxMode.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.IfStandard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item. IfExternal
, Cart Discounts are not considered on the Custom Line Item.Number of Custom Line Items to add to the Cart.Container for Custom Line Item-specific addresses.getSlug()
User-defined identifier used in a deep-link URL for the Custom Line Item.Used to select a Tax Rate when a Cart has thePlatform
TaxMode.User-defined unique identifier of the Custom Line Item.Money value of the Custom Line Item.money
(Function<MoneyBuilder, MoneyBuilder> builder) Money value of the Custom Line Item.name
(LocalizedString name) Name of the Custom Line Item.Name of the Custom Line Item.of()
factory method for an instance of StagedOrderAddCustomLineItemActionBuilderof
(StagedOrderAddCustomLineItemAction template) create builder for StagedOrderAddCustomLineItemAction instancepriceMode
(CustomLineItemPriceMode priceMode) IfStandard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item. IfExternal
, Cart Discounts are not considered on the Custom Line Item.Number of Custom Line Items to add to the Cart.shippingDetails
(ItemShippingDetailsDraft 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.taxCategory
(TaxCategoryResourceIdentifier taxCategory) Used to select a Tax Rate when a Cart has thePlatform
TaxMode.taxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Used to select a Tax Rate when a Cart has thePlatform
TaxMode.Custom Fields for the Custom Line Item.An external Tax Rate can be set if the Cart has theExternal
TaxMode.withMoney
(Function<MoneyBuilder, Money> builder) Money value of the Custom Line Item.Name of the Custom Line Item.Container for Custom Line Item-specific addresses.withTaxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Used to select a Tax Rate when a Cart has thePlatform
TaxMode.
-
Constructor Details
-
StagedOrderAddCustomLineItemActionBuilder
public StagedOrderAddCustomLineItemActionBuilder()
-
-
Method Details
-
money
Money value of the Custom Line Item. The value can be negative.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
withMoney
Money value of the Custom Line Item. The value can be negative.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
money
Money value of the Custom Line Item. The value can be negative.
- Parameters:
money
- value to be set- Returns:
- Builder
-
name
public StagedOrderAddCustomLineItemActionBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the Custom Line Item.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public StagedOrderAddCustomLineItemActionBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) 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
-
key
User-defined unique identifier of the Custom Line Item.
- Parameters:
key
- value to be set- Returns:
- Builder
-
quantity
Number of Custom Line Items to add to the Cart.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
slug
User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern
[a-zA-Z0-9_-]{2,256}
.- Parameters:
slug
- value to be set- Returns:
- Builder
-
taxCategory
public StagedOrderAddCustomLineItemActionBuilder taxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Used to select a Tax Rate when a Cart has the
Platform
TaxMode. If TaxMode isPlatform
, this field must not be empty.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public StagedOrderAddCustomLineItemActionBuilder withTaxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Used to select a Tax Rate when a Cart has the
Platform
TaxMode. If TaxMode isPlatform
, this field must not be empty.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
public StagedOrderAddCustomLineItemActionBuilder taxCategory(@Nullable TaxCategoryResourceIdentifier taxCategory) Used to select a Tax Rate when a Cart has the
Platform
TaxMode. If TaxMode isPlatform
, this field must not be empty.- Parameters:
taxCategory
- value to be set- Returns:
- Builder
-
externalTaxRate
public StagedOrderAddCustomLineItemActionBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) An external Tax Rate can be set if the Cart has the
External
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public StagedOrderAddCustomLineItemActionBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) An external Tax Rate can be set if the Cart has the
External
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
public StagedOrderAddCustomLineItemActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate) An external Tax Rate can be set if the Cart has the
External
TaxMode.- Parameters:
externalTaxRate
- value to be set- Returns:
- Builder
-
shippingDetails
public StagedOrderAddCustomLineItemActionBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Container for Custom Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public StagedOrderAddCustomLineItemActionBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Custom Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public StagedOrderAddCustomLineItemActionBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Container for Custom Line Item-specific addresses.
- Parameters:
shippingDetails
- value to be set- Returns:
- Builder
-
priceMode
public StagedOrderAddCustomLineItemActionBuilder priceMode(@Nullable CustomLineItemPriceMode priceMode) - If
Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item. - If
External
, Cart Discounts are not considered on the Custom Line Item.
- Parameters:
priceMode
- value to be set- Returns:
- Builder
- If
-
custom
public StagedOrderAddCustomLineItemActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Custom Line Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public StagedOrderAddCustomLineItemActionBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Custom Line Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Custom Line Item.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getMoney
Money value of the Custom Line Item. The value can be negative.
- Returns:
- money
-
getName
Name of the Custom Line Item.
- Returns:
- name
-
getKey
User-defined unique identifier of the Custom Line Item.
- Returns:
- key
-
getQuantity
Number of Custom Line Items to add to the Cart.
- Returns:
- quantity
-
getSlug
User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern
[a-zA-Z0-9_-]{2,256}
.- Returns:
- slug
-
getTaxCategory
Used to select a Tax Rate when a Cart has the
Platform
TaxMode. If TaxMode isPlatform
, this field must not be empty.- Returns:
- taxCategory
-
getExternalTaxRate
An external Tax Rate can be set if the Cart has the
External
TaxMode.- Returns:
- externalTaxRate
-
getShippingDetails
Container for Custom Line Item-specific addresses.
- Returns:
- shippingDetails
-
getPriceMode
- If
Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item. - If
External
, Cart Discounts are not considered on the Custom Line Item.
- Returns:
- priceMode
- If
-
getCustom
Custom Fields for the Custom Line Item.
- Returns:
- custom
-
build
builds StagedOrderAddCustomLineItemAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedOrderAddCustomLineItemAction>
- Returns:
- StagedOrderAddCustomLineItemAction
-
buildUnchecked
builds StagedOrderAddCustomLineItemAction without checking for non-null required values- Returns:
- StagedOrderAddCustomLineItemAction
-
of
factory method for an instance of StagedOrderAddCustomLineItemActionBuilder- Returns:
- builder
-
of
public static StagedOrderAddCustomLineItemActionBuilder of(StagedOrderAddCustomLineItemAction template) create builder for StagedOrderAddCustomLineItemAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-