Class CustomLineItemImportDraftBuilder
- All Implemented Interfaces:
Builder<CustomLineItemImportDraft>
Example to create an instance using the builder pattern
CustomLineItemImportDraft customLineItemImportDraft = CustomLineItemImportDraft.builder()
.name(nameBuilder -> nameBuilder)
.slug("{slug}")
.quantity(0.3)
.money(moneyBuilder -> moneyBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddState
(Function<ItemStateBuilder, ItemState> builder) State of the Custom Line Items.build()
builds CustomLineItemImportDraft with checking for non-null required valuesbuilds CustomLineItemImportDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields of the CustomLineItem.Custom Fields of the CustomLineItem.Custom Fields of the CustomLineItem.getKey()
User-defined unique identifier of the Custom Line Item.getMoney()
The cost of individual items in the Custom Line Item.getName()
Name of the Custom Line Item.IfStandard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget are applied to the Custom Line Item. IfExternal
, Cart Discounts are not considered on the Custom Line Item.The number of items in the Custom Line Item.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 Items.Include a value to associate a Tax Category with the Custom Line Item.The tax rate used to calculate thetaxedPrice
of the Order.User-defined unique identifier of the Custom Line Item.The cost of individual items in the Custom Line Item.money
(Function<MoneyBuilder, MoneyBuilder> builder) The cost of individual items in 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 CustomLineItemImportDraftBuilderof
(CustomLineItemImportDraft template) create builder for CustomLineItemImportDraft instanceState of the Custom Line Items.plusState
(Function<ItemStateBuilder, ItemStateBuilder> builder) State of the Custom Line Items.priceMode
(CustomLineItemPriceMode priceMode) IfStandard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget are applied to the Custom Line Item. IfExternal
, Cart Discounts are not considered on the Custom Line Item.The number of items in the Custom Line Item.setState
(Function<ItemStateBuilder, ItemState> builder) State of the Custom Line Items.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.State of the Custom Line Items.State of the Custom Line Items.taxCategory
(TaxCategoryResourceIdentifier taxCategory) Include a value to associate a Tax Category with the Custom Line Item.taxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Include a value to associate a Tax Category with the Custom Line Item.The tax rate used to calculate thetaxedPrice
of the Order.taxRate
(Function<TaxRateBuilder, TaxRateBuilder> builder) The tax rate used to calculate thetaxedPrice
of the Order.Custom Fields of the CustomLineItem.withMoney
(Function<MoneyBuilder, Money> builder) The cost of individual items in the Custom Line Item.Name of the Custom Line Item.Container for Custom Line Item-specific addresses.withState
(Function<ItemStateBuilder, ItemStateBuilder> builder) State of the Custom Line Items.withTaxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Include a value to associate a Tax Category with the Custom Line Item.withTaxRate
(Function<TaxRateBuilder, TaxRate> builder) The tax rate used to calculate thetaxedPrice
of the Order.
-
Constructor Details
-
CustomLineItemImportDraftBuilder
public CustomLineItemImportDraftBuilder()
-
-
Method Details
-
name
public CustomLineItemImportDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the Custom Line Item.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public CustomLineItemImportDraftBuilder 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
-
slug
User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern
[a-zA-Z0-9_-]{2,256}
.- Parameters:
slug
- value to be set- Returns:
- Builder
-
quantity
The number of items in the Custom Line Item. Can be a negative value.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
money
The cost of individual items in the Custom Line Item. The amount can be negative.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
withMoney
The cost of individual items in the Custom Line Item. The amount can be negative.
- Parameters:
builder
- function to build the money value- Returns:
- Builder
-
money
The cost of individual items in the Custom Line Item. The amount can be negative.
- Parameters:
money
- value to be set- Returns:
- Builder
-
taxRate
The tax rate used to calculate the
taxedPrice
of the Order.- Parameters:
builder
- function to build the taxRate value- Returns:
- Builder
-
withTaxRate
The tax rate used to calculate the
taxedPrice
of the Order.- Parameters:
builder
- function to build the taxRate value- Returns:
- Builder
-
taxRate
The tax rate used to calculate the
taxedPrice
of the Order.- Parameters:
taxRate
- value to be set- Returns:
- Builder
-
taxCategory
public CustomLineItemImportDraftBuilder taxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Include a value to associate a Tax Category with the Custom Line Item.
- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public CustomLineItemImportDraftBuilder withTaxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Include a value to associate a Tax Category with the Custom Line Item.
- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
public CustomLineItemImportDraftBuilder taxCategory(@Nullable TaxCategoryResourceIdentifier taxCategory) Include a value to associate a Tax Category with the Custom Line Item.
- Parameters:
taxCategory
- value to be set- Returns:
- Builder
-
priceMode
- If
Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget 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
-
shippingDetails
public CustomLineItemImportDraftBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Container for Custom Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public CustomLineItemImportDraftBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Custom Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public CustomLineItemImportDraftBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Container for Custom Line Item-specific addresses.
- Parameters:
shippingDetails
- value to be set- Returns:
- Builder
-
state
State of the Custom Line Items.
- Parameters:
state
- value to be set- Returns:
- Builder
-
state
State of the Custom Line Items.
- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
State of the Custom Line Items.
- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
public CustomLineItemImportDraftBuilder plusState(Function<ItemStateBuilder, ItemStateBuilder> builder) State of the Custom Line Items.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public CustomLineItemImportDraftBuilder withState(Function<ItemStateBuilder, ItemStateBuilder> builder) State of the Custom Line Items.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
addState
State of the Custom Line Items.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
setState
State of the Custom Line Items.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
custom
public CustomLineItemImportDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields of the CustomLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public CustomLineItemImportDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields of the CustomLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the CustomLineItem.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getName
Name of the Custom Line Item.
- Returns:
- name
-
getKey
User-defined unique identifier of the Custom Line Item.
- Returns:
- key
-
getSlug
User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern
[a-zA-Z0-9_-]{2,256}
.- Returns:
- slug
-
getQuantity
The number of items in the Custom Line Item. Can be a negative value.
- Returns:
- quantity
-
getMoney
The cost of individual items in the Custom Line Item. The amount can be negative.
- Returns:
- money
-
getTaxRate
The tax rate used to calculate the
taxedPrice
of the Order.- Returns:
- taxRate
-
getTaxCategory
Include a value to associate a Tax Category with the Custom Line Item.
- Returns:
- taxCategory
-
getPriceMode
- If
Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget are applied to the Custom Line Item. - If
External
, Cart Discounts are not considered on the Custom Line Item.
- Returns:
- priceMode
- If
-
getShippingDetails
Container for Custom Line Item-specific addresses.
- Returns:
- shippingDetails
-
getState
State of the Custom Line Items.
- Returns:
- state
-
getCustom
Custom Fields of the CustomLineItem.
- Returns:
- custom
-
build
builds CustomLineItemImportDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomLineItemImportDraft>
- Returns:
- CustomLineItemImportDraft
-
buildUnchecked
builds CustomLineItemImportDraft without checking for non-null required values- Returns:
- CustomLineItemImportDraft
-
of
factory method for an instance of CustomLineItemImportDraftBuilder- Returns:
- builder
-
of
create builder for CustomLineItemImportDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-