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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddState
(Function<ItemStateBuilder, ItemState> builder) Maps toLineItem.state
.build()
builds LineItemImportDraft with checking for non-null required valuesbuilds LineItemImportDraft without checking for non-null required valuesMaps toLineItem.custom
.custom
(Function<CustomBuilder, CustomBuilder> builder) Maps toLineItem.custom
.distributionChannel
(ChannelKeyReference distributionChannel) Maps toLineItem.distributionChannel
.Maps toLineItem.distributionChannel
.Maps toLineItem.custom
.Maps toLineItem.distributionChannel
.getName()
Maps toLineItem.name
.getPrice()
Maps toLineItem.price
.Maps toLineItem.productId
.Maps toLineItem.quantity
.Maps toLineItem.shippingDetails
.getState()
Maps toLineItem.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 instanceMaps toLineItem.state
.plusState
(Function<ItemStateBuilder, ItemStateBuilder> builder) Maps toLineItem.state
.price
(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) Maps toLineItem.state
.shippingDetails
(ItemShippingDetailsDraft shippingDetails) Maps toLineItem.shippingDetails
.Maps toLineItem.shippingDetails
.Maps toLineItem.state
.Maps toLineItem.state
.supplyChannel
(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) Maps toLineItem.custom
.Maps toLineItem.distributionChannel
.Maps toLineItem.name
.withPrice
(Function<LineItemPriceBuilder, LineItemPrice> builder) Maps toLineItem.price
.Maps toLineItem.productId
.Maps toLineItem.shippingDetails
.withState
(Function<ItemStateBuilder, ItemStateBuilder> builder) Maps toLineItem.state
.Maps 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
. If the referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Product is created.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public LineItemImportDraftBuilder withProduct(Function<ProductKeyReferenceBuilder, ProductKeyReference> builder) Maps to
LineItem.productId
. If the referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Product is created.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
Maps to
LineItem.productId
. If the referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Product is created.- 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
Maps to
LineItem.state
.- Parameters:
state
- value to be set- Returns:
- Builder
-
state
Maps to
LineItem.state
.- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
Maps to
LineItem.state
.- Parameters:
state
- value to be set- Returns:
- Builder
-
plusState
Maps to
LineItem.state
.- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
Maps to
LineItem.state
.- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
addState
Maps to
LineItem.state
.- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
setState
Maps to
LineItem.state
.- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
supplyChannel
public LineItemImportDraftBuilder supplyChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Maps to
LineItem.supplyChannel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced 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
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
Maps to
LineItem.supplyChannel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Parameters:
supplyChannel
- value to be set- Returns:
- Builder
-
distributionChannel
public LineItemImportDraftBuilder distributionChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Maps to
LineItem.distributionChannel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced 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
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
distributionChannel
public LineItemImportDraftBuilder distributionChannel(@Nullable ChannelKeyReference distributionChannel) Maps to
LineItem.distributionChannel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced 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
Maps to
LineItem.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Maps to
LineItem.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Maps to
LineItem.custom
.- Parameters:
custom
- value to be set- Returns:
- Builder
-
getProduct
Maps to
LineItem.productId
. If the referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Product is created.- 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
Maps to
LineItem.state
.- Returns:
- state
-
getSupplyChannel
Maps to
LineItem.supplyChannel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Returns:
- supplyChannel
-
getDistributionChannel
Maps to
LineItem.distributionChannel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Returns:
- distributionChannel
-
getTaxRate
Maps to
LineItem.taxRate
.- Returns:
- taxRate
-
getShippingDetails
Maps to
LineItem.shippingDetails
.- Returns:
- shippingDetails
-
getCustom
Maps to
LineItem.custom
.- 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
-