Class StagedOrderAddLineItemActionBuilder
- All Implemented Interfaces:
Builder<StagedOrderAddLineItemAction>
Example to create an instance using the builder pattern
StagedOrderAddLineItemAction stagedOrderAddLineItemAction = StagedOrderAddLineItemAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddedAt
(ZonedDateTime addedAt) Date and time (UTC) the Product Variant is added to the Cart.build()
builds StagedOrderAddLineItemAction with checking for non-null required valuesbuilds StagedOrderAddLineItemAction without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the Line Item.Custom Fields for the Line Item.distributionChannel
(ChannelResourceIdentifier distributionChannel) Used to select a Product Price.distributionChannel
(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Used to select a Product Price.externalPrice
(Money externalPrice) Sets the LineItemprice
value, and thepriceMode
toExternalPrice
LineItemPriceMode.externalPrice
(Function<MoneyBuilder, MoneyBuilder> builder) Sets the LineItemprice
value, and thepriceMode
toExternalPrice
LineItemPriceMode.externalTaxRate
(ExternalTaxRateDraft externalTaxRate) Sets the external Tax Rate for the Line Item, if the Cart has theExternal
TaxMode.Sets the external Tax Rate for the Line Item, if the Cart has theExternal
TaxMode.externalTotalPrice
(ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItemprice
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.externalTotalPrice
(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItemprice
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.Date and time (UTC) the Product Variant is added to the Cart.Custom Fields for the Line Item.Used to select a Product Price.Sets the LineItemprice
value, and thepriceMode
toExternalPrice
LineItemPriceMode.Sets the external Tax Rate for the Line Item, if the Cart has theExternal
TaxMode.Sets the LineItemprice
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.Inventory mode specific to the Line Item only, and valid for the entirequantity
of the Line Item.getKey()
User-defined unique identifier of the LineItem.id
of the published Product.Quantity of the Product Variant to add to the Cart.Container for Line Item-specific addresses.getSku()
SKU of the ProductVariant.Used to identify Inventory entries that must be reserved.id
of the ProductVariant in the Product.inventoryMode
(InventoryMode inventoryMode) Inventory mode specific to the Line Item only, and valid for the entirequantity
of the Line Item.User-defined unique identifier of the LineItem.of()
factory method for an instance of StagedOrderAddLineItemActionBuilderof
(StagedOrderAddLineItemAction template) create builder for StagedOrderAddLineItemAction instanceid
of the published Product.Quantity of the Product Variant to add to the Cart.shippingDetails
(ItemShippingDetailsDraft shippingDetails) Container for Line Item-specific addresses.Container for Line Item-specific addresses.SKU of the ProductVariant.supplyChannel
(ChannelResourceIdentifier supplyChannel) Used to identify Inventory entries that must be reserved.Used to identify Inventory entries that must be reserved.id
of the ProductVariant in the Product.Custom Fields for the Line Item.withDistributionChannel
(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Used to select a Product Price.withExternalPrice
(Function<MoneyBuilder, Money> builder) Sets the LineItemprice
value, and thepriceMode
toExternalPrice
LineItemPriceMode.Sets the external Tax Rate for the Line Item, if the Cart has theExternal
TaxMode.withExternalTotalPrice
(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItemprice
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.Container for Line Item-specific addresses.Used to identify Inventory entries that must be reserved.
-
Constructor Details
-
StagedOrderAddLineItemActionBuilder
public StagedOrderAddLineItemActionBuilder()
-
-
Method Details
-
key
User-defined unique identifier of the LineItem.
- Parameters:
key
- value to be set- Returns:
- Builder
-
productId
id
of the published Product.Either the
productId
andvariantId
, orsku
must be provided.- Parameters:
productId
- value to be set- Returns:
- Builder
-
variantId
id
of the ProductVariant in the Product. If not provided, the Master Variant is used.Either the
productId
andvariantId
, orsku
must be provided.- Parameters:
variantId
- value to be set- Returns:
- Builder
-
sku
SKU of the ProductVariant.
Either the
productId
andvariantId
, orsku
must be provided.- Parameters:
sku
- value to be set- Returns:
- Builder
-
quantity
Quantity of the Product Variant to add to the Cart.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
addedAt
Date and time (UTC) the Product Variant is added to the Cart. If not set, it defaults to the current date and time.
Optional for backwards compatibility reasons.
- Parameters:
addedAt
- value to be set- Returns:
- Builder
-
distributionChannel
public StagedOrderAddLineItemActionBuilder distributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Used to select a Product Price. The Channel must have the
ProductDistribution
ChannelRoleEnum. If the Cart is bound to a Store withdistributionChannels
set, the Channel must match one of the Store's distribution channels.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
withDistributionChannel
public StagedOrderAddLineItemActionBuilder withDistributionChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Used to select a Product Price. The Channel must have the
ProductDistribution
ChannelRoleEnum. If the Cart is bound to a Store withdistributionChannels
set, the Channel must match one of the Store's distribution channels.- Parameters:
builder
- function to build the distributionChannel value- Returns:
- Builder
-
distributionChannel
public StagedOrderAddLineItemActionBuilder distributionChannel(@Nullable ChannelResourceIdentifier distributionChannel) Used to select a Product Price. The Channel must have the
ProductDistribution
ChannelRoleEnum. If the Cart is bound to a Store withdistributionChannels
set, the Channel must match one of the Store's distribution channels.- Parameters:
distributionChannel
- value to be set- Returns:
- Builder
-
supplyChannel
public StagedOrderAddLineItemActionBuilder supplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupply
ChannelRoleEnum.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public StagedOrderAddLineItemActionBuilder withSupplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupply
ChannelRoleEnum.- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
public StagedOrderAddLineItemActionBuilder supplyChannel(@Nullable ChannelResourceIdentifier supplyChannel) Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupply
ChannelRoleEnum.- Parameters:
supplyChannel
- value to be set- Returns:
- Builder
-
externalPrice
public StagedOrderAddLineItemActionBuilder externalPrice(Function<MoneyBuilder, MoneyBuilder> builder) Sets the LineItem
price
value, and thepriceMode
toExternalPrice
LineItemPriceMode.- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
withExternalPrice
Sets the LineItem
price
value, and thepriceMode
toExternalPrice
LineItemPriceMode.- Parameters:
builder
- function to build the externalPrice value- Returns:
- Builder
-
externalPrice
Sets the LineItem
price
value, and thepriceMode
toExternalPrice
LineItemPriceMode.- Parameters:
externalPrice
- value to be set- Returns:
- Builder
-
externalTotalPrice
public StagedOrderAddLineItemActionBuilder externalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPriceBuilder> builder) Sets the LineItem
price
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
withExternalTotalPrice
public StagedOrderAddLineItemActionBuilder withExternalTotalPrice(Function<ExternalLineItemTotalPriceBuilder, ExternalLineItemTotalPrice> builder) Sets the LineItem
price
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.- Parameters:
builder
- function to build the externalTotalPrice value- Returns:
- Builder
-
externalTotalPrice
public StagedOrderAddLineItemActionBuilder externalTotalPrice(@Nullable ExternalLineItemTotalPrice externalTotalPrice) Sets the LineItem
price
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.- Parameters:
externalTotalPrice
- value to be set- Returns:
- Builder
-
externalTaxRate
public StagedOrderAddLineItemActionBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) Sets the external Tax Rate for the Line Item, if the Cart has the
External
TaxMode. If the Cart hasMultiple
ShippingMode, the Tax Rate is accepted but ignored.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public StagedOrderAddLineItemActionBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) Sets the external Tax Rate for the Line Item, if the Cart has the
External
TaxMode. If the Cart hasMultiple
ShippingMode, the Tax Rate is accepted but ignored.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
public StagedOrderAddLineItemActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate) Sets the external Tax Rate for the Line Item, if the Cart has the
External
TaxMode. If the Cart hasMultiple
ShippingMode, the Tax Rate is accepted but ignored.- Parameters:
externalTaxRate
- value to be set- Returns:
- Builder
-
inventoryMode
Inventory mode specific to the Line Item only, and valid for the entire
quantity
of the Line Item. Set only if the inventory mode should be different from theinventoryMode
specified on the Cart.- Parameters:
inventoryMode
- value to be set- Returns:
- Builder
-
shippingDetails
public StagedOrderAddLineItemActionBuilder shippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraftBuilder> builder) Container for Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
withShippingDetails
public StagedOrderAddLineItemActionBuilder withShippingDetails(Function<ItemShippingDetailsDraftBuilder, ItemShippingDetailsDraft> builder) Container for Line Item-specific addresses.
- Parameters:
builder
- function to build the shippingDetails value- Returns:
- Builder
-
shippingDetails
public StagedOrderAddLineItemActionBuilder shippingDetails(@Nullable ItemShippingDetailsDraft shippingDetails) Container for Line Item-specific addresses.
- Parameters:
shippingDetails
- value to be set- Returns:
- Builder
-
custom
public StagedOrderAddLineItemActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Line Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public StagedOrderAddLineItemActionBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Line Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Line Item.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier of the LineItem.
- Returns:
- key
-
getProductId
id
of the published Product.Either the
productId
andvariantId
, orsku
must be provided.- Returns:
- productId
-
getVariantId
id
of the ProductVariant in the Product. If not provided, the Master Variant is used.Either the
productId
andvariantId
, orsku
must be provided.- Returns:
- variantId
-
getSku
SKU of the ProductVariant.
Either the
productId
andvariantId
, orsku
must be provided.- Returns:
- sku
-
getQuantity
Quantity of the Product Variant to add to the Cart.
- Returns:
- quantity
-
getAddedAt
Date and time (UTC) the Product Variant is added to the Cart. If not set, it defaults to the current date and time.
Optional for backwards compatibility reasons.
- Returns:
- addedAt
-
getDistributionChannel
Used to select a Product Price. The Channel must have the
ProductDistribution
ChannelRoleEnum. If the Cart is bound to a Store withdistributionChannels
set, the Channel must match one of the Store's distribution channels.- Returns:
- distributionChannel
-
getSupplyChannel
Used to identify Inventory entries that must be reserved. The Channel must have the
InventorySupply
ChannelRoleEnum.- Returns:
- supplyChannel
-
getExternalPrice
Sets the LineItem
price
value, and thepriceMode
toExternalPrice
LineItemPriceMode.- Returns:
- externalPrice
-
getExternalTotalPrice
Sets the LineItem
price
andtotalPrice
values, and thepriceMode
toExternalTotal
LineItemPriceMode.- Returns:
- externalTotalPrice
-
getExternalTaxRate
Sets the external Tax Rate for the Line Item, if the Cart has the
External
TaxMode. If the Cart hasMultiple
ShippingMode, the Tax Rate is accepted but ignored.- Returns:
- externalTaxRate
-
getInventoryMode
Inventory mode specific to the Line Item only, and valid for the entire
quantity
of the Line Item. Set only if the inventory mode should be different from theinventoryMode
specified on the Cart.- Returns:
- inventoryMode
-
getShippingDetails
Container for Line Item-specific addresses.
- Returns:
- shippingDetails
-
getCustom
Custom Fields for the Line Item.
- Returns:
- custom
-
build
builds StagedOrderAddLineItemAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedOrderAddLineItemAction>
- Returns:
- StagedOrderAddLineItemAction
-
buildUnchecked
builds StagedOrderAddLineItemAction without checking for non-null required values- Returns:
- StagedOrderAddLineItemAction
-
of
factory method for an instance of StagedOrderAddLineItemActionBuilder- Returns:
- builder
-
of
create builder for StagedOrderAddLineItemAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-