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)
.price(priceBuilder -> priceBuilder)
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddState
(Function<ItemStateBuilder, ItemState> builder) add the value to the state using the builder functionbuild()
builds LineItemImportDraft with checking for non-null required valuesbuilds LineItemImportDraft without checking for non-null required valuesCustom Fields for this Line Item.custom
(Function<CustomBuilder, CustomBuilder> builder) Custom Fields for this Line Item.distributionChannel
(ChannelKeyReference distributionChannel) Maps toLineItem.distributionChannel
.Maps toLineItem.distributionChannel
.Custom Fields for this Line Item.Maps toLineItem.distributionChannel
.getName()
Maps toLineItem.name
.getPrice()
Maps toLineItem.price
.Maps toLineItem.productId
.Maps toLineItem.quantity
.Maps to LineItem.shippingDetails.getState()
value of state}Maps toLineItem.supplyChannel
.Maps toLineItem.taxRate
.Maps toProductVariantImportDraft
.name
(LocalizedString name) Maps toLineItem.name
.Maps toLineItem.name
.static LineItemImportDraftBuilder
of()
factory method for an instance of LineItemImportDraftBuilderstatic LineItemImportDraftBuilder
of
(LineItemImportDraft template) create builder for LineItemImportDraft instanceadd values to the stateplusState
(Function<ItemStateBuilder, ItemStateBuilder> builder) add the value to the state using the builder functionprice
(LineItemPrice price) Maps toLineItem.price
.Maps toLineItem.price
.product
(ProductKeyReference product) Maps toLineItem.productId
.Maps toLineItem.productId
.Maps toLineItem.quantity
.setState
(Function<ItemStateBuilder, ItemState> builder) set the value to the state using the builder functionshippingDetails
(ItemShippingDetailsDraft shippingDetails) Maps to LineItem.shippingDetails.Maps to LineItem.shippingDetails.set values to the stateset value to the statesupplyChannel
(ChannelKeyReference supplyChannel) Maps toLineItem.supplyChannel
.Maps toLineItem.supplyChannel
.Maps toLineItem.taxRate
.taxRate
(Function<TaxRateBuilder, TaxRateBuilder> builder) Maps toLineItem.taxRate
.variant
(LineItemProductVariantImportDraft variant) Maps toProductVariantImportDraft
.variant
(Function<LineItemProductVariantImportDraftBuilder, LineItemProductVariantImportDraftBuilder> builder) Maps toProductVariantImportDraft
.withCustom
(Function<CustomBuilder, Custom> builder) Custom Fields for this Line Item.Maps toLineItem.distributionChannel
.Maps toLineItem.name
.withPrice
(Function<LineItemPriceBuilder, LineItemPrice> builder) Maps toLineItem.price
.Maps toLineItem.productId
.Maps to LineItem.shippingDetails.withState
(Function<ItemStateBuilder, ItemStateBuilder> builder) set the value to the state using the builder functionMaps toLineItem.supplyChannel
.withTaxRate
(Function<TaxRateBuilder, TaxRate> builder) Maps toLineItem.taxRate
.withVariant
(Function<LineItemProductVariantImportDraftBuilder, LineItemProductVariantImportDraft> builder) Maps toProductVariantImportDraft
.
-
Constructor Details
-
LineItemImportDraftBuilder
public LineItemImportDraftBuilder()
-
-
Method Details
-
product
public LineItemImportDraftBuilder product(Function<ProductKeyReferenceBuilder, ProductKeyReferenceBuilder> builder) Maps to
LineItem.productId
.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public LineItemImportDraftBuilder withProduct(Function<ProductKeyReferenceBuilder, ProductKeyReference> builder) Maps to
LineItem.productId
.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
Maps to
LineItem.productId
.- Parameters:
product
- value to be set- Returns:
- Builder
-
name
public LineItemImportDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
LineItem.name
.- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public LineItemImportDraftBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Maps to
LineItem.name
.- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Maps to
LineItem.name
.- Parameters:
name
- value to be set- Returns:
- Builder
-
variant
public LineItemImportDraftBuilder variant(Function<LineItemProductVariantImportDraftBuilder, LineItemProductVariantImportDraftBuilder> builder) Maps to
ProductVariantImportDraft
.- Parameters:
builder
- function to build the variant value- Returns:
- Builder
-
withVariant
public LineItemImportDraftBuilder withVariant(Function<LineItemProductVariantImportDraftBuilder, LineItemProductVariantImportDraft> builder) Maps to
ProductVariantImportDraft
.- Parameters:
builder
- function to build the variant value- Returns:
- Builder
-
variant
Maps to
ProductVariantImportDraft
.- Parameters:
variant
- value to be set- Returns:
- Builder
-
price
public LineItemImportDraftBuilder price(Function<LineItemPriceBuilder, LineItemPriceBuilder> builder) Maps to
LineItem.price
.- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
withPrice
Maps to
LineItem.price
.- Parameters:
builder
- function to build the price value- Returns:
- Builder
-
price
Maps to
LineItem.price
.- Parameters:
price
- value to be set- Returns:
- Builder
-
quantity
Maps to
LineItem.quantity
.- Parameters:
quantity
- value to be set- Returns:
- Builder
-
state
set values to the state- Parameters:
state
- value to be set- Returns:
- Builder
-
state
set value to the state- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
add values to the state- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
add the value to the state using the builder function- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
set the value to the state using the builder function- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
addState
add the value to the state using the builder function- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
setState
set the value to the state using the builder function- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
supplyChannel
public LineItemImportDraftBuilder supplyChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Maps to
LineItem.supplyChannel
. The Reference to the Supply Channel with which the LineItem is associated. If referenced Supply Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Supply Channel is created.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public LineItemImportDraftBuilder withSupplyChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) Maps to
LineItem.supplyChannel
. The Reference to the Supply Channel with which the LineItem is associated. If referenced Supply Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Supply Channel is created.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
Maps to
LineItem.supplyChannel
. The Reference to the Supply Channel with which the LineItem is associated. If referenced Supply Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Supply Channel is created.- Parameters:
supplyChannel
- value to be set- Returns:
- Builder
-
distributionChannel
public LineItemImportDraftBuilder distributionChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Maps to
LineItem.distributionChannel
. The Reference to the Distribution Channel with which the LineItem is associated. If referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Distribution Channel is created.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
withDistributionChannel
public LineItemImportDraftBuilder withDistributionChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) Maps to
LineItem.distributionChannel
. The Reference to the Distribution Channel with which the LineItem is associated. If referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Distribution Channel is created.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
distributionChannel
public LineItemImportDraftBuilder distributionChannel(@Nullable ChannelKeyReference distributionChannel) Maps to
LineItem.distributionChannel
. The Reference to the Distribution Channel with which the LineItem is associated. If referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Distribution Channel is created.- Parameters:
distributionChannel
- value to be set- Returns:
- Builder
-
taxRate
Maps to
LineItem.taxRate
.- Parameters:
builder
- function to build the taxRate value- Returns:
- Builder
-
withTaxRate
Maps to
LineItem.taxRate
.- Parameters:
builder
- function to build the taxRate value- Returns:
- Builder
-
taxRate
Maps to
LineItem.taxRate
.- Parameters:
taxRate
- value to be set- Returns:
- Builder
-
shippingDetails
public LineItemImportDraftBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Maps to LineItem.shippingDetails.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public LineItemImportDraftBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Maps to LineItem.shippingDetails.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public LineItemImportDraftBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Maps to LineItem.shippingDetails.
- Parameters:
shippingDetails
- value to be set- Returns:
- Builder
-
custom
Custom Fields for this Line Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields for this Line Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for this Line Item.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getProduct
Maps to
LineItem.productId
.- Returns:
- product
-
getName
Maps to
LineItem.name
.- Returns:
- name
-
getVariant
Maps to
ProductVariantImportDraft
.- Returns:
- variant
-
getPrice
Maps to
LineItem.price
.- Returns:
- price
-
getQuantity
Maps to
LineItem.quantity
.- Returns:
- quantity
-
getState
value of state}- Returns:
- state
-
getSupplyChannel
Maps to
LineItem.supplyChannel
. The Reference to the Supply Channel with which the LineItem is associated. If referenced Supply Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Supply Channel is created.- Returns:
- supplyChannel
-
getDistributionChannel
Maps to
LineItem.distributionChannel
. The Reference to the Distribution Channel with which the LineItem is associated. If referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Distribution Channel is created.- Returns:
- distributionChannel
-
getTaxRate
Maps to
LineItem.taxRate
.- Returns:
- taxRate
-
getShippingDetails
Maps to LineItem.shippingDetails.
- Returns:
- shippingDetails
-
getCustom
Custom Fields for this Line Item.
- 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
-