Class LineItemImportDraftBuilder
- All Implemented Interfaces:
Builder<LineItemImportDraft>
Example to create an instance using the builder pattern
LineItemImportDraft lineItemImportDraft = LineItemImportDraft.builder()
.name(nameBuilder -> nameBuilder)
.variant(variantBuilder -> variantBuilder)
.quantity(0.3)
.price(priceBuilder -> priceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddState
(Function<ItemStateBuilder, ItemState> builder) States of the Line Item.build()
builds LineItemImportDraft with checking for non-null required valuesbuilds LineItemImportDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields of the LineItem.Custom Fields of the LineItem.distributionChannel
(ChannelResourceIdentifier distributionChannel) The Channel used to select a Price.distributionChannel
(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) The Channel used to select a Price.Custom Fields of the LineItem.The Channel used to select a Price.Inventory mode specific to the LineItem, valid for the entirequantity
of the LineItem.getKey()
User-defined unique identifier of the Line Item.getName()
Name of the Line Item.getPrice()
The Line Item price forquantity
=1
.id
of the Product the Product Variant belongs to.The number of Product Variants in the LineItem.Container for Line Item-specific addresses.getState()
States of the Line Item.The Channel used to supply Line Items.The tax rate used to calculate thetaxedPrice
of the Order.The Product Variant to use as a Line Item.inventoryMode
(InventoryMode inventoryMode) Inventory mode specific to the LineItem, valid for the entirequantity
of the LineItem.User-defined unique identifier of the Line Item.name
(LocalizedString name) Name of the Line Item.Name of the Line Item.static LineItemImportDraftBuilder
of()
factory method for an instance of LineItemImportDraftBuilderstatic LineItemImportDraftBuilder
of
(LineItemImportDraft template) create builder for LineItemImportDraft instanceStates of the Line Item.plusState
(Function<ItemStateBuilder, ItemStateBuilder> builder) States of the Line Item.price
(PriceDraft price) The Line Item price forquantity
=1
.price
(Function<PriceDraftBuilder, PriceDraftBuilder> builder) The Line Item price forquantity
=1
.id
of the Product the Product Variant belongs to.The number of Product Variants in the LineItem.setState
(Function<ItemStateBuilder, ItemState> builder) States of the Line Item.shippingDetails
(ItemShippingDetailsDraft shippingDetails) Container for Line Item-specific addresses.Container for Line Item-specific addresses.States of the Line Item.States of the Line Item.supplyChannel
(ChannelResourceIdentifier supplyChannel) The Channel used to supply Line Items.The Channel used to supply Line Items.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.variant
(ProductVariantImportDraft variant) The Product Variant to use as a Line Item.The Product Variant to use as a Line Item.Custom Fields of the LineItem.withDistributionChannel
(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) The Channel used to select a Price.Name of the Line Item.withPrice
(Function<PriceDraftBuilder, PriceDraft> builder) The Line Item price forquantity
=1
.Container for Line Item-specific addresses.withState
(Function<ItemStateBuilder, ItemStateBuilder> builder) States of the Line Item.The Channel used to supply Line Items.withTaxRate
(Function<TaxRateBuilder, TaxRate> builder) The tax rate used to calculate thetaxedPrice
of the Order.The Product Variant to use as a Line Item.
-
Constructor Details
-
LineItemImportDraftBuilder
public LineItemImportDraftBuilder()
-
-
Method Details
-
name
public LineItemImportDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the Line Item.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public LineItemImportDraftBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the Line Item.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the Line Item.
- Parameters:
name
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Line Item.
- Parameters:
key
- value to be set- Returns:
- Builder
-
variant
public LineItemImportDraftBuilder variant(Function<ProductVariantImportDraftBuilder, ProductVariantImportDraftBuilder> builder) The Product Variant to use as a Line Item.
- Parameters:
builder
- function to build the variant value- Returns:
- Builder
-
withVariant
public LineItemImportDraftBuilder withVariant(Function<ProductVariantImportDraftBuilder, ProductVariantImportDraft> builder) The Product Variant to use as a Line Item.
- Parameters:
builder
- function to build the variant value- Returns:
- Builder
-
variant
The Product Variant to use as a Line Item.
- Parameters:
variant
- value to be set- Returns:
- Builder
-
productId
id
of the Product the Product Variant belongs to.If provided, you must also set
variant.id
.- Parameters:
productId
- value to be set- Returns:
- Builder
-
quantity
The number of Product Variants in the LineItem. Can be a negative value.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
price
The Line Item price for
quantity
=1
. The amount can be negative.- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
withPrice
The Line Item price for
quantity
=1
. The amount can be negative.- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
price
The Line Item price for
quantity
=1
. The amount can be negative.- Parameters:
price
- 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
-
distributionChannel
public LineItemImportDraftBuilder distributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) The Channel used to select a Price. This Channel must have the
ProductDistribution
role.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
withDistributionChannel
public LineItemImportDraftBuilder withDistributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) The Channel used to select a Price. This Channel must have the
ProductDistribution
role.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
distributionChannel
public LineItemImportDraftBuilder distributionChannel(@Nullable ChannelResourceIdentifier distributionChannel) The Channel used to select a Price. This Channel must have the
ProductDistribution
role.- Parameters:
distributionChannel
- value to be set- Returns:
- Builder
-
supplyChannel
public LineItemImportDraftBuilder supplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) The Channel used to supply Line Items. By providing supply Channel information, you can uniquely identify Inventory entries that should be reserved. This Channel must have the
InventorySupply
role.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public LineItemImportDraftBuilder withSupplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) The Channel used to supply Line Items. By providing supply Channel information, you can uniquely identify Inventory entries that should be reserved. This Channel must have the
InventorySupply
role.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
The Channel used to supply Line Items. By providing supply Channel information, you can uniquely identify Inventory entries that should be reserved. This Channel must have the
InventorySupply
role.- Parameters:
supplyChannel
- value to be set- Returns:
- Builder
-
inventoryMode
Inventory mode specific to the LineItem, valid for the entire
quantity
of the LineItem. Set only if Inventory mode should be different from theinventoryMode
specified on the OrderImportDraft.- Parameters:
inventoryMode
- value to be set- Returns:
- Builder
-
shippingDetails
public LineItemImportDraftBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Container for Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public LineItemImportDraftBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public LineItemImportDraftBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Container for Line Item-specific addresses.
- Parameters:
shippingDetails
- value to be set- Returns:
- Builder
-
state
States of the Line Item.
- Parameters:
state
- value to be set- Returns:
- Builder
-
state
States of the Line Item.
- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
States of the Line Item.
- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
States of the Line Item.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
States of the Line Item.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
addState
States of the Line Item.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
setState
States of the Line Item.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
custom
public LineItemImportDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields of the LineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public LineItemImportDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields of the LineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the LineItem.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getName
Name of the Line Item.
- Returns:
- name
-
getKey
User-defined unique identifier of the Line Item.
- Returns:
- key
-
getVariant
The Product Variant to use as a Line Item.
- Returns:
- variant
-
getProductId
id
of the Product the Product Variant belongs to.If provided, you must also set
variant.id
.- Returns:
- productId
-
getQuantity
The number of Product Variants in the LineItem. Can be a negative value.
- Returns:
- quantity
-
getPrice
The Line Item price for
quantity
=1
. The amount can be negative.- Returns:
- price
-
getTaxRate
The tax rate used to calculate the
taxedPrice
of the Order.- Returns:
- taxRate
-
getDistributionChannel
The Channel used to select a Price. This Channel must have the
ProductDistribution
role.- Returns:
- distributionChannel
-
getSupplyChannel
The Channel used to supply Line Items. By providing supply Channel information, you can uniquely identify Inventory entries that should be reserved. This Channel must have the
InventorySupply
role.- Returns:
- supplyChannel
-
getInventoryMode
Inventory mode specific to the LineItem, valid for the entire
quantity
of the LineItem. Set only if Inventory mode should be different from theinventoryMode
specified on the OrderImportDraft.- Returns:
- inventoryMode
-
getShippingDetails
Container for Line Item-specific addresses.
- Returns:
- shippingDetails
-
getState
States of the Line Item.
- Returns:
- state
-
getCustom
Custom Fields of the LineItem.
- Returns:
- custom
-
build
builds LineItemImportDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<LineItemImportDraft>
- Returns:
- LineItemImportDraft
-
buildUnchecked
builds LineItemImportDraft without checking for non-null required values- Returns:
- LineItemImportDraft
-
of
factory method for an instance of LineItemImportDraftBuilder- Returns:
- builder
-
of
create builder for LineItemImportDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-